[Xorp-hackers] Doubt on VLAN implementation

Ben Greear greearb at candelatech.com
Wed Mar 19 09:31:19 PDT 2008


I've been poking at the VLAN code in FEA.  The part that probes the 
linux kernel seems
a bit strange.  First, if I read it correctly, it could end up with a 
iface:vif pair for
the VLAN, and also a parent_iface:vif pairing.

Second, is it possible to add virtual IPs on top of a VLAN (on top of an 
ethernet)?
It would seem not if the VLAN device is a vif instead of an interface.

Even if that works, Linux (2.6.23+) supports mac-vlans on top of 
ethernet and vlans on top of
mac-vlans (and vice-versa), and virtual ips on top of any of these.
That doesn't easily map to a single parent-child relationship.

My suggestion is to make VLANs (and all other net-devices) the same as 
'real' ethernet
interfaces, but store parameters in the iface to allow it to rebuild the 
virtual devices if
needed (parent-dev-name and VID for VLANs, parent-dev-name and MAC for 
mac-vlans,
and so forth.  This would require adding some new tags to the interface 
config logic,
including device type (vlan, mac-vlan, etc), vlan-id, MAC-addr, and 
maybe others for
new virtual devices.

Please also note that with the advent of network namespaces in Linux, it 
may be possible to have
VLANs with no visible parent device (it being in a different namespace).

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com> 
Candela Technologies Inc  http://www.candelatech.com




More information about the Xorp-hackers mailing list