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