[BACK]Return to vlan.4 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / man / man4

File: [cvs.NetBSD.org] / src / share / man / man4 / vlan.4 (download)

Revision 1.31, Thu Dec 16 18:29:47 2010 UTC (13 years, 3 months ago) by wiz
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, uebayasi-xip-base7, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2, agc-symver-base, agc-symver
Changes since 1.30: +4 -2 lines

Mention vlan(4) support in vr(4).

.\"	$NetBSD: vlan.4,v 1.31 2010/12/16 18:29:47 wiz Exp $
.\"
.\" 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.
.\"
.\" 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.
.\"
.Dd December 16, 2010
.Dt VLAN 4
.Os
.Sh NAME
.Nm vlan
.Nd IEEE 802.1Q Virtual LAN network device
.Sh SYNOPSIS
.Cd "pseudo-device vlan"
.Sh DESCRIPTION
The
.Nm
interface provides support for
.Tn IEEE
802.1Q Virtual Local Area Networks
.Pq Tn VLAN .
This supports the
trunking of more than one network on a single network interface.
This is particularly useful on routers or on hosts which must be
connected to many different networks through a single physical interface.
.Pp
To use a
.Nm vlan
interface, the administrator must first create the interface and then
specify the VID
.Po
.Tn VLAN
identifier, the first 12 bits from a 16-bit integer which
distinguishes each
.Tn VLAN
from any others
.Pc
and physical interface associated with the
.Tn VLAN .
This can be done by using the
.Xr ifconfig 8
.Ic create ,
.Ic vlan ,
and
.Ic vlanif
subcommands from a shell command line or script.
From within a C program, use the
.Xr ioctl 2
system call with the
.Dv SIOCSIFCREATE
and
.Dv SIOCSIFVLAN
arguments.
.Pp
To be compatible with other
.Tn IEEE
802.1Q devices, the
.Nm
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:
.Pp
.Bl -dash -compact
.It
drivers using the DP8390 core
.Po
such as
.Xr ec 4 ,
.Xr ne 4 ,
.Xr we 4 ,
and possibly others
.Pc
.It
.Xr bge 4
.It
.Xr bnx 4
.It
.Xr ea 4
.It
.Xr eb 4
.It
.Xr epic 4
.It
.Xr etherip 4
.It
.Xr ex 4
.It
.Xr fxp 4
.It
.Xr gem 4
.It
.Xr hme 4
.It
.Xr le 4
.It
.Xr sip 4
.It
.Xr ste 4
.It
.Xr stge 4
.It
.Xr ti 4
.It
.Xr tl 4
.It
.Xr tlp 4
.It
.Xr vge 4
.It
.Xr vr 4
.It
.Xr wm 4
.It
.Xr xi 4
.El
.Pp
.Nm
can be used with devices not supporting the
.Tn IEEE
802.1Q
.Tn MTU ,
but then the
.Tn MTU
of the
.Nm
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 VID 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 VID six will see all traffic transmitted through
.Sy vlan0 .
.Pp
The same
.Tn VLAN
can be created at system startup time
by placing the following in
.Pa /etc/ifconfig.vlan0 :
.Bd -literal -offset indent
create
vlan 6 vlanif tlp0
.Ed
.Sh SEE ALSO
.Xr ifconfig 8
.Sh HISTORY
The
.Nm
device first appeared in
.Nx 1.5.1 ,
and was derived from a
.Tn VLAN
implementation that appeared in
.Fx
and
.Ox .
.Sh BUGS
The
.Nm
interfaces do not currently inherit changes made to the physical
interfaces'
.Tn MTU .