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