carp: add carp_group_demote_adj()
[dragonfly.git] / sbin / ifconfig / ifconfig.8
CommitLineData
984263bc
MD
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
984263bc
MD
12.\" 4. Neither the name of the University nor the names of its contributors
13.\" may be used to endorse or promote products derived from this software
14.\" without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
b16c423b 29.\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.124 2006/10/10 09:44:08 ru Exp $
984263bc 30.\"
7a3671b0 31.Dd July 17, 2010
984263bc
MD
32.Dt IFCONFIG 8
33.Os
34.Sh NAME
35.Nm ifconfig
36.Nd configure network interface parameters
37.Sh SYNOPSIS
38.Nm
39.Op Fl L
55fc9f88 40.Op Fl k
984263bc
MD
41.Op Fl m
42.Ar interface
43.Op Cm create
44.Op Ar address_family
45.Oo
46.Ar address
47.Op Ar dest_address
48.Oc
49.Op Ar parameters
50.Nm
51.Ar interface
52.Cm destroy
53.Nm
54.Fl a
55.Op Fl L
56.Op Fl d
57.Op Fl m
58.Op Fl u
55fc9f88 59.Op Fl v
984263bc
MD
60.Op Ar address_family
61.Nm
62.Fl l
63.Op Fl d
64.Op Fl u
65.Op Ar address_family
66.Nm
67.Op Fl L
68.Op Fl d
55fc9f88 69.Op Fl k
984263bc
MD
70.Op Fl m
71.Op Fl u
55fc9f88 72.Op Fl v
984263bc
MD
73.Op Fl C
74.Sh DESCRIPTION
75The
76.Nm
77utility is used to assign an address
78to a network interface and/or configure
79network interface parameters.
80The
81.Nm
82utility must be used at boot time to define the network address
83of each interface present on a machine; it may also be used at
84a later time to redefine an interface's address
85or other operating parameters.
86.Pp
87The following options are available:
88.Bl -tag -width indent
89.It Ar address
90For the
91.Tn DARPA Ns -Internet
92family,
93the address is either a host name present in the host name data
94base,
95.Xr hosts 5 ,
96or a
97.Tn DARPA
98Internet address expressed in the Internet standard
99.Dq dot notation .
100.Pp
101It is also possible to use the CIDR notation (also known as the
102slash notation) to include the netmask.
103That is, one can specify an address like
104.Li 192.168.0.1/16 .
105.Pp
106For
107.Dq inet6
108family, it is also possible to specify the prefix length using the slash
109notation, like
110.Li ::1/128 .
111See the
112.Cm prefixlen
113parameter below for more information.
114.\" For the Xerox Network Systems(tm) family,
115.\" addresses are
116.\" .Ar net:a.b.c.d.e.f ,
117.\" where
118.\" .Ar net
119.\" is the assigned network number (in decimal),
120.\" and each of the six bytes of the host number,
121.\" .Ar a
122.\" through
123.\" .Ar f ,
124.\" are specified in hexadecimal.
125.\" The host number may be omitted on IEEE 802 protocol
126.\" (Ethernet, FDDI, and Token Ring) interfaces,
127.\" which use the hardware physical address,
128.\" and on interfaces other than the first.
129.\" For the
130.\" .Tn ISO
131.\" family, addresses are specified as a long hexadecimal string,
132.\" as in the Xerox family.
133.\" However, two consecutive dots imply a zero
134.\" byte, and the dots are optional, if the user wishes to (carefully)
135.\" count out long strings of digits in network byte order.
136.Pp
137The link-level
138.Pq Dq link
139address
140is specified as a series of colon-separated hex digits.
141This can be used to
b50e4759 142e.g.\& set a new MAC address on an ethernet interface, though the
984263bc
MD
143mechanism used is not ethernet-specific.
144If the interface is already
145up when this option is used, it will be briefly brought down and
146then brought back up again in order to ensure that the receive
147filter in the underlying ethernet hardware is properly reprogrammed.
148.It Ar address_family
149Specify the
150address family
151which affects interpretation of the remaining parameters.
152Since an interface can receive transmissions in differing protocols
153with different naming schemes, specifying the address family is recommended.
154The address or protocol families currently
155supported are
156.Dq inet ,
157.Dq inet6 ,
158.Dq atalk ,
159.Dq ipx ,
160.\" .Dq iso ,
161and
162.Dq link .
163.\" and
164.\" .Dq ns .
165The default is
166.Dq inet .
167.Dq ether
168and
169.Dq lladdr
170are synonyms for
171.Dq link .
172.It Ar dest_address
173Specify the address of the correspondent on the other end
174of a point to point link.
175.It Ar interface
176This
177parameter is a string of the form
178.Dq name unit ,
179for example,
180.Dq Li ed0 .
181.El
182.Pp
183The following parameters may be set with
184.Nm :
185.Bl -tag -width indent
186.It Cm add
187Another name for the
188.Cm alias
189parameter.
190Introduced for compatibility
191with
192.Bsx .
193.It Cm alias
194Establish an additional network address for this interface.
195This is sometimes useful when changing network numbers, and
196one wishes to accept packets addressed to the old interface.
197If the address is on the same subnet as the first network address
198for this interface, a non-conflicting netmask must be given.
199Usually
200.Li 0xffffffff
201is most appropriate.
202.It Fl alias
b50e4759 203Remove the network address specified.
984263bc
MD
204This would be used if you incorrectly specified an alias, or it
205was no longer needed.
206If you have incorrectly set an NS address having the side effect
207of specifying the host portion, removing all NS addresses will
208allow you to respecify the host portion.
209.It Cm anycast
210(Inet6 only.)
211Specify that the address configured is an anycast address.
212Based on the current specification,
213only routers may configure anycast addresses.
214Anycast address will not be used as source address of any of outgoing
215IPv6 packets.
216.It Cm arp
217Enable the use of the Address Resolution Protocol
218.Pq Xr arp 4
219in mapping
220between network level addresses and link level addresses (default).
221This is currently implemented for mapping between
222.Tn DARPA
223Internet
224addresses and
225.Tn IEEE
226802 48-bit MAC addresses (Ethernet, FDDI, and Token Ring addresses).
227.It Fl arp
228Disable the use of the Address Resolution Protocol
229.Pq Xr arp 4 .
07813904
SZ
230.It Cm staticarp
231If the Address Resolution Protocol is enabled,
232the host will only reply to requests for its addresses,
233and will never send any requests.
234.It Fl staticarp
235If the Address Resolution Protocol is enabled,
236the host will perform normally,
237sending out requests and listening for replies.
984263bc
MD
238.It Cm broadcast
239(Inet only.)
240Specify the address to use to represent broadcasts to the
241network.
242The default broadcast address is the address with a host part of all 1's.
243.It Cm debug
244Enable driver dependent debugging code; usually, this turns on
245extra console error logging.
246.It Fl debug
247Disable driver dependent debugging code.
248.It Cm promisc
249Put interface into permanently promiscuous mode.
250.It Fl promisc
251Disable permanently promiscuous mode.
252.It Cm delete
253Another name for the
254.Fl alias
255parameter.
256.It Cm down
257Mark an interface
258.Dq down .
259When an interface is marked
260.Dq down ,
261the system will not attempt to
262transmit messages through that interface.
263If possible, the interface will be reset to disable reception as well.
264This action does not automatically disable routes using the interface.
265.It Cm eui64
266(Inet6 only.)
267Fill interface index
268(lowermost 64bit of an IPv6 address)
269automatically.
b16c423b
SW
270.It Cm ipdst
271This is used to specify an Internet host who is willing to receive
272IP packets encapsulating IPX packets bound for a remote network.
273An apparent point to point link is constructed, and
274the address specified will be taken as the IPX address and network
275of the destination.
984263bc
MD
276.It Cm media Ar type
277If the driver supports the media selection system, set the media type
278of the interface to
279.Ar type .
280Some interfaces support the mutually exclusive use of one of several
281different physical media connectors.
b16c423b 282For example, a 10Mbit/s Ethernet
984263bc
MD
283interface might support the use of either
284.Tn AUI
285or twisted pair connectors.
286Setting the media type to
b16c423b 287.Cm 10base5/AUI
984263bc
MD
288would change the currently active connector to the AUI port.
289Setting it to
b16c423b 290.Cm 10baseT/UTP
984263bc
MD
291would activate twisted pair.
292Refer to the interfaces' driver
293specific documentation or man page for a complete list of the
294available types.
295.It Cm mediaopt Ar opts
296If the driver supports the media selection system, set the specified
297media options on the interface.
298The
299.Ar opts
300argument
301is a comma delimited list of options to apply to the interface.
302Refer to the interfaces' driver specific man page for a complete
303list of available options.
304.It Fl mediaopt Ar opts
305If the driver supports the media selection system, disable the
306specified media options on the interface.
b50e4759
MD
307.It Cm mode Ar mode
308If the driver supports the media selection system, set the specified
309operating mode on the interface to
310.Ar mode .
311For IEEE 802.11 wireless interfaces that support multiple operating modes
312this directive is used to select between 802.11a
b16c423b 313.Pq Cm 11a ,
b50e4759 314802.11b
b16c423b 315.Pq Cm 11b ,
b50e4759 316and 802.11g
b16c423b 317.Pq Cm 11g
b50e4759
MD
318operating modes.
319.It Cm name Ar name
320Set the interface name to
321.Ar name .
d585233c
SZ
322.It Cm rss
323If the driver supports receive side scaling,
324enable receive side scaling on the interface.
325.It Fl rss
326If the driver supports receive side scaling,
327disable receive side scaling on the interface.
b50e4759
MD
328.It Cm rxcsum , txcsum
329If the driver supports user-configurable checksum offloading,
330enable receive (or transmit) checksum offloading on the interface.
331Some drivers may not be able to enable these flags independently
332of each other, so setting one may also set the other.
333The driver will offload as much checksum work as it can reliably
334support, the exact level of offloading varies between drivers.
b16c423b
SW
335.It Fl rxcsum , txcsum
336If the driver supports user-configurable checksum offloading,
337disable receive (or transmit) checksum offloading on the interface.
338These settings may not always be independent of each other.
339.It Cm vlanmtu , vlanhwtag
340If the driver offers user-configurable VLAN support, enable
341reception of extended frames or tag processing in hardware,
342respectively.
343Note that this must be issued on a physical interface associated with
344.Xr vlan 4 ,
345not on a
346.Xr vlan 4
347interface itself.
348.It Fl vlanmtu , vlanhwtag
349If the driver offers user-configurable VLAN support, disable
350reception of extended frames or tag processing in hardware,
351respectively.
6587026a
SZ
352.It Cm pollcpu Ar cpu
353Turn on
354.Xr polling 4
355feature and disable interrupts on the interface,
356if the driver supports this mode and
357.Ar cpu
358supports
359.Xr polling 4 .
360Driver will be polled by
361.Ar cpu .
b16c423b
SW
362.It Cm polling
363Turn on
364.Xr polling 4
365feature and disable interrupts on the interface, if the driver supports
366this mode.
367.It Fl polling
368Turn off
369.Xr polling 4
370feature and enable interrupt mode on the interface.
984263bc
MD
371.It Cm create
372Create the specified network pseudo-device.
373If the interface is given without a unit number, try to create a new
374device with an arbitrary unit number.
375If creation of an arbitrary device is successful, the new device name is
b16c423b
SW
376printed to standard output unless the interface is renamed or destroyed
377in the same
378.Nm
379invocation.
984263bc
MD
380.It Cm destroy
381Destroy the specified network pseudo-device.
382.It Cm plumb
383Another name for the
384.Cm create
385parameter.
386Included for
387.Tn Solaris
388compatibility.
389.It Cm unplumb
390Another name for the
391.Cm destroy
392parameter.
393Included for
394.Tn Solaris
395compatibility.
984263bc
MD
396.It Cm metric Ar n
397Set the routing metric of the interface to
398.Ar n ,
399default 0.
400The routing metric is used by the routing protocol
401.Pq Xr routed 8 .
402Higher metrics have the effect of making a route
b16c423b 403less favorable; metrics are counted as additional hops
984263bc
MD
404to the destination network or host.
405.It Cm mtu Ar n
406Set the maximum transmission unit of the interface to
407.Ar n ,
408default is interface specific.
409The MTU is used to limit the size of packets that are transmitted on an
410interface.
411Not all interfaces support setting the MTU, and some interfaces have
412range restrictions.
413.It Cm netmask Ar mask
414.\" (Inet and ISO.)
415(Inet only.)
416Specify how much of the address to reserve for subdividing
417networks into sub-networks.
418The mask includes the network part of the local address
419and the subnet part, which is taken from the host field of the address.
420The mask can be specified as a single hexadecimal number
421with a leading
422.Ql 0x ,
423with a dot-notation Internet address,
424or with a pseudo-network name listed in the network table
425.Xr networks 5 .
426The mask contains 1's for the bit positions in the 32-bit address
427which are to be used for the network and subnet parts,
428and 0's for the host part.
429The mask should contain at least the standard network portion,
430and the subnet field should be contiguous with the network
431portion.
432.Pp
433The netmask can also be specified in CIDR notation after the address.
434See the
435.Ar address
436option above for more information.
b16c423b
SW
437.It Cm autoconf
438(Inet6 only.)
439Enable autoconfiguration.
440.It Fl autoconf
441Disable autoconfiguration.
442.It Cm pltime Ar n
443(Inet6 only.)
444Set preferred lifetime for the address.
445.It Cm vltime Ar n
446(Inet6 only.)
447Set valid lifetime for the address.
984263bc
MD
448.It Cm prefixlen Ar len
449(Inet6 only.)
450Specify that
451.Ar len
452bits are reserved for subdividing networks into sub-networks.
453The
454.Ar len
455must be integer, and for syntactical reason it must be between 0 to 128.
456It is almost always 64 under the current IPv6 assignment rule.
457If the parameter is omitted, 64 is used.
458.Pp
459The prefix can also be specified using the slash notation after the address.
460See the
461.Ar address
462option above for more information.
b16c423b
SW
463.It Cm deprecated
464(Inet6 only.)
465Set the IPv6 deprecated address bit.
466.It Fl deprecated
467(Inet6 only.)
468Clear the IPv6 deprecated address bit.
469.It Cm tentative
470(Inet6 only.)
471Set the IPv6 tentative address bit.
472.It Fl tentative
473(Inet6 only.)
474Clear the IPv6 tentative address bit.
984263bc
MD
475.\" see
476.\" Xr eon 5 .
477.\" .It Cm nsellength Ar n
478.\" .Pf ( Tn ISO
479.\" only)
480.\" This specifies a trailing number of bytes for a received
481.\" .Tn NSAP
482.\" used for local identification, the remaining leading part of which is
483.\" taken to be the
484.\" .Tn NET
485.\" (Network Entity Title).
486.\" The default value is 1, which is conformant to US
487.\" .Tn GOSIP .
488.\" When an ISO address is set in an ifconfig command,
489.\" it is really the
490.\" .Tn NSAP
491.\" which is being specified.
492.\" For example, in
493.\" .Tn US GOSIP ,
494.\" 20 hex digits should be
495.\" specified in the
496.\" .Tn ISO NSAP
497.\" to be assigned to the interface.
498.\" There is some evidence that a number different from 1 may be useful
499.\" for
500.\" .Tn AFI
501.\" 37 type addresses.
502.It Cm range Ar netrange
503Under appletalk, set the interface to respond to a
504.Ar netrange
505of the form
506.Ar startnet Ns - Ns Ar endnet .
507Appletalk uses this scheme instead of
508netmasks though
2fe12702 509.Dx
984263bc
MD
510implements it internally as a set of netmasks.
511.It Cm remove
512Another name for the
513.Fl alias
514parameter.
515Introduced for compatibility
516with
517.Bsx .
518.It Cm phase
519The argument following this specifies the version (phase) of the
520Appletalk network attached to the interface.
521Values of 1 or 2 are permitted.
522.Sm off
523.It Cm link Op Cm 0 No - Cm 2
524.Sm on
525Enable special processing of the link level of the interface.
526These three options are interface specific in actual effect, however,
527they are in general used to select special modes of operation.
528An example
529of this is to enable SLIP compression, or to select the connector type
530for some Ethernet cards.
531Refer to the man page for the specific driver
532for more information.
533.Sm off
534.It Fl link Op Cm 0 No - Cm 2
535.Sm on
536Disable special processing at the link level with the specified interface.
b16c423b
SW
537.It Cm compress
538Another name for the
539.Cm link0
540parameter.
541.It Cm normal
542Another name for the
543.Fl link0
544parameter.
545.It Cm noicmp
546Another name for the
547.Cm link1
548parameter.
3a593c54
MD
549.It Cm monitor
550Put the interface in monitor mode.
551No packets are transmitted, and received packets are discarded after
552.Xr bpf 4
553processing.
554.It Fl monitor
555Take the interface out of monitor mode.
984263bc
MD
556.It Cm up
557Mark an interface
558.Dq up .
559This may be used to enable an interface after an
560.Dq Nm Cm down .
561It happens automatically when setting the first address on an interface.
562If the interface was reset when previously marked down,
563the hardware will be re-initialized.
55fc9f88
SZ
564.El
565.Pp
e9a7dd65
RP
566The following parameters are specific to cloning
567IEEE 802.11 wireless interfaces with the
568.Cm create
569request:
570.Bl -tag -width indent
571.It Cm wlandev Ar device
572Use
573.Ar device
574as the parent for the cloned device.
575.It Cm wlanmode Ar mode
576Specify the operating mode for this cloned device.
577.Ar mode
578is one of
579.Cm sta ,
6d67ab1b 580.Cm ahdemo
e9a7dd65
RP
581(or
582.Cm adhoc-demo ),
583.Cm ibss ,
584(or
585.Cm adhoc ),
586.Cm ap ,
587(or
588.Cm hostap ),
589.Cm wds ,
590.Cm tdma ,
591.Cm mesh ,
592and
593.Cm monitor .
594The operating mode of a cloned interface cannot be changed.
595The
596.Cm tdma
597mode is actually implemented as an
598.Cm adhoc-demo
599interface with special properties.
600.It Cm wlanbssid Ar bssid
601The 802.11 mac address to use for the bssid.
602This must be specified at create time for a legacy
603.Cm wds
604device.
605.It Cm wlanaddr Ar address
606The local mac address.
607If this is not specified then a mac address will automatically be assigned
608to the cloned device.
609Typically this address is the same as the address of the parent device
610but if the
611.Cm bssid
612parameter is specified then the driver will craft a unique address for
613the device (if supported).
614.It Cm wdslegacy
615Mark a
616.Cm wds
617device as operating in ``legacy mode''.
6d67ab1b 618Legacy
e9a7dd65
RP
619.Cm wds
620devices have a fixed peer relationship and do not, for example, roam
621if their peer stops communicating.
622For completeness a Dynamic WDS (DWDS) interface may marked as
623.Fl wdslegacy .
624.It Cm bssid
625Request a unique local mac address for the cloned device.
626This is only possible if the device supports multiple mac addresses.
627To force use of the parent's mac address use
628.Fl bssid .
629.It Cm beacons
630Mark the cloned interface as depending on hardware support to
631track received beacons.
632To have beacons tracked in software use
633.Fl beacons .
6d67ab1b 634For
e9a7dd65 635.Cm hostap
6d67ab1b 636mode
e9a7dd65
RP
637.Fl beacons
638can also be used to indicate no beacons should
639be transmitted; this can be useful when creating a WDS configuration but
640.Cm wds
641interfaces can only be created as companions to an access point.
642.El
643.Pp
644The following parameters are specific to IEEE 802.11 wireless interfaces
645cloned with a
646.Cm create
647operation:
55fc9f88 648.Bl -tag -width indent
e9a7dd65
RP
649.It Cm ampdu
650Enable sending and receiving AMPDU frames when using 802.11n (default).
651The 802.11n specification states a compliant station must be capable
652of receiving AMPDU frames but transmision is optional.
653Use
654.Fl ampdu
655to disable all use of AMPDU with 802.11n.
656For testing and/or to work around interoperability problems one can use
657.Cm ampdutx
658and
659.Cm ampdurx
660to control use of AMPDU in one direction.
661.It Cm ampdudensity Ar density
662Set the AMPDU density parameter used when operating with 802.11n.
663This parameter controls the inter-packet gap for AMPDU frames.
664The sending device normally controls this setting but a receiving station
665may request wider gaps.
666Legal values for
667.Ar density
668are 0, .25, .5, 1, 2, 4, 8, and 16 (microseconds).
669A value of
670.Cm -
671is treated the same as 0.
672.It Cm ampdulimit Ar limit
673Set the limit on packet size for receiving AMPDU frames when operating
674with 802.11n.
675Legal values for
676.Ar limit
677are 8192, 16384, 32768, and 65536 but one can also specify
678just the unique prefix: 8, 16, 32, 64.
679Note the sender may limit the size of AMPDU frames to be less
680than the maximum specified by the receiving station.
681.It Cm amsdu
682Enable sending and receiving AMSDU frames when using 802.11n.
683By default AMSDU is received but not transmitted.
684Use
685.Fl amsdu
686to disable all use of AMSDU with 802.11n.
687For testing and/or to work around interoperability problems one can use
688.Cm amsdutx
689and
690.Cm amsdurx
691to control use of AMSDU in one direction.
692.It Cm amsdulimit Ar limit
693Set the limit on packet size for sending and receiving AMSDU frames
694when operating with 802.11n.
695Legal values for
696.Ar limit
697are 7935 and 3839 (bytes).
698Note the sender may limit the size of AMSDU frames to be less
699than the maximum specified by the receiving station.
700Note also that devices are not required to support the 7935 limit,
701only 3839 is required by the specification and the larger value
702may require more memory to be dedicated to support functionality
703that is rarely used.
55fc9f88
SZ
704.It Cm apbridge
705When operating as an access point, pass packets between
706wireless clients directly (default).
707To instead let them pass up through the
708system and be forwarded using some other mechanism, use
709.Fl apbridge .
710Disabling the internal bridging
711is useful when traffic is to be processed with
712packet filtering.
984263bc 713.It Cm authmode Ar mode
55fc9f88 714Set the desired authentication mode in infrastructure mode.
e9a7dd65 715Not all adapters support all modes.
984263bc
MD
716The set of
717valid modes is
55fc9f88
SZ
718.Cm none , open , shared
719(shared key),
720.Cm 8021x
721(IEEE 802.1x),
722and
723.Cm wpa
724(IEEE WPA/WPA2/802.11i).
725The
726.Cm 8021x
984263bc 727and
55fc9f88
SZ
728.Cm wpa
729modes are only useful when using an authentication service
730(a supplicant for client operation or an authenticator when
731operating as an access point).
984263bc 732Modes are case insensitive.
e9a7dd65
RP
733.It Cm bgscan
734Enable background scanning when operating as a station.
735Background scanning is a technique whereby a station associated to
736an access point will temporarily leave the channel to scan for
737neighboring stations.
738This allows a station to maintain a cache of nearby access points
739so that roaming between access points can be done without
740a lengthy scan operation.
741Background scanning is done only when a station is not busy and
742any outbound traffic will cancel a scan operation.
743Background scanning should never cause packets to be lost though
744there may be some small latency if outbound traffic interrupts a
745scan operation.
746By default background scanning is enabled if the device is capable.
747To disable background scanning, use
748.Fl bgscan .
749Background scanning is controlled by the
750.Cm bgscanidle
751and
752.Cm bgscanintvl
753parameters.
754Background scanning must be enabled for roaming; this is an artifact
755of the current implementation and may not be required in the future.
756.It Cm bgscanidle Ar idletime
757Set the minimum time a station must be idle (not transmitting or
758receiving frames) before a background scan is initiated.
759The
760.Ar idletime
761parameter is specified in milliseconds.
762By default a station must be idle at least 250 milliseconds before
763a background scan is initiated.
764The idle time may not be set to less than 100 milliseconds.
765.It Cm bgscanintvl Ar interval
766Set the interval at which background scanning is attempted.
767The
768.Ar interval
769parameter is specified in seconds.
770By default a background scan is considered every 300 seconds (5 minutes).
6d67ab1b 771The
e9a7dd65
RP
772.Ar interval
773may not be set to less than 15 seconds.
55fc9f88
SZ
774.It Cm bintval Ar interval
775Set the interval at which beacon frames are sent when operating in
776ad-hoc or ap mode.
777The
778.Ar interval
cf00283f 779parameter is specified in TU's (1024 usecs).
55fc9f88 780By default beacon frames are transmitted every 100 TU's.
c36e937b
SZ
781.It Cm bmissthreshold Ar count
782Set the number of consecutive missed beacons at which the station
e9a7dd65 783will attempt to roam (i.e., search for a new access point).
c36e937b
SZ
784The
785.Ar count
e9a7dd65
RP
786parameter must be in the range 1 to 255; though the
787upper bound may be reduced according to device capabilities.
788The default threshold is 7 consecutive missed beacons; but
789this may be overridden by the device driver.
c36e937b
SZ
790Another name for the
791.Cm bmissthreshold
792parameter is
793.Cm bmiss .
55fc9f88
SZ
794.It Cm bssid Ar address
795Specify the MAC address of the access point to use when operating
796as a station in a BSS network.
797This overrides any automatic selection done by the system.
798To disable a previously selected access point, supply
799.Cm any , none ,
800or
801.Cm -
802for the address.
b16c423b 803This option is useful when more than one access point uses the same SSID.
55fc9f88
SZ
804Another name for the
805.Cm bssid
806parameter is
807.Cm ap .
808.It Cm burst
809Enable packet bursting.
810Packet bursting is a transmission technique whereby the wireless
811medium is acquired once to send multiple frames and the interframe
812spacing is reduced.
813This technique can significantly increase throughput by reducing
814transmission overhead.
815Packet bursting is supported by the 802.11e QoS specification
816and some devices that do not support QoS may still be capable.
817By default packet bursting is enabled if a device is capable
818of doing it.
819To disable packet bursting, use
820.Fl burst .
821.It Cm chanlist Ar channels
822Set the desired channels to use when scanning for access
823points, neighbors in an IBSS network, or looking for unoccupied
824channels when operating as an access point.
825The set of channels is specified as a comma-separated list with
826each element in the list representing either a single channel number or a range
827of the form
828.Dq Li a-b .
829Channel numbers must be in the range 1 to 255 and be permissible
830according to the operating characteristics of the device.
831.It Cm channel Ar number
832Set a single desired channel.
833Channels range from 1 to 255, but the exact selection available
834depends on the region your adaptor was manufactured for.
835Setting
836the channel to
e9a7dd65 837.Li any ,
55fc9f88
SZ
838or
839.Cm -
e9a7dd65
RP
840will clear any desired channel and, if the device is marked up,
841force a scan for a channel to operate on.
55fc9f88
SZ
842Alternatively the frequency, in megahertz, may be specified
843instead of the channel number.
e9a7dd65
RP
844.Pp
845When there are several ways to use a channel the channel
846number/frequency may be appended with attributes to clarify.
847For example, if a device is capable of operating on channel 6
848with 802.11n and 802.11g then one can specify that g-only use
849should be used by specifying ``6:g''.
850Similarly the channel width can be specified by appending it
851with ``/''; e.g. ``6/40'' specifies a 40MHz wide channel,
852These attributes can be combined as in: ``6:ht/40''.
853The full set of flags specified following a `:'' are:
854.Cm a
855(802.11a),
856.Cm b
857(802.11b),
858.Cm d
859(Atheros Dynamic Turbo mode),
860.Cm g
861(802.11g),
862.Cm h
863or
864.Cm n
865(802.11n aka HT),
866.Cm s
867(Atheros Static Turbo mode),
868and
869.Cm t
870(Atheros Dynamic Turbo mode, or appended to ``st'' and ``dt'').
871The full set of channel widths following a '/' are:
6d67ab1b 872.Cm 5
e9a7dd65 873(5MHz aka quarter-rate channel),
6d67ab1b 874.Cm 10
e9a7dd65 875(10MHz aka half-rate channel),
6d67ab1b 876.Cm 20
e9a7dd65
RP
877(20MHz mostly for use in specifying ht20),
878and
6d67ab1b 879.Cm 40
e9a7dd65
RP
880(40MHz mostly for use in specifying ht40),
881In addition,
882a 40MHz HT channel specification may include the location
883of the extension channel by appending ``+'' or ``-'' for above and below,
6d67ab1b 884respectively; e.g. ``2437:ht/40+'' specifies 40MHz wide HT operation
e9a7dd65
RP
885with the center channel at frequency 2437 and the extension channel above.
886.It Cm country Ar name
887Set the country code to use in calculating the regulatory constraints
888for operation.
889In particular the set of available channels, how the wireless device
890will operation on the channels, and the maximum transmit power that
891can be used on a channel are defined by this setting.
892Country/Region codes are specified as a 2-character abbreviation
893defined by ISO 3166 or using a longer, but possibly ambiguous, spelling;
894e.g. "ES" and "Spain".
895The set of country codes are taken from /etc/regdomain.xml and can also
896be viewed with the ``list countries'' request.
897Note that not all devices support changing the country code from a default
898setting; typically stored in EEPROM.
899See also
900.Cm regdomain ,
901.Cm indoor ,
902.Cm outdoor ,
903and
904.Cm anywhere .
905.It Cm dfs
906Enable Dynamic Frequency Selection (DFS) as specified in 802.11h.
907DFS embodies several facilities including detection of overlapping
908radar signals, dynamic transmit power control, and channel selection
909according to a least-congested criteria.
910DFS support is mandatory for some 5Ghz frequencies in certain
911locales (e.g. ETSI).
912By default DFS is enabled according to the regulatory definitions
913specified in /etc/regdomain.xml and the curent country code, regdomain,
914and channel.
915Note the underlying device (and driver) must support radar detection
916for full DFS support to work.
917To be fully compliant with the local regulatory agency frequencies that
918require DFS should not be used unless it is fully supported.
919Use
920.Fl dfs
921to disable this functionality for testing.
922.It Cm dotd
923Enable support for the 802.11d specification (default).
924When this support is enabled in station mode, beacon frames that advertise
925a country code different than the currently configured country code will
926cause an event to be dispatched to user applications.
927This event can be used by the station to adopt that country code and
928operate according to the associated regulatory constraints.
929When operating as an access point with 802.11d enabled the beacon and
930probe response frames transmitted will advertise the current regulatory
931domain settings.
932To disable 802.11d use
933.Fl dotd .
934.It Cm doth
935Enable 802.11h support including spectrum management.
936When 802.11h is enabled beacon and probe response frames will have
937the SpectrumMgt bit set in the capabilities field and
938country and power constraint information elements will be present.
939802.11h support also includes handling Channel Switch Announcements (CSA)
940which are a mechanism to coordinate channel changes by an access point.
941By default 802.11h is enabled if the device is capable.
942To disable 802.11h use
943.Fl doth .
55fc9f88
SZ
944.It Cm deftxkey Ar index
945Set the default key to use for transmission.
946Typically this is only set when using WEP encryption.
e9a7dd65
RP
947Note that you must set a default transmit key
948for the system to know which key to use in encrypting outbound traffic.
55fc9f88
SZ
949The
950.Cm weptxkey
951is an alias for this request; it is provided for backwards compatibility.
952.It Cm dtimperiod Ar period
953Set the
954DTIM
955period for transmitting buffered multicast data frames when
956operating in ap mode.
957The
958.Ar period
959specifies the number of beacon intervals between DTIM
960and must be in the range 1 to 15.
961By default DTIM is 1 (i.e., DTIM occurs at each beacon).
e9a7dd65
RP
962.It Cm dturbo
963Enable the use of Atheros Dynamic Turbo mode when communicating with
964another Dynamic Turbo-capable station.
965Dynamic Turbo mode is an Atheros-specific mechanism by which
966stations switch between normal 802.11 operation and a ``boosted''
967mode in which a 40MHz wide channel is used for communication.
968Stations using Dynamic Turbo mode operate boosted only when the
969channel is free of non-dturbo stations; when a non-dturbo station
970is identified on the channel all stations will automatically drop
971back to normal operation.
972By default, Dynamic Turbo mode is not enabled, even if the device is capable.
973Note that turbo mode (dynamic or static) is only allowed on some
974channels depending on the regulatory constraints; use the
975.Cm list chan
976command to identify the channels where turbo mode may be used.
977To disable Dynamic Turbo mode use
978.Fl dturbo .
979.It Cm dwds
980Enable Dynamic WDS (DWDS) support.
981DWDS is a facility by which 4-address traffic can be carried between
982stations operating in infrastructure mode.
983A station first associates to an access point and authenticates using
984normal procedures (e.g. WPA).
985Then 4-address frames are passed to carry traffic for stations
986operating on either side of the wireless link.
987DWDS extends the normal WDS mechanism by leveraging existing security
988protocols and eliminating static binding.
989.Pp
990When DWDS is enabled on an access point 4-address frames received from
991an authorized station will generate a ``DWDS discovery'' event to user
992applications.
993This event should be used to create a WDS interface that is bound
994to the remote station (and usually plumbed into a bridge).
995Once the WDS interface is up and running 4-address traffic then logically
996flows through that interface.
997.Pp
998When DWDS is enabled on a station, traffic with a destination address
999different from the peer station are encapsulated in a 4-address frame
1000and transmitted to the peer.
1001All 4-address traffic uses the security information of the stations
1002(e.g. cryptographic keys).
1003A station is associated using 802.11n facilities may transport
10044-address traffic using these same mechanisms; this depends on available
1005resources and capabilities of the device.
1006The DWDS implementation guards against layer 2 routing loops of
1007multicast traffic.
1008.It Cm ff
1009Enable the use of Atheros Fast Frames when communicating with
1010another Fast Frames-capable station.
1011Fast Frames are an encapsulation technique by which two 802.3
1012frames are transmitted in a single 802.11 frame.
1013This can noticeably improve throughput but requires that the
1014receiving station understand how to decapsulate the frame.
1015Fast frame use is negotiated using the Atheros 802.11 vendor-specific
1016protocol extension so enabling use is safe when communicating with
1017non-Atheros devices.
1018By default, use of fast frames is enabled if the device is capable.
1019To explicitly disable fast frames, use
1020.Fl ff .
55fc9f88
SZ
1021.It Cm fragthreshold Ar length
1022Set the threshold for which transmitted frames are broken into fragments.
1023The
1024.Ar length
1025argument is the frame size in bytes and must be in the range 256 to 2346.
1026Setting
1027.Ar length
1028to
1029.Li 2346 ,
1030.Cm any ,
1031or
1032.Cm -
1033disables transmit fragmentation.
e9a7dd65 1034Not all adapters honor the fragmentation threshold.
55fc9f88
SZ
1035.It Cm hidessid
1036When operating as an access point, do not broadcast the SSID
1037in beacon frames or respond to probe request frames unless
1038they are directed to the ap (i.e., they include the ap's SSID).
1039By default, the SSID is included in beacon frames and
1040undirected probe request frames are answered.
1041To re-enable the broadcast of the SSID etc., use
1042.Fl hidessid .
e9a7dd65
RP
1043.It Cm ht
1044Enable use of High Throughput (HT) when using 802.11n (default).
1045The 802.11n specification includes mechanisms for operation
1046on 20MHz and 40MHz wide channels using different signalling mechanisms
1047than specified in 802.11b, 802.11g, and 802.11a.
1048Stations negotiate use of these facilities, termed HT20 and HT40,
1049when they associate.
1050To disable all use of 802.11n use
1051.Fl ht .
1052To disable use of HT20 (e.g. to force only HT40 use) use
1053.Fl ht20 .
1054To disable use of HT40 use
1055.Fl ht40 .
1056.Pp
1057HT configuration is used to ``auto promote'' operation
1058when several choices are available.
1059For example, if a station associates to an 11n-capable access point
1060it controls whether the station uses legacy operation, HT20, or HT40.
1061When an 11n-capable device is setup as an access point and
1062Auto Channel Selection is used to locate a channel to operate on,
1063HT configuration controls whether legacy, HT20, or HT40 operation is setup
1064on the selected channel.
1065If a fixed channel is specified for a station then HT configuration can
1066be given as part of the channel specification; e.g. 6:ht/20 to setup
1067HT20 operation on channel 6.
1068.It Cm htcompat
1069Enable use of compatibility support for pre-802.11n devices (default).
1070The 802.11n protocol specification went through several incompatible iterations.
1071Some vendors implemented 11n support to older specifications that
1072will not interoperate with a purely 11n-compliant station.
1073In particular the information elements included in management frames
1074for old devices are different.
1075When compatibility support is enabled both standard and compatible data
1076will be provided.
4d770dcf 1077Stations that associate using the compatibility mechanisms are flagged
e9a7dd65 1078in ``list sta''.
4d770dcf 1079To disable compatibility support use
e9a7dd65
RP
1080.Fl htcompat .
1081.It Cm htprotmode Ar technique
1082For interfaces operating in 802.11n, use the specified
1083.Ar technique
1084for protecting HT frames in a mixed legacy/HT network.
1085The set of valid techniques is
1086.Cm off ,
1087and
1088.Cm rts
1089(RTS/CTS, default).
1090Technique names are case insensitive.
1091.It Cm inact
1092Enable inactivity processing for stations associated to an
1093access point (default).
1094When operating as an access point the 802.11 layer monitors
1095the activity of each associated station.
1096When a station is inactive for 5 minutes it will send several
1097``probe frames'' to see if the station is still present.
1098If no response is received then the station is deauthenticated.
1099Applications that prefer to handle this work can disable this
1100facility by using
1101.Fl inact .
1102.It Cm indoor
1103Set the location to use in calculating regulatory constraints.
1104The location is also advertised in beacon and probe response frames
1105when 802.11d is enabled with
1106.Cm dotd .
1107See also
1108.Cm outdoor ,
1109.Cm anywhere ,
1110.Cm country ,
1111and
1112.Cm regdomain .
55fc9f88
SZ
1113.It Cm list active
1114Display the list of channels available for use taking into account
1115any restrictions set with the
1116.Cm chanlist
1117directive.
1118See the description of
1119.Cm list chan
1120for more information.
1121.It Cm list caps
1122Display the adaptor's capabilities, including the operating
1123modes supported.
1124.It Cm list chan
1125Display the list of channels available for use.
1126Channels are shown with their IEEE channel number, equivalent
1127frequency, and usage modes.
1128Channels identified as
1129.Ql 11g
1130are also usable in
1131.Ql 11b
1132mode.
1133Channels identified as
1134.Ql 11a Turbo
1135may be used only for Atheros' Static Turbo mode
e9a7dd65 1136(specified with
4097c65c 1137.Cm mediaopt turbo ) .
55fc9f88
SZ
1138Channels marked with a
1139.Ql *
1140have a regulatory constraint that they be passively scanned.
1141This means a station is not permitted to transmit on the channel until
1142it identifies the channel is being used for 802.11 communication;
1143typically by hearing a beacon frame from an access point operating
1144on the channel.
1145.Cm list freq
1146is another way of requesting this information.
e9a7dd65
RP
1147By default a compacted list of channels is displayed; if the
1148.Fl v
1149option is specified then all channels are shown.
1150.It Cm list countries
1151Display the set of country codes and regulatory domains that can be
1152used in regulatory configuration.
55fc9f88
SZ
1153.It Cm list mac
1154Display the current MAC Access Control List state.
1155Each address is prefixed with a character that indicates the
1156current policy applied to it:
1157.Ql +
1158indicates the address is allowed access,
1159.Ql -
1160indicates the address is denied access,
1161.Ql *
1162indicates the address is present but the current policy open
1163(so the ACL is not consulted).
e9a7dd65
RP
1164.It Cm list mesh
1165Displays the mesh routing table, used for forwarding packets on a mesh
1166network.
1167.It Cm list regdomain
1168Display the current regulatory settings including the available channels
1169and transmit power caps.
1170.It Cm list roam
1171Display the parameters that govern roaming operation.
1172.It Cm list txparam
1173Display the parameters that govern transmit operation.
1174.It Cm list txpower
1175Display the transmit power caps for each channel.
55fc9f88
SZ
1176.It Cm list scan
1177Display the access points and/or ad-hoc neighbors
1178located in the vicinity.
e9a7dd65
RP
1179This information may be updated automatically by the adapter
1180with a
55fc9f88 1181.Cm scan
e9a7dd65
RP
1182request or through background scanning.
1183Depending on the capabilities of the stations the following
1184flags can be included in the output:
1185.Bl -tag -width 3n
1186.It Li A
1187Authorized.
1188Indicates that the station is permitted to send/receive data frames.
1189.It Li E
1190Extended Rate Phy (ERP).
1191Indicates that the station is operating in an 802.11g network
1192using extended transmit rates.
1193.It Li H
1194High Throughput (HT).
1195Indicates that the station is using HT transmit rates.
1196If a `+' follows immediately after then the station associated
1197using deprecated mechanisms supported only when
1198.Cm htcompat
1199is enabled.
1200.It Li P
1201Power Save.
1202Indicates that the station is operating in power save mode.
1203.It Li Q
1204Quality of Service (QoS).
1205Indicates that the station is using QoS encapsulation for
1206data frame.
1207QoS encapsulation is enabled only when WME mode is enabled.
1208.It Li T
1209Transitional Security Network (TSN).
1210Indicates that the station associated using TSN; see also
1211.Cm tsn
1212below.
1213.It Li W
1214Wi-Fi Protected Setup (WPS).
1215Indicates that the station associated using WPS.
1216.El
1217.Pp
1218By default interesting information elements captured from the neighboring
1219stations are displayed at the end of each row.
1220Possible elements include:
1221.Cm WME
1222(station supports WME),
1223.Cm WPA
1224(station supports WPA),
1225.Cm WPS
1226(station supports WPS),
1227.Cm RSN
1228(station supports 802.11i/RSN),
1229.Cm HTCAP
1230(station supports 802.11n/HT communication),
1231.Cm ATH
1232(station supports Atheros protocol extensions),
1233.Cm VEN
1234(station supports unknown vendor-specific extensions).
1235If the
1236.Fl v
1237flag is used all the information elements and their
1238contents will be shown.
1239Specifying the
1240.Fl v
1241flag also enables display of long SSIDs.
1242The
55fc9f88 1243.Cm list ap
e9a7dd65 1244command is another way of requesting this information.
55fc9f88
SZ
1245.It Cm list sta
1246When operating as an access point display the stations that are
1247currently associated.
1248When operating in ad-hoc mode display stations identified as
1249neighbors in the IBSS.
e9a7dd65
RP
1250When operating in mesh mode display stations identified as
1251neighbors in the MBSS.
1252When operating in station mode display the access point.
1253Capabilities advertised by the stations are described under
1254the
1255.Cm scan
1256request.
1257Depending on the capabilities of the stations the following
1258flags can be included in the output:
1259.Bl -tag -width 3n
1260.It Li A
1261Authorized.
1262Indicates that the station is permitted to send/receive data frames.
1263.It Li E
1264Extended Rate Phy (ERP).
1265Indicates that the station is operating in an 802.11g network
1266using extended transmit rates.
1267.It Li H
1268High Throughput (HT).
1269Indicates that the station is using HT transmit rates.
1270If a `+' follows immediately after then the station associated
1271using deprecated mechanisms supported only when
1272.Cm htcompat
1273is enabled.
1274.It Li P
1275Power Save.
1276Indicates that the station is operating in power save mode.
1277.It Li Q
1278Quality of Service (QoS).
1279Indicates that the station is using QoS encapsulation for
1280data frame.
1281QoS encapsulation is enabled only when WME mode is enabled.
1282.It Li T
1283Transitional Security Network (TSN).
1284Indicates that the station associated using TSN; see also
1285.Cm tsn
1286below.
1287.It Li W
1288Wi-Fi Protected Setup (WPS).
1289Indicates that the station associated using WPS.
1290.El
1291.Pp
1292By default information elements received from associated stations
1293are displayed in a short form; the
1294.Fl v
1295flag causes this information to be displayed symbolically.
55fc9f88 1296.It Cm list wme
e9a7dd65
RP
1297Display the current channel parameters to use when operating in WME mode.
1298If the
1299.Fl v
1300option is specified then both channel and BSS parameters are displayed
1301for each AC (first channel, then BSS).
55fc9f88
SZ
1302When WME mode is enabled for an adaptor this information will be
1303displayed with the regular status; this command is mostly useful
1304for examining parameters when WME mode is disabled.
1305See the description of the
1306.Cm wme
1307directive for information on the various parameters.
e9a7dd65
RP
1308.It Cm maxretry Ar count
1309Set the maximum number of tries to use in sending unicast frames.
1310The default setting is 6 but drivers may override this with a value
1311they choose.
55fc9f88
SZ
1312.It Cm mcastrate Ar rate
1313Set the rate for transmitting multicast/broadcast frames.
e9a7dd65 1314Rates are specified as megabits/second in decimal; e.g.\& 5.5 for 5.5 Mb/s.
55fc9f88
SZ
1315This rate should be valid for the current operating conditions;
1316if an invalid rate is specified drivers are free to chose an
1317appropriate rate.
e9a7dd65
RP
1318.It Cm mgtrate Ar rate
1319Set the rate for transmitting management and/or control frames.
1320Rates are specified as megabits/second in decimal; e.g.\& 5.5 for 5.5 Mb/s.
1321.It Cm outdoor
1322Set the location to use in calculating regulatory constraints.
1323The location is also advertised in beacon and probe response frames
1324when 802.11d is enabled with
1325.Cm dotd .
1326See also
1327.Cm anywhere ,
1328.Cm country ,
1329.Cm indoor ,
1330and
1331.Cm regdomain .
984263bc 1332.It Cm powersave
55fc9f88
SZ
1333Enable powersave operation.
1334When operating as a client, the station will conserve power by
1335periodically turning off the radio and listening for
1336messages from the access point telling it there are packets waiting.
1337The station must then retrieve the packets.
e9a7dd65
RP
1338Not all devices support power save operation as a client.
1339The 802.11 specification requires that all access points support
1340power save but some drivers do not.
55fc9f88
SZ
1341Use
1342.Fl powersave
e9a7dd65 1343to disable powersave operation when operating as a client.
7a3671b0
SW
1344.It Cm powersavemode Ar mode
1345Set powersave mode.
1346The set of valid modes is
1347.Cm off
1348(same as
1349.Fl powersave ) ,
1350.Cm on
1351(same as
1352.Cm powersave ) ,
1353and
1354.Cm cam
1355(same as
1356.Cm powersave ) .
984263bc 1357.It Cm powersavesleep Ar sleep
a33626b9
SZ
1358Set the desired max powersave sleep time in TU's (1024 usecs).
1359By default the max powersave sleep time is 100 TU's.
b50e4759 1360.It Cm protmode Ar technique
55fc9f88 1361For interfaces operating in 802.11g, use the specified
b50e4759
MD
1362.Ar technique
1363for protecting OFDM frames in a mixed 11b/11g network.
1364The set of valid techniques is
55fc9f88 1365.Cm off , cts
b50e4759
MD
1366(CTS to self),
1367and
55fc9f88 1368.Cm rtscts
b50e4759
MD
1369(RTS/CTS).
1370Technique names are case insensitive.
e9a7dd65
RP
1371Not all devices support
1372.Cm cts
1373as a protection technique.
55fc9f88
SZ
1374.It Cm pureg
1375When operating as an access point in 802.11g mode allow only
137611g-capable stations to associate (11b-only stations are not
1377permitted to associate).
1378To allow both 11g and 11b-only stations to associate, use
1379.Fl pureg .
e9a7dd65
RP
1380.It Cm puren
1381When operating as an access point in 802.11n mode allow only
1382HT-capable stations to associate (legacy stations are not
1383permitted to associate).
1384To allow both HT and legacy stations to associate, use
1385.Fl puren .
1386.It Cm regdomain Ar sku
1387Set the regulatory domain to use in calculating the regulatory constraints
1388for operation.
1389In particular the set of available channels, how the wireless device
1390will operation on the channels, and the maximum transmit power that
1391can be used on a channel are defined by this setting.
1392Regdomain codes (SKU's) are taken from /etc/regdomain.xml and can also
1393be viewed with the ``list countries'' request.
1394Note that not all devices support changing the regdomain from a default
1395setting; typically stored in EEPROM.
1396See also
1397.Cm country ,
1398.Cm indoor ,
1399.Cm outdoor ,
1400and
1401.Cm anywhere .
1402.It Cm rifs
1403Enable use of Reduced InterFrame Spacing (RIFS) when operating in 802.11n
1404on an HT channel.
1405Note that RIFS must be supported by both the station and access point
1406for it to be used.
1407To disable RIFS use
1408.Fl rifs .
1409.It Cm roam:rate Ar rate
1410Set the threshold for controlling roaming when operating in a BSS.
1411The
1412.Ar rate
1413parameter specifies the transmit rate in megabits
1414at which roaming should be considered.
1415If the current transmit rate drops below this setting and background scanning
1416is enabled, then the system will check if a more desirable access point is
1417available and switch over to it.
1418The current scan cache contents are used if they are considered
1419valid according to the
1420.Cm scanvalid
1421parameter; otherwise a background scan operation is triggered before
1422any selection occurs.
1423Each channel type has a separate rate threshold; the default values are:
142412 Mb/s (11a), 2 Mb/s (11b), 2 Mb/s (11g), MCS 1 (11na, 11ng).
1425.It Cm roam:rssi Ar rssi
1426Set the threshold for controlling roaming when operating in a BSS.
1427The
1428.Ar rssi
1429parameter specifies the receive signal strength in dBm units
1430at which roaming should be considered.
1431If the current rssi drops below this setting and background scanning
1432is enabled, then the system will check if a more desirable access point is
1433available and switch over to it.
1434The current scan cache contents are used if they are considered
1435valid according to the
1436.Cm scanvalid
1437parameter; otherwise a background scan operation is triggered before
1438any selection occurs.
1439Each channel type has a separate rssi threshold; the default values are
1440all 7 dBm.
55fc9f88
SZ
1441.It Cm roaming Ar mode
1442When operating as a station, control how the system will
1443behave when communication with the current access point
1444is broken.
1445The
1446.Ar mode
1447argument may be one of
1448.Cm device
1449(leave it to the hardware device to decide),
1450.Cm auto
1451(handle either in the device or the operating system\[em]as appropriate),
1452.Cm manual
1453(do nothing until explicitly instructed).
1454By default, the device is left to handle this if it is
1455capable; otherwise, the operating system will automatically
1456attempt to reestablish communication.
e9a7dd65
RP
1457Manual mode is used by applications such as
1458.Xr wpa_supplicant 8
1459that want to control the selection of an access point.
b50e4759 1460.It Cm rtsthreshold Ar length
55fc9f88 1461Set the threshold for which
b50e4759
MD
1462transmitted frames are preceded by transmission of an
1463RTS
1464control frame.
1465The
1466.Ar length
1467argument
55fc9f88
SZ
1468is the frame size in bytes and must be in the range 1 to 2346.
1469Setting
1470.Ar length
1471to
1472.Li 2346 ,
1473.Cm any ,
1474or
1475.Cm -
1476disables transmission of RTS frames.
e9a7dd65 1477Not all adapters support setting the RTS threshold.
55fc9f88
SZ
1478.It Cm scan
1479Initiate a scan of neighboring stations, wait for it to complete, and
1480display all stations found.
1481Only the super-user can initiate a scan.
e9a7dd65
RP
1482See
1483.Cm list scan
1484for information on the display.
1485By default a background scan is done; otherwise a foreground
1486scan is done and the station may roam to a different access point.
55fc9f88
SZ
1487The
1488.Cm list scan
1489request can be used to show recent scan results without
1490initiating a new scan.
e9a7dd65
RP
1491.It Cm scanvalid Ar threshold
1492Set the maximum time the scan cache contents are considered valid;
1493i.e. will be used without first triggering a scan operation to
1494refresh the data.
b16c423b 1495The
e9a7dd65
RP
1496.Ar threshold
1497parameter is specified in seconds and defaults to 60 seconds.
1498The minimum setting for
1499.Ar threshold
1500is 10 seconds.
1501One should take care setting this threshold; if it is set too low
1502then attempts to roam to another access point may trigger unnecessary
1503background scan operations.
1504.It Cm shortgi
1505Enable use of Short Guard Interval when operating in 802.11n
1506on an HT channel.
1507NB: this currently enables Short GI on both HT40 and HT20 channels.
1508To disable Short GI use
1509.Fl shortgi .
1510.It Cm smps
1511Enable use of Static Spatial Multiplexing Power Save (SMPS)
1512when operating in 802.11n.
1513A station operating with Static SMPS maintains only a single
1514receive chain active (this can significantly reduce power consumption).
1515To disable SMPS use
1516.Fl smps .
1517.It Cm smpsdyn
1518Enable use of Dynamic Spatial Multiplexing Power Save (SMPS)
1519when operating in 802.11n.
1520A station operating with Dynamic SMPS maintains only a single
1521receive chain active but switches to multiple receive chains when it
1522receives an RTS frame (this can significantly reduce power consumption).
1523Note that stations cannot distinguish between RTS/CTS intended to
1524enable multiple receive chains and those used for other purposes.
1525To disable SMPS use
1526.Fl smps .
1527.It Cm ssid Ar ssid
1528Set the desired Service Set Identifier (aka network name).
1529The SSID is a string up to 32 characters
1530in length and may be specified as either a normal string or in
1531hexadecimal when preceded by
1532.Ql 0x .
1533Additionally, the SSID may be cleared by setting it to
1534.Ql - .
1535.It Cm tdmaslot Ar slot
1536When operating with TDMA, use the specified
1537.Ar slot
1538configuration.
1539The
1540.Ar slot
1541is a number between 0 and the maximum number of slots in the BSS.
1542Note that a station configured as slot 0 is a master and
1543will broadcast beacon frames advertising the BSS;
1544stations configured to use other slots will always
1545scan to locate a master before they ever transmit.
1546By default
1547.Cm tdmaslot
1548is set to 1.
1549.It Cm tdmaslotcnt Ar cnt
1550When operating with TDMA, setup a BSS with
1551.Ar cnt
1552slots.
1553The slot count may be at most 8.
1554The current implementation is only tested with two stations
1555(i.e. point to point applications).
1556This setting is only meaningful when a station is configured as slot 0;
1557other stations adopt this setting from the BSS they join.
1558By default
1559.Cm tdmaslotcnt
1560is set to 2.
1561.It Cm tdmaslotlen Ar len
1562When operating with TDMA, setup a BSS such that each station has a slot
1563.Ar len
1564microseconds long.
1565The slot length must be at least 150 microseconds (1/8 TU)
1566and no more than 65 milliseconds.
1567Note that setting too small a slot length may result in poor channel
1568bandwidth utilization due to factors such as timer granularity and
1569guard time.
1570This setting is only meaningful when a station is configured as slot 0;
1571other stations adopt this setting from the BSS they join.
1572By default
1573.Cm tdmaslotlen
1574is set to 10 milliseconds.
1575.It Cm tdmabintval Ar intval
1576When operating with TDMA, setup a BSS such that beacons are transmitted every
1577.Ar intval
1578superframes to synchronize the TDMA slot timing.
1579A superframe is defined as the number of slots times the slot length; e.g.
1580a BSS with two slots of 10 milliseconds has a 20 millisecond superframe.
1581The beacon interval may not be zero.
1582A lower setting of
1583.Cm tdmabintval
1584causes the timers to be resynchronized more often; this can be help if
1585significant timer drift is observed.
1586By default
1587.Cm tdmabintval
1588is set to 5.
1589.It Cm tsn
1590When operating as an access point with WPA/802.11i allow legacy
1591stations to associate using static key WEP and open authentication.
1592To disallow legacy station use of WEP, use
1593.Fl tsn .
b50e4759 1594.It Cm txpower Ar power
55fc9f88 1595Set the power used to transmit frames.
b50e4759
MD
1596The
1597.Ar power
e9a7dd65 1598argument is specified in .5 dBm units.
b50e4759
MD
1599Out of range values are truncated.
1600Typically only a few discreet power settings are available and
1601the driver will use the setting closest to the specified value.
e9a7dd65
RP
1602Not all adapters support changing the transmit power.
1603.It Cm ucastrate Ar rate
1604Set a fixed rate for transmitting unicast frames.
1605Rates are specified as megabits/second in decimal; e.g.\& 5.5 for 5.5 Mb/s.
1606This rate should be valid for the current operating conditions;
1607if an invalid rate is specified drivers are free to chose an
1608appropriate rate.
984263bc 1609.It Cm wepmode Ar mode
55fc9f88 1610Set the desired WEP mode.
e9a7dd65 1611Not all adapters support all modes.
984263bc 1612The set of valid modes is
55fc9f88 1613.Cm off , on ,
984263bc 1614and
55fc9f88 1615.Cm mixed .
b50e4759 1616The
55fc9f88 1617.Cm mixed
984263bc
MD
1618mode explicitly tells the adaptor to allow association with access
1619points which allow both encrypted and unencrypted traffic.
e9a7dd65 1620On these adapters,
55fc9f88 1621.Cm on
984263bc 1622means that the access point must only allow encrypted connections.
e9a7dd65 1623On other adapters,
55fc9f88 1624.Cm on
984263bc 1625is generally another name for
55fc9f88 1626.Cm mixed .
984263bc
MD
1627Modes are case insensitive.
1628.It Cm weptxkey Ar index
55fc9f88
SZ
1629Set the WEP key to be used for transmission.
1630This is the same as setting the default transmission key with
1631.Cm deftxkey .
984263bc 1632.It Cm wepkey Ar key Ns | Ns Ar index : Ns Ar key
55fc9f88 1633Set the selected WEP key.
984263bc
MD
1634If an
1635.Ar index
1636is not given, key 1 is set.
1637A WEP key will be either 5 or 13
1638characters (40 or 104 bits) depending of the local network and the
1639capabilities of the adaptor.
1640It may be specified either as a plain
55fc9f88 1641string or as a string of hexadecimal digits preceded by
984263bc
MD
1642.Ql 0x .
1643For maximum portability, hex keys are recommended;
1644the mapping of text keys to WEP encryption is usually driver-specific.
1645In particular, the
1646.Tn Windows
1647drivers do this mapping differently to
e9a7dd65 1648.Fx .
984263bc
MD
1649A key may be cleared by setting it to
1650.Ql - .
1651If WEP is supported then there are at least four keys.
e9a7dd65 1652Some adapters support more than four keys.
984263bc
MD
1653If that is the case, then the first four keys
1654(1-4) will be the standard temporary keys and any others will be adaptor
1655specific keys such as permanent keys stored in NVRAM.
e9a7dd65
RP
1656.Pp
1657Note that you must set a default transmit key with
1658.Cm deftxkey
1659for the system to know which key to use in encrypting outbound traffic.
55fc9f88
SZ
1660.It Cm wme
1661Enable Wireless Multimedia Extensions (WME) support, if available,
1662for the specified interface.
1663WME is a subset of the IEEE 802.11e standard to support the
1664efficient communication of realtime and multimedia data.
1665To disable WME support, use
1666.Fl wme .
e9a7dd65
RP
1667Another name for this parameter is
1668.Cm wmm .
55fc9f88
SZ
1669.Pp
1670The following parameters are meaningful only when WME support is in use.
1671Parameters are specified per-AC (Access Category) and
1672split into those that are used by a station when acting
1673as an access point and those for client stations in the BSS.
1674The latter are received from the access point and may not be changed
1675(at the station).
1676The following Access Categories are recognized:
1677.Pp
1678.Bl -tag -width ".Cm AC_BK" -compact
1679.It Cm AC_BE
1680(or
1681.Cm BE )
1682best effort delivery,
1683.It Cm AC_BK
1684(or
1685.Cm BK )
1686background traffic,
1687.It Cm AC_VI
1688(or
1689.Cm VI )
1690video traffic,
1691.It Cm AC_VO
1692(or
1693.Cm VO )
1694voice traffic.
1695.El
1696.Pp
1697AC parameters are case-insensitive.
1698Traffic classification is done in the operating system using the
1699vlan priority associated with data frames or the
1700ToS (Type of Service) indication in IP-encapsulated frames.
1701If neither information is present, traffic is assigned to the
1702Best Effort (BE) category.
1703.Bl -tag -width indent
1704.It Cm ack Ar ac
1705Set the ACK policy for QoS transmissions by the local station;
1706this controls whether or not data frames transmitted by a station
1707require an ACK response from the receiving station.
1708To disable waiting for an ACK use
1709.Fl ack .
1710This parameter is applied only to the local station.
1711.It Cm acm Ar ac
1712Enable the Admission Control Mandatory (ACM) mechanism
1713for transmissions by the local station.
1714To disable the ACM use
1715.Fl acm .
1716On stations in a BSS this parameter is read-only and indicates
1717the setting received from the access point.
1718NB: ACM is not supported right now.
1719.It Cm aifs Ar ac Ar count
1720Set the Arbitration Inter Frame Spacing (AIFS)
1721channel access parameter to use for transmissions
1722by the local station.
1723On stations in a BSS this parameter is read-only and indicates
1724the setting received from the access point.
1725.It Cm cwmin Ar ac Ar count
1726Set the CWmin channel access parameter to use for transmissions
1727by the local station.
1728On stations in a BSS this parameter is read-only and indicates
1729the setting received from the access point.
1730.It Cm cwmax Ar ac Ar count
1731Set the CWmax channel access parameter to use for transmissions
1732by the local station.
1733On stations in a BSS this parameter is read-only and indicates
1734the setting received from the access point.
1735.It Cm txoplimit Ar ac Ar limit
1736Set the Transmission Opportunity Limit channel access parameter
1737to use for transmissions by the local station.
1738This parameter defines an interval of time when a WME station
1739has the right to initiate transmissions onto the wireless medium.
1740On stations in a BSS this parameter is read-only and indicates
1741the setting received from the access point.
1742.It Cm bss:aifs Ar ac Ar count
1743Set the AIFS channel access parameter to send to stations in a BSS.
1744This parameter is meaningful only when operating in ap mode.
1745.It Cm bss:cwmin Ar ac Ar count
1746Set the CWmin channel access parameter to send to stations in a BSS.
1747This parameter is meaningful only when operating in ap mode.
1748.It Cm bss:cwmax Ar ac Ar count
1749Set the CWmax channel access parameter to send to stations in a BSS.
1750This parameter is meaningful only when operating in ap mode.
1751.It Cm bss:txoplimit Ar ac Ar limit
1752Set the TxOpLimit channel access parameter to send to stations in a BSS.
1753This parameter is meaningful only when operating in ap mode.
1754.El
e9a7dd65
RP
1755.It Cm wps
1756Enable Wireless Privacy Subscriber support.
1757Note that WPS support requires a WPS-capable supplicant.
1758To disable this function use
1759.Fl wps .
55fc9f88
SZ
1760.El
1761.Pp
1762The following parameters support an optional access control list
e9a7dd65 1763feature available with some adapters when operating in ap mode; see
55fc9f88
SZ
1764.Xr wlan_acl 4 .
1765This facility allows an access point to accept/deny association
1766requests based on the MAC address of the station.
1767Note that this feature does not significantly enhance security
1768as MAC address spoofing is easy to do.
1769.Bl -tag -width indent
1770.It Cm mac:add Ar address
1771Add the specified MAC address to the database.
1772Depending on the policy setting association requests from the
1773specified station will be allowed or denied.
1774.It Cm mac:allow
1775Set the ACL policy to permit association only by
1776stations registered in the database.
1777.It Cm mac:del Ar address
1778Delete the specified MAC address from the database.
1779.It Cm mac:deny
1780Set the ACL policy to deny association only by
1781stations registered in the database.
1782.It Cm mac:kick Ar address
1783Force the specified station to be deauthenticated.
1784This typically is done to block a station after updating the
1785address database.
1786.It Cm mac:open
1787Set the ACL policy to allow all stations to associate.
1788.It Cm mac:flush
1789Delete all entries in the database.
e9a7dd65
RP
1790.It Cm mac:radius
1791Set the ACL policy to permit association only by
1792stations approved by a RADIUS server.
1793Note that this feature requires the
1794.Xr hostapd 8
1795program be configured to do the right thing
1796as it handles the RADIUS processing
1797(and marks stations as authorized).
1798.El
1799.Pp
1800The following parameters are related to a wireless interface operating in mesh
1801mode:
1802.Bl -tag -width indent
1803.It Cm meshid Ar meshid
1804Set the desired Mesh Identifier.
1805The Mesh ID is a string up to 32 characters in length.
1806A mesh interface must have a Mesh Identifier specified
1807to reach an operational state.
1808.It Cm meshttl Ar ttl
1809Set the desired ``time to live'' for mesh forwarded packets;
1810this is the number of hops a packet may be forwarded before
1811it is discarded.
1812The default setting for
1813.Cm meshttl
1814is 31.
1815.It Cm meshpeering
1816Enable or disable peering with neighbor mesh stations.
1817Stations must peer before any data packets can be exchanged.
1818By default
1819.Cm meshpeering
1820is enabled.
1821.It Cm meshforward
1822Enable or disable forwarding packets by a mesh interface.
1823By default
1824.Cm meshforward
1825is enabled.
1826.It Cm meshmetric Ar protocol
1827Set the specified
1828.Ar protocol
1829as the link metric protocol used on a mesh network.
1830The default protocol is called
1831.Ar AIRTIME .
1832The mesh interface will restart after changing this setting.
1833.It Cm meshpath Ar protocol
1834Set the specified
1835.Ar protocol
1836as the path selection protocol used on a mesh network.
1837The only available protocol at the moment is called
1838.Ar HWMP
1839(Hybrid Wireless Mesh Protocol).
1840The mesh interface will restart after changing this setting.
1841.It Cm hwmprootmode Ar mode
1842Stations on a mesh network can operate as ``root nodes.''
1843Root nodes try to find paths to all mesh nodes and advertise themselves
1844regularly.
1845When there is a root mesh node on a network, other mesh nodes can setup
1846paths between themselves faster because they can use the root node
1847to find the destination.
1848This path may not be the best, but on-demand
1849routing will eventually find the best path.
1850The following modes are recognized:
1851.Pp
1852.Bl -tag -width ".Cm PROACTIVE" -compact
1853.It Cm DISABLED
1854Disable root mode.
1855.It Cm NORMAL
1856Send broadcast path requests every two seconds.
1857Nodes on the mesh without a path to this root mesh station with try to
1858discover a path to us.
1859.It Cm PROACTIVE
1860Send broadcast path requests every two seconds and every node must reply with
1861with a path reply even if it already has a path to this root mesh station,
1862.It Cm RANN
1863Send broadcast root annoucement (RANN) frames.
1864Nodes on the mesh without a path to this root mesh station with try to
1865discover a path to us.
1866.El
1867By default
6d67ab1b 1868.Cm hwmprootmode
e9a7dd65
RP
1869is set to
1870.Ar DISABLED .
1871.It Cm hwmpmaxhops Ar cnt
1872Set the maximum number of hops allowed in an HMWP path to
1873.Ar cnt .
1874The default setting for
1875.Cm hwmpmaxhops
1876is 31.
55fc9f88
SZ
1877.El
1878.Pp
1879The following parameters are for compatibility with other systems:
1880.Bl -tag -width indent
1881.It Cm nwid Ar ssid
1882Another name for the
1883.Cm ssid
1884parameter.
1885Included for
1886.Nx
1887compatibility.
e9a7dd65
RP
1888.It Cm stationname Ar name
1889Set the name of this station.
1890The station name is not part of the IEEE 802.11
1891protocol though some interfaces support it.
1892As such it only
1893seems to be meaningful to identical or virtually identical equipment.
1894Setting the station name is identical in syntax to setting the SSID.
1895One can also use
1896.Cm station
1897for
55fc9f88
SZ
1898.Bsx
1899compatibility.
984263bc
MD
1900.It Cm wep
1901Another way of saying
1902.Cm wepmode on .
1903Included for
1904.Bsx
1905compatibility.
1906.It Fl wep
1907Another way of saying
1908.Cm wepmode off .
1909Included for
1910.Bsx
1911compatibility.
1912.It Cm nwkey key
1913Another way of saying:
984263bc 1914.Dq Li "wepmode on weptxkey 1 wepkey 1:key wepkey 2:- wepkey 3:- wepkey 4:-" .
984263bc
MD
1915Included for
1916.Nx
1917compatibility.
1918.It Cm nwkey Xo
1919.Sm off
1920.Ar n : k1 , k2 , k3 , k4
1921.Sm on
1922.Xc
1923Another way of saying
984263bc 1924.Dq Li "wepmode on weptxkey n wepkey 1:k1 wepkey 2:k2 wepkey 3:k3 wepkey 4:k4" .
984263bc
MD
1925Included for
1926.Nx
1927compatibility.
1928.It Fl nwkey
1929Another way of saying
1930.Cm wepmode off .
984263bc
MD
1931Included for
1932.Nx
1933compatibility.
55fc9f88
SZ
1934.El
1935.Pp
1936The following parameters are specific to bridge interfaces:
1937.Bl -tag -width indent
1938.It Cm addm Ar interface
1939Add the interface named by
1940.Ar interface
1941as a member of the bridge.
1942The interface is put into promiscuous mode
1943so that it can receive every packet sent on the network.
1944.It Cm deletem Ar interface
1945Remove the interface named by
1946.Ar interface
1947from the bridge.
1948Promiscuous mode is disabled on the interface when
1949it is removed from the bridge.
1950.It Cm maxaddr Ar size
1951Set the size of the bridge address cache to
1952.Ar size .
1953The default is 100 entries.
1954.It Cm timeout Ar seconds
1955Set the timeout of address cache entries to
1956.Ar seconds
1957seconds.
1958If
1959.Ar seconds
1960is zero, then address cache entries will not be expired.
95482127 1961The default is 1200 seconds.
55fc9f88
SZ
1962.It Cm addr
1963Display the addresses that have been learned by the bridge.
1964.It Cm static Ar interface-name Ar address
1965Add a static entry into the address cache pointing to
1966.Ar interface-name .
1967Static entries are never aged out of the cache or re-placed, even if the
1968address is seen on a different interface.
1969.It Cm deladdr Ar address
1970Delete
1971.Ar address
1972from the address cache.
1973.It Cm flush
1974Delete all dynamically-learned addresses from the address cache.
1975.It Cm flushall
1976Delete all addresses, including static addresses, from the address cache.
1977.It Cm discover Ar interface
1978Mark an interface as a
1979.Dq discovering
1980interface.
1981When the bridge has no address cache entry
1982(either dynamic or static)
1983for the destination address of a packet,
1984the bridge will forward the packet to all
1985member interfaces marked as
1986.Dq discovering .
1987This is the default for all interfaces added to a bridge.
b16c423b 1988.It Fl discover Ar interface
55fc9f88
SZ
1989Clear the
1990.Dq discovering
1991attribute on a member interface.
1992For packets without the
1993.Dq discovering
1994attribute, the only packets forwarded on the interface are broadcast
1995or multicast packets and packets for which the destination address
1996is known to be on the interface's segment.
1997.It Cm learn Ar interface
1998Mark an interface as a
1999.Dq learning
2000interface.
2001When a packet arrives on such an interface, the source
2002address of the packet is entered into the address cache as being a
2003destination address on the interface's segment.
2004This is the default for all interfaces added to a bridge.
b16c423b 2005.It Fl learn Ar interface
55fc9f88
SZ
2006Clear the
2007.Dq learning
2008attribute on a member interface.
b16c423b
SW
2009.It Cm span Ar interface
2010Add the interface named by
2011.Ar interface
2012as a span port on the bridge.
2013Span ports transmit a copy of every frame received by the bridge.
2014This is most useful for snooping a bridged network passively on
2015another host connected to one of the span ports of the bridge.
2016.It Fl span Ar interface
2017Delete the interface named by
2018.Ar interface
2019from the list of span ports of the bridge.
55fc9f88
SZ
2020.It Cm stp Ar interface
2021Enable Spanning Tree protocol on
2022.Ar interface .
2023The
2024.Xr bridge 4
2025driver has support for the IEEE 802.1D Spanning Tree protocol (STP).
2026Spanning Tree is used to detect and remove loops in a network topology.
b16c423b 2027.It Fl stp Ar interface
55fc9f88
SZ
2028Disable Spanning Tree protocol on
2029.Ar interface .
2030This is the default for all interfaces added to a bridge.
2031.It Cm maxage Ar seconds
2032Set the time that a Spanning Tree protocol configuration is valid.
2033The default is 20 seconds.
2034The minimum is 1 second and the maximum is 255 seconds.
2035.It Cm fwddelay Ar seconds
2036Set the time that must pass before an interface begins forwarding
2037packets when Spanning Tree is enabled.
2038The default is 15 seconds.
2039The minimum is 1 second and the maximum is 255 seconds.
2040.It Cm hellotime Ar seconds
2041Set the time between broadcasting of Spanning Tree protocol
2042configuration messages.
2043The default is 2 seconds.
2044The minimum is 1 second and the maximum is 255 seconds.
2045.It Cm priority Ar value
2046Set the bridge priority for Spanning Tree.
2047The default is 32768.
2048The minimum is 0 and the maximum is 65536.
2049.It Cm ifpriority Ar interface Ar value
2050Set the Spanning Tree priority of
2051.Ar interface
2052to
2053.Ar value .
2054The default is 128.
2055The minimum is 0 and the maximum is 255.
2056.It Cm ifpathcost Ar interface Ar value
2057Set the Spanning Tree path cost of
2058.Ar interface
2059to
2060.Ar value .
2061The default is 55.
2062The minimum is 0 and the maximum is 65535.
984263bc
MD
2063.El
2064.Pp
b16c423b
SW
2065The following parameters are specific to IP tunnel interfaces,
2066.Xr gif 4 :
2067.Bl -tag -width indent
2068.It Cm tunnel Ar src_addr dest_addr
2069Configure the physical source and destination address for IP tunnel
2070interfaces.
2071The arguments
2072.Ar src_addr
2073and
2074.Ar dest_addr
2075are interpreted as the outer source/destination for the encapsulating
2076IPv4/IPv6 header.
2077.It Fl tunnel
2078Unconfigure the physical source and destination address for IP tunnel
2079interfaces previously configured with
2080.Cm tunnel .
2081.It Cm deletetunnel
2082Another name for the
2083.Fl tunnel
2084parameter.
2085.El
2086.Pp
2087The following parameters are specific to
2088.Xr vlan 4
2089interfaces:
2090.Bl -tag -width indent
2091.It Cm vlan Ar vlan_tag
2092Set the VLAN tag value to
2093.Ar vlan_tag .
2094This value is a 16-bit number which is used to create an 802.1Q
2095VLAN header for packets sent from the
2096.Xr vlan 4
2097interface.
2098Note that
2099.Cm vlan
2100and
2101.Cm vlandev
2102must both be set at the same time.
2103.It Cm vlandev Ar iface
2104Associate the physical interface
2105.Ar iface
2106with a
2107.Xr vlan 4
2108interface.
2109Packets transmitted through the
2110.Xr vlan 4
2111interface will be
2112diverted to the specified physical interface
2113.Ar iface
2114with 802.1Q VLAN encapsulation.
2115Packets with 802.1Q encapsulation received
2116by the parent interface with the correct VLAN tag will be diverted to
2117the associated
2118.Xr vlan 4
2119pseudo-interface.
2120The
2121.Xr vlan 4
2122interface is assigned a
2123copy of the parent interface's flags and the parent's ethernet address.
2124The
2125.Cm vlandev
2126and
2127.Cm vlan
2128must both be set at the same time.
2129If the
2130.Xr vlan 4
2131interface already has
2132a physical interface associated with it, this command will fail.
2133To
2134change the association to another physical interface, the existing
2135association must be cleared first.
2136.Pp
2137Note: if the hardware tagging capability
2138is set on the parent interface, the
2139.Xr vlan 4
2140pseudo
2141interface's behavior changes:
2142the
2143.Xr vlan 4
2144interface recognizes that the
2145parent interface supports insertion and extraction of VLAN tags on its
2146own (usually in firmware) and that it should pass packets to and from
2147the parent unaltered.
2148.It Fl vlandev Op Ar iface
2149If the driver is a
2150.Xr vlan 4
2151pseudo device, disassociate the parent interface from it.
2152This breaks the link between the
2153.Xr vlan 4
2154interface and its parent,
2155clears its VLAN tag, flags and its link address and shuts the interface down.
2156The
2157.Ar iface
2158argument is useless and hence deprecated.
2159.El
2160.Pp
0d16ba1d
MD
2161The following parameters are specific to
2162.Xr carp 4
2163interfaces:
2164.Bl -tag -width indent
2165.It Cm advbase Ar seconds
2166Specifies the base of the advertisement interval in seconds.
2167The acceptable values are 1 to 255.
2168The default value is 1.
2169.\" The default value is
2170.\" .Dv CARP_DFLTINTV .
2171.It Cm advskew Ar interval
2172Specifies the skew to add to the base advertisement interval to
2173make one host advertise slower than another host.
2174It is specified in 1/256 of seconds.
2175The acceptable values are 1 to 254.
2176The default value is 0.
2177.It Cm pass Ar phrase
2178Set the authentication key to
2179.Ar phrase .
2180.It Cm vhid Ar n
2181Set the virtual host ID.
2182This is a required setting.
2183Acceptable values are 1 to 255.
2184.El
2185.Pp
984263bc
MD
2186The
2187.Nm
2188utility displays the current configuration for a network interface
2189when no optional parameters are supplied.
2190If a protocol family is specified,
2191.Nm
2192will report only the details specific to that protocol family.
2193.Pp
984263bc
MD
2194If the
2195.Fl m
2196flag is passed before an interface name,
2197.Nm
b50e4759 2198will display the capability list and all
984263bc
MD
2199of the supported media for the specified interface.
2200If
2201.Fl L
2202flag is supplied, address lifetime is displayed for IPv6 addresses,
2203as time offset string.
2204.Pp
2205Optionally, the
2206.Fl a
2207flag may be used instead of an interface name.
2208This flag instructs
2209.Nm
2210to display information about all interfaces in the system.
2211The
2212.Fl d
2213flag limits this to interfaces that are down, and
2214.Fl u
2215limits this to interfaces that are up.
2216When no arguments are given,
2217.Fl a
2218is implied.
2219.Pp
2220The
2221.Fl l
2222flag may be used to list all available interfaces on the system, with
2223no other additional information.
2224Use of this flag is mutually exclusive
2225with all other flags and commands, except for
2226.Fl d
2227(only list interfaces that are down)
2228and
2229.Fl u
2230(only list interfaces that are up).
2231.Pp
2232The
55fc9f88
SZ
2233.Fl v
2234flag may be used to get more verbose status for an interface.
2235.Pp
2236The
984263bc
MD
2237.Fl C
2238flag may be used to list all of the interface cloners available on
2239the system, with no additional information.
2240Use of this flag is mutually exclusive with all other flags and commands.
2241.Pp
55fc9f88
SZ
2242The
2243.Fl k
2244flag causes keying information for the interface, if available, to be
2245printed.
2246For example, the values of 802.11 WEP keys will be printed, if accessible to
2247the current user.
2248This information is not printed by default, as it may be considered
2249sensitive.
2250.Pp
984263bc 2251Only the super-user may modify the configuration of a network interface.
984263bc
MD
2252.Sh DIAGNOSTICS
2253Messages indicating the specified interface does not exist, the
2254requested address is unknown, or the user is not privileged and
2255tried to alter an interface's configuration.
984263bc
MD
2256.Sh SEE ALSO
2257.Xr netstat 1 ,
0d16ba1d 2258.Xr carp 4 ,
b16c423b 2259.Xr ifmedia 4 ,
984263bc 2260.Xr netintro 4 ,
b16c423b 2261.Xr polling 4 ,
b50e4759 2262.Xr vlan 4 ,
984263bc
MD
2263.\" .Xr eon 5 ,
2264.Xr rc 8 ,
b50e4759
MD
2265.Xr routed 8 ,
2266.Xr sysctl 8
984263bc
MD
2267.Sh HISTORY
2268The
2269.Nm
2270utility appeared in
2271.Bx 4.2 .
d600454b
SW
2272.Sh BUGS
2273Basic IPv6 node operation requires a link-local address on each
2274interface configured for IPv6.
2275Normally, such an address is automatically configured by the
2276kernel on each interface added to the system; this behaviour may
2277be disabled by setting the sysctl MIB variable
2278.Va net.inet6.ip6.auto_linklocal
2279to 0.
2280.Pp
2281If you delete such an address using
2282.Nm ,
b16c423b 2283the kernel may act very odd.
d600454b 2284Do this at your own risk.