VLAN subinterfaces
I wrote a script to handle persistent rules for network interfaces, but I noticed that VLAN subinterfaces have the same MAC address of the parent interface and I could not find in sysfs anything evident which I could use in a rule. The only difference I noticed is that the VLAN subinterfaces lack the device and drivers symlinks.
This problem affects anybody using VLANs, is there a good solution?
Signature · 13 lines
ciao, Marco ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Marco d'Itri
I wrote a script to handle persistent rules for network interfaces, but I noticed that VLAN subinterfaces have the same MAC address of the parent interface and I could not find in sysfs anything evident which I could use in a rule. The only difference I noticed is that the VLAN subinterfaces lack the device and drivers symlinks.
This problem affects anybody using VLANs, is there a good solution?
Another user (Debian bug #365248) reported that this applies to bridges too. Is adding DRIVER="?*" to the rules the correct workaround?
Signature · 13 lines
ciao, Marco ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 9 lines · Marco d'Itri
Quoted 6 lines · Marco d'Itri
I wrote a script to handle persistent rules for network interfaces, but I noticed that VLAN subinterfaces have the same MAC address of the parent interface and I could not find in sysfs anything evident which I could use in a rule. The only difference I noticed is that the VLAN subinterfaces lack the device and drivers symlinks. This problem affects anybody using VLANs, is there a good solution?
Quoted 4 lines
Another user (Debian bug #365248) reported that this applies to bridges too. Is adding DRIVER=="?*" to the rules the correct workaround?
What I do in my (modified Debian testing) firewall at work is rename the base device, and let the kernel handle the VLAN naming.
So I have a rule to rename the interface based on its MAC address, but also based on KERNEL=="eth*". The "base" interface gets created first, then renamed to "intif" or "extif" or whatever. Then the VLANs get created, but the sub-interface's name is already "intif.1" or "extif.16" or whatever, so it doesn't match the KERNEL=="eth*" part of the rule.
I'm not sure if checking KERNEL on a network device is correct, though, or whether something similar would be possible in either of these cases, but it might be worth considering.