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