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