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