Subject: Not possible to use VLAN interface until parent is configured?
To: NetBSD-current Users <current-users@netbsd.org>
From: =?ISO-8859-1?Q?Johan_Ihr=E9n?= <johani@autonomica.se>
List: current-users
Date: 10/27/2004 11:29:07
This is a bunch of machines all running 2.0G from August 29.

I just ran into the strange situation that a bunch of vlan interfaces=20
on top of ste(4) just plain would not work at all. Nothing in, nothing=20=

out as far as I can tell (in this case the primary test was running=20
dhclient on a particular VLAN). While trying to get out of this mess=20
(it was a number of boxes with completely automated configurations that=20=

apparently wouldn't work with ste(4)) I configured adresses on the=20
parent interface, i.e. the raw ste0 in this case, and noted that some=20
time later I got an

ste0: device interrupt

and the the *vlans* started to work (the raw interface worked too, but=20=

that's less surprising).

Since I've used vlans before, but not with ste, I thought this may be a=20=

bug in the ste driver. So I switched a couple of the interfaces to=20
fxp(4)s. Same thing: no traffic until I configure the parent interface.=20=

Confusing.

Is this me being confused or is this the way NetBSD vlan interfaces are=20=

supposed to work? I'm pretty sure I remember that it didn't work like=20
this before (I think I've successfully used f.i. "dhclient" on a vlan=20
without a configured parent), but I no longer have any boxes left with=20=

older versions so I cannot easily verify that.

In my world VLANs are usually used *instead* of the raw interfaces. To=20=

use both at the same time is of course possible but mostly serve to=20
cause confusion and added complexity so I would much like to be able=20
not to do that.

Johan Ihr=E9n

PS. On the subject of vlans in NetBSD: I think it's unfortunate that=20
the actual interface is called "vlan", since that makes it very easy to=20=

mix up the *interface* used with the number of the 802.11q VLAN=20
*number*. I.e.

vlan0 vlan 1 vlanif fxp0
vlan1 vlan 0 vlanif fxp0

is arguably stupid, but it does show what I mean. I'd much rather have=20=

something a la

vlif0 vlan 0 parent fxp0
vlif1 vlan 1 parent fxp0

(note that ifconfig refers to "parent" not "vlanif") although I realize=20=

that backwards compatibility more or less rules such a change out.