I would like all of the physical interfaces on my system to live within a specific network namespace called "physical". It's easy enough to move devices over manually using commands like
ip link set enp2s0 netns physical and
iw phy phy0 set netns name physical, but I would like this to happen automatically both at boot and for any devices connected at runtime.
It seems like the best way to accomplish this would be via udev rules, or possibly some systemd magic.
My first thought was just to write a udev rule that runs the appropriate command, but I ran into a couple of questions I haven't been able to answer via my searches:
- How do I distinguish physical interfaces from virtual interfaces?
- How do I tell WLAN interfaces apart so I can issue the
iwcommand instead of the
- How do I get the name of a WLAN phy so I can pass it to the
I was hoping the above would be relatively straightforward, but I don't see any obvious distinguishing factors in