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 November 12, 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 quiet 1092Enable the use of quiet IE. Hostap will use this to silent other 1093stations to reduce interference for radar detection when 1094operating on 5Ghz frequency and doth support is enabled. 1095Use 1096.Fl quiet 1097to disable this functionality. 1098.It Cm quiet_period Ar period 1099Set the QUIET 1100.Ar period 1101to the number of beacon intervals between the start of regularly 1102scheduled quiet intervals defined by Quiet element. 1103.It Cm quiet_count Ar count 1104Set the QUIET 1105.Ar count 1106to the number of TBTTs until the beacon interval during which the 1107next quiet interval shall start. A value of 1 indicates the quiet 1108interval will start during the beacon interval starting at the next 1109TBTT. A value 0 is reserved. 1110.It Cm quiet_offset Ar offset 1111Set the QUIET 1112.Ar offset 1113to the offset of the start of the quiet interval from the TBTT 1114specified by the Quiet count, expressed in TUs. 1115The value of the 1116.Ar offset 1117shall be less than one beacon interval. 1118.It Cm quiet_duration Ar dur 1119Set the QUIET 1120.Ar dur 1121to the duration of the Quiet interval, expressed in TUs. 1122The value should be less than beacon interval. 1123.It Cm dturbo 1124Enable the use of Atheros Dynamic Turbo mode when communicating with 1125another Dynamic Turbo-capable station. 1126Dynamic Turbo mode is an Atheros-specific mechanism by which 1127stations switch between normal 802.11 operation and a ``boosted'' 1128mode in which a 40MHz wide channel is used for communication. 1129Stations using Dynamic Turbo mode operate boosted only when the 1130channel is free of non-dturbo stations; when a non-dturbo station 1131is identified on the channel all stations will automatically drop 1132back to normal operation. 1133By default, Dynamic Turbo mode is not enabled, even if the device is capable. 1134Note that turbo mode (dynamic or static) is only allowed on some 1135channels depending on the regulatory constraints; use the 1136.Cm list chan 1137command to identify the channels where turbo mode may be used. 1138To disable Dynamic Turbo mode use 1139.Fl dturbo . 1140.It Cm dwds 1141Enable Dynamic WDS (DWDS) support. 1142DWDS is a facility by which 4-address traffic can be carried between 1143stations operating in infrastructure mode. 1144A station first associates to an access point and authenticates using 1145normal procedures (e.g. WPA). 1146Then 4-address frames are passed to carry traffic for stations 1147operating on either side of the wireless link. 1148DWDS extends the normal WDS mechanism by leveraging existing security 1149protocols and eliminating static binding. 1150.Pp 1151When DWDS is enabled on an access point 4-address frames received from 1152an authorized station will generate a ``DWDS discovery'' event to user 1153applications. 1154This event should be used to create a WDS interface that is bound 1155to the remote station (and usually plumbed into a bridge). 1156Once the WDS interface is up and running 4-address traffic then logically 1157flows through that interface. 1158.Pp 1159When DWDS is enabled on a station, traffic with a destination address 1160different from the peer station are encapsulated in a 4-address frame 1161and transmitted to the peer. 1162All 4-address traffic uses the security information of the stations 1163(e.g. cryptographic keys). 1164A station is associated using 802.11n facilities may transport 11654-address traffic using these same mechanisms; this depends on available 1166resources and capabilities of the device. 1167The DWDS implementation guards against layer 2 routing loops of 1168multicast traffic. 1169.It Cm ff 1170Enable the use of Atheros Fast Frames when communicating with 1171another Fast Frames-capable station. 1172Fast Frames are an encapsulation technique by which two 802.3 1173frames are transmitted in a single 802.11 frame. 1174This can noticeably improve throughput but requires that the 1175receiving station understand how to decapsulate the frame. 1176Fast frame use is negotiated using the Atheros 802.11 vendor-specific 1177protocol extension so enabling use is safe when communicating with 1178non-Atheros devices. 1179By default, use of fast frames is enabled if the device is capable. 1180To explicitly disable fast frames, use 1181.Fl ff . 1182.It Cm fragthreshold Ar length 1183Set the threshold for which transmitted frames are broken into fragments. 1184The 1185.Ar length 1186argument is the frame size in bytes and must be in the range 256 to 2346. 1187Setting 1188.Ar length 1189to 1190.Li 2346 , 1191.Cm any , 1192or 1193.Cm - 1194disables transmit fragmentation. 1195Not all adapters honor the fragmentation threshold. 1196.It Cm hidessid 1197When operating as an access point, do not broadcast the SSID 1198in beacon frames or respond to probe request frames unless 1199they are directed to the ap (i.e., they include the ap's SSID). 1200By default, the SSID is included in beacon frames and 1201undirected probe request frames are answered. 1202To re-enable the broadcast of the SSID etc., use 1203.Fl hidessid . 1204.It Cm ht 1205Enable use of High Throughput (HT) when using 802.11n (default). 1206The 802.11n specification includes mechanisms for operation 1207on 20MHz and 40MHz wide channels using different signalling mechanisms 1208than specified in 802.11b, 802.11g, and 802.11a. 1209Stations negotiate use of these facilities, termed HT20 and HT40, 1210when they associate. 1211To disable all use of 802.11n use 1212.Fl ht . 1213To disable use of HT20 (e.g. to force only HT40 use) use 1214.Fl ht20 . 1215To disable use of HT40 use 1216.Fl ht40 . 1217.Pp 1218HT configuration is used to ``auto promote'' operation 1219when several choices are available. 1220For example, if a station associates to an 11n-capable access point 1221it controls whether the station uses legacy operation, HT20, or HT40. 1222When an 11n-capable device is setup as an access point and 1223Auto Channel Selection is used to locate a channel to operate on, 1224HT configuration controls whether legacy, HT20, or HT40 operation is setup 1225on the selected channel. 1226If a fixed channel is specified for a station then HT configuration can 1227be given as part of the channel specification; e.g. 6:ht/20 to setup 1228HT20 operation on channel 6. 1229.It Cm htcompat 1230Enable use of compatibility support for pre-802.11n devices (default). 1231The 802.11n protocol specification went through several incompatible iterations. 1232Some vendors implemented 11n support to older specifications that 1233will not interoperate with a purely 11n-compliant station. 1234In particular the information elements included in management frames 1235for old devices are different. 1236When compatibility support is enabled both standard and compatible data 1237will be provided. 1238Stations that associate using the compatibility mechanisms are flagged 1239in ``list sta''. 1240To disable compatibility support use 1241.Fl htcompat . 1242.It Cm htprotmode Ar technique 1243For interfaces operating in 802.11n, use the specified 1244.Ar technique 1245for protecting HT frames in a mixed legacy/HT network. 1246The set of valid techniques is 1247.Cm off , 1248and 1249.Cm rts 1250(RTS/CTS, default). 1251Technique names are case insensitive. 1252.It Cm inact 1253Enable inactivity processing for stations associated to an 1254access point (default). 1255When operating as an access point the 802.11 layer monitors 1256the activity of each associated station. 1257When a station is inactive for 5 minutes it will send several 1258``probe frames'' to see if the station is still present. 1259If no response is received then the station is deauthenticated. 1260Applications that prefer to handle this work can disable this 1261facility by using 1262.Fl inact . 1263.It Cm indoor 1264Set the location to use in calculating regulatory constraints. 1265The location is also advertised in beacon and probe response frames 1266when 802.11d is enabled with 1267.Cm dotd . 1268See also 1269.Cm outdoor , 1270.Cm anywhere , 1271.Cm country , 1272and 1273.Cm regdomain . 1274.It Cm list active 1275Display the list of channels available for use taking into account 1276any restrictions set with the 1277.Cm chanlist 1278directive. 1279See the description of 1280.Cm list chan 1281for more information. 1282.It Cm list caps 1283Display the adaptor's capabilities, including the operating 1284modes supported. 1285.It Cm list chan 1286Display the list of channels available for use. 1287Channels are shown with their IEEE channel number, equivalent 1288frequency, and usage modes. 1289Channels identified as 1290.Ql 11g 1291are also usable in 1292.Ql 11b 1293mode. 1294Channels identified as 1295.Ql 11a Turbo 1296may be used only for Atheros' Static Turbo mode 1297(specified with 1298. Cm mediaopt turbo ) . 1299Channels marked with a 1300.Ql * 1301have a regulatory constraint that they be passively scanned. 1302This means a station is not permitted to transmit on the channel until 1303it identifies the channel is being used for 802.11 communication; 1304typically by hearing a beacon frame from an access point operating 1305on the channel. 1306.Cm list freq 1307is another way of requesting this information. 1308By default a compacted list of channels is displayed; if the 1309.Fl v 1310option is specified then all channels are shown. 1311.It Cm list countries 1312Display the set of country codes and regulatory domains that can be 1313used in regulatory configuration. 1314.It Cm list mac 1315Display the current MAC Access Control List state. 1316Each address is prefixed with a character that indicates the 1317current policy applied to it: 1318.Ql + 1319indicates the address is allowed access, 1320.Ql - 1321indicates the address is denied access, 1322.Ql * 1323indicates the address is present but the current policy open 1324(so the ACL is not consulted). 1325.It Cm list mesh 1326Displays the mesh routing table, used for forwarding packets on a mesh 1327network. 1328.It Cm list regdomain 1329Display the current regulatory settings including the available channels 1330and transmit power caps. 1331.It Cm list roam 1332Display the parameters that govern roaming operation. 1333.It Cm list txparam 1334Display the parameters that govern transmit operation. 1335.It Cm list txpower 1336Display the transmit power caps for each channel. 1337.It Cm list scan 1338Display the access points and/or ad-hoc neighbors 1339located in the vicinity. 1340This information may be updated automatically by the adapter 1341with a 1342.Cm scan 1343request or through background scanning. 1344Depending on the capabilities of the stations the following 1345flags can be included in the output: 1346.Bl -tag -width 3n 1347.It Li A 1348Authorized. 1349Indicates that the station is permitted to send/receive data frames. 1350.It Li E 1351Extended Rate Phy (ERP). 1352Indicates that the station is operating in an 802.11g network 1353using extended transmit rates. 1354.It Li H 1355High Throughput (HT). 1356Indicates that the station is using HT transmit rates. 1357If a `+' follows immediately after then the station associated 1358using deprecated mechanisms supported only when 1359.Cm htcompat 1360is enabled. 1361.It Li P 1362Power Save. 1363Indicates that the station is operating in power save mode. 1364.It Li Q 1365Quality of Service (QoS). 1366Indicates that the station is using QoS encapsulation for 1367data frame. 1368QoS encapsulation is enabled only when WME mode is enabled. 1369.It Li S 1370Short Preamble. 1371Indicates that the station is doing short preamble to optionally 1372improve throughput performance with 802.11g and 802.11b. 1373.It Li T 1374Transitional Security Network (TSN). 1375Indicates that the station associated using TSN; see also 1376.Cm tsn 1377below. 1378.It Li W 1379Wi-Fi Protected Setup (WPS). 1380Indicates that the station associated using WPS. 1381.El 1382.Pp 1383By default interesting information elements captured from the neighboring 1384stations are displayed at the end of each row. 1385Possible elements include: 1386.Cm WME 1387(station supports WME), 1388.Cm WPA 1389(station supports WPA), 1390.Cm WPS 1391(station supports WPS), 1392.Cm RSN 1393(station supports 802.11i/RSN), 1394.Cm HTCAP 1395(station supports 802.11n/HT communication), 1396.Cm ATH 1397(station supports Atheros protocol extensions), 1398.Cm VEN 1399(station supports unknown vendor-specific extensions). 1400If the 1401.Fl v 1402flag is used all the information elements and their 1403contents will be shown. 1404Specifying the 1405.Fl v 1406flag also enables display of long SSIDs. 1407The 1408.Cm list ap 1409command is another way of requesting this information. 1410.It Cm list sta 1411When operating as an access point display the stations that are 1412currently associated. 1413When operating in ad-hoc mode display stations identified as 1414neighbors in the IBSS. 1415When operating in mesh mode display stations identified as 1416neighbors in the MBSS. 1417When operating in station mode display the access point. 1418Capabilities advertised by the stations are described under 1419the 1420.Cm scan 1421request. 1422Depending on the capabilities of the stations the following 1423flags can be included in the output: 1424.Bl -tag -width 3n 1425.It Li A 1426Authorized. 1427Indicates that the station is permitted to send/receive data frames. 1428.It Li E 1429Extended Rate Phy (ERP). 1430Indicates that the station is operating in an 802.11g network 1431using extended transmit rates. 1432.It Li H 1433High Throughput (HT). 1434Indicates that the station is using HT transmit rates. 1435If a `+' follows immediately after then the station associated 1436using deprecated mechanisms supported only when 1437.Cm htcompat 1438is enabled. 1439.It Li P 1440Power Save. 1441Indicates that the station is operating in power save mode. 1442.It Li Q 1443Quality of Service (QoS). 1444Indicates that the station is using QoS encapsulation for 1445data frame. 1446QoS encapsulation is enabled only when WME mode is enabled. 1447.It Li S 1448Short Preamble. 1449Indicates that the station is doing short preamble to optionally 1450improve throughput performance with 802.11g and 802.11b. 1451.It Li T 1452Transitional Security Network (TSN). 1453Indicates that the station associated using TSN; see also 1454.Cm tsn 1455below. 1456.It Li W 1457Wi-Fi Protected Setup (WPS). 1458Indicates that the station associated using WPS. 1459.El 1460.Pp 1461By default information elements received from associated stations 1462are displayed in a short form; the 1463.Fl v 1464flag causes this information to be displayed symbolically. 1465.It Cm list wme 1466Display the current channel parameters to use when operating in WME mode. 1467If the 1468.Fl v 1469option is specified then both channel and BSS parameters are displayed 1470for each AC (first channel, then BSS). 1471When WME mode is enabled for an adaptor this information will be 1472displayed with the regular status; this command is mostly useful 1473for examining parameters when WME mode is disabled. 1474See the description of the 1475.Cm wme 1476directive for information on the various parameters. 1477.It Cm maxretry Ar count 1478Set the maximum number of tries to use in sending unicast frames. 1479The default setting is 6 but drivers may override this with a value 1480they choose. 1481.It Cm mcastrate Ar rate 1482Set the rate for transmitting multicast/broadcast frames. 1483Rates are specified as megabits/second in decimal; e.g.\& 5.5 for 5.5 Mb/s. 1484This rate should be valid for the current operating conditions; 1485if an invalid rate is specified drivers are free to chose an 1486appropriate rate. 1487.It Cm mgtrate Ar rate 1488Set the rate for transmitting management and/or control frames. 1489Rates are specified as megabits/second in decimal; e.g.\& 5.5 for 5.5 Mb/s. 1490.It Cm outdoor 1491Set the location to use in calculating regulatory constraints. 1492The location is also advertised in beacon and probe response frames 1493when 802.11d is enabled with 1494.Cm dotd . 1495See also 1496.Cm anywhere , 1497.Cm country , 1498.Cm indoor , 1499and 1500.Cm regdomain . 1501.It Cm powersave 1502Enable powersave operation. 1503When operating as a client, the station will conserve power by 1504periodically turning off the radio and listening for 1505messages from the access point telling it there are packets waiting. 1506The station must then retrieve the packets. 1507Not all devices support power save operation as a client. 1508The 802.11 specification requires that all access points support 1509power save but some drivers do not. 1510Use 1511.Fl powersave 1512to disable powersave operation when operating as a client. 1513.It Cm powersavesleep Ar sleep 1514Set the desired max powersave sleep time in TU's (1024 usecs). 1515By default the max powersave sleep time is 100 TU's. 1516.It Cm protmode Ar technique 1517For interfaces operating in 802.11g, use the specified 1518.Ar technique 1519for protecting OFDM frames in a mixed 11b/11g network. 1520The set of valid techniques is 1521.Cm off , cts 1522(CTS to self), 1523and 1524.Cm rtscts 1525(RTS/CTS). 1526Technique names are case insensitive. 1527Not all devices support 1528.Cm cts 1529as a protection technique. 1530.It Cm pureg 1531When operating as an access point in 802.11g mode allow only 153211g-capable stations to associate (11b-only stations are not 1533permitted to associate). 1534To allow both 11g and 11b-only stations to associate, use 1535.Fl pureg . 1536.It Cm puren 1537When operating as an access point in 802.11n mode allow only 1538HT-capable stations to associate (legacy stations are not 1539permitted to associate). 1540To allow both HT and legacy stations to associate, use 1541.Fl puren . 1542.It Cm regdomain Ar sku 1543Set the regulatory domain to use in calculating the regulatory constraints 1544for operation. 1545In particular the set of available channels, how the wireless device 1546will operation on the channels, and the maximum transmit power that 1547can be used on a channel are defined by this setting. 1548Regdomain codes (SKU's) are taken from /etc/regdomain.xml and can also 1549be viewed with the ``list countries'' request. 1550Note that not all devices support changing the regdomain from a default 1551setting; typically stored in EEPROM. 1552See also 1553.Cm country , 1554.Cm indoor , 1555.Cm outdoor , 1556and 1557.Cm anywhere . 1558.It Cm rifs 1559Enable use of Reduced InterFrame Spacing (RIFS) when operating in 802.11n 1560on an HT channel. 1561Note that RIFS must be supported by both the station and access point 1562for it to be used. 1563To disable RIFS use 1564.Fl rifs . 1565.It Cm roam:rate Ar rate 1566Set the threshold for controlling roaming when operating in a BSS. 1567The 1568.Ar rate 1569parameter specifies the transmit rate in megabits 1570at which roaming should be considered. 1571If the current transmit rate drops below this setting and background scanning 1572is enabled, then the system will check if a more desirable access point is 1573available and switch over to it. 1574The current scan cache contents are used if they are considered 1575valid according to the 1576.Cm scanvalid 1577parameter; otherwise a background scan operation is triggered before 1578any selection occurs. 1579Each channel type has a separate rate threshold; the default values are: 158012 Mb/s (11a), 2 Mb/s (11b), 2 Mb/s (11g), MCS 1 (11na, 11ng). 1581.It Cm roam:rssi Ar rssi 1582Set the threshold for controlling roaming when operating in a BSS. 1583The 1584.Ar rssi 1585parameter specifies the receive signal strength in dBm units 1586at which roaming should be considered. 1587If the current rssi drops below this setting and background scanning 1588is enabled, then the system will check if a more desirable access point is 1589available and switch over to it. 1590The current scan cache contents are used if they are considered 1591valid according to the 1592.Cm scanvalid 1593parameter; otherwise a background scan operation is triggered before 1594any selection occurs. 1595Each channel type has a separate rssi threshold; the default values are 1596all 7 dBm. 1597.It Cm roaming Ar mode 1598When operating as a station, control how the system will 1599behave when communication with the current access point 1600is broken. 1601The 1602.Ar mode 1603argument may be one of 1604.Cm device 1605(leave it to the hardware device to decide), 1606.Cm auto 1607(handle either in the device or the operating system\[em]as appropriate), 1608.Cm manual 1609(do nothing until explicitly instructed). 1610By default, the device is left to handle this if it is 1611capable; otherwise, the operating system will automatically 1612attempt to reestablish communication. 1613Manual mode is used by applications such as 1614.Xr wpa_supplicant 8 1615that want to control the selection of an access point. 1616.It Cm rtsthreshold Ar length 1617Set the threshold for which 1618transmitted frames are preceded by transmission of an 1619RTS 1620control frame. 1621The 1622.Ar length 1623argument 1624is the frame size in bytes and must be in the range 1 to 2346. 1625Setting 1626.Ar length 1627to 1628.Li 2346 , 1629.Cm any , 1630or 1631.Cm - 1632disables transmission of RTS frames. 1633Not all adapters support setting the RTS threshold. 1634.It Cm scan 1635Initiate a scan of neighboring stations, wait for it to complete, and 1636display all stations found. 1637Only the super-user can initiate a scan. 1638See 1639.Cm list scan 1640for information on the display. 1641By default a background scan is done; otherwise a foreground 1642scan is done and the station may roam to a different access point. 1643The 1644.Cm list scan 1645request can be used to show recent scan results without 1646initiating a new scan. 1647.It Cm scanvalid Ar threshold 1648Set the maximum time the scan cache contents are considered valid; 1649i.e. will be used without first triggering a scan operation to 1650refresh the data. 1651The 1652.Ar threshold 1653parameter is specified in seconds and defaults to 60 seconds. 1654The minimum setting for 1655.Ar threshold 1656is 10 seconds. 1657One should take care setting this threshold; if it is set too low 1658then attempts to roam to another access point may trigger unnecessary 1659background scan operations. 1660.It Cm shortgi 1661Enable use of Short Guard Interval when operating in 802.11n 1662on an HT channel. 1663NB: this currently enables Short GI on both HT40 and HT20 channels. 1664To disable Short GI use 1665.Fl shortgi . 1666.It Cm smps 1667Enable use of Static Spatial Multiplexing Power Save (SMPS) 1668when operating in 802.11n. 1669A station operating with Static SMPS maintains only a single 1670receive chain active (this can significantly reduce power consumption). 1671To disable SMPS use 1672.Fl smps . 1673.It Cm smpsdyn 1674Enable use of Dynamic Spatial Multiplexing Power Save (SMPS) 1675when operating in 802.11n. 1676A station operating with Dynamic SMPS maintains only a single 1677receive chain active but switches to multiple receive chains when it 1678receives an RTS frame (this can significantly reduce power consumption). 1679Note that stations cannot distinguish between RTS/CTS intended to 1680enable multiple receive chains and those used for other purposes. 1681To disable SMPS use 1682.Fl smps . 1683.It Cm ssid Ar ssid 1684Set the desired Service Set Identifier (aka network name). 1685The SSID is a string up to 32 characters 1686in length and may be specified as either a normal string or in 1687hexadecimal when preceded by 1688.Ql 0x . 1689Additionally, the SSID may be cleared by setting it to 1690.Ql - . 1691.It Cm tdmaslot Ar slot 1692When operating with TDMA, use the specified 1693.Ar slot 1694configuration. 1695The 1696.Ar slot 1697is a number between 0 and the maximum number of slots in the BSS. 1698Note that a station configured as slot 0 is a master and 1699will broadcast beacon frames advertising the BSS; 1700stations configured to use other slots will always 1701scan to locate a master before they ever transmit. 1702By default 1703.Cm tdmaslot 1704is set to 1. 1705.It Cm tdmaslotcnt Ar cnt 1706When operating with TDMA, setup a BSS with 1707.Ar cnt 1708slots. 1709The slot count may be at most 8. 1710The current implementation is only tested with two stations 1711(i.e. point to point applications). 1712This setting is only meaningful when a station is configured as slot 0; 1713other stations adopt this setting from the BSS they join. 1714By default 1715.Cm tdmaslotcnt 1716is set to 2. 1717.It Cm tdmaslotlen Ar len 1718When operating with TDMA, setup a BSS such that each station has a slot 1719.Ar len 1720microseconds long. 1721The slot length must be at least 150 microseconds (1/8 TU) 1722and no more than 65 milliseconds. 1723Note that setting too small a slot length may result in poor channel 1724bandwidth utilization due to factors such as timer granularity and 1725guard time. 1726This setting is only meaningful when a station is configured as slot 0; 1727other stations adopt this setting from the BSS they join. 1728By default 1729.Cm tdmaslotlen 1730is set to 10 milliseconds. 1731.It Cm tdmabintval Ar intval 1732When operating with TDMA, setup a BSS such that beacons are transmitted every 1733.Ar intval 1734superframes to synchronize the TDMA slot timing. 1735A superframe is defined as the number of slots times the slot length; e.g. 1736a BSS with two slots of 10 milliseconds has a 20 millisecond superframe. 1737The beacon interval may not be zero. 1738A lower setting of 1739.Cm tdmabintval 1740causes the timers to be resynchronized more often; this can be help if 1741significant timer drift is observed. 1742By default 1743.Cm tdmabintval 1744is set to 5. 1745.It Cm tsn 1746When operating as an access point with WPA/802.11i allow legacy 1747stations to associate using static key WEP and open authentication. 1748To disallow legacy station use of WEP, use 1749.Fl tsn . 1750.It Cm txpower Ar power 1751Set the power used to transmit frames. 1752The 1753.Ar power 1754argument is specified in .5 dBm units. 1755Out of range values are truncated. 1756Typically only a few discreet power settings are available and 1757the driver will use the setting closest to the specified value. 1758Not all adapters support changing the transmit power. 1759.It Cm ucastrate Ar rate 1760Set a fixed rate for transmitting unicast frames. 1761Rates are specified as megabits/second in decimal; e.g.\& 5.5 for 5.5 Mb/s. 1762This rate should be valid for the current operating conditions; 1763if an invalid rate is specified drivers are free to chose an 1764appropriate rate. 1765.It Cm wepmode Ar mode 1766Set the desired WEP mode. 1767Not all adapters support all modes. 1768The set of valid modes is 1769.Cm off , on , 1770and 1771.Cm mixed . 1772The 1773.Cm mixed 1774mode explicitly tells the adaptor to allow association with access 1775points which allow both encrypted and unencrypted traffic. 1776On these adapters, 1777.Cm on 1778means that the access point must only allow encrypted connections. 1779On other adapters, 1780.Cm on 1781is generally another name for 1782.Cm mixed . 1783Modes are case insensitive. 1784.It Cm weptxkey Ar index 1785Set the WEP key to be used for transmission. 1786This is the same as setting the default transmission key with 1787.Cm deftxkey . 1788.It Cm wepkey Ar key Ns | Ns Ar index : Ns Ar key 1789Set the selected WEP key. 1790If an 1791.Ar index 1792is not given, key 1 is set. 1793A WEP key will be either 5 or 13 1794characters (40 or 104 bits) depending on the local network and the 1795capabilities of the adaptor. 1796It may be specified either as a plain 1797string or as a string of hexadecimal digits preceded by 1798.Ql 0x . 1799For maximum portability, hex keys are recommended; 1800the mapping of text keys to WEP encryption is usually driver-specific. 1801In particular, the 1802.Tn Windows 1803drivers do this mapping differently to 1804.Fx . 1805A key may be cleared by setting it to 1806.Ql - . 1807If WEP is supported then there are at least four keys. 1808Some adapters support more than four keys. 1809If that is the case, then the first four keys 1810(1-4) will be the standard temporary keys and any others will be adaptor 1811specific keys such as permanent keys stored in NVRAM. 1812.Pp 1813Note that you must set a default transmit key with 1814.Cm deftxkey 1815for the system to know which key to use in encrypting outbound traffic. 1816.It Cm wme 1817Enable Wireless Multimedia Extensions (WME) support, if available, 1818for the specified interface. 1819WME is a subset of the IEEE 802.11e standard to support the 1820efficient communication of realtime and multimedia data. 1821To disable WME support, use 1822.Fl wme . 1823Another name for this parameter is 1824.Cm wmm . 1825.Pp 1826The following parameters are meaningful only when WME support is in use. 1827Parameters are specified per-AC (Access Category) and 1828split into those that are used by a station when acting 1829as an access point and those for client stations in the BSS. 1830The latter are received from the access point and may not be changed 1831(at the station). 1832The following Access Categories are recognized: 1833.Pp 1834.Bl -tag -width ".Cm AC_BK" -compact 1835.It Cm AC_BE 1836(or 1837.Cm BE ) 1838best effort delivery, 1839.It Cm AC_BK 1840(or 1841.Cm BK ) 1842background traffic, 1843.It Cm AC_VI 1844(or 1845.Cm VI ) 1846video traffic, 1847.It Cm AC_VO 1848(or 1849.Cm VO ) 1850voice traffic. 1851.El 1852.Pp 1853AC parameters are case-insensitive. 1854Traffic classification is done in the operating system using the 1855vlan priority associated with data frames or the 1856ToS (Type of Service) indication in IP-encapsulated frames. 1857If neither information is present, traffic is assigned to the 1858Best Effort (BE) category. 1859.Bl -tag -width indent 1860.It Cm ack Ar ac 1861Set the ACK policy for QoS transmissions by the local station; 1862this controls whether or not data frames transmitted by a station 1863require an ACK response from the receiving station. 1864To disable waiting for an ACK use 1865.Fl ack . 1866This parameter is applied only to the local station. 1867.It Cm acm Ar ac 1868Enable the Admission Control Mandatory (ACM) mechanism 1869for transmissions by the local station. 1870To disable the ACM use 1871.Fl acm . 1872On stations in a BSS this parameter is read-only and indicates 1873the setting received from the access point. 1874NB: ACM is not supported right now. 1875.It Cm aifs Ar ac Ar count 1876Set the Arbitration Inter Frame Spacing (AIFS) 1877channel access parameter to use for transmissions 1878by the local station. 1879On stations in a BSS this parameter is read-only and indicates 1880the setting received from the access point. 1881.It Cm cwmin Ar ac Ar count 1882Set the CWmin channel access parameter to use for transmissions 1883by the local station. 1884On stations in a BSS this parameter is read-only and indicates 1885the setting received from the access point. 1886.It Cm cwmax Ar ac Ar count 1887Set the CWmax channel access parameter to use for transmissions 1888by the local station. 1889On stations in a BSS this parameter is read-only and indicates 1890the setting received from the access point. 1891.It Cm txoplimit Ar ac Ar limit 1892Set the Transmission Opportunity Limit channel access parameter 1893to use for transmissions by the local station. 1894This parameter defines an interval of time when a WME station 1895has the right to initiate transmissions onto the wireless medium. 1896On stations in a BSS this parameter is read-only and indicates 1897the setting received from the access point. 1898.It Cm bss:aifs Ar ac Ar count 1899Set the AIFS channel access parameter to send to stations in a BSS. 1900This parameter is meaningful only when operating in ap mode. 1901.It Cm bss:cwmin Ar ac Ar count 1902Set the CWmin channel access parameter to send to stations in a BSS. 1903This parameter is meaningful only when operating in ap mode. 1904.It Cm bss:cwmax Ar ac Ar count 1905Set the CWmax channel access parameter to send to stations in a BSS. 1906This parameter is meaningful only when operating in ap mode. 1907.It Cm bss:txoplimit Ar ac Ar limit 1908Set the TxOpLimit channel access parameter to send to stations in a BSS. 1909This parameter is meaningful only when operating in ap mode. 1910.El 1911.It Cm wps 1912Enable Wireless Privacy Subscriber support. 1913Note that WPS support requires a WPS-capable supplicant. 1914To disable this function use 1915.Fl wps . 1916.El 1917.Pp 1918The following parameters support an optional access control list 1919feature available with some adapters when operating in ap mode; see 1920.Xr wlan_acl 4 . 1921This facility allows an access point to accept/deny association 1922requests based on the MAC address of the station. 1923Note that this feature does not significantly enhance security 1924as MAC address spoofing is easy to do. 1925.Bl -tag -width indent 1926.It Cm mac:add Ar address 1927Add the specified MAC address to the database. 1928Depending on the policy setting association requests from the 1929specified station will be allowed or denied. 1930.It Cm mac:allow 1931Set the ACL policy to permit association only by 1932stations registered in the database. 1933.It Cm mac:del Ar address 1934Delete the specified MAC address from the database. 1935.It Cm mac:deny 1936Set the ACL policy to deny association only by 1937stations registered in the database. 1938.It Cm mac:kick Ar address 1939Force the specified station to be deauthenticated. 1940This typically is done to block a station after updating the 1941address database. 1942.It Cm mac:open 1943Set the ACL policy to allow all stations to associate. 1944.It Cm mac:flush 1945Delete all entries in the database. 1946.It Cm mac:radius 1947Set the ACL policy to permit association only by 1948stations approved by a RADIUS server. 1949Note that this feature requires the 1950.Xr hostapd 8 1951program be configured to do the right thing 1952as it handles the RADIUS processing 1953(and marks stations as authorized). 1954.El 1955.Pp 1956The following parameters are related to a wireless interface operating in mesh 1957mode: 1958.Bl -tag -width indent 1959.It Cm meshid Ar meshid 1960Set the desired Mesh Identifier. 1961The Mesh ID is a string up to 32 characters in length. 1962A mesh interface must have a Mesh Identifier specified 1963to reach an operational state. 1964.It Cm meshttl Ar ttl 1965Set the desired ``time to live'' for mesh forwarded packets; 1966this is the number of hops a packet may be forwarded before 1967it is discarded. 1968The default setting for 1969.Cm meshttl 1970is 31. 1971.It Cm meshpeering 1972Enable or disable peering with neighbor mesh stations. 1973Stations must peer before any data packets can be exchanged. 1974By default 1975.Cm meshpeering 1976is enabled. 1977.It Cm meshforward 1978Enable or disable forwarding packets by a mesh interface. 1979By default 1980.Cm meshforward 1981is enabled. 1982.It Cm meshmetric Ar protocol 1983Set the specified 1984.Ar protocol 1985as the link metric protocol used on a mesh network. 1986The default protocol is called 1987.Ar AIRTIME . 1988The mesh interface will restart after changing this setting. 1989.It Cm meshpath Ar protocol 1990Set the specified 1991.Ar protocol 1992as the path selection protocol used on a mesh network. 1993The only available protocol at the moment is called 1994.Ar HWMP 1995(Hybrid Wireless Mesh Protocol). 1996The mesh interface will restart after changing this setting. 1997.It Cm hwmprootmode Ar mode 1998Stations on a mesh network can operate as ``root nodes.'' 1999Root nodes try to find paths to all mesh nodes and advertise themselves 2000regularly. 2001When there is a root mesh node on a network, other mesh nodes can setup 2002paths between themselves faster because they can use the root node 2003to find the destination. 2004This path may not be the best, but on-demand 2005routing will eventually find the best path. 2006The following modes are recognized: 2007.Pp 2008.Bl -tag -width ".Cm PROACTIVE" -compact 2009.It Cm DISABLED 2010Disable root mode. 2011.It Cm NORMAL 2012Send broadcast path requests every two seconds. 2013Nodes on the mesh without a path to this root mesh station with try to 2014discover a path to us. 2015.It Cm PROACTIVE 2016Send broadcast path requests every two seconds and every node must reply with 2017with a path reply even if it already has a path to this root mesh station. 2018.It Cm RANN 2019Send broadcast root announcement (RANN) frames. 2020Nodes on the mesh without a path to this root mesh station with try to 2021discover a path to us. 2022.El 2023By default 2024.Cm hwmprootmode 2025is set to 2026.Ar DISABLED . 2027.It Cm hwmpmaxhops Ar cnt 2028Set the maximum number of hops allowed in an HMWP path to 2029.Ar cnt . 2030The default setting for 2031.Cm hwmpmaxhops 2032is 31. 2033.El 2034.Pp 2035The following parameters are for compatibility with other systems: 2036.Bl -tag -width indent 2037.It Cm nwid Ar ssid 2038Another name for the 2039.Cm ssid 2040parameter. 2041Included for 2042.Nx 2043compatibility. 2044.It Cm stationname Ar name 2045Set the name of this station. 2046The station name is not part of the IEEE 802.11 2047protocol though some interfaces support it. 2048As such it only 2049seems to be meaningful to identical or virtually identical equipment. 2050Setting the station name is identical in syntax to setting the SSID. 2051One can also use 2052.Cm station 2053for 2054.Bsx 2055compatibility. 2056.It Cm wep 2057Another way of saying 2058.Cm wepmode on . 2059Included for 2060.Bsx 2061compatibility. 2062.It Fl wep 2063Another way of saying 2064.Cm wepmode off . 2065Included for 2066.Bsx 2067compatibility. 2068.It Cm nwkey key 2069Another way of saying: 2070.Dq Li "wepmode on weptxkey 1 wepkey 1:key wepkey 2:- wepkey 3:- wepkey 4:-" . 2071Included for 2072.Nx 2073compatibility. 2074.It Cm nwkey Xo 2075.Sm off 2076.Ar n : k1 , k2 , k3 , k4 2077.Sm on 2078.Xc 2079Another way of saying 2080.Dq Li "wepmode on weptxkey n wepkey 1:k1 wepkey 2:k2 wepkey 3:k3 wepkey 4:k4" . 2081Included for 2082.Nx 2083compatibility. 2084.It Fl nwkey 2085Another way of saying 2086.Cm wepmode off . 2087Included for 2088.Nx 2089compatibility. 2090.El 2091.Pp 2092The following parameters are specific to bridge interfaces: 2093.Bl -tag -width indent 2094.It Cm addm Ar interface 2095Add the interface named by 2096.Ar interface 2097as a member of the bridge. 2098The interface is put into promiscuous mode 2099so that it can receive every packet sent on the network. 2100.It Cm deletem Ar interface 2101Remove the interface named by 2102.Ar interface 2103from the bridge. 2104Promiscuous mode is disabled on the interface when 2105it is removed from the bridge. 2106.It Cm maxaddr Ar size 2107Set the size of the bridge address cache to 2108.Ar size . 2109The default is 100 entries. 2110.It Cm timeout Ar seconds 2111Set the timeout of address cache entries to 2112.Ar seconds 2113seconds. 2114If 2115.Ar seconds 2116is zero, then address cache entries will not be expired. 2117The default is 240 seconds. 2118.It Cm addr 2119Display the addresses that have been learned by the bridge. 2120.It Cm static Ar interface-name Ar address 2121Add a static entry into the address cache pointing to 2122.Ar interface-name . 2123Static entries are never aged out of the cache or re-placed, even if the 2124address is seen on a different interface. 2125.It Cm deladdr Ar address 2126Delete 2127.Ar address 2128from the address cache. 2129.It Cm flush 2130Delete all dynamically-learned addresses from the address cache. 2131.It Cm flushall 2132Delete all addresses, including static addresses, from the address cache. 2133.It Cm discover Ar interface 2134Mark an interface as a 2135.Dq discovering 2136interface. 2137When the bridge has no address cache entry 2138(either dynamic or static) 2139for the destination address of a packet, 2140the bridge will forward the packet to all 2141member interfaces marked as 2142.Dq discovering . 2143This is the default for all interfaces added to a bridge. 2144.It Cm -discover Ar interface 2145Clear the 2146.Dq discovering 2147attribute on a member interface. 2148For packets without the 2149.Dq discovering 2150attribute, the only packets forwarded on the interface are broadcast 2151or multicast packets and packets for which the destination address 2152is known to be on the interface's segment. 2153.It Cm learn Ar interface 2154Mark an interface as a 2155.Dq learning 2156interface. 2157When a packet arrives on such an interface, the source 2158address of the packet is entered into the address cache as being a 2159destination address on the interface's segment. 2160This is the default for all interfaces added to a bridge. 2161.It Cm -learn Ar interface 2162Clear the 2163.Dq learning 2164attribute on a member interface. 2165.It Cm sticky Ar interface 2166Mark an interface as a 2167.Dq sticky 2168interface. 2169Dynamically learned address entries are treated at static once entered into 2170the cache. 2171Sticky entries are never aged out of the cache or replaced, even if the 2172address is seen on a different interface. 2173.It Cm -sticky Ar interface 2174Clear the 2175.Dq sticky 2176attribute on a member interface. 2177.It Cm private Ar interface 2178Mark an interface as a 2179.Dq private 2180interface. 2181A private interface does not forward any traffic to any other port that is also 2182a private interface. 2183.It Cm -private Ar interface 2184Clear the 2185.Dq private 2186attribute on a member interface. 2187.It Cm span Ar interface 2188Add the interface named by 2189.Ar interface 2190as a span port on the bridge. 2191Span ports transmit a copy of every frame received by the bridge. 2192This is most useful for snooping a bridged network passively on 2193another host connected to one of the span ports of the bridge. 2194.It Cm -span Ar interface 2195Delete the interface named by 2196.Ar interface 2197from the list of span ports of the bridge. 2198.It Cm stp Ar interface 2199Enable Spanning Tree protocol on 2200.Ar interface . 2201The 2202.Xr if_bridge 4 2203driver has support for the IEEE 802.1D Spanning Tree protocol (STP). 2204Spanning Tree is used to detect and remove loops in a network topology. 2205.It Cm -stp Ar interface 2206Disable Spanning Tree protocol on 2207.Ar interface . 2208This is the default for all interfaces added to a bridge. 2209.It Cm edge Ar interface 2210Set 2211.Ar interface 2212as an edge port. 2213An edge port connects directly to end stations cannot create bridging 2214loops in the network, this allows it to transition straight to forwarding. 2215.It Cm -edge Ar interface 2216Disable edge status on 2217.Ar interface . 2218.It Cm autoedge Ar interface 2219Allow 2220.Ar interface 2221to automatically detect edge status. 2222This is the default for all interfaces added to a bridge. 2223.It Cm -autoedge Ar interface 2224Disable automatic edge status on 2225.Ar interface . 2226.It Cm ptp Ar interface 2227Set the 2228.Ar interface 2229as a point to point link. 2230This is required for straight transitions to forwarding and 2231should be enabled on a direct link to another RSTP capable switch. 2232.It Cm -ptp Ar interface 2233Disable point to point link status on 2234.Ar interface . 2235This should be disabled for a half duplex link and for an interface 2236connected to a shared network segment, 2237like a hub or a wireless network. 2238.It Cm autoptp Ar interface 2239Automatically detect the point to point status on 2240.Ar interface 2241by checking the full duplex link status. 2242This is the default for interfaces added to the bridge. 2243.It Cm -autoptp Ar interface 2244Disable automatic point to point link detection on 2245.Ar interface . 2246.It Cm maxage Ar seconds 2247Set the time that a Spanning Tree protocol configuration is valid. 2248The default is 20 seconds. 2249The minimum is 6 seconds and the maximum is 40 seconds. 2250.It Cm fwddelay Ar seconds 2251Set the time that must pass before an interface begins forwarding 2252packets when Spanning Tree is enabled. 2253The default is 15 seconds. 2254The minimum is 4 seconds and the maximum is 30 seconds. 2255.It Cm hellotime Ar seconds 2256Set the time between broadcasting of Spanning Tree protocol 2257configuration messages. 2258The hello time may only be changed when operating in legacy stp mode. 2259The default is 2 seconds. 2260The minimum is 1 second and the maximum is 2 seconds. 2261.It Cm priority Ar value 2262Set the bridge priority for Spanning Tree. 2263The default is 32768. 2264The minimum is 0 and the maximum is 61440. 2265.It Cm proto Ar value 2266Set the Spanning Tree protocol. 2267The default is rstp. 2268The available options are stp and rstp. 2269.It Cm holdcnt Ar value 2270Set the transmit hold count for Spanning Tree. 2271This is the number of packets transmitted before being rate limited. 2272The default is 6. 2273The minimum is 1 and the maximum is 10. 2274.It Cm ifpriority Ar interface Ar value 2275Set the Spanning Tree priority of 2276.Ar interface 2277to 2278.Ar value . 2279The default is 128. 2280The minimum is 0 and the maximum is 240. 2281.It Cm ifpathcost Ar interface Ar value 2282Set the Spanning Tree path cost of 2283.Ar interface 2284to 2285.Ar value . 2286The default is calculated from the link speed. 2287To change a previously selected path cost back to automatic, set the 2288cost to 0. 2289The minimum is 1 and the maximum is 200000000. 2290.It Cm ifmaxaddr Ar interface Ar size 2291Set the maximum number of hosts allowed from an interface, packets with unknown 2292source addresses are dropped until an existing host cache entry expires or is 2293removed. 2294Set to 0 to disable. 2295.El 2296.Pp 2297The following parameters are specific to lagg interfaces: 2298.Bl -tag -width indent 2299.It Cm laggport Ar interface 2300Add the interface named by 2301.Ar interface 2302as a port of the aggregation interface. 2303.It Cm -laggport Ar interface 2304Remove the interface named by 2305.Ar interface 2306from the aggregation interface. 2307.It Cm laggproto Ar proto 2308Set the aggregation protocol. 2309The default is failover. 2310The available options are failover, fec, lacp, loadbalance, roundrobin and 2311none. 2312.El 2313.Pp 2314The following parameters are specific to IP tunnel interfaces, 2315.Xr gif 4 : 2316.Bl -tag -width indent 2317.It Cm tunnel Ar src_addr dest_addr 2318Configure the physical source and destination address for IP tunnel 2319interfaces. 2320The arguments 2321.Ar src_addr 2322and 2323.Ar dest_addr 2324are interpreted as the outer source/destination for the encapsulating 2325IPv4/IPv6 header. 2326.It Fl tunnel 2327Unconfigure the physical source and destination address for IP tunnel 2328interfaces previously configured with 2329.Cm tunnel . 2330.It Cm deletetunnel 2331Another name for the 2332.Fl tunnel 2333parameter. 2334.It Cm accept_rev_ethip_ver 2335Set a flag to accept both correct EtherIP packets and ones 2336with reversed version field. Enabled by default. 2337This is for backward compatibility with 2338.Fx 6.1 , 23396.2, 6.3, 7.0, and 7.1. 2340.It Cm -accept_rev_ethip_ver 2341Clear a flag 2342.Cm accept_rev_ethip_ver . 2343.It Cm send_rev_ethip_ver 2344Set a flag to send EtherIP packets with reversed version 2345field intentionally. Disabled by default. 2346This is for backward compatibility with 2347.Fx 6.1 , 23486.2, 6.3, 7.0, and 7.1. 2349.It Cm -send_rev_ethip_ver 2350Clear a flag 2351.Cm send_rev_ethip_ver . 2352.El 2353.Pp 2354The following parameters are specific to GRE tunnel interfaces, 2355.Xr gre 4 : 2356.Bl -tag -width indent 2357.It Cm grekey Ar key 2358Configure the GRE key to be used for outgoing packets. 2359Note that 2360.Xr gre 4 will always accept GRE packets with invalid or absent keys. 2361This command will result in a four byte MTU reduction on the interface. 2362.El 2363.Pp 2364The following parameters are specific to 2365.Xr pfsync 4 2366interfaces: 2367.Bl -tag -width indent 2368.It Cm maxupd Ar n 2369Set the maximum number of updates for a single state which 2370can be collapsed into one. 2371This is an 8-bit number; the default value is 128. 2372.El 2373.Pp 2374The following parameters are specific to 2375.Xr vlan 4 2376interfaces: 2377.Bl -tag -width indent 2378.It Cm vlan Ar vlan_tag 2379Set the VLAN tag value to 2380.Ar vlan_tag . 2381This value is a 16-bit number which is used to create an 802.1Q 2382VLAN header for packets sent from the 2383.Xr vlan 4 2384interface. 2385Note that 2386.Cm vlan 2387and 2388.Cm vlandev 2389must both be set at the same time. 2390.It Cm vlandev Ar iface 2391Associate the physical interface 2392.Ar iface 2393with a 2394.Xr vlan 4 2395interface. 2396Packets transmitted through the 2397.Xr vlan 4 2398interface will be 2399diverted to the specified physical interface 2400.Ar iface 2401with 802.1Q VLAN encapsulation. 2402Packets with 802.1Q encapsulation received 2403by the parent interface with the correct VLAN tag will be diverted to 2404the associated 2405.Xr vlan 4 2406pseudo-interface. 2407The 2408.Xr vlan 4 2409interface is assigned a 2410copy of the parent interface's flags and the parent's ethernet address. 2411The 2412.Cm vlandev 2413and 2414.Cm vlan 2415must both be set at the same time. 2416If the 2417.Xr vlan 4 2418interface already has 2419a physical interface associated with it, this command will fail. 2420To 2421change the association to another physical interface, the existing 2422association must be cleared first. 2423.Pp 2424Note: if the hardware tagging capability 2425is set on the parent interface, the 2426.Xr vlan 4 2427pseudo 2428interface's behavior changes: 2429the 2430.Xr vlan 4 2431interface recognizes that the 2432parent interface supports insertion and extraction of VLAN tags on its 2433own (usually in firmware) and that it should pass packets to and from 2434the parent unaltered. 2435.It Fl vlandev Op Ar iface 2436If the driver is a 2437.Xr vlan 4 2438pseudo device, disassociate the parent interface from it. 2439This breaks the link between the 2440.Xr vlan 4 2441interface and its parent, 2442clears its VLAN tag, flags and its link address and shuts the interface down. 2443The 2444.Ar iface 2445argument is useless and hence deprecated. 2446.El 2447.Pp 2448The following parameters are specific to 2449.Xr carp 4 2450interfaces: 2451.Bl -tag -width indent 2452.It Cm advbase Ar seconds 2453Specifies the base of the advertisement interval in seconds. 2454The acceptable values are 1 to 255. 2455The default value is 1. 2456.\" The default value is 2457.\" .Dv CARP_DFLTINTV . 2458.It Cm advskew Ar interval 2459Specifies the skew to add to the base advertisement interval to 2460make one host advertise slower than another host. 2461It is specified in 1/256 of seconds. 2462The acceptable values are 1 to 254. 2463The default value is 0. 2464.It Cm pass Ar phrase 2465Set the authentication key to 2466.Ar phrase . 2467.It Cm vhid Ar n 2468Set the virtual host ID. 2469This is a required setting. 2470Acceptable values are 1 to 255. 2471.El 2472.Pp 2473The 2474.Nm 2475utility displays the current configuration for a network interface 2476when no optional parameters are supplied. 2477If a protocol family is specified, 2478.Nm 2479will report only the details specific to that protocol family. 2480.Pp 2481If the 2482.Fl m 2483flag is passed before an interface name, 2484.Nm 2485will display the capability list and all 2486of the supported media for the specified interface. 2487If 2488.Fl L 2489flag is supplied, address lifetime is displayed for IPv6 addresses, 2490as time offset string. 2491.Pp 2492Optionally, the 2493.Fl a 2494flag may be used instead of an interface name. 2495This flag instructs 2496.Nm 2497to display information about all interfaces in the system. 2498The 2499.Fl d 2500flag limits this to interfaces that are down, and 2501.Fl u 2502limits this to interfaces that are up. 2503When no arguments are given, 2504.Fl a 2505is implied. 2506.Pp 2507The 2508.Fl l 2509flag may be used to list all available interfaces on the system, with 2510no other additional information. 2511Use of this flag is mutually exclusive 2512with all other flags and commands, except for 2513.Fl d 2514(only list interfaces that are down) 2515and 2516.Fl u 2517(only list interfaces that are up). 2518.Pp 2519The 2520.Fl v 2521flag may be used to get more verbose status for an interface. 2522.Pp 2523The 2524.Fl C 2525flag may be used to list all of the interface cloners available on 2526the system, with no additional information. 2527Use of this flag is mutually exclusive with all other flags and commands. 2528.Pp 2529The 2530.Fl k 2531flag causes keying information for the interface, if available, to be 2532printed. 2533For example, the values of 802.11 WEP keys will be printed, if accessible to 2534the current user. 2535This information is not printed by default, as it may be considered 2536sensitive. 2537.Pp 2538If the network interface driver is not present in the kernel then 2539.Nm 2540will attempt to load it. 2541The 2542.Fl n 2543flag disables this behavior. 2544.Pp 2545Only the super-user may modify the configuration of a network interface. 2546.Sh NOTES 2547The media selection system is relatively new and only some drivers support 2548it (or have need for it). 2549.Sh EXAMPLES 2550Assign the IPv4 address 2551.Li 192.0.2.10 , 2552with a network mask of 2553.Li 255.255.255.0 , 2554to the interface 2555.Li fxp0 : 2556.Dl # ifconfig fxp0 inet 192.0.2.10 netmask 255.255.255.0 2557.Pp 2558Add the IPv4 address 2559.Li 192.0.2.45 , 2560with the CIDR network prefix 2561.Li /28 , 2562to the interface 2563.Li ed0 , 2564using 2565.Cm add 2566as a synonym for the canonical form of the option 2567.Cm alias : 2568.Dl # ifconfig ed0 inet 192.0.2.45/28 add 2569.Pp 2570Remove the IPv4 address 2571.Li 192.0.2.45 2572from the interface 2573.Li ed0 : 2574.Dl # ifconfig ed0 inet 192.0.2.45 -alias 2575.Pp 2576Enable IPv6 functionality of the interface: 2577.Dl # ifconfig em0 inet6 -ifdisabled 2578.Pp 2579Add the IPv6 address 2580.Li 2001:DB8:DBDB::123/48 2581to the interface 2582.Li em0 : 2583.Dl # ifconfig em0 inet6 2001:db8:bdbd::123 prefixlen 48 alias 2584Note that lower case hexadecimal IPv6 addresses are acceptable. 2585.Pp 2586Remove the IPv6 address added in the above example, 2587using the 2588.Li / 2589character as shorthand for the network prefix, 2590and using 2591.Cm delete 2592as a synonym for the canonical form of the option 2593.Fl alias : 2594.Dl # ifconfig em0 inet6 2001:db8:bdbd::123/48 delete 2595.Pp 2596Configure the interface 2597.Li xl0 , 2598to use 100baseTX, full duplex Ethernet media options: 2599.Dl # ifconfig xl0 media 100baseTX mediaopt full-duplex 2600.Pp 2601Label the em0 interface as an uplink: 2602.Dl # ifconfig em0 description \&"Uplink to Gigabit Switch 2\&" 2603.Pp 2604Create the software network interface 2605.Li gif1 : 2606.Dl # ifconfig gif1 create 2607.Pp 2608Destroy the software network interface 2609.Li gif1 : 2610.Dl # ifconfig gif1 destroy 2611.Pp 2612Display available wireless networks using 2613.Li wlan0 : 2614.Dl # ifconfig wlan0 list scan 2615.Sh DIAGNOSTICS 2616Messages indicating the specified interface does not exist, the 2617requested address is unknown, or the user is not privileged and 2618tried to alter an interface's configuration. 2619.Sh SEE ALSO 2620.Xr netstat 1 , 2621.Xr carp 4 , 2622.Xr gif 4 , 2623.Xr netintro 4 , 2624.Xr pfsync 4 , 2625.Xr polling 4 , 2626.Xr vlan 4 , 2627.\" .Xr eon 5 , 2628.Xr rc 8 , 2629.Xr routed 8 , 2630.Xr jail 8 , 2631.Xr sysctl 8 2632.Sh HISTORY 2633The 2634.Nm 2635utility appeared in 2636.Bx 4.2 . 2637.Sh BUGS 2638Basic IPv6 node operation requires a link-local address on each 2639interface configured for IPv6. 2640Normally, such an address is automatically configured by the 2641kernel on each interface added to the system or enabled; this behavior may 2642be disabled by setting per-interface flag 2643.Cm -auto_linklocal . 2644The default value of this flag is 1 and can be disabled by using the sysctl 2645MIB variable 2646.Va net.inet6.ip6.auto_linklocal . 2647.Pp 2648Do not configure IPv6 addresses with no link-local address by using 2649.Nm . 2650It can result in unexpected behaviors of the kernel. 2651