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