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