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