b7b8453b746fa1806564b102faefb84e83379071
[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 March 2, 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 compatiblity mechanisms are flagged
1078 in ``list sta''.
1079 To disable compatiblity 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 powersavesleep Ar sleep
1345 Set the desired max powersave sleep time in TU's (1024 usecs).
1346 By default the max powersave sleep time is 100 TU's.
1347 .It Cm protmode Ar technique
1348 For interfaces operating in 802.11g, use the specified
1349 .Ar technique
1350 for protecting OFDM frames in a mixed 11b/11g network.
1351 The set of valid techniques is
1352 .Cm off , cts
1353 (CTS to self),
1354 and
1355 .Cm rtscts
1356 (RTS/CTS).
1357 Technique names are case insensitive.
1358 Not all devices support
1359 .Cm cts
1360 as a protection technique.
1361 .It Cm pureg
1362 When operating as an access point in 802.11g mode allow only
1363 11g-capable stations to associate (11b-only stations are not
1364 permitted to associate).
1365 To allow both 11g and 11b-only stations to associate, use
1366 .Fl pureg .
1367 .It Cm puren
1368 When operating as an access point in 802.11n mode allow only
1369 HT-capable stations to associate (legacy stations are not
1370 permitted to associate).
1371 To allow both HT and legacy stations to associate, use
1372 .Fl puren .
1373 .It Cm regdomain Ar sku
1374 Set the regulatory domain to use in calculating the regulatory constraints
1375 for operation.
1376 In particular the set of available channels, how the wireless device
1377 will operation on the channels, and the maximum transmit power that
1378 can be used on a channel are defined by this setting.
1379 Regdomain codes (SKU's) are taken from /etc/regdomain.xml and can also
1380 be viewed with the ``list countries'' request.
1381 Note that not all devices support changing the regdomain from a default
1382 setting; typically stored in EEPROM.
1383 See also
1384 .Cm country ,
1385 .Cm indoor ,
1386 .Cm outdoor ,
1387 and
1388 .Cm anywhere .
1389 .It Cm rifs
1390 Enable use of Reduced InterFrame Spacing (RIFS) when operating in 802.11n
1391 on an HT channel.
1392 Note that RIFS must be supported by both the station and access point
1393 for it to be used.
1394 To disable RIFS use
1395 .Fl rifs .
1396 .It Cm roam:rate Ar rate
1397 Set the threshold for controlling roaming when operating in a BSS.
1398 The
1399 .Ar rate
1400 parameter specifies the transmit rate in megabits
1401 at which roaming should be considered.
1402 If the current transmit rate drops below this setting and background scanning
1403 is enabled, then the system will check if a more desirable access point is
1404 available and switch over to it.
1405 The current scan cache contents are used if they are considered
1406 valid according to the
1407 .Cm scanvalid
1408 parameter; otherwise a background scan operation is triggered before
1409 any selection occurs.
1410 Each channel type has a separate rate threshold; the default values are:
1411 12 Mb/s (11a), 2 Mb/s (11b), 2 Mb/s (11g), MCS 1 (11na, 11ng).
1412 .It Cm roam:rssi Ar rssi
1413 Set the threshold for controlling roaming when operating in a BSS.
1414 The
1415 .Ar rssi
1416 parameter specifies the receive signal strength in dBm units
1417 at which roaming should be considered.
1418 If the current rssi drops below this setting and background scanning
1419 is enabled, then the system will check if a more desirable access point is
1420 available and switch over to it.
1421 The current scan cache contents are used if they are considered
1422 valid according to the
1423 .Cm scanvalid
1424 parameter; otherwise a background scan operation is triggered before
1425 any selection occurs.
1426 Each channel type has a separate rssi threshold; the default values are
1427 all 7 dBm.
1428 .It Cm roaming Ar mode
1429 When operating as a station, control how the system will
1430 behave when communication with the current access point
1431 is broken.
1432 The
1433 .Ar mode
1434 argument may be one of
1435 .Cm device
1436 (leave it to the hardware device to decide),
1437 .Cm auto
1438 (handle either in the device or the operating system\[em]as appropriate),
1439 .Cm manual
1440 (do nothing until explicitly instructed).
1441 By default, the device is left to handle this if it is
1442 capable; otherwise, the operating system will automatically
1443 attempt to reestablish communication.
1444 Manual mode is used by applications such as
1445 .Xr wpa_supplicant 8
1446 that want to control the selection of an access point.
1447 .It Cm rtsthreshold Ar length
1448 Set the threshold for which
1449 transmitted frames are preceded by transmission of an
1450 RTS
1451 control frame.
1452 The
1453 .Ar length
1454 argument
1455 is the frame size in bytes and must be in the range 1 to 2346.
1456 Setting
1457 .Ar length
1458 to
1459 .Li 2346 ,
1460 .Cm any ,
1461 or
1462 .Cm -
1463 disables transmission of RTS frames.
1464 Not all adapters support setting the RTS threshold.
1465 .It Cm scan
1466 Initiate a scan of neighboring stations, wait for it to complete, and
1467 display all stations found.
1468 Only the super-user can initiate a scan.
1469 See
1470 .Cm list scan
1471 for information on the display.
1472 By default a background scan is done; otherwise a foreground
1473 scan is done and the station may roam to a different access point.
1474 The
1475 .Cm list scan
1476 request can be used to show recent scan results without
1477 initiating a new scan.
1478 .It Cm scanvalid Ar threshold
1479 Set the maximum time the scan cache contents are considered valid;
1480 i.e. will be used without first triggering a scan operation to
1481 refresh the data.
1482 The
1483 .Ar threshold
1484 parameter is specified in seconds and defaults to 60 seconds.
1485 The minimum setting for
1486 .Ar threshold
1487 is 10 seconds.
1488 One should take care setting this threshold; if it is set too low
1489 then attempts to roam to another access point may trigger unnecessary
1490 background scan operations.
1491 .It Cm shortgi
1492 Enable use of Short Guard Interval when operating in 802.11n
1493 on an HT channel.
1494 NB: this currently enables Short GI on both HT40 and HT20 channels.
1495 To disable Short GI use
1496 .Fl shortgi .
1497 .It Cm smps
1498 Enable use of Static Spatial Multiplexing Power Save (SMPS)
1499 when operating in 802.11n.
1500 A station operating with Static SMPS maintains only a single
1501 receive chain active (this can significantly reduce power consumption).
1502 To disable SMPS use
1503 .Fl smps .
1504 .It Cm smpsdyn
1505 Enable use of Dynamic Spatial Multiplexing Power Save (SMPS)
1506 when operating in 802.11n.
1507 A station operating with Dynamic SMPS maintains only a single
1508 receive chain active but switches to multiple receive chains when it
1509 receives an RTS frame (this can significantly reduce power consumption).
1510 Note that stations cannot distinguish between RTS/CTS intended to
1511 enable multiple receive chains and those used for other purposes.
1512 To disable SMPS use
1513 .Fl smps .
1514 .It Cm ssid Ar ssid
1515 Set the desired Service Set Identifier (aka network name).
1516 The SSID is a string up to 32 characters
1517 in length and may be specified as either a normal string or in
1518 hexadecimal when preceded by
1519 .Ql 0x .
1520 Additionally, the SSID may be cleared by setting it to
1521 .Ql - .
1522 .It Cm tdmaslot Ar slot
1523 When operating with TDMA, use the specified
1524 .Ar slot
1525 configuration.
1526 The
1527 .Ar slot
1528 is a number between 0 and the maximum number of slots in the BSS.
1529 Note that a station configured as slot 0 is a master and
1530 will broadcast beacon frames advertising the BSS;
1531 stations configured to use other slots will always
1532 scan to locate a master before they ever transmit.
1533 By default
1534 .Cm tdmaslot
1535 is set to 1.
1536 .It Cm tdmaslotcnt Ar cnt
1537 When operating with TDMA, setup a BSS with
1538 .Ar cnt
1539 slots.
1540 The slot count may be at most 8.
1541 The current implementation is only tested with two stations
1542 (i.e. point to point applications).
1543 This setting is only meaningful when a station is configured as slot 0;
1544 other stations adopt this setting from the BSS they join.
1545 By default
1546 .Cm tdmaslotcnt
1547 is set to 2.
1548 .It Cm tdmaslotlen Ar len
1549 When operating with TDMA, setup a BSS such that each station has a slot
1550 .Ar len
1551 microseconds long.
1552 The slot length must be at least 150 microseconds (1/8 TU)
1553 and no more than 65 milliseconds.
1554 Note that setting too small a slot length may result in poor channel
1555 bandwidth utilization due to factors such as timer granularity and
1556 guard time.
1557 This setting is only meaningful when a station is configured as slot 0;
1558 other stations adopt this setting from the BSS they join.
1559 By default
1560 .Cm tdmaslotlen
1561 is set to 10 milliseconds.
1562 .It Cm tdmabintval Ar intval
1563 When operating with TDMA, setup a BSS such that beacons are transmitted every
1564 .Ar intval
1565 superframes to synchronize the TDMA slot timing.
1566 A superframe is defined as the number of slots times the slot length; e.g.
1567 a BSS with two slots of 10 milliseconds has a 20 millisecond superframe.
1568 The beacon interval may not be zero.
1569 A lower setting of
1570 .Cm tdmabintval
1571 causes the timers to be resynchronized more often; this can be help if
1572 significant timer drift is observed.
1573 By default
1574 .Cm tdmabintval
1575 is set to 5.
1576 .It Cm tsn
1577 When operating as an access point with WPA/802.11i allow legacy
1578 stations to associate using static key WEP and open authentication.
1579 To disallow legacy station use of WEP, use
1580 .Fl tsn .
1581 .It Cm txpower Ar power
1582 Set the power used to transmit frames.
1583 The
1584 .Ar power
1585 argument is specified in .5 dBm units.
1586 Out of range values are truncated.
1587 Typically only a few discreet power settings are available and
1588 the driver will use the setting closest to the specified value.
1589 Not all adapters support changing the transmit power.
1590 .It Cm ucastrate Ar rate
1591 Set a fixed rate for transmitting unicast frames.
1592 Rates are specified as megabits/second in decimal; e.g.\& 5.5 for 5.5 Mb/s.
1593 This rate should be valid for the current operating conditions;
1594 if an invalid rate is specified drivers are free to chose an
1595 appropriate rate.
1596 .It Cm wepmode Ar mode
1597 Set the desired WEP mode.
1598 Not all adapters support all modes.
1599 The set of valid modes is
1600 .Cm off , on ,
1601 and
1602 .Cm mixed .
1603 The
1604 .Cm mixed
1605 mode explicitly tells the adaptor to allow association with access
1606 points which allow both encrypted and unencrypted traffic.
1607 On these adapters,
1608 .Cm on
1609 means that the access point must only allow encrypted connections.
1610 On other adapters,
1611 .Cm on
1612 is generally another name for
1613 .Cm mixed .
1614 Modes are case insensitive.
1615 .It Cm weptxkey Ar index
1616 Set the WEP key to be used for transmission.
1617 This is the same as setting the default transmission key with
1618 .Cm deftxkey .
1619 .It Cm wepkey Ar key Ns | Ns Ar index : Ns Ar key
1620 Set the selected WEP key.
1621 If an
1622 .Ar index
1623 is not given, key 1 is set.
1624 A WEP key will be either 5 or 13
1625 characters (40 or 104 bits) depending of the local network and the
1626 capabilities of the adaptor.
1627 It may be specified either as a plain
1628 string or as a string of hexadecimal digits preceded by
1629 .Ql 0x .
1630 For maximum portability, hex keys are recommended;
1631 the mapping of text keys to WEP encryption is usually driver-specific.
1632 In particular, the
1633 .Tn Windows
1634 drivers do this mapping differently to
1635 .Fx .
1636 A key may be cleared by setting it to
1637 .Ql - .
1638 If WEP is supported then there are at least four keys.
1639 Some adapters support more than four keys.
1640 If that is the case, then the first four keys
1641 (1-4) will be the standard temporary keys and any others will be adaptor
1642 specific keys such as permanent keys stored in NVRAM.
1643 .Pp
1644 Note that you must set a default transmit key with
1645 .Cm deftxkey
1646 for the system to know which key to use in encrypting outbound traffic.
1647 .It Cm wme
1648 Enable Wireless Multimedia Extensions (WME) support, if available,
1649 for the specified interface.
1650 WME is a subset of the IEEE 802.11e standard to support the
1651 efficient communication of realtime and multimedia data.
1652 To disable WME support, use
1653 .Fl wme .
1654 Another name for this parameter is
1655 .Cm wmm .
1656 .Pp
1657 The following parameters are meaningful only when WME support is in use.
1658 Parameters are specified per-AC (Access Category) and
1659 split into those that are used by a station when acting
1660 as an access point and those for client stations in the BSS.
1661 The latter are received from the access point and may not be changed
1662 (at the station).
1663 The following Access Categories are recognized:
1664 .Pp
1665 .Bl -tag -width ".Cm AC_BK" -compact
1666 .It Cm AC_BE
1667 (or
1668 .Cm BE )
1669 best effort delivery,
1670 .It Cm AC_BK
1671 (or
1672 .Cm BK )
1673 background traffic,
1674 .It Cm AC_VI
1675 (or
1676 .Cm VI )
1677 video traffic,
1678 .It Cm AC_VO
1679 (or
1680 .Cm VO )
1681 voice traffic.
1682 .El
1683 .Pp
1684 AC parameters are case-insensitive.
1685 Traffic classification is done in the operating system using the
1686 vlan priority associated with data frames or the
1687 ToS (Type of Service) indication in IP-encapsulated frames.
1688 If neither information is present, traffic is assigned to the
1689 Best Effort (BE) category.
1690 .Bl -tag -width indent
1691 .It Cm ack Ar ac
1692 Set the ACK policy for QoS transmissions by the local station;
1693 this controls whether or not data frames transmitted by a station
1694 require an ACK response from the receiving station.
1695 To disable waiting for an ACK use
1696 .Fl ack .
1697 This parameter is applied only to the local station.
1698 .It Cm acm Ar ac
1699 Enable the Admission Control Mandatory (ACM) mechanism
1700 for transmissions by the local station.
1701 To disable the ACM use
1702 .Fl acm .
1703 On stations in a BSS this parameter is read-only and indicates
1704 the setting received from the access point.
1705 NB: ACM is not supported right now.
1706 .It Cm aifs Ar ac Ar count
1707 Set the Arbitration Inter Frame Spacing (AIFS)
1708 channel access parameter to use for transmissions
1709 by the local station.
1710 On stations in a BSS this parameter is read-only and indicates
1711 the setting received from the access point.
1712 .It Cm cwmin Ar ac Ar count
1713 Set the CWmin channel access parameter to use for transmissions
1714 by the local station.
1715 On stations in a BSS this parameter is read-only and indicates
1716 the setting received from the access point.
1717 .It Cm cwmax Ar ac Ar count
1718 Set the CWmax channel access parameter to use for transmissions
1719 by the local station.
1720 On stations in a BSS this parameter is read-only and indicates
1721 the setting received from the access point.
1722 .It Cm txoplimit Ar ac Ar limit
1723 Set the Transmission Opportunity Limit channel access parameter
1724 to use for transmissions by the local station.
1725 This parameter defines an interval of time when a WME station
1726 has the right to initiate transmissions onto the wireless medium.
1727 On stations in a BSS this parameter is read-only and indicates
1728 the setting received from the access point.
1729 .It Cm bss:aifs Ar ac Ar count
1730 Set the AIFS channel access parameter to send to stations in a BSS.
1731 This parameter is meaningful only when operating in ap mode.
1732 .It Cm bss:cwmin Ar ac Ar count
1733 Set the CWmin channel access parameter to send to stations in a BSS.
1734 This parameter is meaningful only when operating in ap mode.
1735 .It Cm bss:cwmax Ar ac Ar count
1736 Set the CWmax channel access parameter to send to stations in a BSS.
1737 This parameter is meaningful only when operating in ap mode.
1738 .It Cm bss:txoplimit Ar ac Ar limit
1739 Set the TxOpLimit channel access parameter to send to stations in a BSS.
1740 This parameter is meaningful only when operating in ap mode.
1741 .El
1742 .It Cm wps
1743 Enable Wireless Privacy Subscriber support.
1744 Note that WPS support requires a WPS-capable supplicant.
1745 To disable this function use
1746 .Fl wps .
1747 .El
1748 .Pp
1749 The following parameters support an optional access control list
1750 feature available with some adapters when operating in ap mode; see
1751 .Xr wlan_acl 4 .
1752 This facility allows an access point to accept/deny association
1753 requests based on the MAC address of the station.
1754 Note that this feature does not significantly enhance security
1755 as MAC address spoofing is easy to do.
1756 .Bl -tag -width indent
1757 .It Cm mac:add Ar address
1758 Add the specified MAC address to the database.
1759 Depending on the policy setting association requests from the
1760 specified station will be allowed or denied.
1761 .It Cm mac:allow
1762 Set the ACL policy to permit association only by
1763 stations registered in the database.
1764 .It Cm mac:del Ar address
1765 Delete the specified MAC address from the database.
1766 .It Cm mac:deny
1767 Set the ACL policy to deny association only by
1768 stations registered in the database.
1769 .It Cm mac:kick Ar address
1770 Force the specified station to be deauthenticated.
1771 This typically is done to block a station after updating the
1772 address database.
1773 .It Cm mac:open
1774 Set the ACL policy to allow all stations to associate.
1775 .It Cm mac:flush
1776 Delete all entries in the database.
1777 .It Cm mac:radius
1778 Set the ACL policy to permit association only by
1779 stations approved by a RADIUS server.
1780 Note that this feature requires the
1781 .Xr hostapd 8
1782 program be configured to do the right thing
1783 as it handles the RADIUS processing
1784 (and marks stations as authorized).
1785 .El
1786 .Pp
1787 The following parameters are related to a wireless interface operating in mesh
1788 mode:
1789 .Bl -tag -width indent
1790 .It Cm meshid Ar meshid
1791 Set the desired Mesh Identifier.
1792 The Mesh ID is a string up to 32 characters in length.
1793 A mesh interface must have a Mesh Identifier specified
1794 to reach an operational state.
1795 .It Cm meshttl Ar ttl
1796 Set the desired ``time to live'' for mesh forwarded packets;
1797 this is the number of hops a packet may be forwarded before
1798 it is discarded.
1799 The default setting for
1800 .Cm meshttl
1801 is 31.
1802 .It Cm meshpeering
1803 Enable or disable peering with neighbor mesh stations.
1804 Stations must peer before any data packets can be exchanged.
1805 By default
1806 .Cm meshpeering
1807 is enabled.
1808 .It Cm meshforward
1809 Enable or disable forwarding packets by a mesh interface.
1810 By default
1811 .Cm meshforward
1812 is enabled.
1813 .It Cm meshmetric Ar protocol
1814 Set the specified
1815 .Ar protocol
1816 as the link metric protocol used on a mesh network.
1817 The default protocol is called
1818 .Ar AIRTIME .
1819 The mesh interface will restart after changing this setting.
1820 .It Cm meshpath Ar protocol
1821 Set the specified
1822 .Ar protocol
1823 as the path selection protocol used on a mesh network.
1824 The only available protocol at the moment is called
1825 .Ar HWMP
1826 (Hybrid Wireless Mesh Protocol).
1827 The mesh interface will restart after changing this setting.
1828 .It Cm hwmprootmode Ar mode
1829 Stations on a mesh network can operate as ``root nodes.''
1830 Root nodes try to find paths to all mesh nodes and advertise themselves
1831 regularly.
1832 When there is a root mesh node on a network, other mesh nodes can setup
1833 paths between themselves faster because they can use the root node
1834 to find the destination.
1835 This path may not be the best, but on-demand
1836 routing will eventually find the best path.
1837 The following modes are recognized:
1838 .Pp
1839 .Bl -tag -width ".Cm PROACTIVE" -compact
1840 .It Cm DISABLED
1841 Disable root mode.
1842 .It Cm NORMAL
1843 Send broadcast path requests every two seconds.
1844 Nodes on the mesh without a path to this root mesh station with try to
1845 discover a path to us.
1846 .It Cm PROACTIVE
1847 Send broadcast path requests every two seconds and every node must reply with
1848 with a path reply even if it already has a path to this root mesh station,
1849 .It Cm RANN
1850 Send broadcast root annoucement (RANN) frames.
1851 Nodes on the mesh without a path to this root mesh station with try to
1852 discover a path to us.
1853 .El
1854 By default
1855 .Cm hwmprootmode
1856 is set to
1857 .Ar DISABLED .
1858 .It Cm hwmpmaxhops Ar cnt
1859 Set the maximum number of hops allowed in an HMWP path to
1860 .Ar cnt .
1861 The default setting for
1862 .Cm hwmpmaxhops
1863 is 31.
1864 .El
1865 .Pp
1866 The following parameters are for compatibility with other systems:
1867 .Bl -tag -width indent
1868 .It Cm nwid Ar ssid
1869 Another name for the
1870 .Cm ssid
1871 parameter.
1872 Included for
1873 .Nx
1874 compatibility.
1875 .It Cm stationname Ar name
1876 Set the name of this station.
1877 The station name is not part of the IEEE 802.11
1878 protocol though some interfaces support it.
1879 As such it only
1880 seems to be meaningful to identical or virtually identical equipment.
1881 Setting the station name is identical in syntax to setting the SSID.
1882 One can also use
1883 .Cm station
1884 for
1885 .Bsx
1886 compatibility.
1887 .It Cm wep
1888 Another way of saying
1889 .Cm wepmode on .
1890 Included for
1891 .Bsx
1892 compatibility.
1893 .It Fl wep
1894 Another way of saying
1895 .Cm wepmode off .
1896 Included for
1897 .Bsx
1898 compatibility.
1899 .It Cm nwkey key
1900 Another way of saying:
1901 .Dq Li "wepmode on weptxkey 1 wepkey 1:key wepkey 2:- wepkey 3:- wepkey 4:-" .
1902 Included for
1903 .Nx
1904 compatibility.
1905 .It Cm nwkey Xo
1906 .Sm off
1907 .Ar n : k1 , k2 , k3 , k4
1908 .Sm on
1909 .Xc
1910 Another way of saying
1911 .Dq Li "wepmode on weptxkey n wepkey 1:k1 wepkey 2:k2 wepkey 3:k3 wepkey 4:k4" .
1912 Included for
1913 .Nx
1914 compatibility.
1915 .It Fl nwkey
1916 Another way of saying
1917 .Cm wepmode off .
1918 Included for
1919 .Nx
1920 compatibility.
1921 .El
1922 .Pp
1923 The following parameters are specific to bridge interfaces:
1924 .Bl -tag -width indent
1925 .It Cm addm Ar interface
1926 Add the interface named by
1927 .Ar interface
1928 as a member of the bridge.
1929 The interface is put into promiscuous mode
1930 so that it can receive every packet sent on the network.
1931 .It Cm deletem Ar interface
1932 Remove the interface named by
1933 .Ar interface
1934 from the bridge.
1935 Promiscuous mode is disabled on the interface when
1936 it is removed from the bridge.
1937 .It Cm maxaddr Ar size
1938 Set the size of the bridge address cache to
1939 .Ar size .
1940 The default is 100 entries.
1941 .It Cm timeout Ar seconds
1942 Set the timeout of address cache entries to
1943 .Ar seconds
1944 seconds.
1945 If
1946 .Ar seconds
1947 is zero, then address cache entries will not be expired.
1948 The default is 1200 seconds.
1949 .It Cm addr
1950 Display the addresses that have been learned by the bridge.
1951 .It Cm static Ar interface-name Ar address
1952 Add a static entry into the address cache pointing to
1953 .Ar interface-name .
1954 Static entries are never aged out of the cache or re-placed, even if the
1955 address is seen on a different interface.
1956 .It Cm deladdr Ar address
1957 Delete
1958 .Ar address
1959 from the address cache.
1960 .It Cm flush
1961 Delete all dynamically-learned addresses from the address cache.
1962 .It Cm flushall
1963 Delete all addresses, including static addresses, from the address cache.
1964 .It Cm discover Ar interface
1965 Mark an interface as a
1966 .Dq discovering
1967 interface.
1968 When the bridge has no address cache entry
1969 (either dynamic or static)
1970 for the destination address of a packet,
1971 the bridge will forward the packet to all
1972 member interfaces marked as
1973 .Dq discovering .
1974 This is the default for all interfaces added to a bridge.
1975 .It Fl discover Ar interface
1976 Clear the
1977 .Dq discovering
1978 attribute on a member interface.
1979 For packets without the
1980 .Dq discovering
1981 attribute, the only packets forwarded on the interface are broadcast
1982 or multicast packets and packets for which the destination address
1983 is known to be on the interface's segment.
1984 .It Cm learn Ar interface
1985 Mark an interface as a
1986 .Dq learning
1987 interface.
1988 When a packet arrives on such an interface, the source
1989 address of the packet is entered into the address cache as being a
1990 destination address on the interface's segment.
1991 This is the default for all interfaces added to a bridge.
1992 .It Fl learn Ar interface
1993 Clear the
1994 .Dq learning
1995 attribute on a member interface.
1996 .It Cm span Ar interface
1997 Add the interface named by
1998 .Ar interface
1999 as a span port on the bridge.
2000 Span ports transmit a copy of every frame received by the bridge.
2001 This is most useful for snooping a bridged network passively on
2002 another host connected to one of the span ports of the bridge.
2003 .It Fl span Ar interface
2004 Delete the interface named by
2005 .Ar interface
2006 from the list of span ports of the bridge.
2007 .It Cm stp Ar interface
2008 Enable Spanning Tree protocol on
2009 .Ar interface .
2010 The
2011 .Xr bridge 4
2012 driver has support for the IEEE 802.1D Spanning Tree protocol (STP).
2013 Spanning Tree is used to detect and remove loops in a network topology.
2014 .It Fl stp Ar interface
2015 Disable Spanning Tree protocol on
2016 .Ar interface .
2017 This is the default for all interfaces added to a bridge.
2018 .It Cm maxage Ar seconds
2019 Set the time that a Spanning Tree protocol configuration is valid.
2020 The default is 20 seconds.
2021 The minimum is 1 second and the maximum is 255 seconds.
2022 .It Cm fwddelay Ar seconds
2023 Set the time that must pass before an interface begins forwarding
2024 packets when Spanning Tree is enabled.
2025 The default is 15 seconds.
2026 The minimum is 1 second and the maximum is 255 seconds.
2027 .It Cm hellotime Ar seconds
2028 Set the time between broadcasting of Spanning Tree protocol
2029 configuration messages.
2030 The default is 2 seconds.
2031 The minimum is 1 second and the maximum is 255 seconds.
2032 .It Cm priority Ar value
2033 Set the bridge priority for Spanning Tree.
2034 The default is 32768.
2035 The minimum is 0 and the maximum is 65536.
2036 .It Cm ifpriority Ar interface Ar value
2037 Set the Spanning Tree priority of
2038 .Ar interface
2039 to
2040 .Ar value .
2041 The default is 128.
2042 The minimum is 0 and the maximum is 255.
2043 .It Cm ifpathcost Ar interface Ar value
2044 Set the Spanning Tree path cost of
2045 .Ar interface
2046 to
2047 .Ar value .
2048 The default is 55.
2049 The minimum is 0 and the maximum is 65535.
2050 .El
2051 .Pp
2052 The following parameters are specific to IP tunnel interfaces,
2053 .Xr gif 4 :
2054 .Bl -tag -width indent
2055 .It Cm tunnel Ar src_addr dest_addr
2056 Configure the physical source and destination address for IP tunnel
2057 interfaces.
2058 The arguments
2059 .Ar src_addr
2060 and
2061 .Ar dest_addr
2062 are interpreted as the outer source/destination for the encapsulating
2063 IPv4/IPv6 header.
2064 .It Fl tunnel
2065 Unconfigure the physical source and destination address for IP tunnel
2066 interfaces previously configured with
2067 .Cm tunnel .
2068 .It Cm deletetunnel
2069 Another name for the
2070 .Fl tunnel
2071 parameter.
2072 .El
2073 .Pp
2074 The following parameters are specific to
2075 .Xr vlan 4
2076 interfaces:
2077 .Bl -tag -width indent
2078 .It Cm vlan Ar vlan_tag
2079 Set the VLAN tag value to
2080 .Ar vlan_tag .
2081 This value is a 16-bit number which is used to create an 802.1Q
2082 VLAN header for packets sent from the
2083 .Xr vlan 4
2084 interface.
2085 Note that
2086 .Cm vlan
2087 and
2088 .Cm vlandev
2089 must both be set at the same time.
2090 .It Cm vlandev Ar iface
2091 Associate the physical interface
2092 .Ar iface
2093 with a
2094 .Xr vlan 4
2095 interface.
2096 Packets transmitted through the
2097 .Xr vlan 4
2098 interface will be
2099 diverted to the specified physical interface
2100 .Ar iface
2101 with 802.1Q VLAN encapsulation.
2102 Packets with 802.1Q encapsulation received
2103 by the parent interface with the correct VLAN tag will be diverted to
2104 the associated
2105 .Xr vlan 4
2106 pseudo-interface.
2107 The
2108 .Xr vlan 4
2109 interface is assigned a
2110 copy of the parent interface's flags and the parent's ethernet address.
2111 The
2112 .Cm vlandev
2113 and
2114 .Cm vlan
2115 must both be set at the same time.
2116 If the
2117 .Xr vlan 4
2118 interface already has
2119 a physical interface associated with it, this command will fail.
2120 To
2121 change the association to another physical interface, the existing
2122 association must be cleared first.
2123 .Pp
2124 Note: if the hardware tagging capability
2125 is set on the parent interface, the
2126 .Xr vlan 4
2127 pseudo
2128 interface's behavior changes:
2129 the
2130 .Xr vlan 4
2131 interface recognizes that the
2132 parent interface supports insertion and extraction of VLAN tags on its
2133 own (usually in firmware) and that it should pass packets to and from
2134 the parent unaltered.
2135 .It Fl vlandev Op Ar iface
2136 If the driver is a
2137 .Xr vlan 4
2138 pseudo device, disassociate the parent interface from it.
2139 This breaks the link between the
2140 .Xr vlan 4
2141 interface and its parent,
2142 clears its VLAN tag, flags and its link address and shuts the interface down.
2143 The
2144 .Ar iface
2145 argument is useless and hence deprecated.
2146 .El
2147 .Pp
2148 The following parameters are specific to
2149 .Xr carp 4
2150 interfaces:
2151 .Bl -tag -width indent
2152 .It Cm advbase Ar seconds
2153 Specifies the base of the advertisement interval in seconds.
2154 The acceptable values are 1 to 255.
2155 The default value is 1.
2156 .\" The default value is
2157 .\" .Dv CARP_DFLTINTV .
2158 .It Cm advskew Ar interval
2159 Specifies the skew to add to the base advertisement interval to
2160 make one host advertise slower than another host.
2161 It is specified in 1/256 of seconds.
2162 The acceptable values are 1 to 254.
2163 The default value is 0.
2164 .It Cm pass Ar phrase
2165 Set the authentication key to
2166 .Ar phrase .
2167 .It Cm vhid Ar n
2168 Set the virtual host ID.
2169 This is a required setting.
2170 Acceptable values are 1 to 255.
2171 .El
2172 .Pp
2173 The
2174 .Nm
2175 utility displays the current configuration for a network interface
2176 when no optional parameters are supplied.
2177 If a protocol family is specified,
2178 .Nm
2179 will report only the details specific to that protocol family.
2180 .Pp
2181 If the
2182 .Fl m
2183 flag is passed before an interface name,
2184 .Nm
2185 will display the capability list and all
2186 of the supported media for the specified interface.
2187 If
2188 .Fl L
2189 flag is supplied, address lifetime is displayed for IPv6 addresses,
2190 as time offset string.
2191 .Pp
2192 Optionally, the
2193 .Fl a
2194 flag may be used instead of an interface name.
2195 This flag instructs
2196 .Nm
2197 to display information about all interfaces in the system.
2198 The
2199 .Fl d
2200 flag limits this to interfaces that are down, and
2201 .Fl u
2202 limits this to interfaces that are up.
2203 When no arguments are given,
2204 .Fl a
2205 is implied.
2206 .Pp
2207 The
2208 .Fl l
2209 flag may be used to list all available interfaces on the system, with
2210 no other additional information.
2211 Use of this flag is mutually exclusive
2212 with all other flags and commands, except for
2213 .Fl d
2214 (only list interfaces that are down)
2215 and
2216 .Fl u
2217 (only list interfaces that are up).
2218 .Pp
2219 The
2220 .Fl v
2221 flag may be used to get more verbose status for an interface.
2222 .Pp
2223 The
2224 .Fl C
2225 flag may be used to list all of the interface cloners available on
2226 the system, with no additional information.
2227 Use of this flag is mutually exclusive with all other flags and commands.
2228 .Pp
2229 The
2230 .Fl k
2231 flag causes keying information for the interface, if available, to be
2232 printed.
2233 For example, the values of 802.11 WEP keys will be printed, if accessible to
2234 the current user.
2235 This information is not printed by default, as it may be considered
2236 sensitive.
2237 .Pp
2238 Only the super-user may modify the configuration of a network interface.
2239 .Sh DIAGNOSTICS
2240 Messages indicating the specified interface does not exist, the
2241 requested address is unknown, or the user is not privileged and
2242 tried to alter an interface's configuration.
2243 .Sh SEE ALSO
2244 .Xr netstat 1 ,
2245 .Xr carp 4 ,
2246 .Xr ifmedia 4 ,
2247 .Xr netintro 4 ,
2248 .Xr polling 4 ,
2249 .Xr vlan 4 ,
2250 .\" .Xr eon 5 ,
2251 .Xr rc 8 ,
2252 .Xr routed 8 ,
2253 .Xr sysctl 8
2254 .Sh HISTORY
2255 The
2256 .Nm
2257 utility appeared in
2258 .Bx 4.2 .
2259 .Sh BUGS
2260 Basic IPv6 node operation requires a link-local address on each
2261 interface configured for IPv6.
2262 Normally, such an address is automatically configured by the
2263 kernel on each interface added to the system; this behaviour may
2264 be disabled by setting the sysctl MIB variable
2265 .Va net.inet6.ip6.auto_linklocal
2266 to 0.
2267 .Pp
2268 If you delete such an address using
2269 .Nm ,
2270 the kernel may act very odd.
2271 Do this at your own risk.