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