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