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