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