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