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