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