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