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