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