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