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