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