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