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