!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

894 Members
Declaratively manage your switching, routing, wireless, tunneling and more.261 Servers

Load older messages


SenderMessageTime
23 Jun 2021
@hexa:lossy.networkhexain theory there is IFALIAS15:20:48
@hexa:lossy.networkhexa * in theory there is IFALIAS: ip link set alias somethinglongerthanfiveteencharacters dev lo 15:21:17
@linus.heckemann:matrix.mayflower.deLinux Hackermanyou can also patch your kernel, but YMMV :>15:21:41
@hexa:lossy.networkhexayeah, should be pretty straightforward with nixos, and I would really like to know where this breaks :D15:22:12
@linus.heckemann:matrix.mayflower.deLinux Hackermanhm, since it's part of uapi, it also won't help much, you'll also need to rebuild the world against patched kernel headers :>15:22:54
@kraftnix:matrix.orgkraftnixguess hacking the names down to 15 characters then setting an alias is the sanest solution? might need to add some assertions to ensure i don't get conflicting interface names after trimming the names15:24:49
@hexa:lossy.networkhexa
❯ rg "IFNAMSIZ" include/uapi/linux/if.h
32:#if __UAPI_DEF_IF_IFNAMSIZ
33:#define	IFNAMSIZ	16
15:24:51
@hexa:lossy.networkhexatbh, I don't know how to use aliases15:25:07
@hexa:lossy.networkhexaand whether any client software allows you to reference them15:25:22
@andreas.schraegle:helsinki-systems.deAndreas Schrägle
In reply to @kraftnix:matrix.org
guess hacking the names down to 15 characters then setting an alias is the sanest solution? might need to add some assertions to ensure i don't get conflicting interface names after trimming the names
you could calculate a crc or some hash with 15 characters output, to reduce collisions.
15:25:49
@linus.heckemann:matrix.mayflower.deLinux Hackerman ifname = s: builtins.substr 0 14 (builtins.hashString "sha256" s) 15:26:31
@andreas.schraegle:helsinki-systems.deAndreas Schrägleyou could also just use the interface index instead of the name. I'm sure that's equally convenient.15:26:48
@linus.heckemann:matrix.mayflower.deLinux Hackermanalthough that's using hexadecimal so there's a lot of room for improvements15:27:06
@kraftnix:matrix.orgkraftnix

It seems that when you let systemd-nspawn create network zones for you, it auto trims + adds an alias/altname, not sure how other things interact with the altname though

5: vb-wc-interpEGa@if2:  mtu 1500 qdisc noqueue master vz-test-wc-priv state UP group default qlen 1000
    link/ether 8a:df:07:8f:76:e5 brd ff:ff:ff:ff:ff:ff link-netnsid 1
    altname vb-wc-internal-zone1
    inet6 fe80::88df:7ff:fe8f:76e5/64 scope link
       valid_lft forever preferred_lft forever
15:27:07
@hexa:lossy.networkhexa
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    alias somethinglongerthanfiveteencharacters
❯ ip link show alias somethinglongerthanfiveteencharacters
Error: either "dev" is duplicate, or "somethinglongerthanfiveteencharacters" is a garbage.
❯ ip link show dev somethinglongerthanfiveteencharacters
Device "somethinglongerthanfiveteencharacters" does not exist.
15:28:09
@hexa:lossy.networkhexanot sure how to use that as a selector, too lazy to read the man page15:28:30
@kraftnix:matrix.orgkraftnixstill seems like a PIA :/15:28:46
@kraftnix:matrix.orgkraftnixheres me wishing for a magic solution that perfectly fits my usecase15:29:11
@kraftnix:matrix.orgkraftnix does systemd-networkd ever clean up networks that have been removed from systemd.network.networks without rebooting the entire machine? can you make it do a full reconfiguration without reboot or cleanup old networks manually? 23:56:40
24 Jun 2021
@tadfisher:matrix.orgtadfisher joined the room.03:42:30
@joerg:bethselamin.deMic92 (Old)
In reply to @kraftnix:matrix.org
does systemd-networkd ever clean up networks that have been removed from systemd.network.networks without rebooting the entire machine? can you make it do a full reconfiguration without reboot or cleanup old networks manually?
No it only adds stuff.
16:02:33
@joerg:bethselamin.deMic92 (Old)I have mixed feelings about that. Sometimes I prefer it this way.16:02:58
@kraftnix:matrix.orgkraftnixWould be nice if you could manually "flush" old devices/networks but oh well, I guess I'll just need to be careful not to change network names but maintain the same ipspace/subnet, i've had some weirdness with that (and noticed the old netdevs/works were not cleaned up).17:50:51
25 Jun 2021
@joerg:bethselamin.deMic92 (Old)I wonder if netplan solves any of these issues. But I guess not because than they would need to reimplement a lot of what networkd does.07:04:34
26 Jun 2021
@grahamc:nixos.org@grahamc:nixos.orgchanged room power levels.01:30:07
@grahamc:nixos.org@grahamc:nixos.org invited @mjolnir:nixos.orgmjolnir.01:51:11
@mjolnir:nixos.orgmjolnir joined the room.01:51:12
@antifuchs:asf.computerantifuchsit's been my experience that netplan doesn't really solve any issues, only creates new ways to experience the same issues but with less documentation03:35:44
@antifuchs:asf.computerantifuchs * it's been my experience that netplan doesn't really solve anything exciting, it only creates new ways to experience the same issues but with less documentation03:38:57
@washort:greyface.orgdashyaml 😬03:45:17

Show newer messages


Back to Room ListRoom Version: 6