Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Sep 2001 14:19:06 -0700
From:      Ulf Zimmermann <ulf@Alameda.net>
To:        hackers@FreeBSD.org
Subject:   Question about VLAN dot1q tagging in FreeBSD
Message-ID:  <20010904141906.B31175@seven.alameda.net>

next in thread | raw e-mail | index | archive | help
Got a question for the people who worked on the support. All my
experience is under 4.3-Release/-Stable/4.4-RC3. A while back
when I wanted to use dot1q tagging, it seems to work fine with
the expection that I wasn't able to get VLAN 1 (default VLAN) to
work.

Last night I setup dot1q tagging again on another machine and had
the same problem. Looking into packets sent down the trunk, I saw
that VLAN 1 wasn't tagged (I assume the dot1q spec tells so that
VLAN 1 packets aren't tagged, while other VLANs are). If this is
right, I think we should mention this in the man page. Here is a
copy of the current man page of ifconfig in regards to VLAN:

     vlan vlan_tag
             If the interface is a vlan pseudo interface, set the vlan tag
             value to vlan_tag.  This value is a 16-bit number which is used
             to create an 802.1Q vlan header for packets sent from the vlan
             interface.  Note that vlan and vlandev must both be set at the
             same time.

     vlandev iface
             If the interface is a vlan pseudo device, associate physical
             interface iface with it.  Packets transmitted through the vlan
             interface will be diverted to the specified physical interface
             iface with 802.1Q vlan encapsulation.  Packets with 802.1Q encap-
             sulation received by the parent interface with the correct vlan
             tag will be diverted to the associated vlan pseudo-interface.
             The vlan interface is assigned a copy of the parent interface's
             flags and the parent's ethernet address.  The vlandev and vlan
             must both be set at the same time.  If the vlan interface already
             has a physical interface associated with it, this command will
             fail.  To change the association to another physical interface,
             the existing association must be cleared first.

             Note: if the link0 flag is set on the vlan interface, the vlan
             pseudo interface's behavior changes: the link0 tells the vlan
             interface that the parent interface supports insertion and
             extraction of vlan tags on its own (usually in firmware) and that
             it should pass packets to and from the parent unaltered.

     -vlandev iface
             If the driver is a vlan pseudo device, disassociate the physical
             interface iface from it.  This breaks the link between the vlan
             interface and its parent, clears its vlan tag, flags and its link
             address and shuts the interface down.

My current config in the case I setup last night looks like this from /etc/rc.conf:

network_interfaces="fxp0 vlan2 lo0"
ifconfig_fxp0="inet 192.168.0.250 netmask 255.255.255.0 media 100basetx mediaopt full-duplex"
ifconfig_vlan2="inet 64.81.63.130 netmask 255.255.255.224 vlan 2 vlandev fxp0"

192.168.0.250 is my private LAN which is VLAN 1 on my switches. VLAN 2 and 3
are my external networks (DSL/Cable Modem).

My suggestion is to add to ifconfig man page something like this under "vlan vlan_tag":

             Note: VLAN 1 is not tagged and should be put directly on the physical
             interface.

-- 
Regards, Ulf.

---------------------------------------------------------------------
Ulf Zimmermann, 1525 Pacific Ave., Alameda, CA-94501, #: 510-865-0204

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010904141906.B31175>