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