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