xref: /freebsd/sbin/ifconfig/ifconfig.8 (revision fa56f7457031460e716c2d99e2a63bd111ac1b22)
18fae3551SRodney W. Grimes.\" Copyright (c) 1983, 1991, 1993
28fae3551SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
38fae3551SRodney W. Grimes.\"
48fae3551SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
58fae3551SRodney W. Grimes.\" modification, are permitted provided that the following conditions
68fae3551SRodney W. Grimes.\" are met:
78fae3551SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
88fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
98fae3551SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
108fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
118fae3551SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
128fae3551SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
138fae3551SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
148fae3551SRodney W. Grimes.\"    without specific prior written permission.
158fae3551SRodney W. Grimes.\"
168fae3551SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
178fae3551SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
188fae3551SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
198fae3551SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
208fae3551SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
218fae3551SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
228fae3551SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
238fae3551SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
248fae3551SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
258fae3551SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
268fae3551SRodney W. Grimes.\" SUCH DAMAGE.
278fae3551SRodney W. Grimes.\"
280761cb29SGarrett Wollman.\"     From: @(#)ifconfig.8	8.3 (Berkeley) 1/5/94
297f3dea24SPeter Wemm.\" $FreeBSD$
308fae3551SRodney W. Grimes.\"
31fa56f745SSam Leffler.Dd July 5, 2005
328fae3551SRodney W. Grimes.Dt IFCONFIG 8
33b09b4efbSRuslan Ermilov.Os
348fae3551SRodney W. Grimes.Sh NAME
358fae3551SRodney W. Grimes.Nm ifconfig
368fae3551SRodney W. Grimes.Nd configure network interface parameters
378fae3551SRodney W. Grimes.Sh SYNOPSIS
387c7fb079SRuslan Ermilov.Nm
39abc3361aSArchie Cobbs.Op Fl L
40ca299b1fSPoul-Henning Kamp.Op Fl m
41abc3361aSArchie Cobbs.Ar interface
423e61dca0SBrooks Davis.Op Cm create
43abc3361aSArchie Cobbs.Op Ar address_family
448fae3551SRodney W. Grimes.Oo
45eb2a1701SDima Dorfman.Ar address
468fae3551SRodney W. Grimes.Op Ar dest_address
478fae3551SRodney W. Grimes.Oc
488fae3551SRodney W. Grimes.Op Ar parameters
497c7fb079SRuslan Ermilov.Nm
503e61dca0SBrooks Davis.Ar interface
513e61dca0SBrooks Davis.Cm destroy
523e61dca0SBrooks Davis.Nm
53b5436146SPeter Wemm.Fl a
54abc3361aSArchie Cobbs.Op Fl L
55b5436146SPeter Wemm.Op Fl d
56ca299b1fSPoul-Henning Kamp.Op Fl m
57b5436146SPeter Wemm.Op Fl u
585faf8dcbSSam Leffler.Op Fl v
59e333b944SPhilippe Charnier.Op Ar address_family
607c7fb079SRuslan Ermilov.Nm
61b5436146SPeter Wemm.Fl l
62b5436146SPeter Wemm.Op Fl d
63b5436146SPeter Wemm.Op Fl u
64e333b944SPhilippe Charnier.Op Ar address_family
657c7fb079SRuslan Ermilov.Nm
66abc3361aSArchie Cobbs.Op Fl L
67abc3361aSArchie Cobbs.Op Fl d
68ca299b1fSPoul-Henning Kamp.Op Fl m
69abc3361aSArchie Cobbs.Op Fl u
705faf8dcbSSam Leffler.Op Fl v
713e61dca0SBrooks Davis.Op Fl C
728fae3551SRodney W. Grimes.Sh DESCRIPTION
73e1205e80SPhilippe CharnierThe
74e1205e80SPhilippe Charnier.Nm
75e1205e80SPhilippe Charnierutility is used to assign an address
768fae3551SRodney W. Grimesto a network interface and/or configure
778fae3551SRodney W. Grimesnetwork interface parameters.
78e1205e80SPhilippe CharnierThe
79e1205e80SPhilippe Charnier.Nm
80e1205e80SPhilippe Charnierutility must be used at boot time to define the network address
818fae3551SRodney W. Grimesof each interface present on a machine; it may also be used at
828fae3551SRodney W. Grimesa later time to redefine an interface's address
838fae3551SRodney W. Grimesor other operating parameters.
848fae3551SRodney W. Grimes.Pp
85e333b944SPhilippe CharnierThe following options are available:
86e333b944SPhilippe Charnier.Bl -tag -width indent
87e333b944SPhilippe Charnier.It Ar address
888fae3551SRodney W. GrimesFor the
89e333b944SPhilippe Charnier.Tn DARPA Ns -Internet
908fae3551SRodney W. Grimesfamily,
918fae3551SRodney W. Grimesthe address is either a host name present in the host name data
928fae3551SRodney W. Grimesbase,
938fae3551SRodney W. Grimes.Xr hosts 5 ,
948fae3551SRodney W. Grimesor a
958fae3551SRodney W. Grimes.Tn DARPA
968fae3551SRodney W. GrimesInternet address expressed in the Internet standard
978fae3551SRodney W. Grimes.Dq dot notation .
9812813062SJesper Skriver.Pp
9912813062SJesper SkriverIt is also possible to use the CIDR notation (also known as the
10012813062SJesper Skriverslash notation) to include the netmask.
10112813062SJesper SkriverThat is, one can specify an address like
10219fe4826SRuslan Ermilov.Li 192.168.0.1/16 .
1039f1741caSRuslan Ermilov.Pp
1049f1741caSRuslan ErmilovFor
1059f1741caSRuslan Ermilov.Dq inet6
1069f1741caSRuslan Ermilovfamily, it is also possible to specify the prefix length using the slash
1079f1741caSRuslan Ermilovnotation, like
1089f1741caSRuslan Ermilov.Li ::1/128 .
1099f1741caSRuslan ErmilovSee the
1109f1741caSRuslan Ermilov.Cm prefixlen
1119f1741caSRuslan Ermilovparameter below for more information.
112cbc17e71SGarrett Wollman.\" For the Xerox Network Systems(tm) family,
113cbc17e71SGarrett Wollman.\" addresses are
114cbc17e71SGarrett Wollman.\" .Ar net:a.b.c.d.e.f ,
115cbc17e71SGarrett Wollman.\" where
116cbc17e71SGarrett Wollman.\" .Ar net
117cbc17e71SGarrett Wollman.\" is the assigned network number (in decimal),
118cbc17e71SGarrett Wollman.\" and each of the six bytes of the host number,
119cbc17e71SGarrett Wollman.\" .Ar a
120cbc17e71SGarrett Wollman.\" through
121cbc17e71SGarrett Wollman.\" .Ar f ,
122cbc17e71SGarrett Wollman.\" are specified in hexadecimal.
123b80875bcSDima Dorfman.\" The host number may be omitted on IEEE 802 protocol
124b80875bcSDima Dorfman.\" (Ethernet, FDDI, and Token Ring) interfaces,
125cbc17e71SGarrett Wollman.\" which use the hardware physical address,
126cbc17e71SGarrett Wollman.\" and on interfaces other than the first.
1270761cb29SGarrett Wollman.\" For the
1280761cb29SGarrett Wollman.\" .Tn ISO
1290761cb29SGarrett Wollman.\" family, addresses are specified as a long hexadecimal string,
130b09b4efbSRuslan Ermilov.\" as in the Xerox family.
131b09b4efbSRuslan Ermilov.\" However, two consecutive dots imply a zero
1320761cb29SGarrett Wollman.\" byte, and the dots are optional, if the user wishes to (carefully)
1330761cb29SGarrett Wollman.\" count out long strings of digits in network byte order.
1341876df83SRuslan Ermilov.Pp
1351876df83SRuslan ErmilovThe link-level
1361876df83SRuslan Ermilov.Pq Dq link
1371876df83SRuslan Ermilovaddress
1381876df83SRuslan Ermilovis specified as a series of colon-separated hex digits.
1391876df83SRuslan ErmilovThis can be used to
1409806e231SRuslan Ermilove.g.\& set a new MAC address on an ethernet interface, though the
1411876df83SRuslan Ermilovmechanism used is not ethernet-specific.
1421876df83SRuslan ErmilovIf the interface is already
1431876df83SRuslan Ermilovup when this option is used, it will be briefly brought down and
1441876df83SRuslan Ermilovthen brought back up again in order to ensure that the receive
1451876df83SRuslan Ermilovfilter in the underlying ethernet hardware is properly reprogrammed.
1468fae3551SRodney W. Grimes.It Ar address_family
147e333b944SPhilippe CharnierSpecify the
148b09b4efbSRuslan Ermilovaddress family
1498fae3551SRodney W. Grimeswhich affects interpretation of the remaining parameters.
1508fae3551SRodney W. GrimesSince an interface can receive transmissions in differing protocols
151e71057d8SMike Pritchardwith different naming schemes, specifying the address family is recommended.
1528fae3551SRodney W. GrimesThe address or protocol families currently
1538fae3551SRodney W. Grimessupported are
154e05f2836SJulian Elischer.Dq inet ,
155cfa1ca9dSYoshinobu Inoue.Dq inet6 ,
156e05f2836SJulian Elischer.Dq atalk ,
1571876df83SRuslan Ermilov.Dq ipx ,
1580761cb29SGarrett Wollman.\" .Dq iso ,
1598fae3551SRodney W. Grimesand
1601876df83SRuslan Ermilov.Dq link .
161cbc17e71SGarrett Wollman.\" and
162cbc17e71SGarrett Wollman.\" .Dq ns .
163d29a2061SDima DorfmanThe default is
164d29a2061SDima Dorfman.Dq inet .
1651876df83SRuslan Ermilov.Dq ether
1661876df83SRuslan Ermilovand
1671876df83SRuslan Ermilov.Dq lladdr
1681876df83SRuslan Ermilovare synonyms for
1691876df83SRuslan Ermilov.Dq link .
170e333b944SPhilippe Charnier.It Ar dest_address
171e333b944SPhilippe CharnierSpecify the address of the correspondent on the other end
172e333b944SPhilippe Charnierof a point to point link.
173e333b944SPhilippe Charnier.It Ar interface
174e333b944SPhilippe CharnierThis
1758fae3551SRodney W. Grimesparameter is a string of the form
1768fae3551SRodney W. Grimes.Dq name unit ,
1778fae3551SRodney W. Grimesfor example,
178b09b4efbSRuslan Ermilov.Dq Li ed0 .
1798fae3551SRodney W. Grimes.El
1808fae3551SRodney W. Grimes.Pp
1818fae3551SRodney W. GrimesThe following parameters may be set with
1827c7fb079SRuslan Ermilov.Nm :
183e333b944SPhilippe Charnier.Bl -tag -width indent
184d6d1cb48SRobert Watson.It Cm add
185d0353b83SRuslan ErmilovAnother name for the
186d0353b83SRuslan Ermilov.Cm alias
187d0353b83SRuslan Ermilovparameter.
188d0353b83SRuslan ErmilovIntroduced for compatibility
189b09b4efbSRuslan Ermilovwith
190b09b4efbSRuslan Ermilov.Bsx .
1918fae3551SRodney W. Grimes.It Cm alias
1928fae3551SRodney W. GrimesEstablish an additional network address for this interface.
1938fae3551SRodney W. GrimesThis is sometimes useful when changing network numbers, and
1948fae3551SRodney W. Grimesone wishes to accept packets addressed to the old interface.
19599aa831bSChris CostelloIf the address is on the same subnet as the first network address
196aaa34889SBrian Somersfor this interface, a non-conflicting netmask must be given.
197aaa34889SBrian SomersUsually
198b09b4efbSRuslan Ermilov.Li 0xffffffff
199aaa34889SBrian Somersis most appropriate.
200fac3d981SDavid E. O'Brien.It Fl alias
201fac3d981SDavid E. O'BrienRemove the network address specified.
202fac3d981SDavid E. O'BrienThis would be used if you incorrectly specified an alias, or it
203fac3d981SDavid E. O'Brienwas no longer needed.
204fac3d981SDavid E. O'BrienIf you have incorrectly set an NS address having the side effect
205fac3d981SDavid E. O'Brienof specifying the host portion, removing all NS addresses will
206fac3d981SDavid E. O'Brienallow you to respecify the host portion.
207cfa1ca9dSYoshinobu Inoue.It Cm anycast
208b09b4efbSRuslan Ermilov(Inet6 only.)
209cfa1ca9dSYoshinobu InoueSpecify that the address configured is an anycast address.
210cfa1ca9dSYoshinobu InoueBased on the current specification,
211cfa1ca9dSYoshinobu Inoueonly routers may configure anycast addresses.
212cfa1ca9dSYoshinobu InoueAnycast address will not be used as source address of any of outgoing
213cfa1ca9dSYoshinobu InoueIPv6 packets.
2148fae3551SRodney W. Grimes.It Cm arp
215b09b4efbSRuslan ErmilovEnable the use of the Address Resolution Protocol
216b09b4efbSRuslan Ermilov.Pq Xr arp 4
217b09b4efbSRuslan Ermilovin mapping
2188fae3551SRodney W. Grimesbetween network level addresses and link level addresses (default).
2198fae3551SRodney W. GrimesThis is currently implemented for mapping between
2208fae3551SRodney W. Grimes.Tn DARPA
2218fae3551SRodney W. GrimesInternet
222b80875bcSDima Dorfmanaddresses and
223b80875bcSDima Dorfman.Tn IEEE
224b80875bcSDima Dorfman802 48-bit MAC addresses (Ethernet, FDDI, and Token Ring addresses).
2258fae3551SRodney W. Grimes.It Fl arp
226b09b4efbSRuslan ErmilovDisable the use of the Address Resolution Protocol
227b09b4efbSRuslan Ermilov.Pq Xr arp 4 .
228deb62e28SRuslan Ermilov.It Cm staticarp
229deb62e28SRuslan ErmilovIf the Address Resolution Protocol is enabled,
230deb62e28SRuslan Ermilovthe host will only reply to requests for its addresses,
231deb62e28SRuslan Ermilovand will never send any requests.
232deb62e28SRuslan Ermilov.It Fl staticarp
233deb62e28SRuslan ErmilovIf the Address Resolution Protocol is enabled,
234deb62e28SRuslan Ermilovthe host will perform normally,
235deb62e28SRuslan Ermilovsending out requests and listening for replies.
2368fae3551SRodney W. Grimes.It Cm broadcast
237b09b4efbSRuslan Ermilov(Inet only.)
2388fae3551SRodney W. GrimesSpecify the address to use to represent broadcasts to the
2398fae3551SRodney W. Grimesnetwork.
2408fae3551SRodney W. GrimesThe default broadcast address is the address with a host part of all 1's.
2418fae3551SRodney W. Grimes.It Cm debug
2428fae3551SRodney W. GrimesEnable driver dependent debugging code; usually, this turns on
2438fae3551SRodney W. Grimesextra console error logging.
2448fae3551SRodney W. Grimes.It Fl debug
2458fae3551SRodney W. GrimesDisable driver dependent debugging code.
246ffb079beSMaxim Sobolev.It Cm promisc
247ffb079beSMaxim SobolevPut interface into permanently promiscuous mode.
248ffb079beSMaxim Sobolev.It Fl promisc
249ffb079beSMaxim SobolevDisable permanently promiscuous mode.
2508fae3551SRodney W. Grimes.It Cm delete
251d0353b83SRuslan ErmilovAnother name for the
252d0353b83SRuslan Ermilov.Fl alias
253d0353b83SRuslan Ermilovparameter.
2548fae3551SRodney W. Grimes.It Cm down
255d0353b83SRuslan ErmilovMark an interface
256d0353b83SRuslan Ermilov.Dq down .
257d0353b83SRuslan ErmilovWhen an interface is marked
258d0353b83SRuslan Ermilov.Dq down ,
259d0353b83SRuslan Ermilovthe system will not attempt to
2608fae3551SRodney W. Grimestransmit messages through that interface.
2618fae3551SRodney W. GrimesIf possible, the interface will be reset to disable reception as well.
2628fae3551SRodney W. GrimesThis action does not automatically disable routes using the interface.
263331a2db8SHajimu UMEMOTO.It Cm eui64
264331a2db8SHajimu UMEMOTO(Inet6 only.)
265331a2db8SHajimu UMEMOTOFill interface index
266a61d9c47SRuslan Ermilov(lowermost 64bit of an IPv6 address)
267331a2db8SHajimu UMEMOTOautomatically.
26881511867STim J. Robbins.It Cm ipdst
26981511867STim J. RobbinsThis is used to specify an Internet host who is willing to receive
27081511867STim J. RobbinsIP packets encapsulating IPX packets bound for a remote network.
27181511867STim J. RobbinsAn apparent point to point link is constructed, and
27281511867STim J. Robbinsthe address specified will be taken as the IPX address and network
27381511867STim J. Robbinsof the destination.
27476b4b15fSChris Costello.It Cm maclabel Ar label
27576b4b15fSChris CostelloIf Mandatory Access Control support is enabled in the kernel,
27676b4b15fSChris Costelloset the MAC label to
27776b4b15fSChris Costello.Ar label .
27876b4b15fSChris Costello.\" (see
27976b4b15fSChris Costello.\" .Xr maclabel 7 ) .
280b5436146SPeter Wemm.It Cm media Ar type
281920de530SPeter WemmIf the driver supports the media selection system, set the media type
282920de530SPeter Wemmof the interface to
283b5436146SPeter Wemm.Ar type .
284b5436146SPeter WemmSome interfaces support the mutually exclusive use of one of several
285b09b4efbSRuslan Ermilovdifferent physical media connectors.
286b09b4efbSRuslan ErmilovFor example, a 10Mb/s Ethernet
287b5436146SPeter Wemminterface might support the use of either
288b5436146SPeter Wemm.Tn AUI
289b09b4efbSRuslan Ermilovor twisted pair connectors.
290b09b4efbSRuslan ErmilovSetting the media type to
291d04b5dfeSRuslan Ermilov.Dq Li 10base5/AUI
292b5436146SPeter Wemmwould change the currently active connector to the AUI port.
293b5436146SPeter WemmSetting it to
294d04b5dfeSRuslan Ermilov.Dq Li 10baseT/UTP
295b09b4efbSRuslan Ermilovwould activate twisted pair.
296b09b4efbSRuslan ErmilovRefer to the interfaces' driver
297920de530SPeter Wemmspecific documentation or man page for a complete list of the
298920de530SPeter Wemmavailable types.
299b5436146SPeter Wemm.It Cm mediaopt Ar opts
300920de530SPeter WemmIf the driver supports the media selection system, set the specified
301920de530SPeter Wemmmedia options on the interface.
302b09b4efbSRuslan ErmilovThe
303b09b4efbSRuslan Ermilov.Ar opts
304b09b4efbSRuslan Ermilovargument
305b5436146SPeter Wemmis a comma delimited list of options to apply to the interface.
306b5436146SPeter WemmRefer to the interfaces' driver specific man page for a complete
307b5436146SPeter Wemmlist of available options.
308b5436146SPeter Wemm.It Fl mediaopt Ar opts
309920de530SPeter WemmIf the driver supports the media selection system, disable the
310920de530SPeter Wemmspecified media options on the interface.
311e519b1a5SSam Leffler.It Cm mode Ar mode
312e519b1a5SSam LefflerIf the driver supports the media selection system, set the specified
313e519b1a5SSam Leffleroperating mode on the interface to
314e519b1a5SSam Leffler.Ar mode .
315e519b1a5SSam LefflerFor IEEE 802.11 wireless interfaces that support multiple operating modes
316eb9a85caSRuslan Ermilovthis directive is used to select between 802.11a
317d04b5dfeSRuslan Ermilov.Pq Dq Li 11a ,
318eb9a85caSRuslan Ermilov802.11b
319d04b5dfeSRuslan Ermilov.Pq Dq Li 11b ,
320eb9a85caSRuslan Ermilovand 802.11g
321d04b5dfeSRuslan Ermilov.Pq Dq Li 11g
322e519b1a5SSam Leffleroperating modes.
32397bebf0aSBrooks Davis.It Cm name Ar name
32497bebf0aSBrooks DavisSet the interface name to
32597bebf0aSBrooks Davis.Ar name .
3268fbad60dSRuslan Ermilov.It Cm rxcsum , txcsum
3278fbad60dSRuslan ErmilovIf the driver supports user-configurable checksum offloading,
3288fbad60dSRuslan Ermilovenable receive (or transmit) checksum offloading on the interface.
3298fbad60dSRuslan ErmilovSome drivers may not be able to enable these flags independently
3308fbad60dSRuslan Ermilovof each other, so setting one may also set the other.
3318fbad60dSRuslan ErmilovThe driver will offload as much checksum work as it can reliably
3328fbad60dSRuslan Ermilovsupport, the exact level of offloading varies between drivers.
33321414470SRuslan Ermilov.It Fl rxcsum , txcsum
3348fbad60dSRuslan ErmilovIf the driver supports user-configurable checksum offloading,
3358fbad60dSRuslan Ermilovdisable receive (or transmit) checksum offloading on the interface.
3368fbad60dSRuslan ErmilovThese settings may not always be independent of each other.
3373a3b019aSRuslan Ermilov.It Cm polling
3383a3b019aSRuslan ErmilovIf the driver has user-configurable
3393a3b019aSRuslan Ermilov.Xr polling 4
3403a3b019aSRuslan Ermilovsupport, select the polling mode on the interface.
3413a3b019aSRuslan Ermilov.It Fl polling
3423a3b019aSRuslan ErmilovIf the driver has user-configurable
3433a3b019aSRuslan Ermilov.Xr polling 4
3443a3b019aSRuslan Ermilovsupport, select the interrupt mode on the interface.
345b09b4efbSRuslan Ermilov.It Cm tunnel Ar src_addr dest_addr
346b09b4efbSRuslan Ermilov(IP tunnel devices only.)
34733841545SHajimu UMEMOTOConfigure the physical source and destination address for IP tunnel
348b09b4efbSRuslan Ermilovinterfaces
349b09b4efbSRuslan Ermilov.Pq Xr gif 4 .
350b09b4efbSRuslan ErmilovThe arguments
35133841545SHajimu UMEMOTO.Ar src_addr
35233841545SHajimu UMEMOTOand
35333841545SHajimu UMEMOTO.Ar dest_addr
35433841545SHajimu UMEMOTOare interpreted as the outer source/destination for the encapsulating
35533841545SHajimu UMEMOTOIPv4/IPv6 header.
35633841545SHajimu UMEMOTO.It Cm deletetunnel
35733841545SHajimu UMEMOTOUnconfigure the physical source and destination address for IP tunnel
35833841545SHajimu UMEMOTOinterfaces previously configured with
35933841545SHajimu UMEMOTO.Cm tunnel .
3603e61dca0SBrooks Davis.It Cm create
3613e61dca0SBrooks DavisCreate the specified network pseudo-device.
3623e61dca0SBrooks DavisIf the interface is given without a unit number, try to create a new
3633e61dca0SBrooks Davisdevice with an arbitrary unit number.
364525d500eSDima DorfmanIf creation of an arbitrary device is successful, the new device name is
36597bebf0aSBrooks Davisprinted to standard output unless the interface is renamed or destroyed
36697bebf0aSBrooks Davisin the same
36797bebf0aSBrooks Davis.Nm
36897bebf0aSBrooks Davisinvocation.
3693e61dca0SBrooks Davis.It Cm destroy
3703e61dca0SBrooks DavisDestroy the specified network pseudo-device.
3713e61dca0SBrooks Davis.It Cm plumb
3723e61dca0SBrooks DavisAnother name for the
373b8a7fd3fSYaroslav Tykhiy.Cm create
3743e61dca0SBrooks Davisparameter.
375b09b4efbSRuslan ErmilovIncluded for
376b09b4efbSRuslan Ermilov.Tn Solaris
377b09b4efbSRuslan Ermilovcompatibility.
3783e61dca0SBrooks Davis.It Cm unplumb
3793e61dca0SBrooks DavisAnother name for the
380b8a7fd3fSYaroslav Tykhiy.Cm destroy
3813e61dca0SBrooks Davisparameter.
382b09b4efbSRuslan ErmilovIncluded for
383b09b4efbSRuslan Ermilov.Tn Solaris
384b09b4efbSRuslan Ermilovcompatibility.
38597ed1257SBill Paul.It Cm vlan Ar vlan_tag
386588e78c5SYaroslav TykhiyIf the interface is a
387588e78c5SYaroslav Tykhiy.Xr vlan 4
388588e78c5SYaroslav Tykhiypseudo interface, set the VLAN tag value
38997ed1257SBill Paulto
39097ed1257SBill Paul.Ar vlan_tag .
39197ed1257SBill PaulThis value is a 16-bit number which is used to create an 802.1Q
392588e78c5SYaroslav TykhiyVLAN header for packets sent from the
393588e78c5SYaroslav Tykhiy.Xr vlan 4
394588e78c5SYaroslav Tykhiyinterface.
395ef8f7ac9SSheldon HearnNote that
39697ed1257SBill Paul.Cm vlan
39797ed1257SBill Pauland
39897ed1257SBill Paul.Cm vlandev
39997ed1257SBill Paulmust both be set at the same time.
40097ed1257SBill Paul.It Cm vlandev Ar iface
401588e78c5SYaroslav TykhiyIf the interface is a
402588e78c5SYaroslav Tykhiy.Xr vlan 4
403588e78c5SYaroslav Tykhiypseudo device, associate physical interface
40497ed1257SBill Paul.Ar iface
405ef8f7ac9SSheldon Hearnwith it.
406588e78c5SYaroslav TykhiyPackets transmitted through the
407588e78c5SYaroslav Tykhiy.Xr vlan 4
408588e78c5SYaroslav Tykhiyinterface will be
40997ed1257SBill Pauldiverted to the specified physical interface
41097ed1257SBill Paul.Ar iface
411588e78c5SYaroslav Tykhiywith 802.1Q VLAN encapsulation.
412ef8f7ac9SSheldon HearnPackets with 802.1Q encapsulation received
413588e78c5SYaroslav Tykhiyby the parent interface with the correct VLAN tag will be diverted to
414588e78c5SYaroslav Tykhiythe associated
415588e78c5SYaroslav Tykhiy.Xr vlan 4
416588e78c5SYaroslav Tykhiypseudo-interface.
417588e78c5SYaroslav TykhiyThe
418588e78c5SYaroslav Tykhiy.Xr vlan 4
419588e78c5SYaroslav Tykhiyinterface is assigned a
42097ed1257SBill Paulcopy of the parent interface's flags and the parent's ethernet address.
42197ed1257SBill PaulThe
42297ed1257SBill Paul.Cm vlandev
42397ed1257SBill Pauland
42497ed1257SBill Paul.Cm vlan
425ef8f7ac9SSheldon Hearnmust both be set at the same time.
426588e78c5SYaroslav TykhiyIf the
427588e78c5SYaroslav Tykhiy.Xr vlan 4
428588e78c5SYaroslav Tykhiyinterface already has
429ef8f7ac9SSheldon Hearna physical interface associated with it, this command will fail.
430ef8f7ac9SSheldon HearnTo
43197ed1257SBill Paulchange the association to another physical interface, the existing
43297ed1257SBill Paulassociation must be cleared first.
43397ed1257SBill Paul.Pp
4343706a3a8SRuslan ErmilovNote: if the hardware tagging capability
435588e78c5SYaroslav Tykhiyis set on the parent interface, the
436588e78c5SYaroslav Tykhiy.Xr vlan 4
437588e78c5SYaroslav Tykhiypseudo
438ac244ef3SSam Lefflerinterface's behavior changes:
439588e78c5SYaroslav Tykhiythe
440588e78c5SYaroslav Tykhiy.Xr vlan 4
441588e78c5SYaroslav Tykhiyinterface recognizes that the
442588e78c5SYaroslav Tykhiyparent interface supports insertion and extraction of VLAN tags on its
44397ed1257SBill Paulown (usually in firmware) and that it should pass packets to and from
44497ed1257SBill Paulthe parent unaltered.
44597ed1257SBill Paul.It Fl vlandev Ar iface
446588e78c5SYaroslav TykhiyIf the driver is a
447588e78c5SYaroslav Tykhiy.Xr vlan 4
448588e78c5SYaroslav Tykhiypseudo device, disassociate the physical interface
44997ed1257SBill Paul.Ar iface
450ef8f7ac9SSheldon Hearnfrom it.
451588e78c5SYaroslav TykhiyThis breaks the link between the
452588e78c5SYaroslav Tykhiy.Xr vlan 4
453588e78c5SYaroslav Tykhiyinterface and its parent,
454588e78c5SYaroslav Tykhiyclears its VLAN tag, flags and its link address and shuts the interface down.
455e82866feSYaroslav Tykhiy.It Cm vlanmtu , vlanhwtag
456e82866feSYaroslav TykhiyIf the driver offers user-configurable VLAN support, enable
457e82866feSYaroslav Tykhiyreception of extended frames or tag processing in hardware,
458e82866feSYaroslav Tykhiyrespectively.
459e82866feSYaroslav TykhiyNote that this must be issued on a physical interface associated with
460e82866feSYaroslav Tykhiy.Xr vlan 4 ,
461e82866feSYaroslav Tykhiynot on a
462e82866feSYaroslav Tykhiy.Xr vlan 4
463e82866feSYaroslav Tykhiyinterface itself.
46421414470SRuslan Ermilov.It Fl vlanmtu , vlanhwtag
465e82866feSYaroslav TykhiyIf the driver offers user-configurable VLAN support, disable
466e82866feSYaroslav Tykhiyreception of extended frames or tag processing in hardware,
467e82866feSYaroslav Tykhiyrespectively.
4688fae3551SRodney W. Grimes.It Cm metric Ar n
4698fae3551SRodney W. GrimesSet the routing metric of the interface to
4708fae3551SRodney W. Grimes.Ar n ,
4718fae3551SRodney W. Grimesdefault 0.
4728fae3551SRodney W. GrimesThe routing metric is used by the routing protocol
4738fae3551SRodney W. Grimes.Pq Xr routed 8 .
4748fae3551SRodney W. GrimesHigher metrics have the effect of making a route
4758fae3551SRodney W. Grimesless favorable; metrics are counted as addition hops
4768fae3551SRodney W. Grimesto the destination network or host.
4774db32b03SDavid Greenman.It Cm mtu Ar n
4784db32b03SDavid GreenmanSet the maximum transmission unit of the interface to
4794db32b03SDavid Greenman.Ar n ,
4804db32b03SDavid Greenmandefault is interface specific.
481b09b4efbSRuslan ErmilovThe MTU is used to limit the size of packets that are transmitted on an
4824db32b03SDavid Greenmaninterface.
483b09b4efbSRuslan ErmilovNot all interfaces support setting the MTU, and some interfaces have
4844db32b03SDavid Greenmanrange restrictions.
4858fae3551SRodney W. Grimes.It Cm netmask Ar mask
486b09b4efbSRuslan Ermilov.\" (Inet and ISO.)
487b09b4efbSRuslan Ermilov(Inet only.)
4888fae3551SRodney W. GrimesSpecify how much of the address to reserve for subdividing
4898fae3551SRodney W. Grimesnetworks into sub-networks.
4908fae3551SRodney W. GrimesThe mask includes the network part of the local address
4918fae3551SRodney W. Grimesand the subnet part, which is taken from the host field of the address.
4928fae3551SRodney W. GrimesThe mask can be specified as a single hexadecimal number
493b09b4efbSRuslan Ermilovwith a leading
494b09b4efbSRuslan Ermilov.Ql 0x ,
495b09b4efbSRuslan Ermilovwith a dot-notation Internet address,
4968fae3551SRodney W. Grimesor with a pseudo-network name listed in the network table
4978fae3551SRodney W. Grimes.Xr networks 5 .
4988fae3551SRodney W. GrimesThe mask contains 1's for the bit positions in the 32-bit address
4998fae3551SRodney W. Grimeswhich are to be used for the network and subnet parts,
5008fae3551SRodney W. Grimesand 0's for the host part.
5018fae3551SRodney W. GrimesThe mask should contain at least the standard network portion,
5028fae3551SRodney W. Grimesand the subnet field should be contiguous with the network
5038fae3551SRodney W. Grimesportion.
50412813062SJesper Skriver.Pp
50512813062SJesper SkriverThe netmask can also be specified in CIDR notation after the address.
50612813062SJesper SkriverSee the
50712813062SJesper Skriver.Ar address
50812813062SJesper Skriveroption above for more information.
509cfa1ca9dSYoshinobu Inoue.It Cm prefixlen Ar len
510b09b4efbSRuslan Ermilov(Inet6 only.)
511cfa1ca9dSYoshinobu InoueSpecify that
512cfa1ca9dSYoshinobu Inoue.Ar len
513cfa1ca9dSYoshinobu Inouebits are reserved for subdividing networks into sub-networks.
514cfa1ca9dSYoshinobu InoueThe
515cfa1ca9dSYoshinobu Inoue.Ar len
516cfa1ca9dSYoshinobu Inouemust be integer, and for syntactical reason it must be between 0 to 128.
517cfa1ca9dSYoshinobu InoueIt is almost always 64 under the current IPv6 assignment rule.
518bfc03b18SStephen McKayIf the parameter is omitted, 64 is used.
5199f1741caSRuslan Ermilov.Pp
5209f1741caSRuslan ErmilovThe prefix can also be specified using the slash notation after the address.
5219f1741caSRuslan ErmilovSee the
5229f1741caSRuslan Ermilov.Ar address
5239f1741caSRuslan Ermilovoption above for more information.
52449830e2aSSheldon Hearn.\" see
5258fae3551SRodney W. Grimes.\" Xr eon 5 .
5260761cb29SGarrett Wollman.\" .It Cm nsellength Ar n
5270761cb29SGarrett Wollman.\" .Pf ( Tn ISO
5280761cb29SGarrett Wollman.\" only)
5290761cb29SGarrett Wollman.\" This specifies a trailing number of bytes for a received
5300761cb29SGarrett Wollman.\" .Tn NSAP
5310761cb29SGarrett Wollman.\" used for local identification, the remaining leading part of which is
5320761cb29SGarrett Wollman.\" taken to be the
5330761cb29SGarrett Wollman.\" .Tn NET
5340761cb29SGarrett Wollman.\" (Network Entity Title).
5350761cb29SGarrett Wollman.\" The default value is 1, which is conformant to US
5360761cb29SGarrett Wollman.\" .Tn GOSIP .
5370761cb29SGarrett Wollman.\" When an ISO address is set in an ifconfig command,
5380761cb29SGarrett Wollman.\" it is really the
5390761cb29SGarrett Wollman.\" .Tn NSAP
5400761cb29SGarrett Wollman.\" which is being specified.
5410761cb29SGarrett Wollman.\" For example, in
5420761cb29SGarrett Wollman.\" .Tn US GOSIP ,
5430761cb29SGarrett Wollman.\" 20 hex digits should be
5440761cb29SGarrett Wollman.\" specified in the
5450761cb29SGarrett Wollman.\" .Tn ISO NSAP
5460761cb29SGarrett Wollman.\" to be assigned to the interface.
5470761cb29SGarrett Wollman.\" There is some evidence that a number different from 1 may be useful
5480761cb29SGarrett Wollman.\" for
5490761cb29SGarrett Wollman.\" .Tn AFI
5500761cb29SGarrett Wollman.\" 37 type addresses.
551b112c02bSBen Smithurst.It Cm range Ar netrange
55291badbbeSJulian ElischerUnder appletalk, set the interface to respond to a
55323dafeacSBen Smithurst.Ar netrange
55423dafeacSBen Smithurstof the form
55523dafeacSBen Smithurst.Ar startnet Ns - Ns Ar endnet .
556ef8f7ac9SSheldon HearnAppletalk uses this scheme instead of
557e333b944SPhilippe Charniernetmasks though
558f050f700SMike Pritchard.Fx
559e333b944SPhilippe Charnierimplements it internally as a set of netmasks.
560d6d1cb48SRobert Watson.It Cm remove
561d0353b83SRuslan ErmilovAnother name for the
562d0353b83SRuslan Ermilov.Fl alias
563d0353b83SRuslan Ermilovparameter.
564d0353b83SRuslan ErmilovIntroduced for compatibility
565b09b4efbSRuslan Ermilovwith
566b09b4efbSRuslan Ermilov.Bsx .
56791badbbeSJulian Elischer.It Cm phase
56891badbbeSJulian ElischerThe argument following this specifies the version (phase) of the
569ef8f7ac9SSheldon HearnAppletalk network attached to the interface.
570ef8f7ac9SSheldon HearnValues of 1 or 2 are permitted.
571b09b4efbSRuslan Ermilov.Sm off
572b09b4efbSRuslan Ermilov.It Cm link Op Cm 0 No - Cm 2
573b09b4efbSRuslan Ermilov.Sm on
5748fae3551SRodney W. GrimesEnable special processing of the link level of the interface.
5758fae3551SRodney W. GrimesThese three options are interface specific in actual effect, however,
576ef8f7ac9SSheldon Hearnthey are in general used to select special modes of operation.
577ef8f7ac9SSheldon HearnAn example
578b5436146SPeter Wemmof this is to enable SLIP compression, or to select the connector type
579b09b4efbSRuslan Ermilovfor some Ethernet cards.
580b09b4efbSRuslan ErmilovRefer to the man page for the specific driver
581b5436146SPeter Wemmfor more information.
582b09b4efbSRuslan Ermilov.Sm off
583b09b4efbSRuslan Ermilov.It Fl link Op Cm 0 No - Cm 2
584b09b4efbSRuslan Ermilov.Sm on
5858fae3551SRodney W. GrimesDisable special processing at the link level with the specified interface.
586afbe3a0fSPoul-Henning Kamp.It Cm monitor
587afbe3a0fSPoul-Henning KampPut the interface in monitor mode.
5883706a3a8SRuslan ErmilovNo packets are transmitted, and received packets are discarded after
589afbe3a0fSPoul-Henning Kamp.Xr bpf 4
590afbe3a0fSPoul-Henning Kampprocessing.
591afbe3a0fSPoul-Henning Kamp.It Fl monitor
592afbe3a0fSPoul-Henning KampTake the interface out of monitor mode.
5938fae3551SRodney W. Grimes.It Cm up
594e333b944SPhilippe CharnierMark an interface
595e333b944SPhilippe Charnier.Dq up .
596e333b944SPhilippe CharnierThis may be used to enable an interface after an
597b09b4efbSRuslan Ermilov.Dq Nm Cm down .
5988fae3551SRodney W. GrimesIt happens automatically when setting the first address on an interface.
5998fae3551SRodney W. GrimesIf the interface was reset when previously marked down,
6008fae3551SRodney W. Grimesthe hardware will be re-initialized.
6015faf8dcbSSam Leffler.El
6025faf8dcbSSam Leffler.Pp
6035faf8dcbSSam LefflerThe following parameters are specific to IEEE 802.11 wireless interfaces:
6045faf8dcbSSam Leffler.Bl -tag -width indent
6055faf8dcbSSam Leffler.It Cm apbridge
60621414470SRuslan ErmilovWhen operating as an access point, pass packets between
6075faf8dcbSSam Lefflerwireless clients directly (default).
6085faf8dcbSSam LefflerTo instead let them pass up through the
60921414470SRuslan Ermilovsystem and be forwarded using some other mechanism, use
61021414470SRuslan Ermilov.Fl apbridge .
6115faf8dcbSSam LefflerDisabling the internal bridging
6125faf8dcbSSam Leffleris useful when traffic is to be processed with
6135faf8dcbSSam Lefflerpacket filtering.
614419d8080SPoul-Henning Kamp.It Cm authmode Ar mode
6155faf8dcbSSam LefflerSet the desired authentication mode in infrastructure mode.
616b09b4efbSRuslan ErmilovNot all adaptors support all modes.
617b09b4efbSRuslan ErmilovThe set of
618419d8080SPoul-Henning Kampvalid modes is
619d04b5dfeSRuslan Ermilov.Dq Li none ,
620d04b5dfeSRuslan Ermilov.Dq Li open ,
62121414470SRuslan Ermilov.Dq Li shared
62221414470SRuslan Ermilov(shared key),
62321414470SRuslan Ermilov.Dq Li 8021x
62421414470SRuslan Ermilov(IEEE 802.1x),
6255faf8dcbSSam Leffleror
62621414470SRuslan Ermilov.Dq Li wpa
62721414470SRuslan Ermilov(IEEE WPA/WPA2/802.11i).
6285faf8dcbSSam LefflerThe
6295faf8dcbSSam Leffler.Dq Li 8021x
630419d8080SPoul-Henning Kampand
6315faf8dcbSSam Leffler.Dq Li wpa
6325faf8dcbSSam Lefflermodes are only useful when used an authentication service
6335faf8dcbSSam Leffler(a supplicant for client operation or an authenticator when
6345faf8dcbSSam Leffleroperating as an access point).
635419d8080SPoul-Henning KampModes are case insensitive.
6365faf8dcbSSam Leffler.It Cm bssid Ar address
6375faf8dcbSSam LefflerSpecify the MAC address of the access point to use when operating
6385faf8dcbSSam Leffleras a station in a BSS network.
6395faf8dcbSSam LefflerThis overrides any automatic selection done by the system.
64021414470SRuslan ErmilovTo disable a previously selected access point, supply
6415faf8dcbSSam Leffler.Dq Li any ,
6425faf8dcbSSam Leffler.Dq Li none ,
6435faf8dcbSSam Leffleror
6445faf8dcbSSam Leffler.Dq Li -
6455faf8dcbSSam Lefflerfor the address.
6465faf8dcbSSam LefflerThis option is useful when more than one access points have the same SSID.
6475faf8dcbSSam LefflerAnother name for the
6485faf8dcbSSam Leffler.Cm bssid
6495faf8dcbSSam Lefflerparameter is
6505faf8dcbSSam Leffler.Cm ap .
6515faf8dcbSSam Leffler.It Cm chanlist Ar channels
6525faf8dcbSSam LefflerSet the desired channels to use when scanning for access
6535faf8dcbSSam Lefflerpoints, neighbors in an IBSS network, or looking for unoccupied
6545faf8dcbSSam Lefflerchannels when operating as an access point.
6555faf8dcbSSam LefflerThe set of channels is specified as a comma-separated list with
65621414470SRuslan Ermiloveach element in the list representing either a single channel number or a range
6575faf8dcbSSam Lefflerof the form
6585faf8dcbSSam Leffler.Dq Li a-b .
6595faf8dcbSSam LefflerChannel numbers must be in the range 1 to 255 and be permissible
6605faf8dcbSSam Leffleraccording to the operating characteristics of the device.
6615faf8dcbSSam Leffler.It Cm channel Ar number
6625faf8dcbSSam LefflerSet a single desired channel.
6635faf8dcbSSam LefflerChannels range from 1 to 255, but the exact selection available
6645faf8dcbSSam Lefflerdepends on the region your adaptor was manufactured for.
6655faf8dcbSSam LefflerSetting
6665faf8dcbSSam Lefflerthe channel to
6675faf8dcbSSam Leffler.Dq Li 0 ,
6685faf8dcbSSam Leffler.Dq Li any ,
6695faf8dcbSSam Leffleror
6705faf8dcbSSam Leffler.Dq Li -
6715faf8dcbSSam Lefflerwill give you the default for your adaptor.
6725faf8dcbSSam LefflerMany
6735faf8dcbSSam Leffleradaptors ignore this setting unless you are in ad-hoc mode.
6745faf8dcbSSam LefflerAlternatively the frequency, in megahertz, may be specified
6755faf8dcbSSam Lefflerinstead of the channel number.
6765faf8dcbSSam Leffler.It Cm hidessid
67721414470SRuslan ErmilovWhen operating as an access point, do not broadcast the SSID
6785faf8dcbSSam Lefflerin beacon frames.
67921414470SRuslan ErmilovBy default, the SSID is included in beacon frames.
68021414470SRuslan ErmilovTo re-enable the broadcast of the SSID, use
6815faf8dcbSSam Leffler.Fl hidessid .
682419d8080SPoul-Henning Kamp.It Cm powersave
6835faf8dcbSSam LefflerEnable powersave operation.
68421414470SRuslan ErmilovWhen operating as a client, the station will conserve power by
6855faf8dcbSSam Lefflerperiodically turning off the radio and listening for
6865faf8dcbSSam Lefflermessages from the access point telling it there are packets waiting.
6875faf8dcbSSam LefflerThe station must then retrieve the packets.
68821414470SRuslan ErmilovWhen operating as an access point, the station must honor power
6895faf8dcbSSam Lefflersave operation of associated clients.
6905faf8dcbSSam LefflerNot all devices support power save operation, either as a client
6915faf8dcbSSam Leffleror as an access point.
6925faf8dcbSSam LefflerUse
6935faf8dcbSSam Leffler.Fl powersave
6945faf8dcbSSam Lefflerto disable powersave operation.
695419d8080SPoul-Henning Kamp.It Cm powersavesleep Ar sleep
6965faf8dcbSSam LefflerSet the desired max powersave sleep time in milliseconds.
697a6b03f42SSam Leffler.It Cm protmode Ar technique
6985faf8dcbSSam LefflerFor interfaces operating in 802.11g, use the specified
699d04b5dfeSRuslan Ermilov.Ar technique
700d04b5dfeSRuslan Ermilovfor protecting OFDM frames in a mixed 11b/11g network.
701a6b03f42SSam LefflerThe set of valid techniques is
702d04b5dfeSRuslan Ermilov.Dq Li off ,
703d04b5dfeSRuslan Ermilov.Dq Li cts
704a6b03f42SSam Leffler(CTS to self),
705a6b03f42SSam Lefflerand
706d04b5dfeSRuslan Ermilov.Dq Li rtscts
707a6b03f42SSam Leffler(RTS/CTS).
708a6b03f42SSam LefflerTechnique names are case insensitive.
709fa56f745SSam Leffler.It Cm pureg
710fa56f745SSam LefflerWhen operating as an access point in 802.11g mode allow only
711fa56f745SSam Leffler11g-capable stations to associate (11b-only stations are not
712fa56f745SSam Lefflerpermitted to associate).
713fa56f745SSam LefflerTo allow both 11g and 11b-only stations to associate, use
714fa56f745SSam Leffler.Fl pureg .
7155faf8dcbSSam Leffler.It Cm roaming Ar mode
7165faf8dcbSSam LefflerWhen operating as a station, control how the system will
7175faf8dcbSSam Lefflerbehave when communication with the current access point
7185faf8dcbSSam Leffleris broken.
71921414470SRuslan ErmilovThe
72021414470SRuslan Ermilov.Ar mode
72121414470SRuslan Ermilovargument may be one of
7225faf8dcbSSam Leffler.Dq Li device
7235faf8dcbSSam Leffler(leave it to the hardware device to decide),
7245faf8dcbSSam Leffler.Dq Li auto
72521414470SRuslan Ermilov(handle either in the device or the operating system\[em]as appropriate),
7265faf8dcbSSam Leffler.Dq Li manual
7275faf8dcbSSam Leffler(do nothing until explicitly instructed).
72821414470SRuslan ErmilovBy default, the device is left to handle this if it is
72921414470SRuslan Ermilovcapable; otherwise, the operating system will automatically
7305faf8dcbSSam Lefflerattempt to reestablish communication.
7315faf8dcbSSam LefflerManual mode is mostly useful when an application wants to
7325faf8dcbSSam Lefflercontrol the selection of an access point.
733a6b03f42SSam Leffler.It Cm rtsthreshold Ar length
7345faf8dcbSSam LefflerSet the threshold for which
735a6b03f42SSam Lefflertransmitted frames are preceded by transmission of an
736a6b03f42SSam LefflerRTS
737a6b03f42SSam Lefflercontrol frame.
738d04b5dfeSRuslan ErmilovThe
739d04b5dfeSRuslan Ermilov.Ar length
740d04b5dfeSRuslan Ermilovargument
741a6b03f42SSam Leffleris the frame size in bytes and must be in the range 1 to 2312.
742a6b03f42SSam LefflerNot all adaptors support setting the RTS threshold.
7435faf8dcbSSam Leffler.It Cm ssid Ar ssid
7445faf8dcbSSam LefflerSet the desired Service Set Identifier (aka network name).
7455faf8dcbSSam LefflerThe SSID is a string up to 32 characters
7465faf8dcbSSam Lefflerin length and may be specified as either a normal string or in
747e7951bdfSChristian Bruefferhexadecimal when preceded by
7485faf8dcbSSam Leffler.Ql 0x .
7495faf8dcbSSam LefflerAdditionally, the SSID may be cleared by setting it to
7505faf8dcbSSam Leffler.Ql - .
7515faf8dcbSSam Leffler.It Cm scan
7525faf8dcbSSam LefflerDisplay the current set of scanned neighbors and/or trigger a new scan.
7535faf8dcbSSam LefflerOnly the super-user can trigger a scan.
7545faf8dcbSSam Leffler.It Cm stationname Ar name
7555faf8dcbSSam LefflerSet the name of this station.
7565faf8dcbSSam LefflerIt appears that the station name is not really part of the IEEE 802.11
7575faf8dcbSSam Lefflerprotocol though all interfaces seem to support it.
7585faf8dcbSSam LefflerAs such it only
7595faf8dcbSSam Lefflerseems to be meaningful to identical or virtually identical equipment.
7605faf8dcbSSam LefflerSetting the station name is identical in syntax to setting the SSID.
761a6b03f42SSam Leffler.It Cm txpower Ar power
7625faf8dcbSSam LefflerSet the power used to transmit frames.
763d04b5dfeSRuslan ErmilovThe
764d04b5dfeSRuslan Ermilov.Ar power
765d04b5dfeSRuslan Ermilovargument
766a6b03f42SSam Leffleris a unitless value in the range 0 to 100 that is interpreted
767a6b03f42SSam Lefflerby drivers to derive a device-specific value.
768a6b03f42SSam LefflerOut of range values are truncated.
769a6b03f42SSam LefflerTypically only a few discreet power settings are available and
770a6b03f42SSam Lefflerthe driver will use the setting closest to the specified value.
771a6b03f42SSam LefflerNot all adaptors support changing the transmit power.
772419d8080SPoul-Henning Kamp.It Cm wepmode Ar mode
7735faf8dcbSSam LefflerSet the desired WEP mode.
774b09b4efbSRuslan ErmilovNot all adaptors support all modes.
775b09b4efbSRuslan ErmilovThe set of valid modes is
776d04b5dfeSRuslan Ermilov.Dq Li off ,
777d04b5dfeSRuslan Ermilov.Dq Li on ,
778419d8080SPoul-Henning Kampand
779d04b5dfeSRuslan Ermilov.Dq Li mixed .
780d04b5dfeSRuslan ErmilovThe
781d04b5dfeSRuslan Ermilov.Dq Li mixed
782419d8080SPoul-Henning Kampmode explicitly tells the adaptor to allow association with access
783b09b4efbSRuslan Ermilovpoints which allow both encrypted and unencrypted traffic.
784b09b4efbSRuslan ErmilovOn these adaptors,
785d04b5dfeSRuslan Ermilov.Dq Li on
786b09b4efbSRuslan Ermilovmeans that the access point must only allow encrypted connections.
787b09b4efbSRuslan ErmilovOn other adaptors,
788d04b5dfeSRuslan Ermilov.Dq Li on
789419d8080SPoul-Henning Kampis generally another name for
790d04b5dfeSRuslan Ermilov.Dq Li mixed .
791419d8080SPoul-Henning KampModes are case insensitive.
792419d8080SPoul-Henning Kamp.It Cm weptxkey Ar index
7935faf8dcbSSam LefflerSet the WEP key to be used for transmission.
794b09b4efbSRuslan Ermilov.It Cm wepkey Ar key Ns | Ns Ar index : Ns Ar key
7955faf8dcbSSam LefflerSet the selected WEP key.
796b09b4efbSRuslan ErmilovIf an
797419d8080SPoul-Henning Kamp.Ar index
798b09b4efbSRuslan Ermilovis not given, key 1 is set.
799b09b4efbSRuslan ErmilovA WEP key will be either 5 or 13
800419d8080SPoul-Henning Kampcharacters (40 or 104 bits) depending of the local network and the
801b09b4efbSRuslan Ermilovcapabilities of the adaptor.
802b09b4efbSRuslan ErmilovIt may be specified either as a plain
803e7951bdfSChristian Bruefferstring or as a string of hexadecimal digits preceded by
804b09b4efbSRuslan Ermilov.Ql 0x .
805d8f2e345SWarner LoshFor maximum portability, hex keys are recommended;
806d8f2e345SWarner Loshthe mapping of text keys to WEP encryption is usually driver-specific.
8073706a3a8SRuslan ErmilovIn particular, the
8083706a3a8SRuslan Ermilov.Tn Windows
8093706a3a8SRuslan Ermilovdrivers do this mapping differently to
810a61d9c47SRuslan Ermilov.Fx .
811419d8080SPoul-Henning KampA key may be cleared by setting it to
812b09b4efbSRuslan Ermilov.Ql - .
813b09b4efbSRuslan ErmilovIf WEP is supported then there are at least four keys.
814b94231daSDima DorfmanSome adaptors support more than four keys.
815b09b4efbSRuslan ErmilovIf that is the case, then the first four keys
816419d8080SPoul-Henning Kamp(1-4) will be the standard temporary keys and any others will be adaptor
817419d8080SPoul-Henning Kampspecific keys such as permanent keys stored in NVRAM.
8185faf8dcbSSam Leffler.It Cm wme
8195faf8dcbSSam LefflerEnable Wireless Media Extensions (WME) support, if available,
8205faf8dcbSSam Lefflerfor the specified interface.
8215faf8dcbSSam LefflerWME is a subset of the IEEE 802.11e standard to support the
8225faf8dcbSSam Lefflerefficient communication of realtime and multimedia data.
82321414470SRuslan ErmilovTo disable WME support, use
8245faf8dcbSSam Leffler.Fl wme .
8255faf8dcbSSam Leffler.El
8265faf8dcbSSam Leffler.Pp
8275faf8dcbSSam LefflerThe following parameters are support for compatibility with other systems:
8285faf8dcbSSam Leffler.Bl -tag -width indent
8295faf8dcbSSam Leffler.It Cm nwid Ar ssid
8305faf8dcbSSam LefflerAnother name for the
8315faf8dcbSSam Leffler.Cm ssid
8325faf8dcbSSam Lefflerparameter.
8335faf8dcbSSam LefflerIncluded for
8345faf8dcbSSam Leffler.Nx
8355faf8dcbSSam Lefflercompatibility.
8365faf8dcbSSam Leffler.It Cm station Ar name
8375faf8dcbSSam LefflerAnother name for the
8385faf8dcbSSam Leffler.Cm stationname
8395faf8dcbSSam Lefflerparameter.
8405faf8dcbSSam LefflerIncluded for
8415faf8dcbSSam Leffler.Bsx
8425faf8dcbSSam Lefflercompatibility.
843419d8080SPoul-Henning Kamp.It Cm wep
844419d8080SPoul-Henning KampAnother way of saying
845b09b4efbSRuslan Ermilov.Cm wepmode on .
846b09b4efbSRuslan ErmilovIncluded for
847b09b4efbSRuslan Ermilov.Bsx
848b09b4efbSRuslan Ermilovcompatibility.
849b09b4efbSRuslan Ermilov.It Fl wep
850419d8080SPoul-Henning KampAnother way of saying
851b09b4efbSRuslan Ermilov.Cm wepmode off .
852b09b4efbSRuslan ErmilovIncluded for
853b09b4efbSRuslan Ermilov.Bsx
854b09b4efbSRuslan Ermilovcompatibility.
855419d8080SPoul-Henning Kamp.It Cm nwkey key
856419d8080SPoul-Henning KampAnother way of saying:
857b09b4efbSRuslan Ermilov.Dq Li "wepmode on weptxkey 1 wepkey 1:key wepkey 2:- wepkey 3:- wepkey 4:-" .
858b09b4efbSRuslan ErmilovIncluded for
859b09b4efbSRuslan Ermilov.Nx
860b09b4efbSRuslan Ermilovcompatibility.
861b09b4efbSRuslan Ermilov.It Cm nwkey Xo
862b09b4efbSRuslan Ermilov.Sm off
863b09b4efbSRuslan Ermilov.Ar n : k1 , k2 , k3 , k4
864b09b4efbSRuslan Ermilov.Sm on
865b09b4efbSRuslan Ermilov.Xc
866419d8080SPoul-Henning KampAnother way of saying
867b09b4efbSRuslan Ermilov.Dq Li "wepmode on weptxkey n wepkey 1:k1 wepkey 2:k2 wepkey 3:k3 wepkey 4:k4" .
868b09b4efbSRuslan ErmilovIncluded for
869b09b4efbSRuslan Ermilov.Nx
870b09b4efbSRuslan Ermilovcompatibility.
871b09b4efbSRuslan Ermilov.It Fl nwkey
872419d8080SPoul-Henning KampAnother way of saying
873b09b4efbSRuslan Ermilov.Cm wepmode off .
874b09b4efbSRuslan ErmilovIncluded for
875b09b4efbSRuslan Ermilov.Nx
876b09b4efbSRuslan Ermilovcompatibility.
8778fae3551SRodney W. Grimes.El
8788fae3551SRodney W. Grimes.Pp
8797afc53b8SAndrew ThompsonThe following parameters are specific to bridge interfaces:
8807afc53b8SAndrew Thompson.Bl -tag -width indent
8817afc53b8SAndrew Thompson.It Cm addm Ar interface
8827afc53b8SAndrew ThompsonAdd the interface named by
8837afc53b8SAndrew Thompson.Ar interface
8847afc53b8SAndrew Thompsonas a member of the bridge.
8857afc53b8SAndrew ThompsonThe interface is put into promiscuous mode
8867afc53b8SAndrew Thompsonso that it can receive every packet sent on the network.
8877afc53b8SAndrew Thompson.It Cm deletem Ar interface
8887afc53b8SAndrew ThompsonRemove the interface named by
8897afc53b8SAndrew Thompson.Ar interface
8907afc53b8SAndrew Thompsonfrom the bridge.
8917afc53b8SAndrew ThompsonPromiscuous mode is disabled on the interface when
8927afc53b8SAndrew Thompsonit is removed from the bridge.
8937afc53b8SAndrew Thompson.It Cm maxaddr Ar size
8947afc53b8SAndrew ThompsonSet the size of the bridge address cache to
8957afc53b8SAndrew Thompson.Ar size .
8967afc53b8SAndrew ThompsonThe default is 100 entries.
8977afc53b8SAndrew Thompson.It Cm timeout Ar seconds
8987afc53b8SAndrew ThompsonSet the timeout of address cache entries to
8997afc53b8SAndrew Thompson.Ar seconds
9007afc53b8SAndrew Thompsonseconds.
9017afc53b8SAndrew ThompsonIf
9027afc53b8SAndrew Thompson.Ar seconds
9037afc53b8SAndrew Thompsonis zero, then address cache entries will not be expired.
9047afc53b8SAndrew ThompsonThe default is 240 seconds.
9057afc53b8SAndrew Thompson.It Cm deladdr Ar address
9067afc53b8SAndrew ThompsonDelete
9077afc53b8SAndrew Thompson.Ar address
9087afc53b8SAndrew Thompsonfrom the address cache.
9097afc53b8SAndrew Thompson.It Cm flush
9107afc53b8SAndrew ThompsonDelete all dynamically-learned addresses from the address cache.
9117afc53b8SAndrew Thompson.It Cm flushall
9127afc53b8SAndrew ThompsonDelete all addresses, including static addresses, from the address cache.
9137afc53b8SAndrew Thompson.It Cm discover Ar interface
9147afc53b8SAndrew ThompsonMark an interface as a
9157afc53b8SAndrew Thompson.Dq discovering
9167afc53b8SAndrew Thompsoninterface.
9177afc53b8SAndrew ThompsonWhen the bridge has no address cache entry
9187afc53b8SAndrew Thompson(either dynamic or static)
9197afc53b8SAndrew Thompsonfor the destination address of a packet,
9207afc53b8SAndrew Thompsonthe bridge will forward the packet to all
9217afc53b8SAndrew Thompsonmember interfaces marked as
9227afc53b8SAndrew Thompson.Dq discovering .
9237afc53b8SAndrew ThompsonThis is the default for all interfaces added to a bridge.
9247afc53b8SAndrew Thompson.It Cm -discover Ar interface
9257afc53b8SAndrew ThompsonClear the
9267afc53b8SAndrew Thompson.Dq discovering
9277afc53b8SAndrew Thompsonattribute on a member interface.
9287afc53b8SAndrew ThompsonFor packets without the
9297afc53b8SAndrew Thompson.Dq discovering
9307afc53b8SAndrew Thompsonattribute, the only packets forwarded on the interface are broadcast
9317afc53b8SAndrew Thompsonor multicast packets and packets for which the destination address
9327afc53b8SAndrew Thompsonis known to be on the interface's segment.
9337afc53b8SAndrew Thompson.It Cm learn Ar interface
9347afc53b8SAndrew ThompsonMark an interface as a
9357afc53b8SAndrew Thompson.Dq learning
9367afc53b8SAndrew Thompsoninterface.
9377afc53b8SAndrew ThompsonWhen a packet arrives on such an interface, the source
9387afc53b8SAndrew Thompsonaddress of the packet is entered into the address cache as being a
9397afc53b8SAndrew Thompsondestination address on the interface's segment.
9407afc53b8SAndrew ThompsonThis is the default for all interfaces added to a bridge.
9417afc53b8SAndrew Thompson.It Cm -learn Ar interface
9427afc53b8SAndrew ThompsonClear the
9437afc53b8SAndrew Thompson.Dq learning
9447afc53b8SAndrew Thompsonattribute on a member interface.
9457afc53b8SAndrew Thompson.It Cm stp Ar interface
9467afc53b8SAndrew ThompsonEnable Spanning Tree protocol on
9477afc53b8SAndrew Thompson.Ar interface .
9487afc53b8SAndrew ThompsonThe
9497afc53b8SAndrew Thompson.Xr if_bridge 4
9507afc53b8SAndrew Thompsondriver has support for the IEEE 802.1D Spanning Tree protocol (STP).
9517afc53b8SAndrew ThompsonSpanning Tree is used to detect and remove loops in a network topology.
9527afc53b8SAndrew Thompson.It Cm -stp Ar interface
9537afc53b8SAndrew ThompsonDisable Spanning Tree protocol on
9547afc53b8SAndrew Thompson.Ar interface .
9557afc53b8SAndrew ThompsonThis is the default for all interfaces added to a bridge.
9567afc53b8SAndrew Thompson.It Cm maxage Ar seconds
9577afc53b8SAndrew ThompsonSet the time that a Spanning Tree protocol configuration is valid.
9587afc53b8SAndrew ThompsonThe default is 20 seconds.
9597afc53b8SAndrew ThompsonThe minimum is 1 second and the maximum is 255 seconds.
9607afc53b8SAndrew Thompson.It Cm fwddelay Ar seconds
9617afc53b8SAndrew ThompsonSet the time that must pass before an interface begins forwarding
9627afc53b8SAndrew Thompsonpackets when Spanning Tree is enabled.
9637afc53b8SAndrew ThompsonThe default is 15 seconds.
9647afc53b8SAndrew ThompsonThe minimum is 1 second and the maximum is 255 seconds.
9657afc53b8SAndrew Thompson.It Cm hellotime Ar seconds
9667afc53b8SAndrew ThompsonSet the time between broadcasting of Spanning Tree protocol
9677afc53b8SAndrew Thompsonconfiguration messages.
9687afc53b8SAndrew ThompsonThe default is 2 seconds.
9697afc53b8SAndrew ThompsonThe minimum is 1 second and the maximum is 255 seconds.
9707afc53b8SAndrew Thompson.It Cm priority Ar value
9717afc53b8SAndrew ThompsonSet the bridge priority for Spanning Tree.
9727afc53b8SAndrew ThompsonThe default is 32768.
9737afc53b8SAndrew ThompsonThe minimum is 0 and the maximum is 65536.
9747afc53b8SAndrew Thompson.It Cm ifpriority Ar interface Ar value
9757afc53b8SAndrew ThompsonSet the Spanning Tree priority of
9767afc53b8SAndrew Thompson.Ar interface
9777afc53b8SAndrew Thompsonto
9787afc53b8SAndrew Thompson.Ar value .
9797afc53b8SAndrew ThompsonThe default is 128.
9807afc53b8SAndrew ThompsonThe minimum is 0 and the maximum is 255.
9817afc53b8SAndrew Thompson.It Cm ifpathcost Ar interface Ar value
9827afc53b8SAndrew ThompsonSet the Spanning Tree path cost of
9837afc53b8SAndrew Thompson.Ar interface
9847afc53b8SAndrew Thompsonto
9857afc53b8SAndrew Thompson.Ar value .
9867afc53b8SAndrew ThompsonThe default is 55.
9877afc53b8SAndrew ThompsonThe minimum is 0 and the maximum is 65535.
9887afc53b8SAndrew Thompson.El
9897afc53b8SAndrew Thompson.Pp
990e1205e80SPhilippe CharnierThe
991e1205e80SPhilippe Charnier.Nm
992e1205e80SPhilippe Charnierutility displays the current configuration for a network interface
9938fae3551SRodney W. Grimeswhen no optional parameters are supplied.
9948fae3551SRodney W. GrimesIf a protocol family is specified,
995e333b944SPhilippe Charnier.Nm
996e333b944SPhilippe Charnierwill report only the details specific to that protocol family.
997b5436146SPeter Wemm.Pp
998ca299b1fSPoul-Henning KampIf the
999ca299b1fSPoul-Henning Kamp.Fl m
1000b09b4efbSRuslan Ermilovflag is passed before an interface name,
1001b09b4efbSRuslan Ermilov.Nm
1002fc281403SRuslan Ermilovwill display the capability list and all
1003ca299b1fSPoul-Henning Kampof the supported media for the specified interface.
1004cfa1ca9dSYoshinobu InoueIf
1005cfa1ca9dSYoshinobu Inoue.Fl L
1006b112c02bSBen Smithurstflag is supplied, address lifetime is displayed for IPv6 addresses,
1007cfa1ca9dSYoshinobu Inoueas time offset string.
1008cfa1ca9dSYoshinobu Inoue.Pp
1009b5436146SPeter WemmOptionally, the
1010b5436146SPeter Wemm.Fl a
1011b09b4efbSRuslan Ermilovflag may be used instead of an interface name.
1012b09b4efbSRuslan ErmilovThis flag instructs
1013b5436146SPeter Wemm.Nm
1014b5436146SPeter Wemmto display information about all interfaces in the system.
1015e333b944SPhilippe CharnierThe
1016b5436146SPeter Wemm.Fl d
1017e333b944SPhilippe Charnierflag limits this to interfaces that are down, and
1018b5436146SPeter Wemm.Fl u
1019b5436146SPeter Wemmlimits this to interfaces that are up.
1020abc3361aSArchie CobbsWhen no arguments are given,
1021abc3361aSArchie Cobbs.Fl a
1022abc3361aSArchie Cobbsis implied.
1023b5436146SPeter Wemm.Pp
1024b5436146SPeter WemmThe
1025b5436146SPeter Wemm.Fl l
1026b5436146SPeter Wemmflag may be used to list all available interfaces on the system, with
1027b09b4efbSRuslan Ermilovno other additional information.
1028b09b4efbSRuslan ErmilovUse of this flag is mutually exclusive
1029b5436146SPeter Wemmwith all other flags and commands, except for
1030b5436146SPeter Wemm.Fl d
1031b5436146SPeter Wemm(only list interfaces that are down)
1032b5436146SPeter Wemmand
1033b5436146SPeter Wemm.Fl u
1034b5436146SPeter Wemm(only list interfaces that are up).
10358fae3551SRodney W. Grimes.Pp
10363e61dca0SBrooks DavisThe
10375faf8dcbSSam Leffler.Fl v
10385faf8dcbSSam Lefflerflag may be used to get more verbose status for an interface.
10395faf8dcbSSam Leffler.Pp
10405faf8dcbSSam LefflerThe
10413e61dca0SBrooks Davis.Fl C
10423e61dca0SBrooks Davisflag may be used to list all of the interface cloners available on
10433e61dca0SBrooks Davisthe system, with no additional information.
10443e61dca0SBrooks DavisUse of this flag is mutually exclusive with all other flags and commands.
10453e61dca0SBrooks Davis.Pp
10468fae3551SRodney W. GrimesOnly the super-user may modify the configuration of a network interface.
1047920de530SPeter Wemm.Sh NOTES
1048920de530SPeter WemmThe media selection system is relatively new and only some drivers support
1049920de530SPeter Wemmit (or have need for it).
10508fae3551SRodney W. Grimes.Sh DIAGNOSTICS
105120d3783aSDaniel O'CallaghanMessages indicating the specified interface does not exist, the
10528fae3551SRodney W. Grimesrequested address is unknown, or the user is not privileged and
10538fae3551SRodney W. Grimestried to alter an interface's configuration.
10548fae3551SRodney W. Grimes.Sh SEE ALSO
10558fae3551SRodney W. Grimes.Xr netstat 1 ,
10564029efa5SChristian Brueffer.Xr carp 4 ,
10578fae3551SRodney W. Grimes.Xr netintro 4 ,
10584029efa5SChristian Brueffer.Xr polling 4 ,
1059588e78c5SYaroslav Tykhiy.Xr vlan 4 ,
1060b09b4efbSRuslan Ermilov.\" .Xr eon 5 ,
10618fae3551SRodney W. Grimes.Xr rc 8 ,
10624b32efacSBruce M Simpson.Xr routed 8 ,
10634b32efacSBruce M Simpson.Xr sysctl 8
10648fae3551SRodney W. Grimes.Sh HISTORY
10658fae3551SRodney W. GrimesThe
10668fae3551SRodney W. Grimes.Nm
1067e1205e80SPhilippe Charnierutility appeared in
10688fae3551SRodney W. Grimes.Bx 4.2 .
10696087df9eSRuslan Ermilov.Sh BUGS
10706087df9eSRuslan ErmilovBasic IPv6 node operation requires a link-local address on each
10716087df9eSRuslan Ermilovinterface configured for IPv6.
10726087df9eSRuslan ErmilovNormally, such an address is automatically configured by the
10736087df9eSRuslan Ermilovkernel on each interface added to the system; this behaviour may
10746087df9eSRuslan Ermilovbe disabled by setting the sysctl MIB variable
10756087df9eSRuslan Ermilov.Va net.inet6.ip6.auto_linklocal
10766087df9eSRuslan Ermilovto 0.
10776087df9eSRuslan Ermilov.Pp
10786087df9eSRuslan ErmilovIf you delete such an address using
10796087df9eSRuslan Ermilov.Nm ,
10806087df9eSRuslan Ermilovthe kernel may act very oddly.
10816087df9eSRuslan ErmilovDo this at your own risk.
1082