On Mon, Jun 09, 2014 at 03:22:43AM +1000, Darren Reed wrote: > On 9/06/2014 3:01 AM, Thor Lancelot Simon wrote: > > On Mon, Jun 09, 2014 at 02:45:19AM +1000, Darren Reed wrote: > >>> In Sun, Jun 08, 2014 at 10:56:50PM +1000, Darren Reed wrote: > >>>> > >>> ... > >>>> inet6 fe80::203:baff:fe34:a1f5%cas0 prefixlen 64 scopeid 0x6 > >>>> vlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > >>>> vlan: 200 parent: cas0 > >>>> address: 00:03:ba:34:a1:f5 > >>>> ... > >>>> vlan1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > >>>> vlan: 201 parent: cas0 > >>>> address: 00:03:ba:34:a1:f5 > >>> > >>>> I've got three interfaces with the same MAC address! > >>> > >>> This is correct. It is an error to connect two vlan interfaces on the > >>> same underlying physical network to the same layer 2 network. So the > >>> MAC address being the same can't cause problems. > >>> ... > >>> Note that the > >>> pathological case where you configure two vlan interfaces on the same > >>> physical interface with the _same_ vlanif, simulating dual-attach to the > >>> same physical LAN in the SunOS 4 case (which is where that was > >>> problematic) > >>> is also insane -- it's easy enough to work out why. > >> > >> I think you're wrong here. > >> > >> For example, what if I were to create two chroot environments on my > >> NetBSD box and I wanted to use a dedicated NIC and IP address for each? > >> And if I want each NIC to be its own vlan interface? > >> > >> Or what if I want to do virtual networking inside of NetBSD and create > >> a vwire between two vlan interfaces? > >> > >> Or connect both vlan interfaces to a virtual switch inside the kernel? > > > > Why do any of these require stacking two instances of vlan, with the same > > vlanif, on the same physical interface? > > In the first instance, because NetBSD vlan interfaces that have a vlanid > cannot exist without a hardware interface underneath them. So if you only > have one NIC, say bge0, then every vlan interface must have that under it.
Not so. We have virtual physical interfaces, too. > To put this another way, if I can plug bge0 and bge1 into the same LAN > and use them in whichever way, why can't I plug vlan0 and vlan1 both > into the same VLAN? Because if they're on the same physical interface, the semantics are unclear at best; and implementing this on some physical hardware (we do not have the luxury of pretending every interface in the world is a wm or bge) is difficult and seems likely to perform poorly. There are other ways to build equivalent configurations; why eat the hair instead of a hamburger? Thor
