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