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