summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorChris Cappuccio <chris@cvs.openbsd.org>2001-08-03 23:21:21 +0000
committerChris Cappuccio <chris@cvs.openbsd.org>2001-08-03 23:21:21 +0000
commitf5a456948912fe2334de6af3556c036bf63c117f (patch)
treef06b5d8fb896c08a1f6771233f64ceb45f2a4d5d /share
parent2b31e82237dabc508cbc2df2c9a840ed81cab1cc (diff)
Use IFCAP_VLAN_MTU and IFCAP_VLAN_HWTAGGING capabilities:
LINK0 disappears; we now set IFCAP_VLAN_HWTAGGING at ifnet->if_capabilities in the Ethernet driver for cards/drivers which support hardware tagging. MTU ambiguity disppears; we now set IFCAP_VLAN_MTU in the Ethernet driver when we know the chip will not truncate/discard vlan-sized frames. Only allow the MTU to be changed within the scope of the parent interface's MTU. (Here we also take into account IFCAP_VLAN_MTU) Propagate hardware-assisted IP/TCP/UDP checksumming flags to the vlan interface if the card supports hardware tagging (from NetBSD)
Diffstat (limited to 'share')
-rw-r--r--share/man/man4/vlan.496
1 files changed, 60 insertions, 36 deletions
diff --git a/share/man/man4/vlan.4 b/share/man/man4/vlan.4
index 60c113a023a..26b0a088c3a 100644
--- a/share/man/man4/vlan.4
+++ b/share/man/man4/vlan.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: vlan.4,v 1.11 2001/08/03 15:21:16 mpech Exp $
+.\" $OpenBSD: vlan.4,v 1.12 2001/08/03 23:21:20 chris Exp $
.\"
.Dd January 9, 2000
.Dt VLAN 4
@@ -54,15 +54,48 @@ Set the vlan tag and parent for a given vlan interface.
Get the vlan tag and parent for a given vlan interface.
.Pp
.El
-The operation mode can be given as
-.Bl -tag -width bbb
-.It link0
-The parent interface supports VLAN tagging/untagging in hardware,
-this requires support from the Ethernet driver as well.
+.Xr vlan 4
+interfaces use the following interface capabilities:
+.Bl -tag -width aaa
+.It IFCAP_VLAN_MTU:
+The parent interface can handle full sized frames, plus the size
+of the vlan tag.
+.It IFCAP_VLAN_HWTAGGING:
+The parent interface will participate in the tagging and untagging of frames.
.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "vlan%d: initialized with non-standard mtu %d (parent %s)"
+The IFCAP_VLAN_MTU capability was not set on the parent interface.
+We assume in this event that the parent interface is not capable of handling
+frames larger then its MTU. This will generally result in a non-compliant
+802.1Q implementation.
.Pp
-to
-.Xr ifconfig 8 .
+Some Ethernet chips will either discard or truncate
+Ethernet frames that are larger then 1514 bytes. This causes a problem as
+802.1Q tagged frames can be up to 1518 bytes.
+Most controller chips can be told not to discard large frames
+and/or to increase the allowed frame size. Refer to the hardware manual
+for your chip to do this.
+.El
+.Pp
+If the IFCAP_VLAN_MTU capability is set on a vlan parent,
+.Xr vlan 4
+assumes that Ethernet chip on the parent can handle
+oversized frames.
+Either the chip allows 1518 byte frames by default (such as
+.Xr rl 4 ),
+the driver has instructed the chip to do so (such as
+.Xr fxp 4
+and
+.Xr dc 4 ),
+or the driver also takes advantage of a hardware tagging capability,
+and thus oversized frames are never actually sent or received by
+.Ox
+(such as
+.Xr txp 4
+and
+.Xr ti 4 .)
.Sh SEE ALSO
.Xr bridge 4 ,
.Xr inet 4 ,
@@ -70,42 +103,33 @@ to
.Xr netintro 4 ,
.Xr ifconfig 8
.Pp
-All aspects of the vlan interface can be configured with
-.Xr ifconfig 8 ;
-see its manual page for more information.
+.Rs
+.%T IEEE 802.1Q standard
+.%O http://standards.ieee.org/getieee802/802.1.html
+.Re
.Pp
-A draft of IEEE 802.1Q standard can be obtained from
-http://grouper.ieee.org/groups/802/1/pages/802.1Q.html
-or the final version can be purchased from the
-Institute of Electrical and Electronic Engineers, Inc.
+The vlan interface is to be configured with
+.Xr ifconfig 8 ,
+see its manual page for more information.
.Sh BUGS
The 802.1Q specification allows for operation over FDDI and Token Ring
as well as Ethernet.
This driver only supports such operation with Ethernet devices.
.Pp
-Some Ethernet chips (notably the Intel 82558 and 82559) automatically
-discard frames that are larger then 1514 bytes.
-All Ethernet
-chips supporting this sort of feature should allow for it to be turned off.
-Optimally, upon loading, the chip's driver would do this (The
-.Xr fxp 4
-driver currently does for the Intel 82558/82559 chips.)
-Refer to the hardware manual for your Ethernet chip to determine
-if it has this feature, and if so, for information on how to turn it off.
-A symptom of this problem is that small frames pass through the VLAN
-(such as a frame carrying an ICMP packet), but frames which are at MTU size
-are dropped.
-When these frames are dropped, the TCP session will hang.
-A temporary kludge is to set the MTU for each machine behind each VLAN to
-1496 or less.
-.Pp
-Some Ethernet chips support 802.1Q tagging/untagging in hardware, but
-do not have the appropriate hooks in their driver to pass the frame
-directly to if_vlan.
-The PCI device driver if_ti is able to do this, use it as a reference.
+When the IFCAP_VLAN_HWTAGGING capability is set on the parent interface,
+.Xr vlan 4
+does not participate in the actual tagging or untagging of Ethernet frames.
+It simply passes the vlan ID on to the parent interface for tagging on transmit,
+and gets a vlan ID for each packet on receive.
+The vlan tagged packet is not actually visible to
+.Ox .
+Thus,
+.Xr bpf 4
+will show untagged packets on the parent interface, although frames
+are actually being transmitted and received with tags on the wire.
.Pp
This driver could be the basis for support of the Cisco ISL VLAN protocol,
-detailed at http://www.cisco.com/warp/public/741/4.html.
+detailed at http://www.cisco.com/warp/public/741/4.html .
Unfortunately, public reimplementation of this protocol is currently prevented
by patent (at least in the USA).
.Sh AUTHORS