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