xref: /freebsd/sbin/ifconfig/ifconfig.8 (revision 0bf48626aaa33768078f5872b922b1487b3a9296)
1.\" Copyright (c) 1983, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. Neither the name of the University nor the names of its contributors
13.\"    may be used to endorse or promote products derived from this software
14.\"    without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\"     From: @(#)ifconfig.8	8.3 (Berkeley) 1/5/94
29.\" $FreeBSD$
30.\"
31.Dd June 28, 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 up
709Mark an interface
710.Dq up .
711This may be used to enable an interface after an
712.Dq Nm Cm down .
713It happens automatically when setting the first address on an interface.
714If the interface was reset when previously marked down,
715the hardware will be re-initialized.
716.El
717.Pp
718The following parameters are for ICMPv6 Neighbor Discovery Protocol.
719Note that the address family keyword
720.Dq Li inet6
721is needed for them:
722.Bl -tag -width indent
723.It Cm accept_rtadv
724Set a flag to enable accepting ICMPv6 Router Advertisement messages.
725The
726.Xr sysctl 8
727variable
728.Va net.inet6.ip6.accept_rtadv
729controls whether this flag is set by default or not.
730.It Cm -accept_rtadv
731Clear a flag
732.Cm accept_rtadv .
733.It Cm no_radr
734Set a flag to control whether routers from which the system accepts
735Router Advertisement messages will be added to the Default Router List
736or not.
737When the
738.Cm accept_rtadv
739flag is disabled, this flag has no effect.
740The
741.Xr sysctl 8
742variable
743.Va net.inet6.ip6.no_radr
744controls whether this flag is set by default or not.
745.It Cm -no_radr
746Clear a flag
747.Cm no_radr .
748.It Cm auto_linklocal
749Set a flag to perform automatic link-local address configuration when
750the interface becomes available.
751The
752.Xr sysctl 8
753variable
754.Va net.inet6.ip6.auto_linklocal
755controls whether this flag is set by default or not.
756.It Cm -auto_linklocal
757Clear a flag
758.Cm auto_linklocal .
759.It Cm defaultif
760Set the specified interface as the default route when there is no
761default router.
762.It Cm -defaultif
763Clear a flag
764.Cm defaultif .
765.It Cm ifdisabled
766Set a flag to disable all of IPv6 network communications on the
767specified interface.
768Note that if there are already configured IPv6
769addresses on that interface, all of them are marked as
770.Dq tentative
771and DAD will be performed when this flag is cleared.
772.It Cm -ifdisabled
773Clear a flag
774.Cm ifdisabled .
775When this flag is cleared and
776.Cm auto_linklocal
777flag is enabled, automatic configuration of a link-local address is
778performed.
779.It Cm nud
780Set a flag to enable Neighbor Unreachability Detection.
781.It Cm -nud
782Clear a flag
783.Cm nud .
784.It Cm no_prefer_iface
785Set a flag to not honor rule 5 of source address selection in RFC 3484.
786In practice this means the address on the outgoing interface will not be
787preferred, effectively yielding the decision to the address selection
788policy table, configurable with
789.Xr ip6addrctl 8 .
790.It Cm -no_prefer_iface
791Clear a flag
792.Cm no_prefer_iface .
793.It Cm no_dad
794Set a flag to disable Duplicate Address Detection.
795.It Cm -no_dad
796Clear a flag
797.Cm no_dad .
798.El
799.Pp
800The following parameters are specific for IPv6 addresses.
801Note that the address family keyword
802.Dq Li inet6
803is needed for them:
804.Bl -tag -width indent
805.It Cm autoconf
806Set the IPv6 autoconfigured address bit.
807.It Fl autoconf
808Clear the IPv6 autoconfigured address bit.
809.It Cm deprecated
810Set the IPv6 deprecated address bit.
811.It Fl deprecated
812Clear the IPv6 deprecated address bit.
813.It Cm pltime Ar n
814Set preferred lifetime for the address.
815.It Cm prefer_source
816Set a flag to prefer address as a candidate of the source address for
817outgoing packets.
818.It Cm -prefer_source
819Clear a flag
820.Cm prefer_source .
821.It Cm vltime Ar n
822Set valid lifetime for the address.
823.El
824.Pp
825The following parameters are specific to cloning
826IEEE 802.11 wireless interfaces with the
827.Cm create
828request:
829.Bl -tag -width indent
830.It Cm wlandev Ar device
831Use
832.Ar device
833as the parent for the cloned device.
834.It Cm wlanmode Ar mode
835Specify the operating mode for this cloned device.
836.Ar mode
837is one of
838.Cm sta ,
839.Cm ahdemo
840(or
841.Cm adhoc-demo ) ,
842.Cm ibss ,
843(or
844.Cm adhoc ) ,
845.Cm ap ,
846(or
847.Cm hostap ) ,
848.Cm wds ,
849.Cm tdma ,
850.Cm mesh ,
851and
852.Cm monitor .
853The operating mode of a cloned interface cannot be changed.
854The
855.Cm tdma
856mode is actually implemented as an
857.Cm adhoc-demo
858interface with special properties.
859.It Cm wlanbssid Ar bssid
860The 802.11 mac address to use for the bssid.
861This must be specified at create time for a legacy
862.Cm wds
863device.
864.It Cm wlanaddr Ar address
865The local mac address.
866If this is not specified then a mac address will automatically be assigned
867to the cloned device.
868Typically this address is the same as the address of the parent device
869but if the
870.Cm bssid
871parameter is specified then the driver will craft a unique address for
872the device (if supported).
873.It Cm wdslegacy
874Mark a
875.Cm wds
876device as operating in ``legacy mode''.
877Legacy
878.Cm wds
879devices have a fixed peer relationship and do not, for example, roam
880if their peer stops communicating.
881For completeness a Dynamic WDS (DWDS) interface may marked as
882.Fl wdslegacy .
883.It Cm bssid
884Request a unique local mac address for the cloned device.
885This is only possible if the device supports multiple mac addresses.
886To force use of the parent's mac address use
887.Fl bssid .
888.It Cm beacons
889Mark the cloned interface as depending on hardware support to
890track received beacons.
891To have beacons tracked in software use
892.Fl beacons .
893For
894.Cm hostap
895mode
896.Fl beacons
897can also be used to indicate no beacons should
898be transmitted; this can be useful when creating a WDS configuration but
899.Cm wds
900interfaces can only be created as companions to an access point.
901.El
902.Pp
903The following parameters are specific to IEEE 802.11 wireless interfaces
904cloned with a
905.Cm create
906operation:
907.Bl -tag -width indent
908.It Cm ampdu
909Enable sending and receiving AMPDU frames when using 802.11n (default).
910The 802.11n specification states a compliant station must be capable
911of receiving AMPDU frames but transmission is optional.
912Use
913.Fl ampdu
914to disable all use of AMPDU with 802.11n.
915For testing and/or to work around interoperability problems one can use
916.Cm ampdutx
917and
918.Cm ampdurx
919to control use of AMPDU in one direction.
920.It Cm ampdudensity Ar density
921Set the AMPDU density parameter used when operating with 802.11n.
922This parameter controls the inter-packet gap for AMPDU frames.
923The sending device normally controls this setting but a receiving station
924may request wider gaps.
925Legal values for
926.Ar density
927are 0, .25, .5, 1, 2, 4, 8, and 16 (microseconds).
928A value of
929.Cm -
930is treated the same as 0.
931.It Cm ampdulimit Ar limit
932Set the limit on packet size for receiving AMPDU frames when operating
933with 802.11n.
934Legal values for
935.Ar limit
936are 8192, 16384, 32768, and 65536 but one can also specify
937just the unique prefix: 8, 16, 32, 64.
938Note the sender may limit the size of AMPDU frames to be less
939than the maximum specified by the receiving station.
940.It Cm amsdu
941Enable sending and receiving AMSDU frames when using 802.11n.
942By default AMSDU is received but not transmitted.
943Use
944.Fl amsdu
945to disable all use of AMSDU with 802.11n.
946For testing and/or to work around interoperability problems one can use
947.Cm amsdutx
948and
949.Cm amsdurx
950to control use of AMSDU in one direction.
951.It Cm amsdulimit Ar limit
952Set the limit on packet size for sending and receiving AMSDU frames
953when operating with 802.11n.
954Legal values for
955.Ar limit
956are 7935 and 3839 (bytes).
957Note the sender may limit the size of AMSDU frames to be less
958than the maximum specified by the receiving station.
959Note also that devices are not required to support the 7935 limit,
960only 3839 is required by the specification and the larger value
961may require more memory to be dedicated to support functionality
962that is rarely used.
963.It Cm apbridge
964When operating as an access point, pass packets between
965wireless clients directly (default).
966To instead let them pass up through the
967system and be forwarded using some other mechanism, use
968.Fl apbridge .
969Disabling the internal bridging
970is useful when traffic is to be processed with
971packet filtering.
972.It Cm authmode Ar mode
973Set the desired authentication mode in infrastructure mode.
974Not all adapters support all modes.
975The set of
976valid modes is
977.Cm none , open , shared
978(shared key),
979.Cm 8021x
980(IEEE 802.1x),
981and
982.Cm wpa
983(IEEE WPA/WPA2/802.11i).
984The
985.Cm 8021x
986and
987.Cm wpa
988modes are only useful when using an authentication service
989(a supplicant for client operation or an authenticator when
990operating as an access point).
991Modes are case insensitive.
992.It Cm bgscan
993Enable background scanning when operating as a station.
994Background scanning is a technique whereby a station associated to
995an access point will temporarily leave the channel to scan for
996neighboring stations.
997This allows a station to maintain a cache of nearby access points
998so that roaming between access points can be done without
999a lengthy scan operation.
1000Background scanning is done only when a station is not busy and
1001any outbound traffic will cancel a scan operation.
1002Background scanning should never cause packets to be lost though
1003there may be some small latency if outbound traffic interrupts a
1004scan operation.
1005By default background scanning is enabled if the device is capable.
1006To disable background scanning, use
1007.Fl bgscan .
1008Background scanning is controlled by the
1009.Cm bgscanidle
1010and
1011.Cm bgscanintvl
1012parameters.
1013Background scanning must be enabled for roaming; this is an artifact
1014of the current implementation and may not be required in the future.
1015.It Cm bgscanidle Ar idletime
1016Set the minimum time a station must be idle (not transmitting or
1017receiving frames) before a background scan is initiated.
1018The
1019.Ar idletime
1020parameter is specified in milliseconds.
1021By default a station must be idle at least 250 milliseconds before
1022a background scan is initiated.
1023The idle time may not be set to less than 100 milliseconds.
1024.It Cm bgscanintvl Ar interval
1025Set the interval at which background scanning is attempted.
1026The
1027.Ar interval
1028parameter is specified in seconds.
1029By default a background scan is considered every 300 seconds (5 minutes).
1030The
1031.Ar interval
1032may not be set to less than 15 seconds.
1033.It Cm bintval Ar interval
1034Set the interval at which beacon frames are sent when operating in
1035ad-hoc or ap mode.
1036The
1037.Ar interval
1038parameter is specified in TU's (1024 usecs).
1039By default beacon frames are transmitted every 100 TU's.
1040.It Cm bmissthreshold Ar count
1041Set the number of consecutive missed beacons at which the station
1042will attempt to roam (i.e., search for a new access point).
1043The
1044.Ar count
1045parameter must be in the range 1 to 255; though the
1046upper bound may be reduced according to device capabilities.
1047The default threshold is 7 consecutive missed beacons; but
1048this may be overridden by the device driver.
1049Another name for the
1050.Cm bmissthreshold
1051parameter is
1052.Cm bmiss .
1053.It Cm bssid Ar address
1054Specify the MAC address of the access point to use when operating
1055as a station in a BSS network.
1056This overrides any automatic selection done by the system.
1057To disable a previously selected access point, supply
1058.Cm any , none ,
1059or
1060.Cm -
1061for the address.
1062This option is useful when more than one access point uses the same SSID.
1063Another name for the
1064.Cm bssid
1065parameter is
1066.Cm ap .
1067.It Cm burst
1068Enable packet bursting.
1069Packet bursting is a transmission technique whereby the wireless
1070medium is acquired once to send multiple frames and the interframe
1071spacing is reduced.
1072This technique can significantly increase throughput by reducing
1073transmission overhead.
1074Packet bursting is supported by the 802.11e QoS specification
1075and some devices that do not support QoS may still be capable.
1076By default packet bursting is enabled if a device is capable
1077of doing it.
1078To disable packet bursting, use
1079.Fl burst .
1080.It Cm chanlist Ar channels
1081Set the desired channels to use when scanning for access
1082points, neighbors in an IBSS network, or looking for unoccupied
1083channels when operating as an access point.
1084The set of channels is specified as a comma-separated list with
1085each element in the list representing either a single channel number or a range
1086of the form
1087.Dq Li a-b .
1088Channel numbers must be in the range 1 to 255 and be permissible
1089according to the operating characteristics of the device.
1090.It Cm channel Ar number
1091Set a single desired channel.
1092Channels range from 1 to 255, but the exact selection available
1093depends on the region your adaptor was manufactured for.
1094Setting
1095the channel to
1096.Li any ,
1097or
1098.Cm -
1099will clear any desired channel and, if the device is marked up,
1100force a scan for a channel to operate on.
1101Alternatively the frequency, in megahertz, may be specified
1102instead of the channel number.
1103.Pp
1104When there are several ways to use a channel the channel
1105number/frequency may be appended with attributes to clarify.
1106For example, if a device is capable of operating on channel 6
1107with 802.11n and 802.11g then one can specify that g-only use
1108should be used by specifying ``6:g''.
1109Similarly the channel width can be specified by appending it
1110with ``/''; e.g., ``6/40'' specifies a 40MHz wide channel,
1111These attributes can be combined as in: ``6:ht/40''.
1112The full set of flags specified following a ``:'' are:
1113.Cm a
1114(802.11a),
1115.Cm b
1116(802.11b),
1117.Cm d
1118(Atheros Dynamic Turbo mode),
1119.Cm g
1120(802.11g),
1121.Cm h
1122or
1123.Cm n
1124(802.11n aka HT),
1125.Cm s
1126(Atheros Static Turbo mode),
1127and
1128.Cm t
1129(Atheros Dynamic Turbo mode, or appended to ``st'' and ``dt'').
1130The full set of channel widths following a '/' are:
1131.Cm 5
1132(5MHz aka quarter-rate channel),
1133.Cm 10
1134(10MHz aka half-rate channel),
1135.Cm 20
1136(20MHz mostly for use in specifying ht20),
1137and
1138.Cm 40
1139(40MHz mostly for use in specifying ht40).
1140In addition,
1141a 40MHz HT channel specification may include the location
1142of the extension channel by appending ``+'' or ``-'' for above and below,
1143respectively; e.g., ``2437:ht/40+'' specifies 40MHz wide HT operation
1144with the center channel at frequency 2437 and the extension channel above.
1145.It Cm country Ar name
1146Set the country code to use in calculating the regulatory constraints
1147for operation.
1148In particular the set of available channels, how the wireless device
1149will operation on the channels, and the maximum transmit power that
1150can be used on a channel are defined by this setting.
1151Country/Region codes are specified as a 2-character abbreviation
1152defined by ISO 3166 or using a longer, but possibly ambiguous, spelling;
1153e.g., "ES" and "Spain".
1154The set of country codes are taken from
1155.Pa /etc/regdomain.xml
1156and can also
1157be viewed with the ``list countries'' request.
1158Note that not all devices support changing the country code from a default
1159setting; typically stored in EEPROM.
1160See also
1161.Cm regdomain ,
1162.Cm indoor ,
1163.Cm outdoor ,
1164and
1165.Cm anywhere .
1166.It Cm dfs
1167Enable Dynamic Frequency Selection (DFS) as specified in 802.11h.
1168DFS embodies several facilities including detection of overlapping
1169radar signals, dynamic transmit power control, and channel selection
1170according to a least-congested criteria.
1171DFS support is mandatory for some 5GHz frequencies in certain
1172locales (e.g., ETSI).
1173By default DFS is enabled according to the regulatory definitions
1174specified in
1175.Pa /etc/regdomain.xml
1176and the current country code, regdomain,
1177and channel.
1178Note the underlying device (and driver) must support radar detection
1179for full DFS support to work.
1180To be fully compliant with the local regulatory agency frequencies that
1181require DFS should not be used unless it is fully supported.
1182Use
1183.Fl dfs
1184to disable this functionality for testing.
1185.It Cm dotd
1186Enable support for the 802.11d specification (default).
1187When this support is enabled in station mode, beacon frames that advertise
1188a country code different than the currently configured country code will
1189cause an event to be dispatched to user applications.
1190This event can be used by the station to adopt that country code and
1191operate according to the associated regulatory constraints.
1192When operating as an access point with 802.11d enabled the beacon and
1193probe response frames transmitted will advertise the current regulatory
1194domain settings.
1195To disable 802.11d use
1196.Fl dotd .
1197.It Cm doth
1198Enable 802.11h support including spectrum management.
1199When 802.11h is enabled beacon and probe response frames will have
1200the SpectrumMgt bit set in the capabilities field and
1201country and power constraint information elements will be present.
1202802.11h support also includes handling Channel Switch Announcements (CSA)
1203which are a mechanism to coordinate channel changes by an access point.
1204By default 802.11h is enabled if the device is capable.
1205To disable 802.11h use
1206.Fl doth .
1207.It Cm deftxkey Ar index
1208Set the default key to use for transmission.
1209Typically this is only set when using WEP encryption.
1210Note that you must set a default transmit key
1211for the system to know which key to use in encrypting outbound traffic.
1212The
1213.Cm weptxkey
1214is an alias for this request; it is provided for backwards compatibility.
1215.It Cm dtimperiod Ar period
1216Set the
1217DTIM
1218period for transmitting buffered multicast data frames when
1219operating in ap mode.
1220The
1221.Ar period
1222specifies the number of beacon intervals between DTIM
1223and must be in the range 1 to 15.
1224By default DTIM is 1 (i.e., DTIM occurs at each beacon).
1225.It Cm quiet
1226Enable the use of quiet IE.
1227Hostap will use this to silence other
1228stations to reduce interference for radar detection when
1229operating on 5GHz frequency and doth support is enabled.
1230Use
1231.Fl quiet
1232to disable this functionality.
1233.It Cm quiet_period Ar period
1234Set the QUIET
1235.Ar period
1236to the number of beacon intervals between the start of regularly
1237scheduled quiet intervals defined by Quiet element.
1238.It Cm quiet_count Ar count
1239Set the QUIET
1240.Ar count
1241to the number of TBTTs until the beacon interval during which the
1242next quiet interval shall start.
1243A value of 1 indicates the quiet
1244interval will start during the beacon interval starting at the next
1245TBTT.
1246A value 0 is reserved.
1247.It Cm quiet_offset Ar offset
1248Set the QUIET
1249.Ar offset
1250to the offset of the start of the quiet interval from the TBTT
1251specified by the Quiet count, expressed in TUs.
1252The value of the
1253.Ar offset
1254shall be less than one beacon interval.
1255.It Cm quiet_duration Ar dur
1256Set the QUIET
1257.Ar dur
1258to the duration of the Quiet interval, expressed in TUs.
1259The value should be less than beacon interval.
1260.It Cm dturbo
1261Enable the use of Atheros Dynamic Turbo mode when communicating with
1262another Dynamic Turbo-capable station.
1263Dynamic Turbo mode is an Atheros-specific mechanism by which
1264stations switch between normal 802.11 operation and a ``boosted''
1265mode in which a 40MHz wide channel is used for communication.
1266Stations using Dynamic Turbo mode operate boosted only when the
1267channel is free of non-dturbo stations; when a non-dturbo station
1268is identified on the channel all stations will automatically drop
1269back to normal operation.
1270By default, Dynamic Turbo mode is not enabled, even if the device is capable.
1271Note that turbo mode (dynamic or static) is only allowed on some
1272channels depending on the regulatory constraints; use the
1273.Cm list chan
1274command to identify the channels where turbo mode may be used.
1275To disable Dynamic Turbo mode use
1276.Fl dturbo .
1277.It Cm dwds
1278Enable Dynamic WDS (DWDS) support.
1279DWDS is a facility by which 4-address traffic can be carried between
1280stations operating in infrastructure mode.
1281A station first associates to an access point and authenticates using
1282normal procedures (e.g., WPA).
1283Then 4-address frames are passed to carry traffic for stations
1284operating on either side of the wireless link.
1285DWDS extends the normal WDS mechanism by leveraging existing security
1286protocols and eliminating static binding.
1287.Pp
1288When DWDS is enabled on an access point 4-address frames received from
1289an authorized station will generate a ``DWDS discovery'' event to user
1290applications.
1291This event should be used to create a WDS interface that is bound
1292to the remote station (and usually plumbed into a bridge).
1293Once the WDS interface is up and running 4-address traffic then logically
1294flows through that interface.
1295.Pp
1296When DWDS is enabled on a station, traffic with a destination address
1297different from the peer station are encapsulated in a 4-address frame
1298and transmitted to the peer.
1299All 4-address traffic uses the security information of the stations
1300(e.g., cryptographic keys).
1301A station is associated using 802.11n facilities may transport
13024-address traffic using these same mechanisms; this depends on available
1303resources and capabilities of the device.
1304The DWDS implementation guards against layer 2 routing loops of
1305multicast traffic.
1306.It Cm ff
1307Enable the use of Atheros Fast Frames when communicating with
1308another Fast Frames-capable station.
1309Fast Frames are an encapsulation technique by which two 802.3
1310frames are transmitted in a single 802.11 frame.
1311This can noticeably improve throughput but requires that the
1312receiving station understand how to decapsulate the frame.
1313Fast frame use is negotiated using the Atheros 802.11 vendor-specific
1314protocol extension so enabling use is safe when communicating with
1315non-Atheros devices.
1316By default, use of fast frames is enabled if the device is capable.
1317To explicitly disable fast frames, use
1318.Fl ff .
1319.It Cm fragthreshold Ar length
1320Set the threshold for which transmitted frames are broken into fragments.
1321The
1322.Ar length
1323argument is the frame size in bytes and must be in the range 256 to 2346.
1324Setting
1325.Ar length
1326to
1327.Li 2346 ,
1328.Cm any ,
1329or
1330.Cm -
1331disables transmit fragmentation.
1332Not all adapters honor the fragmentation threshold.
1333.It Cm hidessid
1334When operating as an access point, do not broadcast the SSID
1335in beacon frames or respond to probe request frames unless
1336they are directed to the ap (i.e., they include the ap's SSID).
1337By default, the SSID is included in beacon frames and
1338undirected probe request frames are answered.
1339To re-enable the broadcast of the SSID etc., use
1340.Fl hidessid .
1341.It Cm ht
1342Enable use of High Throughput (HT) when using 802.11n (default).
1343The 802.11n specification includes mechanisms for operation
1344on 20MHz and 40MHz wide channels using different signalling mechanisms
1345than specified in 802.11b, 802.11g, and 802.11a.
1346Stations negotiate use of these facilities, termed HT20 and HT40,
1347when they associate.
1348To disable all use of 802.11n use
1349.Fl ht .
1350To disable use of HT20 (e.g., to force only HT40 use) use
1351.Fl ht20 .
1352To disable use of HT40 use
1353.Fl ht40 .
1354.Pp
1355HT configuration is used to ``auto promote'' operation
1356when several choices are available.
1357For example, if a station associates to an 11n-capable access point
1358it controls whether the station uses legacy operation, HT20, or HT40.
1359When an 11n-capable device is setup as an access point and
1360Auto Channel Selection is used to locate a channel to operate on,
1361HT configuration controls whether legacy, HT20, or HT40 operation is setup
1362on the selected channel.
1363If a fixed channel is specified for a station then HT configuration can
1364be given as part of the channel specification; e.g., 6:ht/20 to setup
1365HT20 operation on channel 6.
1366.It Cm htcompat
1367Enable use of compatibility support for pre-802.11n devices (default).
1368The 802.11n protocol specification went through several incompatible iterations.
1369Some vendors implemented 11n support to older specifications that
1370will not interoperate with a purely 11n-compliant station.
1371In particular the information elements included in management frames
1372for old devices are different.
1373When compatibility support is enabled both standard and compatible data
1374will be provided.
1375Stations that associate using the compatibility mechanisms are flagged
1376in ``list sta''.
1377To disable compatibility support use
1378.Fl htcompat .
1379.It Cm htprotmode Ar technique
1380For interfaces operating in 802.11n, use the specified
1381.Ar technique
1382for protecting HT frames in a mixed legacy/HT network.
1383The set of valid techniques is
1384.Cm off ,
1385and
1386.Cm rts
1387(RTS/CTS, default).
1388Technique names are case insensitive.
1389.It Cm inact
1390Enable inactivity processing for stations associated to an
1391access point (default).
1392When operating as an access point the 802.11 layer monitors
1393the activity of each associated station.
1394When a station is inactive for 5 minutes it will send several
1395``probe frames'' to see if the station is still present.
1396If no response is received then the station is deauthenticated.
1397Applications that prefer to handle this work can disable this
1398facility by using
1399.Fl inact .
1400.It Cm indoor
1401Set the location to use in calculating regulatory constraints.
1402The location is also advertised in beacon and probe response frames
1403when 802.11d is enabled with
1404.Cm dotd .
1405See also
1406.Cm outdoor ,
1407.Cm anywhere ,
1408.Cm country ,
1409and
1410.Cm regdomain .
1411.It Cm list active
1412Display the list of channels available for use taking into account
1413any restrictions set with the
1414.Cm chanlist
1415directive.
1416See the description of
1417.Cm list chan
1418for more information.
1419.It Cm list caps
1420Display the adaptor's capabilities, including the operating
1421modes supported.
1422.It Cm list chan
1423Display the list of channels available for use.
1424Channels are shown with their IEEE channel number, equivalent
1425frequency, and usage modes.
1426Channels identified as
1427.Ql 11g
1428are also usable in
1429.Ql 11b
1430mode.
1431Channels identified as
1432.Ql 11a Turbo
1433may be used only for Atheros' Static Turbo mode
1434(specified with
1435. Cm mediaopt turbo ) .
1436Channels marked with a
1437.Ql *
1438have a regulatory constraint that they be passively scanned.
1439This means a station is not permitted to transmit on the channel until
1440it identifies the channel is being used for 802.11 communication;
1441typically by hearing a beacon frame from an access point operating
1442on the channel.
1443.Cm list freq
1444is another way of requesting this information.
1445By default a compacted list of channels is displayed; if the
1446.Fl v
1447option is specified then all channels are shown.
1448.It Cm list countries
1449Display the set of country codes and regulatory domains that can be
1450used in regulatory configuration.
1451.It Cm list mac
1452Display the current MAC Access Control List state.
1453Each address is prefixed with a character that indicates the
1454current policy applied to it:
1455.Ql +
1456indicates the address is allowed access,
1457.Ql -
1458indicates the address is denied access,
1459.Ql *
1460indicates the address is present but the current policy open
1461(so the ACL is not consulted).
1462.It Cm list mesh
1463Displays the mesh routing table, used for forwarding packets on a mesh
1464network.
1465.It Cm list regdomain
1466Display the current regulatory settings including the available channels
1467and transmit power caps.
1468.It Cm list roam
1469Display the parameters that govern roaming operation.
1470.It Cm list txparam
1471Display the parameters that govern transmit operation.
1472.It Cm list txpower
1473Display the transmit power caps for each channel.
1474.It Cm list scan
1475Display the access points and/or ad-hoc neighbors
1476located in the vicinity.
1477This information may be updated automatically by the adapter
1478with a
1479.Cm scan
1480request or through background scanning.
1481Depending on the capabilities of the stations the following
1482flags can be included in the output:
1483.Bl -tag -width 3n
1484.It Li A
1485Authorized.
1486Indicates that the station is permitted to send/receive data frames.
1487.It Li E
1488Extended Rate Phy (ERP).
1489Indicates that the station is operating in an 802.11g network
1490using extended transmit rates.
1491.It Li H
1492High Throughput (HT).
1493Indicates that the station is using HT transmit rates.
1494If a `+' follows immediately after then the station associated
1495using deprecated mechanisms supported only when
1496.Cm htcompat
1497is enabled.
1498.It Li P
1499Power Save.
1500Indicates that the station is operating in power save mode.
1501.It Li Q
1502Quality of Service (QoS).
1503Indicates that the station is using QoS encapsulation for
1504data frame.
1505QoS encapsulation is enabled only when WME mode is enabled.
1506.It Li S
1507Short Preamble.
1508Indicates that the station is doing short preamble to optionally
1509improve throughput performance with 802.11g and 802.11b.
1510.It Li T
1511Transitional Security Network (TSN).
1512Indicates that the station associated using TSN; see also
1513.Cm tsn
1514below.
1515.It Li W
1516Wi-Fi Protected Setup (WPS).
1517Indicates that the station associated using WPS.
1518.El
1519.Pp
1520By default interesting information elements captured from the neighboring
1521stations are displayed at the end of each row.
1522Possible elements include:
1523.Cm WME
1524(station supports WME),
1525.Cm WPA
1526(station supports WPA),
1527.Cm WPS
1528(station supports WPS),
1529.Cm RSN
1530(station supports 802.11i/RSN),
1531.Cm HTCAP
1532(station supports 802.11n/HT communication),
1533.Cm ATH
1534(station supports Atheros protocol extensions),
1535.Cm VEN
1536(station supports unknown vendor-specific extensions).
1537If the
1538.Fl v
1539flag is used all the information elements and their
1540contents will be shown.
1541Specifying the
1542.Fl v
1543flag also enables display of long SSIDs.
1544The
1545.Cm list ap
1546command is another way of requesting this information.
1547.It Cm list sta
1548When operating as an access point display the stations that are
1549currently associated.
1550When operating in ad-hoc mode display stations identified as
1551neighbors in the IBSS.
1552When operating in mesh mode display stations identified as
1553neighbors in the MBSS.
1554When operating in station mode display the access point.
1555Capabilities advertised by the stations are described under
1556the
1557.Cm scan
1558request.
1559Depending on the capabilities of the stations the following
1560flags can be included in the output:
1561.Bl -tag -width 3n
1562.It Li A
1563Authorized.
1564Indicates that the station is permitted to send/receive data frames.
1565.It Li E
1566Extended Rate Phy (ERP).
1567Indicates that the station is operating in an 802.11g network
1568using extended transmit rates.
1569.It Li H
1570High Throughput (HT).
1571Indicates that the station is using HT transmit rates.
1572If a `+' follows immediately after then the station associated
1573using deprecated mechanisms supported only when
1574.Cm htcompat
1575is enabled.
1576.It Li P
1577Power Save.
1578Indicates that the station is operating in power save mode.
1579.It Li Q
1580Quality of Service (QoS).
1581Indicates that the station is using QoS encapsulation for
1582data frame.
1583QoS encapsulation is enabled only when WME mode is enabled.
1584.It Li S
1585Short Preamble.
1586Indicates that the station is doing short preamble to optionally
1587improve throughput performance with 802.11g and 802.11b.
1588.It Li T
1589Transitional Security Network (TSN).
1590Indicates that the station associated using TSN; see also
1591.Cm tsn
1592below.
1593.It Li W
1594Wi-Fi Protected Setup (WPS).
1595Indicates that the station associated using WPS.
1596.El
1597.Pp
1598By default information elements received from associated stations
1599are displayed in a short form; the
1600.Fl v
1601flag causes this information to be displayed symbolically.
1602.It Cm list wme
1603Display the current channel parameters to use when operating in WME mode.
1604If the
1605.Fl v
1606option is specified then both channel and BSS parameters are displayed
1607for each AC (first channel, then BSS).
1608When WME mode is enabled for an adaptor this information will be
1609displayed with the regular status; this command is mostly useful
1610for examining parameters when WME mode is disabled.
1611See the description of the
1612.Cm wme
1613directive for information on the various parameters.
1614.It Cm maxretry Ar count
1615Set the maximum number of tries to use in sending unicast frames.
1616The default setting is 6 but drivers may override this with a value
1617they choose.
1618.It Cm mcastrate Ar rate
1619Set the rate for transmitting multicast/broadcast frames.
1620Rates are specified as megabits/second in decimal; e.g.,\& 5.5 for 5.5 Mb/s.
1621This rate should be valid for the current operating conditions;
1622if an invalid rate is specified drivers are free to chose an
1623appropriate rate.
1624.It Cm mgtrate Ar rate
1625Set the rate for transmitting management and/or control frames.
1626Rates are specified as megabits/second in decimal; e.g.,\& 5.5 for 5.5 Mb/s.
1627.It Cm outdoor
1628Set the location to use in calculating regulatory constraints.
1629The location is also advertised in beacon and probe response frames
1630when 802.11d is enabled with
1631.Cm dotd .
1632See also
1633.Cm anywhere ,
1634.Cm country ,
1635.Cm indoor ,
1636and
1637.Cm regdomain .
1638.It Cm powersave
1639Enable powersave operation.
1640When operating as a client, the station will conserve power by
1641periodically turning off the radio and listening for
1642messages from the access point telling it there are packets waiting.
1643The station must then retrieve the packets.
1644Not all devices support power save operation as a client.
1645The 802.11 specification requires that all access points support
1646power save but some drivers do not.
1647Use
1648.Fl powersave
1649to disable powersave operation when operating as a client.
1650.It Cm powersavesleep Ar sleep
1651Set the desired max powersave sleep time in TU's (1024 usecs).
1652By default the max powersave sleep time is 100 TU's.
1653.It Cm protmode Ar technique
1654For interfaces operating in 802.11g, use the specified
1655.Ar technique
1656for protecting OFDM frames in a mixed 11b/11g network.
1657The set of valid techniques is
1658.Cm off , cts
1659(CTS to self),
1660and
1661.Cm rtscts
1662(RTS/CTS).
1663Technique names are case insensitive.
1664Not all devices support
1665.Cm cts
1666as a protection technique.
1667.It Cm pureg
1668When operating as an access point in 802.11g mode allow only
166911g-capable stations to associate (11b-only stations are not
1670permitted to associate).
1671To allow both 11g and 11b-only stations to associate, use
1672.Fl pureg .
1673.It Cm puren
1674When operating as an access point in 802.11n mode allow only
1675HT-capable stations to associate (legacy stations are not
1676permitted to associate).
1677To allow both HT and legacy stations to associate, use
1678.Fl puren .
1679.It Cm regdomain Ar sku
1680Set the regulatory domain to use in calculating the regulatory constraints
1681for operation.
1682In particular the set of available channels, how the wireless device
1683will operation on the channels, and the maximum transmit power that
1684can be used on a channel are defined by this setting.
1685Regdomain codes (SKU's) are taken from
1686.Pa /etc/regdomain.xml
1687and can also
1688be viewed with the ``list countries'' request.
1689Note that not all devices support changing the regdomain from a default
1690setting; typically stored in EEPROM.
1691See also
1692.Cm country ,
1693.Cm indoor ,
1694.Cm outdoor ,
1695and
1696.Cm anywhere .
1697.It Cm rifs
1698Enable use of Reduced InterFrame Spacing (RIFS) when operating in 802.11n
1699on an HT channel.
1700Note that RIFS must be supported by both the station and access point
1701for it to be used.
1702To disable RIFS use
1703.Fl rifs .
1704.It Cm roam:rate Ar rate
1705Set the threshold for controlling roaming when operating in a BSS.
1706The
1707.Ar rate
1708parameter specifies the transmit rate in megabits
1709at which roaming should be considered.
1710If the current transmit rate drops below this setting and background scanning
1711is enabled, then the system will check if a more desirable access point is
1712available and switch over to it.
1713The current scan cache contents are used if they are considered
1714valid according to the
1715.Cm scanvalid
1716parameter; otherwise a background scan operation is triggered before
1717any selection occurs.
1718Each channel type has a separate rate threshold; the default values are:
171912 Mb/s (11a), 2 Mb/s (11b), 2 Mb/s (11g), MCS 1 (11na, 11ng).
1720.It Cm roam:rssi Ar rssi
1721Set the threshold for controlling roaming when operating in a BSS.
1722The
1723.Ar rssi
1724parameter specifies the receive signal strength in dBm units
1725at which roaming should be considered.
1726If the current rssi drops below this setting and background scanning
1727is enabled, then the system will check if a more desirable access point is
1728available and switch over to it.
1729The current scan cache contents are used if they are considered
1730valid according to the
1731.Cm scanvalid
1732parameter; otherwise a background scan operation is triggered before
1733any selection occurs.
1734Each channel type has a separate rssi threshold; the default values are
1735all 7 dBm.
1736.It Cm roaming Ar mode
1737When operating as a station, control how the system will
1738behave when communication with the current access point
1739is broken.
1740The
1741.Ar mode
1742argument may be one of
1743.Cm device
1744(leave it to the hardware device to decide),
1745.Cm auto
1746(handle either in the device or the operating system\[em]as appropriate),
1747.Cm manual
1748(do nothing until explicitly instructed).
1749By default, the device is left to handle this if it is
1750capable; otherwise, the operating system will automatically
1751attempt to reestablish communication.
1752Manual mode is used by applications such as
1753.Xr wpa_supplicant 8
1754that want to control the selection of an access point.
1755.It Cm rtsthreshold Ar length
1756Set the threshold for which
1757transmitted frames are preceded by transmission of an
1758RTS
1759control frame.
1760The
1761.Ar length
1762argument
1763is the frame size in bytes and must be in the range 1 to 2346.
1764Setting
1765.Ar length
1766to
1767.Li 2346 ,
1768.Cm any ,
1769or
1770.Cm -
1771disables transmission of RTS frames.
1772Not all adapters support setting the RTS threshold.
1773.It Cm scan
1774Initiate a scan of neighboring stations, wait for it to complete, and
1775display all stations found.
1776Only the super-user can initiate a scan.
1777See
1778.Cm list scan
1779for information on the display.
1780By default a background scan is done; otherwise a foreground
1781scan is done and the station may roam to a different access point.
1782The
1783.Cm list scan
1784request can be used to show recent scan results without
1785initiating a new scan.
1786.It Cm scanvalid Ar threshold
1787Set the maximum time the scan cache contents are considered valid;
1788i.e., will be used without first triggering a scan operation to
1789refresh the data.
1790The
1791.Ar threshold
1792parameter is specified in seconds and defaults to 60 seconds.
1793The minimum setting for
1794.Ar threshold
1795is 10 seconds.
1796One should take care setting this threshold; if it is set too low
1797then attempts to roam to another access point may trigger unnecessary
1798background scan operations.
1799.It Cm shortgi
1800Enable use of Short Guard Interval when operating in 802.11n
1801on an HT channel.
1802NB: this currently enables Short GI on both HT40 and HT20 channels.
1803To disable Short GI use
1804.Fl shortgi .
1805.It Cm smps
1806Enable use of Static Spatial Multiplexing Power Save (SMPS)
1807when operating in 802.11n.
1808A station operating with Static SMPS maintains only a single
1809receive chain active (this can significantly reduce power consumption).
1810To disable SMPS use
1811.Fl smps .
1812.It Cm smpsdyn
1813Enable use of Dynamic Spatial Multiplexing Power Save (SMPS)
1814when operating in 802.11n.
1815A station operating with Dynamic SMPS maintains only a single
1816receive chain active but switches to multiple receive chains when it
1817receives an RTS frame (this can significantly reduce power consumption).
1818Note that stations cannot distinguish between RTS/CTS intended to
1819enable multiple receive chains and those used for other purposes.
1820To disable SMPS use
1821.Fl smps .
1822.It Cm ssid Ar ssid
1823Set the desired Service Set Identifier (aka network name).
1824The SSID is a string up to 32 characters
1825in length and may be specified as either a normal string or in
1826hexadecimal when preceded by
1827.Ql 0x .
1828Additionally, the SSID may be cleared by setting it to
1829.Ql - .
1830.It Cm tdmaslot Ar slot
1831When operating with TDMA, use the specified
1832.Ar slot
1833configuration.
1834The
1835.Ar slot
1836is a number between 0 and the maximum number of slots in the BSS.
1837Note that a station configured as slot 0 is a master and
1838will broadcast beacon frames advertising the BSS;
1839stations configured to use other slots will always
1840scan to locate a master before they ever transmit.
1841By default
1842.Cm tdmaslot
1843is set to 1.
1844.It Cm tdmaslotcnt Ar cnt
1845When operating with TDMA, setup a BSS with
1846.Ar cnt
1847slots.
1848The slot count may be at most 8.
1849The current implementation is only tested with two stations
1850(i.e., point to point applications).
1851This setting is only meaningful when a station is configured as slot 0;
1852other stations adopt this setting from the BSS they join.
1853By default
1854.Cm tdmaslotcnt
1855is set to 2.
1856.It Cm tdmaslotlen Ar len
1857When operating with TDMA, setup a BSS such that each station has a slot
1858.Ar len
1859microseconds long.
1860The slot length must be at least 150 microseconds (1/8 TU)
1861and no more than 65 milliseconds.
1862Note that setting too small a slot length may result in poor channel
1863bandwidth utilization due to factors such as timer granularity and
1864guard time.
1865This setting is only meaningful when a station is configured as slot 0;
1866other stations adopt this setting from the BSS they join.
1867By default
1868.Cm tdmaslotlen
1869is set to 10 milliseconds.
1870.It Cm tdmabintval Ar intval
1871When operating with TDMA, setup a BSS such that beacons are transmitted every
1872.Ar intval
1873superframes to synchronize the TDMA slot timing.
1874A superframe is defined as the number of slots times the slot length; e.g.,
1875a BSS with two slots of 10 milliseconds has a 20 millisecond superframe.
1876The beacon interval may not be zero.
1877A lower setting of
1878.Cm tdmabintval
1879causes the timers to be resynchronized more often; this can be help if
1880significant timer drift is observed.
1881By default
1882.Cm tdmabintval
1883is set to 5.
1884.It Cm tsn
1885When operating as an access point with WPA/802.11i allow legacy
1886stations to associate using static key WEP and open authentication.
1887To disallow legacy station use of WEP, use
1888.Fl tsn .
1889.It Cm txpower Ar power
1890Set the power used to transmit frames.
1891The
1892.Ar power
1893argument is specified in .5 dBm units.
1894Out of range values are truncated.
1895Typically only a few discreet power settings are available and
1896the driver will use the setting closest to the specified value.
1897Not all adapters support changing the transmit power.
1898.It Cm ucastrate Ar rate
1899Set a fixed rate for transmitting unicast frames.
1900Rates are specified as megabits/second in decimal; e.g.,\& 5.5 for 5.5 Mb/s.
1901This rate should be valid for the current operating conditions;
1902if an invalid rate is specified drivers are free to chose an
1903appropriate rate.
1904.It Cm wepmode Ar mode
1905Set the desired WEP mode.
1906Not all adapters support all modes.
1907The set of valid modes is
1908.Cm off , on ,
1909and
1910.Cm mixed .
1911The
1912.Cm mixed
1913mode explicitly tells the adaptor to allow association with access
1914points which allow both encrypted and unencrypted traffic.
1915On these adapters,
1916.Cm on
1917means that the access point must only allow encrypted connections.
1918On other adapters,
1919.Cm on
1920is generally another name for
1921.Cm mixed .
1922Modes are case insensitive.
1923.It Cm weptxkey Ar index
1924Set the WEP key to be used for transmission.
1925This is the same as setting the default transmission key with
1926.Cm deftxkey .
1927.It Cm wepkey Ar key Ns | Ns Ar index : Ns Ar key
1928Set the selected WEP key.
1929If an
1930.Ar index
1931is not given, key 1 is set.
1932A WEP key will be either 5 or 13
1933characters (40 or 104 bits) depending on the local network and the
1934capabilities of the adaptor.
1935It may be specified either as a plain
1936string or as a string of hexadecimal digits preceded by
1937.Ql 0x .
1938For maximum portability, hex keys are recommended;
1939the mapping of text keys to WEP encryption is usually driver-specific.
1940In particular, the
1941.Tn Windows
1942drivers do this mapping differently to
1943.Fx .
1944A key may be cleared by setting it to
1945.Ql - .
1946If WEP is supported then there are at least four keys.
1947Some adapters support more than four keys.
1948If that is the case, then the first four keys
1949(1-4) will be the standard temporary keys and any others will be adaptor
1950specific keys such as permanent keys stored in NVRAM.
1951.Pp
1952Note that you must set a default transmit key with
1953.Cm deftxkey
1954for the system to know which key to use in encrypting outbound traffic.
1955.It Cm wme
1956Enable Wireless Multimedia Extensions (WME) support, if available,
1957for the specified interface.
1958WME is a subset of the IEEE 802.11e standard to support the
1959efficient communication of realtime and multimedia data.
1960To disable WME support, use
1961.Fl wme .
1962Another name for this parameter is
1963.Cm wmm .
1964.Pp
1965The following parameters are meaningful only when WME support is in use.
1966Parameters are specified per-AC (Access Category) and
1967split into those that are used by a station when acting
1968as an access point and those for client stations in the BSS.
1969The latter are received from the access point and may not be changed
1970(at the station).
1971The following Access Categories are recognized:
1972.Pp
1973.Bl -tag -width ".Cm AC_BK" -compact
1974.It Cm AC_BE
1975(or
1976.Cm BE )
1977best effort delivery,
1978.It Cm AC_BK
1979(or
1980.Cm BK )
1981background traffic,
1982.It Cm AC_VI
1983(or
1984.Cm VI )
1985video traffic,
1986.It Cm AC_VO
1987(or
1988.Cm VO )
1989voice traffic.
1990.El
1991.Pp
1992AC parameters are case-insensitive.
1993Traffic classification is done in the operating system using the
1994vlan priority associated with data frames or the
1995ToS (Type of Service) indication in IP-encapsulated frames.
1996If neither information is present, traffic is assigned to the
1997Best Effort (BE) category.
1998.Bl -tag -width indent
1999.It Cm ack Ar ac
2000Set the ACK policy for QoS transmissions by the local station;
2001this controls whether or not data frames transmitted by a station
2002require an ACK response from the receiving station.
2003To disable waiting for an ACK use
2004.Fl ack .
2005This parameter is applied only to the local station.
2006.It Cm acm Ar ac
2007Enable the Admission Control Mandatory (ACM) mechanism
2008for transmissions by the local station.
2009To disable the ACM use
2010.Fl acm .
2011On stations in a BSS this parameter is read-only and indicates
2012the setting received from the access point.
2013NB: ACM is not supported right now.
2014.It Cm aifs Ar ac Ar count
2015Set the Arbitration Inter Frame Spacing (AIFS)
2016channel access parameter to use for transmissions
2017by the local station.
2018On stations in a BSS this parameter is read-only and indicates
2019the setting received from the access point.
2020.It Cm cwmin Ar ac Ar count
2021Set the CWmin channel access parameter to use for transmissions
2022by the local station.
2023On stations in a BSS this parameter is read-only and indicates
2024the setting received from the access point.
2025.It Cm cwmax Ar ac Ar count
2026Set the CWmax channel access parameter to use for transmissions
2027by the local station.
2028On stations in a BSS this parameter is read-only and indicates
2029the setting received from the access point.
2030.It Cm txoplimit Ar ac Ar limit
2031Set the Transmission Opportunity Limit channel access parameter
2032to use for transmissions by the local station.
2033This parameter defines an interval of time when a WME station
2034has the right to initiate transmissions onto the wireless medium.
2035On stations in a BSS this parameter is read-only and indicates
2036the setting received from the access point.
2037.It Cm bss:aifs Ar ac Ar count
2038Set the AIFS channel access parameter to send to stations in a BSS.
2039This parameter is meaningful only when operating in ap mode.
2040.It Cm bss:cwmin Ar ac Ar count
2041Set the CWmin channel access parameter to send to stations in a BSS.
2042This parameter is meaningful only when operating in ap mode.
2043.It Cm bss:cwmax Ar ac Ar count
2044Set the CWmax channel access parameter to send to stations in a BSS.
2045This parameter is meaningful only when operating in ap mode.
2046.It Cm bss:txoplimit Ar ac Ar limit
2047Set the TxOpLimit channel access parameter to send to stations in a BSS.
2048This parameter is meaningful only when operating in ap mode.
2049.El
2050.It Cm wps
2051Enable Wireless Privacy Subscriber support.
2052Note that WPS support requires a WPS-capable supplicant.
2053To disable this function use
2054.Fl wps .
2055.El
2056.Pp
2057The following parameters support an optional access control list
2058feature available with some adapters when operating in ap mode; see
2059.Xr wlan_acl 4 .
2060This facility allows an access point to accept/deny association
2061requests based on the MAC address of the station.
2062Note that this feature does not significantly enhance security
2063as MAC address spoofing is easy to do.
2064.Bl -tag -width indent
2065.It Cm mac:add Ar address
2066Add the specified MAC address to the database.
2067Depending on the policy setting association requests from the
2068specified station will be allowed or denied.
2069.It Cm mac:allow
2070Set the ACL policy to permit association only by
2071stations registered in the database.
2072.It Cm mac:del Ar address
2073Delete the specified MAC address from the database.
2074.It Cm mac:deny
2075Set the ACL policy to deny association only by
2076stations registered in the database.
2077.It Cm mac:kick Ar address
2078Force the specified station to be deauthenticated.
2079This typically is done to block a station after updating the
2080address database.
2081.It Cm mac:open
2082Set the ACL policy to allow all stations to associate.
2083.It Cm mac:flush
2084Delete all entries in the database.
2085.It Cm mac:radius
2086Set the ACL policy to permit association only by
2087stations approved by a RADIUS server.
2088Note that this feature requires the
2089.Xr hostapd 8
2090program be configured to do the right thing
2091as it handles the RADIUS processing
2092(and marks stations as authorized).
2093.El
2094.Pp
2095The following parameters are related to a wireless interface operating in mesh
2096mode:
2097.Bl -tag -width indent
2098.It Cm meshid Ar meshid
2099Set the desired Mesh Identifier.
2100The Mesh ID is a string up to 32 characters in length.
2101A mesh interface must have a Mesh Identifier specified
2102to reach an operational state.
2103.It Cm meshttl Ar ttl
2104Set the desired ``time to live'' for mesh forwarded packets;
2105this is the number of hops a packet may be forwarded before
2106it is discarded.
2107The default setting for
2108.Cm meshttl
2109is 31.
2110.It Cm meshpeering
2111Enable or disable peering with neighbor mesh stations.
2112Stations must peer before any data packets can be exchanged.
2113By default
2114.Cm meshpeering
2115is enabled.
2116.It Cm meshforward
2117Enable or disable forwarding packets by a mesh interface.
2118By default
2119.Cm meshforward
2120is enabled.
2121.It Cm meshgate
2122This attribute specifies whether or not the mesh STA activates mesh gate
2123announcements.
2124By default
2125.Cm meshgate
2126is disabled.
2127.It Cm meshmetric Ar protocol
2128Set the specified
2129.Ar protocol
2130as the link metric protocol used on a mesh network.
2131The default protocol is called
2132.Ar AIRTIME .
2133The mesh interface will restart after changing this setting.
2134.It Cm meshpath Ar protocol
2135Set the specified
2136.Ar protocol
2137as the path selection protocol used on a mesh network.
2138The only available protocol at the moment is called
2139.Ar HWMP
2140(Hybrid Wireless Mesh Protocol).
2141The mesh interface will restart after changing this setting.
2142.It Cm hwmprootmode Ar mode
2143Stations on a mesh network can operate as ``root nodes.''
2144Root nodes try to find paths to all mesh nodes and advertise themselves
2145regularly.
2146When there is a root mesh node on a network, other mesh nodes can setup
2147paths between themselves faster because they can use the root node
2148to find the destination.
2149This path may not be the best, but on-demand
2150routing will eventually find the best path.
2151The following modes are recognized:
2152.Pp
2153.Bl -tag -width ".Cm PROACTIVE" -compact
2154.It Cm DISABLED
2155Disable root mode.
2156.It Cm NORMAL
2157Send broadcast path requests every two seconds.
2158Nodes on the mesh without a path to this root mesh station with try to
2159discover a path to us.
2160.It Cm PROACTIVE
2161Send broadcast path requests every two seconds and every node must reply
2162with a path reply even if it already has a path to this root mesh station.
2163.It Cm RANN
2164Send broadcast root announcement (RANN) frames.
2165Nodes on the mesh without a path to this root mesh station with try to
2166discover a path to us.
2167.El
2168By default
2169.Cm hwmprootmode
2170is set to
2171.Ar DISABLED .
2172.It Cm hwmpmaxhops Ar cnt
2173Set the maximum number of hops allowed in an HMWP path to
2174.Ar cnt .
2175The default setting for
2176.Cm hwmpmaxhops
2177is 31.
2178.El
2179.Pp
2180The following parameters are for compatibility with other systems:
2181.Bl -tag -width indent
2182.It Cm nwid Ar ssid
2183Another name for the
2184.Cm ssid
2185parameter.
2186Included for
2187.Nx
2188compatibility.
2189.It Cm stationname Ar name
2190Set the name of this station.
2191The station name is not part of the IEEE 802.11
2192protocol though some interfaces support it.
2193As such it only
2194seems to be meaningful to identical or virtually identical equipment.
2195Setting the station name is identical in syntax to setting the SSID.
2196One can also use
2197.Cm station
2198for
2199.Bsx
2200compatibility.
2201.It Cm wep
2202Another way of saying
2203.Cm wepmode on .
2204Included for
2205.Bsx
2206compatibility.
2207.It Fl wep
2208Another way of saying
2209.Cm wepmode off .
2210Included for
2211.Bsx
2212compatibility.
2213.It Cm nwkey key
2214Another way of saying:
2215.Dq Li "wepmode on weptxkey 1 wepkey 1:key wepkey 2:- wepkey 3:- wepkey 4:-" .
2216Included for
2217.Nx
2218compatibility.
2219.It Cm nwkey Xo
2220.Sm off
2221.Ar n : k1 , k2 , k3 , k4
2222.Sm on
2223.Xc
2224Another way of saying
2225.Dq Li "wepmode on weptxkey n wepkey 1:k1 wepkey 2:k2 wepkey 3:k3 wepkey 4:k4" .
2226Included for
2227.Nx
2228compatibility.
2229.It Fl nwkey
2230Another way of saying
2231.Cm wepmode off .
2232Included for
2233.Nx
2234compatibility.
2235.El
2236.Pp
2237The following parameters are specific to bridge interfaces:
2238.Bl -tag -width indent
2239.It Cm addm Ar interface
2240Add the interface named by
2241.Ar interface
2242as a member of the bridge.
2243The interface is put into promiscuous mode
2244so that it can receive every packet sent on the network.
2245.It Cm deletem Ar interface
2246Remove the interface named by
2247.Ar interface
2248from the bridge.
2249Promiscuous mode is disabled on the interface when
2250it is removed from the bridge.
2251.It Cm maxaddr Ar size
2252Set the size of the bridge address cache to
2253.Ar size .
2254The default is 2000 entries.
2255.It Cm timeout Ar seconds
2256Set the timeout of address cache entries to
2257.Ar seconds
2258seconds.
2259If
2260.Ar seconds
2261is zero, then address cache entries will not be expired.
2262The default is 1200 seconds.
2263.It Cm addr
2264Display the addresses that have been learned by the bridge.
2265.It Cm static Ar interface-name Ar address
2266Add a static entry into the address cache pointing to
2267.Ar interface-name .
2268Static entries are never aged out of the cache or re-placed, even if the
2269address is seen on a different interface.
2270.It Cm deladdr Ar address
2271Delete
2272.Ar address
2273from the address cache.
2274.It Cm flush
2275Delete all dynamically-learned addresses from the address cache.
2276.It Cm flushall
2277Delete all addresses, including static addresses, from the address cache.
2278.It Cm discover Ar interface
2279Mark an interface as a
2280.Dq discovering
2281interface.
2282When the bridge has no address cache entry
2283(either dynamic or static)
2284for the destination address of a packet,
2285the bridge will forward the packet to all
2286member interfaces marked as
2287.Dq discovering .
2288This is the default for all interfaces added to a bridge.
2289.It Cm -discover Ar interface
2290Clear the
2291.Dq discovering
2292attribute on a member interface.
2293For packets without the
2294.Dq discovering
2295attribute, the only packets forwarded on the interface are broadcast
2296or multicast packets and packets for which the destination address
2297is known to be on the interface's segment.
2298.It Cm learn Ar interface
2299Mark an interface as a
2300.Dq learning
2301interface.
2302When a packet arrives on such an interface, the source
2303address of the packet is entered into the address cache as being a
2304destination address on the interface's segment.
2305This is the default for all interfaces added to a bridge.
2306.It Cm -learn Ar interface
2307Clear the
2308.Dq learning
2309attribute on a member interface.
2310.It Cm sticky Ar interface
2311Mark an interface as a
2312.Dq sticky
2313interface.
2314Dynamically learned address entries are treated at static once entered into
2315the cache.
2316Sticky entries are never aged out of the cache or replaced, even if the
2317address is seen on a different interface.
2318.It Cm -sticky Ar interface
2319Clear the
2320.Dq sticky
2321attribute on a member interface.
2322.It Cm private Ar interface
2323Mark an interface as a
2324.Dq private
2325interface.
2326A private interface does not forward any traffic to any other port that is also
2327a private interface.
2328.It Cm -private Ar interface
2329Clear the
2330.Dq private
2331attribute on a member interface.
2332.It Cm span Ar interface
2333Add the interface named by
2334.Ar interface
2335as a span port on the bridge.
2336Span ports transmit a copy of every frame received by the bridge.
2337This is most useful for snooping a bridged network passively on
2338another host connected to one of the span ports of the bridge.
2339.It Cm -span Ar interface
2340Delete the interface named by
2341.Ar interface
2342from the list of span ports of the bridge.
2343.It Cm stp Ar interface
2344Enable Spanning Tree protocol on
2345.Ar interface .
2346The
2347.Xr if_bridge 4
2348driver has support for the IEEE 802.1D Spanning Tree protocol (STP).
2349Spanning Tree is used to detect and remove loops in a network topology.
2350.It Cm -stp Ar interface
2351Disable Spanning Tree protocol on
2352.Ar interface .
2353This is the default for all interfaces added to a bridge.
2354.It Cm edge Ar interface
2355Set
2356.Ar interface
2357as an edge port.
2358An edge port connects directly to end stations cannot create bridging
2359loops in the network, this allows it to transition straight to forwarding.
2360.It Cm -edge Ar interface
2361Disable edge status on
2362.Ar interface .
2363.It Cm autoedge Ar interface
2364Allow
2365.Ar interface
2366to automatically detect edge status.
2367This is the default for all interfaces added to a bridge.
2368.It Cm -autoedge Ar interface
2369Disable automatic edge status on
2370.Ar interface .
2371.It Cm ptp Ar interface
2372Set the
2373.Ar interface
2374as a point to point link.
2375This is required for straight transitions to forwarding and
2376should be enabled on a direct link to another RSTP capable switch.
2377.It Cm -ptp Ar interface
2378Disable point to point link status on
2379.Ar interface .
2380This should be disabled for a half duplex link and for an interface
2381connected to a shared network segment,
2382like a hub or a wireless network.
2383.It Cm autoptp Ar interface
2384Automatically detect the point to point status on
2385.Ar interface
2386by checking the full duplex link status.
2387This is the default for interfaces added to the bridge.
2388.It Cm -autoptp Ar interface
2389Disable automatic point to point link detection on
2390.Ar interface .
2391.It Cm maxage Ar seconds
2392Set the time that a Spanning Tree protocol configuration is valid.
2393The default is 20 seconds.
2394The minimum is 6 seconds and the maximum is 40 seconds.
2395.It Cm fwddelay Ar seconds
2396Set the time that must pass before an interface begins forwarding
2397packets when Spanning Tree is enabled.
2398The default is 15 seconds.
2399The minimum is 4 seconds and the maximum is 30 seconds.
2400.It Cm hellotime Ar seconds
2401Set the time between broadcasting of Spanning Tree protocol
2402configuration messages.
2403The hello time may only be changed when operating in legacy stp mode.
2404The default is 2 seconds.
2405The minimum is 1 second and the maximum is 2 seconds.
2406.It Cm priority Ar value
2407Set the bridge priority for Spanning Tree.
2408The default is 32768.
2409The minimum is 0 and the maximum is 61440.
2410.It Cm proto Ar value
2411Set the Spanning Tree protocol.
2412The default is rstp.
2413The available options are stp and rstp.
2414.It Cm holdcnt Ar value
2415Set the transmit hold count for Spanning Tree.
2416This is the number of packets transmitted before being rate limited.
2417The default is 6.
2418The minimum is 1 and the maximum is 10.
2419.It Cm ifpriority Ar interface Ar value
2420Set the Spanning Tree priority of
2421.Ar interface
2422to
2423.Ar value .
2424The default is 128.
2425The minimum is 0 and the maximum is 240.
2426.It Cm ifpathcost Ar interface Ar value
2427Set the Spanning Tree path cost of
2428.Ar interface
2429to
2430.Ar value .
2431The default is calculated from the link speed.
2432To change a previously selected path cost back to automatic, set the
2433cost to 0.
2434The minimum is 1 and the maximum is 200000000.
2435.It Cm ifmaxaddr Ar interface Ar size
2436Set the maximum number of hosts allowed from an interface, packets with unknown
2437source addresses are dropped until an existing host cache entry expires or is
2438removed.
2439Set to 0 to disable.
2440.El
2441.Pp
2442The following parameters are specific to lagg interfaces:
2443.Bl -tag -width indent
2444.It Cm laggport Ar interface
2445Add the interface named by
2446.Ar interface
2447as a port of the aggregation interface.
2448.It Cm -laggport Ar interface
2449Remove the interface named by
2450.Ar interface
2451from the aggregation interface.
2452.It Cm laggproto Ar proto
2453Set the aggregation protocol.
2454The default is
2455.Li failover .
2456The available options are
2457.Li failover ,
2458.Li lacp ,
2459.Li loadbalance ,
2460.Li roundrobin ,
2461.Li broadcast
2462and
2463.Li none .
2464.It Cm lagghash Ar option Ns Oo , Ns Ar option Oc
2465Set the packet layers to hash for aggregation protocols which load balance.
2466The default is
2467.Dq l2,l3,l4 .
2468The options can be combined using commas.
2469.Pp
2470.Bl -tag -width ".Cm l2" -compact
2471.It Cm l2
2472src/dst mac address and optional vlan number.
2473.It Cm l3
2474src/dst address for IPv4 or IPv6.
2475.It Cm l4
2476src/dst port for TCP/UDP/SCTP.
2477.El
2478.It Cm -use_flowid
2479Enable local hash computation for RSS hash on the interface.
2480The
2481.Li loadbalance
2482and
2483.Li lacp
2484modes will use the RSS hash from the network card if available
2485to avoid computing one, this may give poor traffic distribution
2486if the hash is invalid or uses less of the protocol header information.
2487.Cm -use_flowid
2488disables use of RSS hash from the network card.
2489The default value can be set via the
2490.Va net.link.lagg.default_use_flowid
2491.Xr sysctl 8
2492variable.
2493.Li 0
2494means
2495.Dq disabled
2496and
2497.Li 1
2498means
2499.Dq enabled .
2500.It Cm use_flowid
2501Use the RSS hash from the network card if available.
2502.It Cm flowid_shift Ar number
2503Set a shift parameter for RSS local hash computation.
2504Hash is calculated by using flowid bits in a packet header mbuf
2505which are shifted by the number of this parameter.
2506.It Cm use_numa
2507Enable selection of egress ports based on the native
2508.Xr NUMA 4
2509domain for the packets being transmitted.
2510This is currently only implemented for lacp mode.
2511This works only on
2512.Xr NUMA 4
2513hardware, running a kernel compiled with the
2514.Xr NUMA 4
2515option, and when interfaces from multiple
2516.Xr NUMA 4
2517domains are ports of the aggregation interface.
2518.It Cm -use_numa
2519Disable selection of egress ports based on the native
2520.Xr NUMA 4
2521domain for the packets being transmitted.
2522.It Cm lacp_fast_timeout
2523Enable lacp fast-timeout on the interface.
2524.It Cm -lacp_fast_timeout
2525Disable lacp fast-timeout on the interface.
2526.It Cm lacp_strict
2527Enable lacp strict compliance on the interface.
2528The default value can be set via the
2529.Va net.link.lagg.lacp.default_strict_mode
2530.Xr sysctl 8
2531variable.
2532.Li 0
2533means
2534.Dq disabled
2535and
2536.Li 1
2537means
2538.Dq enabled .
2539.It Cm -lacp_strict
2540Disable lacp strict compliance on the interface.
2541.El
2542.Pp
2543The following parameters apply to IP tunnel interfaces,
2544.Xr gif 4 :
2545.Bl -tag -width indent
2546.It Cm tunnel Ar src_addr dest_addr
2547Configure the physical source and destination address for IP tunnel
2548interfaces.
2549The arguments
2550.Ar src_addr
2551and
2552.Ar dest_addr
2553are interpreted as the outer source/destination for the encapsulating
2554IPv4/IPv6 header.
2555.It Fl tunnel
2556Unconfigure the physical source and destination address for IP tunnel
2557interfaces previously configured with
2558.Cm tunnel .
2559.It Cm deletetunnel
2560Another name for the
2561.Fl tunnel
2562parameter.
2563.It Cm accept_rev_ethip_ver
2564Set a flag to accept both correct EtherIP packets and ones
2565with reversed version field.
2566Enabled by default.
2567This is for backward compatibility with
2568.Fx 6.1 ,
25696.2, 6.3, 7.0, and 7.1.
2570.It Cm -accept_rev_ethip_ver
2571Clear a flag
2572.Cm accept_rev_ethip_ver .
2573.It Cm ignore_source
2574Set a flag to accept encapsulated packets destined to this host
2575independently from source address.
2576This may be useful for hosts, that receive encapsulated packets
2577from the load balancers.
2578.It Cm -ignore_source
2579Clear a flag
2580.Cm ignore_source .
2581.It Cm send_rev_ethip_ver
2582Set a flag to send EtherIP packets with reversed version
2583field intentionally.
2584Disabled by default.
2585This is for backward compatibility with
2586.Fx 6.1 ,
25876.2, 6.3, 7.0, and 7.1.
2588.It Cm -send_rev_ethip_ver
2589Clear a flag
2590.Cm send_rev_ethip_ver .
2591.El
2592.Pp
2593The following parameters apply to GRE tunnel interfaces,
2594.Xr gre 4 :
2595.Bl -tag -width indent
2596.It Cm tunnel Ar src_addr dest_addr
2597Configure the physical source and destination address for GRE tunnel
2598interfaces.
2599The arguments
2600.Ar src_addr
2601and
2602.Ar dest_addr
2603are interpreted as the outer source/destination for the encapsulating
2604IPv4/IPv6 header.
2605.It Fl tunnel
2606Unconfigure the physical source and destination address for GRE tunnel
2607interfaces previously configured with
2608.Cm tunnel .
2609.It Cm deletetunnel
2610Another name for the
2611.Fl tunnel
2612parameter.
2613.It Cm grekey Ar key
2614Configure the GRE key to be used for outgoing packets.
2615Note that
2616.Xr gre 4 will always accept GRE packets with invalid or absent keys.
2617This command will result in a four byte MTU reduction on the interface.
2618.El
2619.Pp
2620The following parameters are specific to
2621.Xr pfsync 4
2622interfaces:
2623.Bl -tag -width indent
2624.It Cm syncdev Ar iface
2625Use the specified interface
2626to send and receive pfsync state synchronisation messages.
2627.It Fl syncdev
2628Stop sending pfsync state synchronisation messages over the network.
2629.It Cm syncpeer Ar peer_address
2630Make the pfsync link point-to-point rather than using
2631multicast to broadcast the state synchronisation messages.
2632The peer_address is the IP address of the other host taking part in
2633the pfsync cluster.
2634.It Fl syncpeer
2635Broadcast the packets using multicast.
2636.It Cm maxupd Ar n
2637Set the maximum number of updates for a single state which
2638can be collapsed into one.
2639This is an 8-bit number; the default value is 128.
2640.It Cm defer
2641Defer transmission of the first packet in a state until a peer has
2642acknowledged that the associated state has been inserted.
2643.It Fl defer
2644Do not defer the first packet in a state.
2645This is the default.
2646.El
2647.Pp
2648The following parameters are specific to
2649.Xr vlan 4
2650interfaces:
2651.Bl -tag -width indent
2652.It Cm vlan Ar vlan_tag
2653Set the VLAN tag value to
2654.Ar vlan_tag .
2655This value is a 12-bit VLAN Identifier (VID) which is used to create an 802.1Q
2656VLAN header for packets sent from the
2657.Xr vlan 4
2658interface.
2659Note that
2660.Cm vlan
2661and
2662.Cm vlandev
2663must both be set at the same time.
2664.It Cm vlanpcp Ar priority_code_point
2665Priority code point
2666.Pq Dv PCP
2667is an 3-bit field which refers to the IEEE 802.1p
2668class of service and maps to the frame priority level.
2669.Pp
2670Values in order of priority are:
2671.Cm 1
2672.Pq Dv Background (lowest) ,
2673.Cm 0
2674.Pq Dv Best effort (default) ,
2675.Cm 2
2676.Pq Dv Excellent effort ,
2677.Cm 3
2678.Pq Dv Critical applications ,
2679.Cm 4
2680.Pq Dv Video, < 100ms latency ,
2681.Cm 5
2682.Pq Dv Video, < 10ms latency ,
2683.Cm 6
2684.Pq Dv Internetwork control ,
2685.Cm 7
2686.Pq Dv Network control (highest) .
2687.It Cm vlandev Ar iface
2688Associate the physical interface
2689.Ar iface
2690with a
2691.Xr vlan 4
2692interface.
2693Packets transmitted through the
2694.Xr vlan 4
2695interface will be
2696diverted to the specified physical interface
2697.Ar iface
2698with 802.1Q VLAN encapsulation.
2699Packets with 802.1Q encapsulation received
2700by the parent interface with the correct VLAN Identifier will be diverted to
2701the associated
2702.Xr vlan 4
2703pseudo-interface.
2704The
2705.Xr vlan 4
2706interface is assigned a
2707copy of the parent interface's flags and the parent's Ethernet address.
2708The
2709.Cm vlandev
2710and
2711.Cm vlan
2712must both be set at the same time.
2713If the
2714.Xr vlan 4
2715interface already has
2716a physical interface associated with it, this command will fail.
2717To
2718change the association to another physical interface, the existing
2719association must be cleared first.
2720.Pp
2721Note: if the hardware tagging capability
2722is set on the parent interface, the
2723.Xr vlan 4
2724pseudo
2725interface's behavior changes:
2726the
2727.Xr vlan 4
2728interface recognizes that the
2729parent interface supports insertion and extraction of VLAN tags on its
2730own (usually in firmware) and that it should pass packets to and from
2731the parent unaltered.
2732.It Fl vlandev Op Ar iface
2733If the driver is a
2734.Xr vlan 4
2735pseudo device, disassociate the parent interface from it.
2736This breaks the link between the
2737.Xr vlan 4
2738interface and its parent,
2739clears its VLAN Identifier, flags and its link address and shuts the interface
2740down.
2741The
2742.Ar iface
2743argument is useless and hence deprecated.
2744.El
2745.Pp
2746The following parameters are used to configure
2747.Xr vxlan 4
2748interfaces.
2749.Bl -tag -width indent
2750.It Cm vxlanid Ar identifier
2751This value is a 24-bit VXLAN Network Identifier (VNI) that identifies the
2752virtual network segment membership of the interface.
2753.It Cm vxlanlocal Ar address
2754The source address used in the encapsulating IPv4/IPv6 header.
2755The address should already be assigned to an existing interface.
2756When the interface is configured in unicast mode, the listening socket
2757is bound to this address.
2758.It Cm vxlanremote Ar address
2759The interface can be configured in a unicast, or point-to-point, mode
2760to create a tunnel between two hosts.
2761This is the IP address of the remote end of the tunnel.
2762.It Cm vxlangroup Ar address
2763The interface can be configured in a multicast mode
2764to create a virtual network of hosts.
2765This is the IP multicast group address the interface will join.
2766.It Cm vxlanlocalport Ar port
2767The port number the interface will listen on.
2768The default port number is 4789.
2769.It Cm vxlanremoteport Ar port
2770The destination port number used in the encapsulating IPv4/IPv6 header.
2771The remote host should be listening on this port.
2772The default port number is 4789.
2773Note some other implementations, such as Linux,
2774do not default to the IANA assigned port,
2775but instead listen on port 8472.
2776.It Cm vxlanportrange Ar low high
2777The range of source ports used in the encapsulating IPv4/IPv6 header.
2778The port selected within the range is based on a hash of the inner frame.
2779A range is useful to provide entropy within the outer IP header
2780for more effective load balancing.
2781The default range is between the
2782.Xr sysctl 8
2783variables
2784.Va net.inet.ip.portrange.first
2785and
2786.Va net.inet.ip.portrange.last
2787.It Cm vxlantimeout Ar timeout
2788The maximum time, in seconds, before an entry in the forwarding table
2789is pruned.
2790The default is 1200 seconds (20 minutes).
2791.It Cm vxlanmaxaddr Ar max
2792The maximum number of entries in the forwarding table.
2793The default is 2000.
2794.It Cm vxlandev Ar dev
2795When the interface is configured in multicast mode, the
2796.Cm dev
2797interface is used to transmit IP multicast packets.
2798.It Cm vxlanttl Ar ttl
2799The TTL used in the encapsulating IPv4/IPv6 header.
2800The default is 64.
2801.It Cm vxlanlearn
2802The source IP address and inner source Ethernet MAC address of
2803received packets are used to dynamically populate the forwarding table.
2804When in multicast mode, an entry in the forwarding table allows the
2805interface to send the frame directly to the remote host instead of
2806broadcasting the frame to the multicast group.
2807This is the default.
2808.It Fl vxlanlearn
2809The forwarding table is not populated by received packets.
2810.It Cm vxlanflush
2811Delete all dynamically-learned addresses from the forwarding table.
2812.It Cm vxlanflushall
2813Delete all addresses, including static addresses, from the forwarding table.
2814.El
2815.Pp
2816The following parameters are used to configure
2817.Xr carp 4
2818protocol on an interface:
2819.Bl -tag -width indent
2820.It Cm vhid Ar n
2821Set the virtual host ID.
2822This is a required setting to initiate
2823.Xr carp 4 .
2824If the virtual host ID does not exist yet, it is created and attached to the
2825interface, otherwise configuration of an existing vhid is adjusted.
2826If the
2827.Cm vhid
2828keyword is supplied along with an
2829.Dq inet6
2830or
2831.Dq inet
2832address, then this address is configured to be run under control of the
2833specified vhid.
2834Whenever a last address that refers to a particular vhid is removed from an
2835interface, the vhid is automatically removed from interface and destroyed.
2836Any other configuration parameters for the
2837.Xr carp 4
2838protocol should be supplied along with the
2839.Cm vhid
2840keyword.
2841Acceptable values for vhid are 1 to 255.
2842.It Cm advbase Ar seconds
2843Specifies the base of the advertisement interval in seconds.
2844The acceptable values are 1 to 255.
2845The default value is 1.
2846.It Cm advskew Ar interval
2847Specifies the skew to add to the base advertisement interval to
2848make one host advertise slower than another host.
2849It is specified in 1/256 of seconds.
2850The acceptable values are 1 to 254.
2851The default value is 0.
2852.It Cm pass Ar phrase
2853Set the authentication key to
2854.Ar phrase .
2855.It Cm state Ar MASTER|BACKUP
2856Forcibly change state of a given vhid.
2857.El
2858.Pp
2859The
2860.Nm
2861utility displays the current configuration for a network interface
2862when no optional parameters are supplied.
2863If a protocol family is specified,
2864.Nm
2865will report only the details specific to that protocol family.
2866.Pp
2867If the
2868.Fl m
2869flag is passed before an interface name,
2870.Nm
2871will display the capability list and all
2872of the supported media for the specified interface.
2873If
2874.Fl L
2875flag is supplied, address lifetime is displayed for IPv6 addresses,
2876as time offset string.
2877.Pp
2878Optionally, the
2879.Fl a
2880flag may be used instead of an interface name.
2881This flag instructs
2882.Nm
2883to display information about all interfaces in the system.
2884The
2885.Fl d
2886flag limits this to interfaces that are down, and
2887.Fl u
2888limits this to interfaces that are up.
2889When no arguments are given,
2890.Fl a
2891is implied.
2892.Pp
2893The
2894.Fl l
2895flag may be used to list all available interfaces on the system, with
2896no other additional information.
2897If an
2898.Ar address_family
2899is specified, only interfaces of that type will be listed.
2900.Fl l Dq ether
2901will list only Ethernet adapters, excluding the loopback interface.
2902Use of this flag is mutually exclusive
2903with all other flags and commands, except for
2904.Fl d
2905(only list interfaces that are down)
2906and
2907.Fl u
2908(only list interfaces that are up).
2909.Pp
2910The
2911.Fl v
2912flag may be used to get more verbose status for an interface.
2913.Pp
2914The
2915.Fl C
2916flag may be used to list all of the interface cloners available on
2917the system, with no additional information.
2918Use of this flag is mutually exclusive with all other flags and commands.
2919.Pp
2920The
2921.Fl k
2922flag causes keying information for the interface, if available, to be
2923printed.
2924For example, the values of 802.11 WEP keys and
2925.Xr carp 4
2926passphrases will be printed, if accessible to the current user.
2927This information is not printed by default, as it may be considered
2928sensitive.
2929.Pp
2930If the network interface driver is not present in the kernel then
2931.Nm
2932will attempt to load it.
2933The
2934.Fl n
2935flag disables this behavior.
2936.Pp
2937Only the super-user may modify the configuration of a network interface.
2938.Sh EXAMPLES
2939Assign the IPv4 address
2940.Li 192.0.2.10 ,
2941with a network mask of
2942.Li 255.255.255.0 ,
2943to the interface
2944.Li em0 :
2945.Dl # ifconfig em0 inet 192.0.2.10 netmask 255.255.255.0
2946.Pp
2947Add the IPv4 address
2948.Li 192.0.2.45 ,
2949with the CIDR network prefix
2950.Li /28 ,
2951to the interface
2952.Li em0 ,
2953using
2954.Cm add
2955as a synonym for the canonical form of the option
2956.Cm alias :
2957.Dl # ifconfig em0 inet 192.0.2.45/28 add
2958.Pp
2959Remove the IPv4 address
2960.Li 192.0.2.45
2961from the interface
2962.Li em0 :
2963.Dl # ifconfig em0 inet 192.0.2.45 -alias
2964.Pp
2965Enable IPv6 functionality of the interface:
2966.Dl # ifconfig em0 inet6 -ifdisabled
2967.Pp
2968Add the IPv6 address
2969.Li 2001:DB8:DBDB::123/48
2970to the interface
2971.Li em0 :
2972.Dl # ifconfig em0 inet6 2001:db8:bdbd::123 prefixlen 48 alias
2973Note that lower case hexadecimal IPv6 addresses are acceptable.
2974.Pp
2975Remove the IPv6 address added in the above example,
2976using the
2977.Li /
2978character as shorthand for the network prefix,
2979and using
2980.Cm delete
2981as a synonym for the canonical form of the option
2982.Fl alias :
2983.Dl # ifconfig em0 inet6 2001:db8:bdbd::123/48 delete
2984.Pp
2985Configure a single CARP redundant address on igb0, and then switch it
2986to be master:
2987.Dl # ifconfig igb0 vhid 1 10.0.0.1/24 pass foobar up
2988.Dl # ifconfig igb0 vhid 1 state master
2989.Pp
2990Configure the interface
2991.Li xl0 ,
2992to use 100baseTX, full duplex Ethernet media options:
2993.Dl # ifconfig xl0 media 100baseTX mediaopt full-duplex
2994.Pp
2995Label the em0 interface as an uplink:
2996.Dl # ifconfig em0 description \&"Uplink to Gigabit Switch 2\&"
2997.Pp
2998Create the software network interface
2999.Li gif1 :
3000.Dl # ifconfig gif1 create
3001.Pp
3002Destroy the software network interface
3003.Li gif1 :
3004.Dl # ifconfig gif1 destroy
3005.Pp
3006Display available wireless networks using
3007.Li wlan0 :
3008.Dl # ifconfig wlan0 list scan
3009.Pp
3010Display inet and inet6 address subnet masks in CIDR notation
3011.Dl # ifconfig -f inet:cidr,inet6:cidr
3012.Sh DIAGNOSTICS
3013Messages indicating the specified interface does not exist, the
3014requested address is unknown, or the user is not privileged and
3015tried to alter an interface's configuration.
3016.Sh SEE ALSO
3017.Xr netstat 1 ,
3018.Xr carp 4 ,
3019.Xr gif 4 ,
3020.Xr netintro 4 ,
3021.Xr pfsync 4 ,
3022.Xr polling 4 ,
3023.Xr vlan 4 ,
3024.Xr vxlan 4 ,
3025.Xr devd.conf 5 ,
3026.\" .Xr eon 5 ,
3027.Xr devd 8 ,
3028.Xr jail 8 ,
3029.Xr rc 8 ,
3030.Xr routed 8 ,
3031.Xr sysctl 8
3032.Sh HISTORY
3033The
3034.Nm
3035utility appeared in
3036.Bx 4.2 .
3037.Sh BUGS
3038Basic IPv6 node operation requires a link-local address on each
3039interface configured for IPv6.
3040Normally, such an address is automatically configured by the
3041kernel on each interface added to the system or enabled; this behavior may
3042be disabled by setting per-interface flag
3043.Cm -auto_linklocal .
3044The default value of this flag is 1 and can be disabled by using the sysctl
3045MIB variable
3046.Va net.inet6.ip6.auto_linklocal .
3047.Pp
3048Do not configure IPv6 addresses with no link-local address by using
3049.Nm .
3050It can result in unexpected behaviors of the kernel.
3051