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