2003-05-07 07:33:49 +04:00
|
|
|
.\" $NetBSD: vlan.4,v 1.23 2003/05/07 03:33:49 fair Exp $
|
2000-09-28 10:59:58 +04:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2000 The NetBSD Foundation, Inc.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
.\" by Jason R. Thorpe of Zembu Labs, Inc.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the NetBSD
|
|
|
|
.\" Foundation, Inc. and its contributors.
|
|
|
|
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
.\" contributors may be used to endorse or promote products derived
|
|
|
|
.\" from this software without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
2003-05-07 07:33:49 +04:00
|
|
|
.Dd May 6, 2003
|
2000-09-28 10:59:58 +04:00
|
|
|
.Dt VLAN 4
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm vlan
|
2001-05-05 04:19:45 +04:00
|
|
|
.Nd IEEE 802.1Q Virtual LAN network device
|
2000-09-28 10:59:58 +04:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Cd "pseudo-device vlan"
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
2003-05-07 07:33:49 +04:00
|
|
|
interface provides support for
|
|
|
|
.Tn IEEE
|
|
|
|
802.1Q Virtual Local Area Networks
|
|
|
|
.Pq Tn VLAN .
|
|
|
|
This supports the
|
2000-09-28 10:59:58 +04:00
|
|
|
trunking of more than one network on a single network interface.
|
|
|
|
This is particularly useful on routers or on hosts which must be
|
2003-05-07 07:33:49 +04:00
|
|
|
connected to many different networks through a single physical interface.
|
2000-09-28 10:59:58 +04:00
|
|
|
.Pp
|
2000-09-28 14:23:57 +04:00
|
|
|
To use a
|
|
|
|
.Nm vlan
|
|
|
|
interface, the administrator must first create the interface and then
|
2003-05-07 07:33:49 +04:00
|
|
|
specify the
|
|
|
|
.Tn VLAN
|
|
|
|
tag
|
|
|
|
.Po
|
|
|
|
a 16-bit integer which distinguishes each
|
|
|
|
.Tn VLAN
|
|
|
|
from any others
|
|
|
|
.Pc
|
|
|
|
and physical interface associated with the
|
|
|
|
.Tn VLAN .
|
2000-09-28 10:59:58 +04:00
|
|
|
This can be done by using the
|
|
|
|
.Xr ifconfig 8
|
2003-05-07 07:33:49 +04:00
|
|
|
.Ic create ,
|
|
|
|
.Ic vlan ,
|
2000-09-28 10:59:58 +04:00
|
|
|
and
|
2003-05-07 07:33:49 +04:00
|
|
|
.Ic vlanif
|
|
|
|
subcommands from a shell command line or script.
|
|
|
|
From within a C program, use the
|
|
|
|
.Xr ioctl 2
|
|
|
|
system call with the
|
2000-09-28 10:59:58 +04:00
|
|
|
.Dv SIOCSIFCREATE
|
|
|
|
and
|
|
|
|
.Dv SIOCSIFVLAN
|
2003-05-07 07:33:49 +04:00
|
|
|
arguments.
|
2000-12-19 17:04:03 +03:00
|
|
|
.Pp
|
2003-05-07 07:33:49 +04:00
|
|
|
To be compatible with other
|
|
|
|
.Tn IEEE
|
|
|
|
802.1Q devices, the
|
2000-12-19 17:04:03 +03:00
|
|
|
.Nm
|
2003-05-07 07:33:49 +04:00
|
|
|
interface supports a 1500 byte
|
|
|
|
.Tn MTU ,
|
|
|
|
which means that the parent interface will have to handle packets
|
|
|
|
that are 4 bytes larger than the original
|
|
|
|
.Tn Ethernet
|
|
|
|
standard.
|
|
|
|
Drivers supporting this increased
|
|
|
|
.Tn MTU
|
|
|
|
are:
|
2001-12-18 16:31:45 +03:00
|
|
|
.Pp
|
|
|
|
.Bl -dash -compact
|
2000-12-19 17:04:03 +03:00
|
|
|
.It
|
2003-05-07 07:33:49 +04:00
|
|
|
drivers using the DP8390 core
|
|
|
|
.Po
|
|
|
|
such as
|
2002-08-20 19:47:46 +04:00
|
|
|
.Xr ec 4 ,
|
2000-12-19 17:04:03 +03:00
|
|
|
.Xr ne 4 ,
|
2001-07-01 06:04:57 +04:00
|
|
|
.Xr we 4 ,
|
2003-05-07 07:33:49 +04:00
|
|
|
and possibly others
|
|
|
|
.Pc
|
2000-12-19 17:04:03 +03:00
|
|
|
.It
|
2003-03-19 20:24:16 +03:00
|
|
|
.Xr bge 4
|
|
|
|
.It
|
2001-06-27 02:01:45 +04:00
|
|
|
.Xr ea 4
|
|
|
|
.It
|
|
|
|
.Xr eb 4
|
|
|
|
.It
|
2001-07-01 06:04:57 +04:00
|
|
|
.Xr epic 4
|
|
|
|
.It
|
2000-12-19 17:04:03 +03:00
|
|
|
.Xr ex 4
|
|
|
|
.It
|
|
|
|
.Xr fxp 4
|
|
|
|
.It
|
2003-03-19 20:24:16 +03:00
|
|
|
.Xr gem 4
|
|
|
|
.It
|
2001-11-29 03:03:15 +03:00
|
|
|
.Xr hme 4
|
|
|
|
.It
|
2000-12-19 17:04:03 +03:00
|
|
|
.Xr le 4
|
2001-04-26 13:36:26 +04:00
|
|
|
.It
|
2003-03-19 20:24:16 +03:00
|
|
|
.Xr sip 4
|
|
|
|
.It
|
|
|
|
.Xr ste 4
|
|
|
|
.It
|
|
|
|
.Xr stge 4
|
|
|
|
.It
|
2003-04-16 13:59:40 +04:00
|
|
|
.Xr ti 4
|
|
|
|
.It
|
2003-03-19 20:24:16 +03:00
|
|
|
.Xr tl 4
|
|
|
|
.It
|
2001-04-26 13:36:26 +04:00
|
|
|
.Xr tlp 4
|
2000-12-19 17:04:03 +03:00
|
|
|
.It
|
2003-04-16 13:59:40 +04:00
|
|
|
.Xr wm 4
|
2001-07-01 06:04:57 +04:00
|
|
|
.It
|
|
|
|
.Xr xi 4
|
2000-12-19 17:04:03 +03:00
|
|
|
.El
|
2001-12-18 16:31:45 +03:00
|
|
|
.Pp
|
2000-12-19 17:04:03 +03:00
|
|
|
.Nm
|
2003-05-07 07:33:49 +04:00
|
|
|
can be used with devices not supporting the
|
|
|
|
.Tn IEEE
|
|
|
|
802.1Q
|
|
|
|
.Tn MTU ,
|
|
|
|
but then the
|
|
|
|
.Tn MTU
|
|
|
|
of the
|
2000-12-19 17:04:03 +03:00
|
|
|
.Nm
|
2003-05-07 07:33:49 +04:00
|
|
|
interface will be 4 bytes too small and will not interoperate
|
|
|
|
properly with other
|
|
|
|
.Tn IEEE
|
|
|
|
802.1Q devices, unless the
|
|
|
|
.Tn MTU
|
|
|
|
of the other hosts on the
|
|
|
|
.Tn VLAN
|
|
|
|
are also lowered to match.
|
|
|
|
.Sh EXAMPLES
|
|
|
|
The following will create interface
|
|
|
|
.Sy vlan0
|
|
|
|
with
|
|
|
|
.Tn VLAN
|
|
|
|
tag six, on the
|
|
|
|
.Tn Ethernet
|
|
|
|
interface
|
|
|
|
.Sy tlp0 :
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
ifconfig vlan0 create
|
|
|
|
ifconfig vlan0 vlan 6 vlanif tlp0
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
After this set up,
|
|
|
|
.Tn IP
|
|
|
|
addresses (and/or other protocols) can be assigned to the
|
|
|
|
.Sy vlan0
|
|
|
|
interface.
|
|
|
|
All other hosts on the
|
|
|
|
.Tn Ethernet
|
|
|
|
connected to
|
|
|
|
.Sy tlp0
|
|
|
|
which configure a
|
|
|
|
.Tn VLAN
|
|
|
|
and use
|
|
|
|
.Tn VLAN
|
|
|
|
tag six will see all traffic transmitted through
|
|
|
|
.Sy vlan0 .
|
2000-09-28 10:59:58 +04:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr ifconfig 8
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
2000-12-11 16:10:24 +03:00
|
|
|
device first appeared in
|
2001-04-26 17:35:35 +04:00
|
|
|
.Nx 1.5.1 .
|
2001-09-11 04:08:25 +04:00
|
|
|
.Sh AUTHORS
|
2000-09-28 10:59:58 +04:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
driver was integrated by
|
|
|
|
.An Andrew Doran
|
2003-02-14 18:20:17 +03:00
|
|
|
.Aq ad@NetBSD.org
|
2000-09-28 10:59:58 +04:00
|
|
|
and
|
|
|
|
.An Jason R. Thorpe
|
|
|
|
.Aq thorpej@zembu.com .
|
2003-05-07 07:33:49 +04:00
|
|
|
It was derived from a
|
|
|
|
.Tn VLAN
|
|
|
|
implementation that appeared in
|
2000-09-28 10:59:58 +04:00
|
|
|
.Fx
|
|
|
|
and
|
|
|
|
.Ox .
|
2001-09-12 03:18:55 +04:00
|
|
|
.Sh BUGS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
interfaces do not currently inherit changes made to the physical
|
2003-05-07 07:33:49 +04:00
|
|
|
interfaces'
|
|
|
|
.Tn MTU .
|