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