Subject: 802.1Q tagged VLAN for NetBSD
To: None <tech-net@netbsd.org>
From: Michael Graff <explorer@flame.org>
List: tech-net
Date: 10/08/1999 00:26:40
I've poked around at the idea of supporting 802.1Q tagged VLAN
interfaces for NetBSD, but have yet to get very far past thinking
about it.  I believe the best way is to once again broach the subject
of subinterfaces, where there is a parent "physical" interface and any
number of children which have only per-logical-link attributes.

For instance, suppose I have fxp0 in my machine.  I could

	ifconfig fxp0 inet 1.2.3.4 netmask 0xffffff00

to set the interface address, or

	ifconfig fxp0 media 100baseTX-FDX

to set the media type.  On the first subinterface for fxp0, I could:

	ifconfig fxp0.0 inet 10.1.2.3 netmask 0xffffff00 vlan 42

to set the address, netmask, and virtual LAN id.  I could not,
however, ifconfig the media through fxp0.0 -- I'd have to use the
parent, fxp0.

This seems to scale very well with frame relay and VLAN logical links,
where many virtual interfaces sit on top of one physical link.  It
would also work for ATM, I would assume, but since I forgot all I know
about ATM (thankfully :) someone else will have to consider that.

I'd implement this by removing the interface address information from
the link-level physical interface structure, and hanging a linked list
of subinterface structures off the physical interface.  Some of this
is already being done for detaching PCMCIA ethernet cards, I believe.

Another thing I would love to get going is the concept of bonded
interfaces, where an address can be used on multiple interfaces.  Say,
two 100baseTX-FDX interfaces bonded into a single trunk, going to a
switch.

I don't yet know how these two can be combined, but I think having
them would help a lot in the "Net" part of NetBSD :)

--Michael