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