Feature request: ability to run on an interface using its altname #222

Open
opened 2025-06-05 21:05:44 +00:00 by jfly · 0 comments

Setting up data-mesher in a brand new clan is an awkward 2 step process right now: first you have to deploy Zerotier and check what the generated interface name is, and only then can you configure data-mesher to run on the appropriate interface.

For example, see my data-mesher configuration, which hardcodes a Zerotier interface name: https://github.com/jfly/snow/blob/067d31b6041367054c48a0ea091f96435e9d8779/flake-modules/clan.nix#L36-L41.

@lassulus recently taught me that Zerotier actually configures an altname for the Zerotier interface using the Zerotier network name. For example, my Zerotier network is named "mm":

$ ip addr show mm
3: zthjzvlscg: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2800 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether 9e:30:a4:49:aa:79 brd ff:ff:ff:ff:ff:ff
    altname mm
    inet6 fdd4:aa51:eed9:426:9f99:9316:a090:4428/88 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::9c30:a4ff:fe49:aa79/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever

Also see clan/clan-core#3876

Unfortunately, I tried to configure data-mesher to run on mm rather than zthjzvlscg, but that failed with the following

Jun 05 14:02:32 pattern data-mesher[29504]: Error: failed to create config from viper: failed to validate config: invalid config: failed to resolve ip addresses for interface "mm": failed to get network interface "mm": route ip+net: no such network interface
Setting up data-mesher in a brand new clan is an awkward 2 step process right now: first you have to deploy Zerotier and check what the generated interface name is, and only then can you configure data-mesher to run on the appropriate interface. For example, see my data-mesher configuration, which hardcodes a Zerotier interface name: https://github.com/jfly/snow/blob/067d31b6041367054c48a0ea091f96435e9d8779/flake-modules/clan.nix#L36-L41. @lassulus recently taught me that Zerotier actually configures an altname for the Zerotier interface using the Zerotier network name. For example, my Zerotier network is named "mm": ```console $ ip addr show mm 3: zthjzvlscg: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2800 qdisc fq_codel state UNKNOWN group default qlen 1000 link/ether 9e:30:a4:49:aa:79 brd ff:ff:ff:ff:ff:ff altname mm inet6 fdd4:aa51:eed9:426:9f99:9316:a090:4428/88 scope global valid_lft forever preferred_lft forever inet6 fe80::9c30:a4ff:fe49:aa79/64 scope link proto kernel_ll valid_lft forever preferred_lft forever ``` Also see https://git.clan.lol/clan/clan-core/pulls/3876 Unfortunately, I tried to configure data-mesher to run on `mm` rather than `zthjzvlscg`, but that failed with the following ``` Jun 05 14:02:32 pattern data-mesher[29504]: Error: failed to create config from viper: failed to validate config: invalid config: failed to resolve ip addresses for interface "mm": failed to get network interface "mm": route ip+net: no such network interface ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: clan/data-mesher#222