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