Hi folks,
- I’m facing an issue with configuring Thunderbolt network interfaces. Specifically, the following configuration works initially:
networking.interfaces = {
thunderbolt0.ipv4.addresses = [
{
address = "10.0.1.1";
prefixLength = 24;
}
];
thunderbolt1.ipv4.addresses = [
{
address = "10.0.2.1";
prefixLength = 24;
}
];
};
However, when I plug just the 2nd interface (thunderbolt1 in the above config), it shows up in the system as thunderbolt0, and thus has a mismatched IP wrt my client that’s connected to it over Thunderbolt.
How could I create stable network names for these?
I should note that initially, they show up in my system as such:
readlink -f /sys/class/net/thunderbolt0/device
/sys/devices/pci0000:00/0000:00:1b.4/0000:03:00.0/0000:04:00.0/0000:05:00.0/domain0/0-0/0-3/0-3.0
readlink -f /sys/class/net/thunderbolt1/device
/sys/devices/pci0000:00/0000:00:1b.4/0000:03:00.0/0000:04:00.0/0000:05:00.0/domain0/0-0/0-1/0-1.0
and if I plug just one of them, those paths remain stable.
I tried playing with services.udev.extraRules and systemd.network.links, but didn’t get far. Any advice on these or any other approaches truly appreciated!
- Alternatively, I tried creating a network bridge using
networking.bridges.thunderbolt.interfaces = ["thunderbolt0" "thunderbolt1"];
networking.interfaces.thunderbolt.ipv4.addresses = [
{
address = "10.0.1.1";
prefixLength = 24;
}
];
And that works great (and avoids the problem of relying on stable underlying interface names). However, when I plug in just one of Thunderbolt clients, it shows up as thunderbolt0, and then thunderbolt bridge fails to be brought up, because thunderbolt1 is missing. Is it possible to avoid its hard reliance on both underlying interfaces being present?
Thank you!