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 October 31, 2007 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.Op 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 110.Dq inet6 111family, it is also possible to specify the prefix length using the slash 112notation, like 113.Li ::1/128 . 114See the 115.Cm prefixlen 116parameter below for more information. 117.\" For the Xerox Network Systems(tm) family, 118.\" addresses are 119.\" .Ar net:a.b.c.d.e.f , 120.\" where 121.\" .Ar net 122.\" is the assigned network number (in decimal), 123.\" and each of the six bytes of the host number, 124.\" .Ar a 125.\" through 126.\" .Ar f , 127.\" are specified in hexadecimal. 128.\" The host number may be omitted on IEEE 802 protocol 129.\" (Ethernet, FDDI, and Token Ring) interfaces, 130.\" which use the hardware physical address, 131.\" and on interfaces other than the first. 132.\" For the 133.\" .Tn ISO 134.\" family, addresses are specified as a long hexadecimal string, 135.\" as in the Xerox family. 136.\" However, two consecutive dots imply a zero 137.\" byte, and the dots are optional, if the user wishes to (carefully) 138.\" count out long strings of digits in network byte order. 139.Pp 140The link-level 141.Pq Dq link 142address 143is specified as a series of colon-separated hex digits. 144This can be used to 145e.g.\& set a new MAC address on an ethernet interface, though the 146mechanism used is not ethernet-specific. 147If the interface is already 148up when this option is used, it will be briefly brought down and 149then brought back up again in order to ensure that the receive 150filter in the underlying ethernet hardware is properly reprogrammed. 151.It Ar address_family 152Specify the 153address family 154which affects interpretation of the remaining parameters. 155Since an interface can receive transmissions in differing protocols 156with different naming schemes, specifying the address family is recommended. 157The address or protocol families currently 158supported are 159.Dq inet , 160.Dq inet6 , 161.Dq atalk , 162.Dq ipx , 163.\" .Dq iso , 164and 165.Dq link . 166.\" and 167.\" .Dq ns . 168The default is 169.Dq inet . 170.Dq ether 171and 172.Dq lladdr 173are synonyms for 174.Dq link . 175.It Ar dest_address 176Specify the address of the correspondent on the other end 177of a point to point link. 178.It Ar interface 179This 180parameter is a string of the form 181.Dq name unit , 182for example, 183.Dq Li ed0 . 184.It Ar groupname 185List the interfaces in the given group. 186.El 187.Pp 188The following parameters may be set with 189.Nm : 190.Bl -tag -width indent 191.It Cm add 192Another name for the 193.Cm alias 194parameter. 195Introduced for compatibility 196with 197.Bsx . 198.It Cm alias 199Establish an additional network address for this interface. 200This is sometimes useful when changing network numbers, and 201one wishes to accept packets addressed to the old interface. 202If the address is on the same subnet as the first network address 203for this interface, a non-conflicting netmask must be given. 204Usually 205.Li 0xffffffff 206is most appropriate. 207.It Fl alias 208Remove the network address specified. 209This would be used if you incorrectly specified an alias, or it 210was no longer needed. 211If you have incorrectly set an NS address having the side effect 212of specifying the host portion, removing all NS addresses will 213allow you to respecify the host portion. 214.It Cm anycast 215(Inet6 only.) 216Specify that the address configured is an anycast address. 217Based on the current specification, 218only routers may configure anycast addresses. 219Anycast address will not be used as source address of any of outgoing 220IPv6 packets. 221.It Cm arp 222Enable the use of the Address Resolution Protocol 223.Pq Xr arp 4 224in mapping 225between network level addresses and link level addresses (default). 226This is currently implemented for mapping between 227.Tn DARPA 228Internet 229addresses and 230.Tn IEEE 231802 48-bit MAC addresses (Ethernet, FDDI, and Token Ring addresses). 232.It Fl arp 233Disable the use of the Address Resolution Protocol 234.Pq Xr arp 4 . 235.It Cm staticarp 236If the Address Resolution Protocol is enabled, 237the host will only reply to requests for its addresses, 238and will never send any requests. 239.It Fl staticarp 240If the Address Resolution Protocol is enabled, 241the host will perform normally, 242sending out requests and listening for replies. 243.It Cm broadcast 244(Inet only.) 245Specify the address to use to represent broadcasts to the 246network. 247The default broadcast address is the address with a host part of all 1's. 248.It Cm debug 249Enable driver dependent debugging code; usually, this turns on 250extra console error logging. 251.It Fl debug 252Disable driver dependent debugging code. 253.It Cm promisc 254Put interface into permanently promiscuous mode. 255.It Fl promisc 256Disable permanently promiscuous mode. 257.It Cm delete 258Another name for the 259.Fl alias 260parameter. 261.It Cm down 262Mark an interface 263.Dq down . 264When an interface is marked 265.Dq down , 266the system will not attempt to 267transmit messages through that interface. 268If possible, the interface will be reset to disable reception as well. 269This action does not automatically disable routes using the interface. 270.It Cm group Ar group-name 271Assign the interface to a 272.Dq group . 273Any interface can be in multiple groups. 274.Pp 275Cloned interfaces are members of their interface family group by default. 276For example, a PPP interface such as 277.Em ppp0 278is a member of the PPP interface family group, 279.Em ppp . 280.\" The interface(s) the default route(s) point to are members of the 281.\" .Em egress 282.\" interface group. 283.It Cm -group Ar group-name 284Remove the interface from the given 285.Dq group . 286.It Cm eui64 287(Inet6 only.) 288Fill interface index 289(lowermost 64bit of an IPv6 address) 290automatically. 291.It Cm ipdst 292This is used to specify an Internet host who is willing to receive 293IP packets encapsulating IPX packets bound for a remote network. 294An apparent point to point link is constructed, and 295the address specified will be taken as the IPX address and network 296of the destination. 297.It Cm maclabel Ar label 298If Mandatory Access Control support is enabled in the kernel, 299set the MAC label to 300.Ar label . 301.\" (see 302.\" .Xr maclabel 7 ) . 303.It Cm media Ar type 304If the driver supports the media selection system, set the media type 305of the interface to 306.Ar type . 307Some interfaces support the mutually exclusive use of one of several 308different physical media connectors. 309For example, a 10Mbit/s Ethernet 310interface might support the use of either 311.Tn AUI 312or twisted pair connectors. 313Setting the media type to 314.Cm 10base5/AUI 315would change the currently active connector to the AUI port. 316Setting it to 317.Cm 10baseT/UTP 318would activate twisted pair. 319Refer to the interfaces' driver 320specific documentation or man page for a complete list of the 321available types. 322.It Cm mediaopt Ar opts 323If the driver supports the media selection system, set the specified 324media options on the interface. 325The 326.Ar opts 327argument 328is a comma delimited list of options to apply to the interface. 329Refer to the interfaces' driver specific man page for a complete 330list of available options. 331.It Fl mediaopt Ar opts 332If the driver supports the media selection system, disable the 333specified media options on the interface. 334.It Cm mode Ar mode 335If the driver supports the media selection system, set the specified 336operating mode on the interface to 337.Ar mode . 338For IEEE 802.11 wireless interfaces that support multiple operating modes 339this directive is used to select between 802.11a 340.Pq Cm 11a , 341802.11b 342.Pq Cm 11b , 343and 802.11g 344.Pq Cm 11g 345operating modes. 346.It Cm inst Ar minst , Cm instance Ar minst 347Set the media instance to 348.Ar minst . 349This is useful for devices which have multiple physical layer interfaces 350.Pq PHYs . 351.It Cm name Ar name 352Set the interface name to 353.Ar name . 354.It Cm rxcsum , txcsum 355If the driver supports user-configurable checksum offloading, 356enable receive (or transmit) checksum offloading on the interface. 357Some drivers may not be able to enable these flags independently 358of each other, so setting one may also set the other. 359The driver will offload as much checksum work as it can reliably 360support, the exact level of offloading varies between drivers. 361.It Fl rxcsum , txcsum 362If the driver supports user-configurable checksum offloading, 363disable receive (or transmit) checksum offloading on the interface. 364These settings may not always be independent of each other. 365.It Cm tso 366If the driver supports 367.Xr tcp 4 368segmentation offloading, enable TSO on the interface. 369Some drivers may not be able to support TSO for 370.Xr ip 4 371and 372.Xr ip6 4 373packets, so they may enable only one of them. 374.It Fl tso 375If the driver supports 376.Xr tcp 4 377segmentation offloading, disable TSO on the interface. 378It will always disable TSO for 379.Xr ip 4 380and 381.Xr ip6 4 . 382.It Cm lro 383If the driver supports 384.Xr tcp 4 385large receive offloading, enable LRO on the interface. 386.It Fl lro 387If the driver supports 388.Xr tcp 4 389large receive offloading, disable LRO on the interface. 390.It Cm vlanmtu , vlanhwtag 391If the driver offers user-configurable VLAN support, enable 392reception of extended frames or tag processing in hardware, 393respectively. 394Note that this must be issued on a physical interface associated with 395.Xr vlan 4 , 396not on a 397.Xr vlan 4 398interface itself. 399.It Fl vlanmtu , vlanhwtag 400If the driver offers user-configurable VLAN support, disable 401reception of extended frames or tag processing in hardware, 402respectively. 403.It Cm polling 404Turn on 405.Xr polling 4 406feature and disable interrupts on the interface, if driver supports 407this mode. 408.It Fl polling 409Turn off 410.Xr polling 4 411feature and enable interrupt mode on the interface. 412.It Cm create 413Create the specified network pseudo-device. 414If the interface is given without a unit number, try to create a new 415device with an arbitrary unit number. 416If creation of an arbitrary device is successful, the new device name is 417printed to standard output unless the interface is renamed or destroyed 418in the same 419.Nm 420invocation. 421.It Cm destroy 422Destroy the specified network pseudo-device. 423.It Cm plumb 424Another name for the 425.Cm create 426parameter. 427Included for 428.Tn Solaris 429compatibility. 430.It Cm unplumb 431Another name for the 432.Cm destroy 433parameter. 434Included for 435.Tn Solaris 436compatibility. 437.It Cm metric Ar n 438Set the routing metric of the interface to 439.Ar n , 440default 0. 441The routing metric is used by the routing protocol 442.Pq Xr routed 8 . 443Higher metrics have the effect of making a route 444less favorable; metrics are counted as additional hops 445to the destination network or host. 446.It Cm mtu Ar n 447Set the maximum transmission unit of the interface to 448.Ar n , 449default is interface specific. 450The MTU is used to limit the size of packets that are transmitted on an 451interface. 452Not all interfaces support setting the MTU, and some interfaces have 453range restrictions. 454.It Cm netmask Ar mask 455.\" (Inet and ISO.) 456(Inet only.) 457Specify how much of the address to reserve for subdividing 458networks into sub-networks. 459The mask includes the network part of the local address 460and the subnet part, which is taken from the host field of the address. 461The mask can be specified as a single hexadecimal number 462with a leading 463.Ql 0x , 464with a dot-notation Internet address, 465or with a pseudo-network name listed in the network table 466.Xr networks 5 . 467The mask contains 1's for the bit positions in the 32-bit address 468which are to be used for the network and subnet parts, 469and 0's for the host part. 470The mask should contain at least the standard network portion, 471and the subnet field should be contiguous with the network 472portion. 473.Pp 474The netmask can also be specified in CIDR notation after the address. 475See the 476.Ar address 477option above for more information. 478.It Cm prefixlen Ar len 479(Inet6 only.) 480Specify that 481.Ar len 482bits are reserved for subdividing networks into sub-networks. 483The 484.Ar len 485must be integer, and for syntactical reason it must be between 0 to 128. 486It is almost always 64 under the current IPv6 assignment rule. 487If the parameter is omitted, 64 is used. 488.Pp 489The prefix can also be specified using the slash notation after the address. 490See the 491.Ar address 492option above for more information. 493.\" see 494.\" Xr eon 5 . 495.\" .It Cm nsellength Ar n 496.\" .Pf ( Tn ISO 497.\" only) 498.\" This specifies a trailing number of bytes for a received 499.\" .Tn NSAP 500.\" used for local identification, the remaining leading part of which is 501.\" taken to be the 502.\" .Tn NET 503.\" (Network Entity Title). 504.\" The default value is 1, which is conformant to US 505.\" .Tn GOSIP . 506.\" When an ISO address is set in an ifconfig command, 507.\" it is really the 508.\" .Tn NSAP 509.\" which is being specified. 510.\" For example, in 511.\" .Tn US GOSIP , 512.\" 20 hex digits should be 513.\" specified in the 514.\" .Tn ISO NSAP 515.\" to be assigned to the interface. 516.\" There is some evidence that a number different from 1 may be useful 517.\" for 518.\" .Tn AFI 519.\" 37 type addresses. 520.It Cm range Ar netrange 521Under appletalk, set the interface to respond to a 522.Ar netrange 523of the form 524.Ar startnet Ns - Ns Ar endnet . 525Appletalk uses this scheme instead of 526netmasks though 527.Fx 528implements it internally as a set of netmasks. 529.It Cm remove 530Another name for the 531.Fl alias 532parameter. 533Introduced for compatibility 534with 535.Bsx . 536.It Cm phase 537The argument following this specifies the version (phase) of the 538Appletalk network attached to the interface. 539Values of 1 or 2 are permitted. 540.Sm off 541.It Cm link Op Cm 0 No - Cm 2 542.Sm on 543Enable special processing of the link level of the interface. 544These three options are interface specific in actual effect, however, 545they are in general used to select special modes of operation. 546An example 547of this is to enable SLIP compression, or to select the connector type 548for some Ethernet cards. 549Refer to the man page for the specific driver 550for more information. 551.Sm off 552.It Fl link Op Cm 0 No - Cm 2 553.Sm on 554Disable special processing at the link level with the specified interface. 555.It Cm monitor 556Put the interface in monitor mode. 557No packets are transmitted, and received packets are discarded after 558.Xr bpf 4 559processing. 560.It Fl monitor 561Take the interface out of monitor mode. 562.It Cm up 563Mark an interface 564.Dq up . 565This may be used to enable an interface after an 566.Dq Nm Cm down . 567It happens automatically when setting the first address on an interface. 568If the interface was reset when previously marked down, 569the hardware will be re-initialized. 570.El 571.Pp 572The following parameters are specific to IEEE 802.11 wireless interfaces: 573.Bl -tag -width indent 574.It Cm apbridge 575When operating as an access point, pass packets between 576wireless clients directly (default). 577To instead let them pass up through the 578system and be forwarded using some other mechanism, use 579.Fl apbridge . 580Disabling the internal bridging 581is useful when traffic is to be processed with 582packet filtering. 583.It Cm authmode Ar mode 584Set the desired authentication mode in infrastructure mode. 585Not all adaptors support all modes. 586The set of 587valid modes is 588.Cm none , open , shared 589(shared key), 590.Cm 8021x 591(IEEE 802.1x), 592and 593.Cm wpa 594(IEEE WPA/WPA2/802.11i). 595The 596.Cm 8021x 597and 598.Cm wpa 599modes are only useful when using an authentication service 600(a supplicant for client operation or an authenticator when 601operating as an access point). 602Modes are case insensitive. 603.It Cm bgscan 604Enable background scanning when operating as a station. 605Background scanning is a technique whereby a station associated to 606an access point will temporarily leave the channel to scan for 607neighboring stations. 608This allows a station to maintain a cache of nearby access points 609so that roaming between access points can be done without 610a lengthy scan operation. 611Background scanning is done only when a station is not busy and 612any outbound traffic will cancel a scan operation. 613Background scanning should never cause packets to be lost though 614there may be some small latency if outbound traffic interrupts a 615scan operation. 616By default background scanning is enabled if the device is capable. 617To disable background scanning, use 618.Fl bgscan . 619Background scanning is controlled by the 620.Cm bgscanidle 621and 622.Cm bgscanintvl 623parameters. 624Background scanning must be enabled for roaming; this is an artifact 625of the current implementation and may not be required in the future. 626.It Cm bgscanidle Ar idletime 627Set the minimum time a station must be idle (not transmitting or 628receiving frames) before a background scan is initiated. 629The 630.Ar idletime 631parameter is specified in milliseconds. 632By default a station must be idle at least 250 milliseconds before 633a background scan is initiated. 634The idle time may not be set to less than 100 milliseconds. 635.It Cm bgscanintvl Ar interval 636Set the interval at which background scanning is attempted. 637The 638.Ar interval 639parameter is specified in seconds. 640By default a background scan is considered every 300 seconds (5 minutes). 641The 642.Ar interval 643may not be set to less than 15 seconds. 644.It Cm bintval Ar interval 645Set the interval at which beacon frames are sent when operating in 646ad-hoc or ap mode. 647The 648.Ar interval 649parameter is specified in TU's (1024 usecs). 650By default beacon frames are transmitted every 100 TU's. 651.It Cm bmissthreshold Ar count 652Set the number of consecutive missed beacons at which the station 653will attempt to roam (i.e., search for a new access point). 654The 655.Ar count 656parameter must be in the range 1 to 255; though the 657upper bound may be reduced according to device capabilities. 658The default threshold is 7 consecutive missed beacons; but 659this may be overridden by the device driver. 660Another name for the 661.Cm bmissthreshold 662parameter is 663.Cm bmiss . 664.It Cm bssid Ar address 665Specify the MAC address of the access point to use when operating 666as a station in a BSS network. 667This overrides any automatic selection done by the system. 668To disable a previously selected access point, supply 669.Cm any , none , 670or 671.Cm - 672for the address. 673This option is useful when more than one access point uses the same SSID. 674Another name for the 675.Cm bssid 676parameter is 677.Cm ap . 678.It Cm burst 679Enable packet bursting. 680Packet bursting is a transmission technique whereby the wireless 681medium is acquired once to send multiple frames and the interframe 682spacing is reduced. 683This technique can significantly increase throughput by reducing 684transmission overhead. 685Packet bursting is supported by the 802.11e QoS specification 686and some devices that do not support QoS may still be capable. 687By default packet bursting is enabled if a device is capable 688of doing it. 689To disable packet bursting, use 690.Fl burst . 691.It Cm chanlist Ar channels 692Set the desired channels to use when scanning for access 693points, neighbors in an IBSS network, or looking for unoccupied 694channels when operating as an access point. 695The set of channels is specified as a comma-separated list with 696each element in the list representing either a single channel number or a range 697of the form 698.Dq Li a-b . 699Channel numbers must be in the range 1 to 255 and be permissible 700according to the operating characteristics of the device. 701.It Cm channel Ar number 702Set a single desired channel. 703Channels range from 1 to 255, but the exact selection available 704depends on the region your adaptor was manufactured for. 705Setting 706the channel to 707.Li 0 , 708.Cm any , 709or 710.Cm - 711will give you the default for your adaptor. 712Some 713adaptors ignore this setting unless you are in ad-hoc mode. 714Alternatively the frequency, in megahertz, may be specified 715instead of the channel number. 716.Pp 717When there are several ways to use a channel the channel 718number/frequency may be appended with attributes to clarify. 719For example, if a device is capable of operating on channel 6 720with 802.11n and 802.11g then one can specify that g-only use 721should be used by specifying ``6:g''. 722Similarly the channel width can be specified by appending it 723with ``/''; e.g. ``6/40'' specifies a 40MHz wide channel, 724These attributes can be combined as in: ``6:ht/40''. 725The full set of flags specified following a `:'' are: 726.Cm a 727(802.11a), 728.Cm b 729(802.11b), 730.Cm d 731(Atheros Dynamic Turbo mode), 732.Cm g 733(802.11g), 734.Cm h 735or 736.Cm n 737(802.11n aka HT), 738.Cm s 739(Atheros Static Turbo mode), 740and 741.Cm t 742(Atheros Dynamic Turbo mode, or appended to ``st'' and ``dt''). 743The full set of channel widths following a '/' are: 744.Cm 5 745(5MHz aka quarter-rate channel), 746.Cm 10 747(10MHz aka half-rate channel), 748.Cm 20 749(20MHz mostly for use in specifying ht20), 750and 751.Cm 40 752(40MHz mostly for use in specifying ht40), 753In addition, 754a 40MHz HT channel specification may include the location 755of the extension channel by appending ``+'' or ``-'' for above and below, 756respectively; e.g. ``2437:ht/40+'' specifies 40MHz wide HT operation 757with the center channel at frequency 2437 and the extension channel above. 758.It Cm doth 759Enable inclusion of an 802.11h country information element in beacon 760frames transmitted when operating as an access point. 761By default 802.11h is enabled if the device is capable. 762To disable 802.11h use 763.Fl doth . 764.It Cm deftxkey Ar index 765Set the default key to use for transmission. 766Typically this is only set when using WEP encryption. 767The 768.Cm weptxkey 769is an alias for this request; it is provided for backwards compatibility. 770.It Cm dtimperiod Ar period 771Set the 772DTIM 773period for transmitting buffered multicast data frames when 774operating in ap mode. 775The 776.Ar period 777specifies the number of beacon intervals between DTIM 778and must be in the range 1 to 15. 779By default DTIM is 1 (i.e., DTIM occurs at each beacon). 780.It Cm dturbo 781Enable the use of Atheros Dynamic Turbo mode when communicating with 782another Dynamic Turbo-capable station. 783Dynamic Turbo mode is an Atheros-specific mechanism by which 784stations switch between normal 802.11 operation and a ``boosted'' 785mode in which a 40MHz wide channel is used for communication. 786Stations using Dynamic Turbo mode operate boosted only when the 787channel is free of non-dturbo stations; when a non-dturbo station 788is identified on the channel all stations will automatically drop 789back to normal operation. 790By default, Dynamic Turbo mode is not enabled, even if the device is capable. 791Note that turbo mode (dynamic or static) is only allowed on some 792channels depending on the regulatory constraints; use the 793.Cm list chan 794command to identify the channels where turbo mode may be used. 795To disable Dynamic Turbo mode use 796.Fl dturbo . 797.It Cm fragthreshold Ar length 798Set the threshold for which transmitted frames are broken into fragments. 799The 800.Ar length 801argument is the frame size in bytes and must be in the range 256 to 2346. 802Setting 803.Ar length 804to 805.Li 2346 , 806.Cm any , 807or 808.Cm - 809disables transmit fragmentation. 810Not all adaptors honor the fragmentation threshold. 811.It Cm hidessid 812When operating as an access point, do not broadcast the SSID 813in beacon frames or respond to probe request frames unless 814they are directed to the ap (i.e., they include the ap's SSID). 815By default, the SSID is included in beacon frames and 816undirected probe request frames are answered. 817To re-enable the broadcast of the SSID etc., use 818.Fl hidessid . 819.It Cm ff 820Enable the use of Atheros Fast Frames when communicating with 821another Fast Frames-capable station. 822Fast Frames are an encapsulation technique by which two 802.3 823frames are transmitted in a single 802.11 frame. 824This can noticeably improve throughput but requires that the 825receiving station understand how to decapsulate the frame. 826Fast frame use is negotiated using the Atheros 802.11 vendor-specific 827protocol extension so enabling use is safe when communicating with 828non-Atheros devices. 829By default, use of fast frames is enabled if the device is capable. 830To explicitly disable fast frames, use 831.Fl ff . 832.It Cm list active 833Display the list of channels available for use taking into account 834any restrictions set with the 835.Cm chanlist 836directive. 837See the description of 838.Cm list chan 839for more information. 840.It Cm list caps 841Display the adaptor's capabilities, including the operating 842modes supported. 843.It Cm list chan 844Display the list of channels available for use. 845Channels are shown with their IEEE channel number, equivalent 846frequency, and usage modes. 847Channels identified as 848.Ql 11g 849are also usable in 850.Ql 11b 851mode. 852Channels identified as 853.Ql 11a Turbo 854may be used only for Atheros' Static Turbo mode 855(specified with 856. Cm mediaopt turbo ) . 857Channels marked with a 858.Ql * 859have a regulatory constraint that they be passively scanned. 860This means a station is not permitted to transmit on the channel until 861it identifies the channel is being used for 802.11 communication; 862typically by hearing a beacon frame from an access point operating 863on the channel. 864.Cm list freq 865is another way of requesting this information. 866By default a compacted list of channels is displayed; if the 867.Fl v 868option is specified then all channels are shown. 869.It Cm list mac 870Display the current MAC Access Control List state. 871Each address is prefixed with a character that indicates the 872current policy applied to it: 873.Ql + 874indicates the address is allowed access, 875.Ql - 876indicates the address is denied access, 877.Ql * 878indicates the address is present but the current policy open 879(so the ACL is not consulted). 880.It Cm list scan 881Display the access points and/or ad-hoc neighbors 882located in the vicinity. 883The 884.Fl v 885flag may be used to display long SSIDs. 886.Fl v 887also causes received information elements to be displayed symbolicaly. 888This information may be updated automatically by the adaptor 889and/or with a 890.Cm scan 891request or through background scanning. 892.Cm list ap 893is another way of requesting this information. 894.It Cm list sta 895When operating as an access point display the stations that are 896currently associated. 897When operating in ad-hoc mode display stations identified as 898neighbors in the IBSS. 899When operating in station mode display the access point. 900Capabilities advertised by the stations are described under 901the 902.Cm scan 903request. 904Depending on the capabilities of the stations the following 905flags can be included in the output: 906.Bl -tag -width 3n 907.It Li A 908Authorized. 909Indicates that the station is permitted to send/receive data frames. 910.It Li E 911Extended Rate Phy (ERP). 912Indicates that the station is operating in an 802.11g network 913using extended transmit rates. 914.It Li H 915High Throughput (HT). 916Indicates that the station is using MCS to send/receive frames. 917.It Li P 918Power Save. 919Indicates that the station is operating in power save mode. 920.It Li Q 921Quality of Service (QoS). 922Indicates that the station is using QoS encapsulation for 923data frame. 924QoS encapsulation is enabled only when WME mode is enabled. 925.El 926.Pp 927By default information elements received from associated stations 928are displayed in a short form; the 929.Fl v 930flag causes this information to be displayed symbolicaly. 931.It Cm list wme 932Display the current parameters to use when operating in WME mode. 933When WME mode is enabled for an adaptor this information will be 934displayed with the regular status; this command is mostly useful 935for examining parameters when WME mode is disabled. 936See the description of the 937.Cm wme 938directive for information on the various parameters. 939.It Cm mcastrate Ar rate 940Set the rate for transmitting multicast/broadcast frames. 941Rates are specified as megabits/second in decimal; e.g.\& 5.5 for 5.5 Mb/s. 942This rate should be valid for the current operating conditions; 943if an invalid rate is specified drivers are free to chose an 944appropriate rate. 945.It Cm powersave 946Enable powersave operation. 947When operating as a client, the station will conserve power by 948periodically turning off the radio and listening for 949messages from the access point telling it there are packets waiting. 950The station must then retrieve the packets. 951Not all devices support power save operation as a client. 952The 802.11 specification requires that all access points support 953power save but some drivers do not. 954Use 955.Fl powersave 956to disable powersave operation when operating as a client. 957.It Cm powersavesleep Ar sleep 958Set the desired max powersave sleep time in TU's (1024 usecs). 959By default the max powersave sleep time is 100 TU's. 960.It Cm protmode Ar technique 961For interfaces operating in 802.11g, use the specified 962.Ar technique 963for protecting OFDM frames in a mixed 11b/11g network. 964The set of valid techniques is 965.Cm off , cts 966(CTS to self), 967and 968.Cm rtscts 969(RTS/CTS). 970Technique names are case insensitive. 971Not all devices support 972.Cm cts 973as a protection technique. 974.It Cm pureg 975When operating as an access point in 802.11g mode allow only 97611g-capable stations to associate (11b-only stations are not 977permitted to associate). 978To allow both 11g and 11b-only stations to associate, use 979.Fl pureg . 980.It Cm roaming Ar mode 981When operating as a station, control how the system will 982behave when communication with the current access point 983is broken. 984The 985.Ar mode 986argument may be one of 987.Cm device 988(leave it to the hardware device to decide), 989.Cm auto 990(handle either in the device or the operating system\[em]as appropriate), 991.Cm manual 992(do nothing until explicitly instructed). 993By default, the device is left to handle this if it is 994capable; otherwise, the operating system will automatically 995attempt to reestablish communication. 996Manual mode is used by applications such as 997.Xr wpa_supplicant 8 998that want to control the selection of an access point. 999.It Cm roam:rssi11a Ar rssi 1000Set the threshold for controlling roaming when operating in an 1001802.11a BSS. 1002The 1003.Ar rssi 1004parameter specifies the receive signal strength in dBm units 1005at which roaming should be considered. 1006If the current rssi drops below this setting and background scanning 1007is enabled, then the system will check if a more desirable access point is 1008available and switch over to it. 1009The current scan cache contents are used if they are considered 1010valid according to the 1011.Cm scanvalid 1012parameter; otherwise a background scan operation is triggered before 1013any selection occurs. 1014By default 1015.Ar rssi 1016is set to 7 dBm. 1017.It Cm roam:rssi11b Ar rssi 1018Set the threshold for controlling roaming when operating in an 1019802.11b-only BSS. 1020See 1021.Cm roam:rssi11a 1022for a description of this parameter. 1023By default 1024.Ar rssi 1025is set to 7 dBm. 1026.It Cm roam:rssi11g Ar rssi 1027Set the threshold for controlling roaming when operating in a 1028(mixed) 802.11g BSS. 1029See 1030.Cm roam:rssi11a 1031for a description of this parameter. 1032By default 1033.Ar rssi 1034is set to 7 dBm. 1035.It Cm roam:rate11a Ar rate 1036Set the threshold for controlling roaming when operating in an 1037802.11a BSS. 1038The 1039.Ar rate 1040parameter specifies the transmit rate in megabits 1041at which roaming should be considered. 1042If the current transmit rate drops below this setting and background scanning 1043is enabled, then the system will check if a more desirable access point is 1044available and switch over to it. 1045The current scan cache contents are used if they are considered 1046valid according to the 1047.Cm scanvalid 1048parameter; otherwise a background scan operation is triggered before 1049any selection occurs. 1050By default 1051.Ar rate 1052is set to 12 Mb/s. 1053.It Cm roam:rate11b Ar rate 1054Set the threshold for controlling roaming when operating in an 1055802.11b-only BSS. 1056See 1057.Cm roam:rate11a 1058for a description of this parameter. 1059By default 1060.Ar rate 1061is set to 1 Mb/s. 1062.It Cm roam:rate11g Ar rate 1063Set the threshold for controlling roaming when operating in a 1064(mixed) 802.11g BSS. 1065See 1066.Cm roam:rate11a 1067for a description of this parameter. 1068By default 1069.Ar rate 1070is set to 5 Mb/s. 1071.It Cm rtsthreshold Ar length 1072Set the threshold for which 1073transmitted frames are preceded by transmission of an 1074RTS 1075control frame. 1076The 1077.Ar length 1078argument 1079is the frame size in bytes and must be in the range 1 to 2346. 1080Setting 1081.Ar length 1082to 1083.Li 2346 , 1084.Cm any , 1085or 1086.Cm - 1087disables transmission of RTS frames. 1088Not all adaptors support setting the RTS threshold. 1089.It Cm ssid Ar ssid 1090Set the desired Service Set Identifier (aka network name). 1091The SSID is a string up to 32 characters 1092in length and may be specified as either a normal string or in 1093hexadecimal when preceded by 1094.Ql 0x . 1095Additionally, the SSID may be cleared by setting it to 1096.Ql - . 1097.It Cm scan 1098Initiate a scan of neighboring stations, wait for it to complete, and 1099display all stations found. 1100Only the super-user can initiate a scan. 1101Depending on the capabilities of the APs, the following 1102flags can be included in the output: 1103.Bl -tag -width 3n 1104.It Li A 1105Channel Agility. 1106Indicates that the station support channel hopping as described by the 1107IEEE 802.11b specification. 1108.It Li B 1109Packet Binary Convolution Code (PBCC). 1110A modulation alternative to the standard OFDM method. 1111.It Dv C 1112Pollreq 1113.It Dv c 1114Pollable 1115.It Dv D 1116Direct Sequence Spread Spectrum (DSSSOFDM). 1117Indicates the the station supports DSSS modulation. 1118.It Li E 1119Extended Service Set (ESS). 1120Indicates that the station is part of an infrastructure network 1121(in contrast to an IBSS/ad-hoc network). 1122.It Li I 1123IBSS/ad-hoc network. 1124Indicates that the station is part of an ad-hoc network 1125(in contrast to an ESS network). 1126.It Li P 1127Privacy. 1128Data confidentiality is required for all data frames 1129exchanged within the BSS. 1130This means that this BSS requires the station to 1131use cryptographic means such as WEP, TKIP or AES-CCMP to 1132encrypt/decrypt data frames being exchanged with others. 1133.It Dv R 1134Robust Security Network (RSN). 1135Indicates that the station supports the IEEE 802.11i authentication 1136and key management protocol. 1137.It Li S 1138Short Preamble. 1139Indicates that the network is using short preambles (defined 1140in 802.11b High Rate/DSSS PHY, short preamble utilizes a 114156 bit sync field in contrast to a 128 bit field used in long 1142preamble mode). 1143.It Li s 1144Short slot time. 1145Indicates that the network is using a short slot time. 1146.El 1147.Pp 1148Interesting information elements captured from the neighboring 1149stations are displayed at the end of each row. 1150Possible elements are: 1151.Cm WME 1152(station supports WME), 1153.Cm WPA 1154(station supports WPA), 1155.Cm RSN 1156(station supports 802.11i/RSN), 1157.Cm HT 1158(station supports 802.11n/HT communication), 1159.Cm ATH 1160(station supoprts Atheros protocol extensions), 1161.Cm VEN 1162(station supports unknown vendor-specific extensions). 1163If the 1164.Fl v 1165flag is used the information element contents will be shown. 1166.Pp 1167The 1168.Cm list scan 1169request can be used to show recent scan results without 1170initiating a new scan. 1171.Pp 1172The 1173.Fl v 1174flag may be used to prevent the shortening of long SSIDs. 1175.It Cm scanvalid Ar threshold 1176Set the maximum time the scan cache contents are considered valid; 1177i.e. will be used without first triggering a scan operation to 1178refresh the data. 1179The 1180.Ar threshold 1181parameter is specified in seconds and defaults to 60 seconds. 1182The minimum setting for 1183.Ar threshold 1184is 10 seconds. 1185One should take care setting this threshold; if it is set too low 1186then attempts to roam to another access point may trigger unnecessary 1187background scan operations. 1188.It Cm stationname Ar name 1189Set the name of this station. 1190The station name is not part of the IEEE 802.11 1191protocol though some interfaces support it. 1192As such it only 1193seems to be meaningful to identical or virtually identical equipment. 1194Setting the station name is identical in syntax to setting the SSID. 1195.It Cm txpower Ar power 1196Set the power used to transmit frames. 1197The 1198.Ar power 1199argument is specified in .5 dBm units. 1200Out of range values are truncated. 1201Typically only a few discreet power settings are available and 1202the driver will use the setting closest to the specified value. 1203Not all adaptors support changing the transmit power. 1204.It Cm wepmode Ar mode 1205Set the desired WEP mode. 1206Not all adaptors support all modes. 1207The set of valid modes is 1208.Cm off , on , 1209and 1210.Cm mixed . 1211The 1212.Cm mixed 1213mode explicitly tells the adaptor to allow association with access 1214points which allow both encrypted and unencrypted traffic. 1215On these adaptors, 1216.Cm on 1217means that the access point must only allow encrypted connections. 1218On other adaptors, 1219.Cm on 1220is generally another name for 1221.Cm mixed . 1222Modes are case insensitive. 1223.It Cm weptxkey Ar index 1224Set the WEP key to be used for transmission. 1225This is the same as setting the default transmission key with 1226.Cm deftxkey . 1227.It Cm wepkey Ar key Ns | Ns Ar index : Ns Ar key 1228Set the selected WEP key. 1229If an 1230.Ar index 1231is not given, key 1 is set. 1232A WEP key will be either 5 or 13 1233characters (40 or 104 bits) depending of the local network and the 1234capabilities of the adaptor. 1235It may be specified either as a plain 1236string or as a string of hexadecimal digits preceded by 1237.Ql 0x . 1238For maximum portability, hex keys are recommended; 1239the mapping of text keys to WEP encryption is usually driver-specific. 1240In particular, the 1241.Tn Windows 1242drivers do this mapping differently to 1243.Fx . 1244A key may be cleared by setting it to 1245.Ql - . 1246If WEP is supported then there are at least four keys. 1247Some adaptors support more than four keys. 1248If that is the case, then the first four keys 1249(1-4) will be the standard temporary keys and any others will be adaptor 1250specific keys such as permanent keys stored in NVRAM. 1251.It Cm wme 1252Enable Wireless Multimedia Extensions (WME) support, if available, 1253for the specified interface. 1254WME is a subset of the IEEE 802.11e standard to support the 1255efficient communication of realtime and multimedia data. 1256To disable WME support, use 1257.Fl wme . 1258.Pp 1259The following parameters are meaningful only when WME support is in use. 1260Parameters are specified per-AC (Access Category) and 1261split into those that are used by a station when acting 1262as an access point and those for client stations in the BSS. 1263The latter are received from the access point and may not be changed 1264(at the station). 1265The following Access Categories are recognized: 1266.Pp 1267.Bl -tag -width ".Cm AC_BK" -compact 1268.It Cm AC_BE 1269(or 1270.Cm BE ) 1271best effort delivery, 1272.It Cm AC_BK 1273(or 1274.Cm BK ) 1275background traffic, 1276.It Cm AC_VI 1277(or 1278.Cm VI ) 1279video traffic, 1280.It Cm AC_VO 1281(or 1282.Cm VO ) 1283voice traffic. 1284.El 1285.Pp 1286AC parameters are case-insensitive. 1287Traffic classification is done in the operating system using the 1288vlan priority associated with data frames or the 1289ToS (Type of Service) indication in IP-encapsulated frames. 1290If neither information is present, traffic is assigned to the 1291Best Effort (BE) category. 1292.Bl -tag -width indent 1293.It Cm ack Ar ac 1294Set the ACK policy for QoS transmissions by the local station; 1295this controls whether or not data frames transmitted by a station 1296require an ACK response from the receiving station. 1297To disable waiting for an ACK use 1298.Fl ack . 1299This parameter is applied only to the local station. 1300.It Cm acm Ar ac 1301Enable the Admission Control Mandatory (ACM) mechanism 1302for transmissions by the local station. 1303To disable the ACM use 1304.Fl acm . 1305On stations in a BSS this parameter is read-only and indicates 1306the setting received from the access point. 1307NB: ACM is not supported right now. 1308.It Cm aifs Ar ac Ar count 1309Set the Arbitration Inter Frame Spacing (AIFS) 1310channel access parameter to use for transmissions 1311by the local station. 1312On stations in a BSS this parameter is read-only and indicates 1313the setting received from the access point. 1314.It Cm cwmin Ar ac Ar count 1315Set the CWmin channel access parameter to use for transmissions 1316by the local station. 1317On stations in a BSS this parameter is read-only and indicates 1318the setting received from the access point. 1319.It Cm cwmax Ar ac Ar count 1320Set the CWmax channel access parameter to use for transmissions 1321by the local station. 1322On stations in a BSS this parameter is read-only and indicates 1323the setting received from the access point. 1324.It Cm txoplimit Ar ac Ar limit 1325Set the Transmission Opportunity Limit channel access parameter 1326to use for transmissions by the local station. 1327This parameter defines an interval of time when a WME station 1328has the right to initiate transmissions onto the wireless medium. 1329On stations in a BSS this parameter is read-only and indicates 1330the setting received from the access point. 1331.It Cm bss:aifs Ar ac Ar count 1332Set the AIFS channel access parameter to send to stations in a BSS. 1333This parameter is meaningful only when operating in ap mode. 1334.It Cm bss:cwmin Ar ac Ar count 1335Set the CWmin channel access parameter to send to stations in a BSS. 1336This parameter is meaningful only when operating in ap mode. 1337.It Cm bss:cwmax Ar ac Ar count 1338Set the CWmax channel access parameter to send to stations in a BSS. 1339This parameter is meaningful only when operating in ap mode. 1340.It Cm bss:txoplimit Ar ac Ar limit 1341Set the TxOpLimit channel access parameter to send to stations in a BSS. 1342This parameter is meaningful only when operating in ap mode. 1343.El 1344.El 1345.Pp 1346The following parameters support an optional access control list 1347feature available with some adaptors when operating in ap mode; see 1348.Xr wlan_acl 4 . 1349This facility allows an access point to accept/deny association 1350requests based on the MAC address of the station. 1351Note that this feature does not significantly enhance security 1352as MAC address spoofing is easy to do. 1353.Bl -tag -width indent 1354.It Cm mac:add Ar address 1355Add the specified MAC address to the database. 1356Depending on the policy setting association requests from the 1357specified station will be allowed or denied. 1358.It Cm mac:allow 1359Set the ACL policy to permit association only by 1360stations registered in the database. 1361.It Cm mac:del Ar address 1362Delete the specified MAC address from the database. 1363.It Cm mac:deny 1364Set the ACL policy to deny association only by 1365stations registered in the database. 1366.It Cm mac:kick Ar address 1367Force the specified station to be deauthenticated. 1368This typically is done to block a station after updating the 1369address database. 1370.It Cm mac:open 1371Set the ACL policy to allow all stations to associate. 1372.It Cm mac:flush 1373Delete all entries in the database. 1374.El 1375.Pp 1376The following parameters are for compatibility with other systems: 1377.Bl -tag -width indent 1378.It Cm nwid Ar ssid 1379Another name for the 1380.Cm ssid 1381parameter. 1382Included for 1383.Nx 1384compatibility. 1385.It Cm station Ar name 1386Another name for the 1387.Cm stationname 1388parameter. 1389Included for 1390.Bsx 1391compatibility. 1392.It Cm wep 1393Another way of saying 1394.Cm wepmode on . 1395Included for 1396.Bsx 1397compatibility. 1398.It Fl wep 1399Another way of saying 1400.Cm wepmode off . 1401Included for 1402.Bsx 1403compatibility. 1404.It Cm nwkey key 1405Another way of saying: 1406.Dq Li "wepmode on weptxkey 1 wepkey 1:key wepkey 2:- wepkey 3:- wepkey 4:-" . 1407Included for 1408.Nx 1409compatibility. 1410.It Cm nwkey Xo 1411.Sm off 1412.Ar n : k1 , k2 , k3 , k4 1413.Sm on 1414.Xc 1415Another way of saying 1416.Dq Li "wepmode on weptxkey n wepkey 1:k1 wepkey 2:k2 wepkey 3:k3 wepkey 4:k4" . 1417Included for 1418.Nx 1419compatibility. 1420.It Fl nwkey 1421Another way of saying 1422.Cm wepmode off . 1423Included for 1424.Nx 1425compatibility. 1426.El 1427.Pp 1428The following parameters are specific to bridge interfaces: 1429.Bl -tag -width indent 1430.It Cm addm Ar interface 1431Add the interface named by 1432.Ar interface 1433as a member of the bridge. 1434The interface is put into promiscuous mode 1435so that it can receive every packet sent on the network. 1436.It Cm deletem Ar interface 1437Remove the interface named by 1438.Ar interface 1439from the bridge. 1440Promiscuous mode is disabled on the interface when 1441it is removed from the bridge. 1442.It Cm maxaddr Ar size 1443Set the size of the bridge address cache to 1444.Ar size . 1445The default is 100 entries. 1446.It Cm timeout Ar seconds 1447Set the timeout of address cache entries to 1448.Ar seconds 1449seconds. 1450If 1451.Ar seconds 1452is zero, then address cache entries will not be expired. 1453The default is 240 seconds. 1454.It Cm addr 1455Display the addresses that have been learned by the bridge. 1456.It Cm static Ar interface-name Ar address 1457Add a static entry into the address cache pointing to 1458.Ar interface-name . 1459Static entries are never aged out of the cache or re-placed, even if the 1460address is seen on a different interface. 1461.It Cm deladdr Ar address 1462Delete 1463.Ar address 1464from the address cache. 1465.It Cm flush 1466Delete all dynamically-learned addresses from the address cache. 1467.It Cm flushall 1468Delete all addresses, including static addresses, from the address cache. 1469.It Cm discover Ar interface 1470Mark an interface as a 1471.Dq discovering 1472interface. 1473When the bridge has no address cache entry 1474(either dynamic or static) 1475for the destination address of a packet, 1476the bridge will forward the packet to all 1477member interfaces marked as 1478.Dq discovering . 1479This is the default for all interfaces added to a bridge. 1480.It Cm -discover Ar interface 1481Clear the 1482.Dq discovering 1483attribute on a member interface. 1484For packets without the 1485.Dq discovering 1486attribute, the only packets forwarded on the interface are broadcast 1487or multicast packets and packets for which the destination address 1488is known to be on the interface's segment. 1489.It Cm learn Ar interface 1490Mark an interface as a 1491.Dq learning 1492interface. 1493When a packet arrives on such an interface, the source 1494address of the packet is entered into the address cache as being a 1495destination address on the interface's segment. 1496This is the default for all interfaces added to a bridge. 1497.It Cm -learn Ar interface 1498Clear the 1499.Dq learning 1500attribute on a member interface. 1501.It Cm sticky Ar interface 1502Mark an interface as a 1503.Dq sticky 1504interface. 1505Dynamically learned address entries are treated at static once entered into 1506the cache. 1507Sticky entries are never aged out of the cache or replaced, even if the 1508address is seen on a different interface. 1509.It Cm -sticky Ar interface 1510Clear the 1511.Dq sticky 1512attribute on a member interface. 1513.It Cm private Ar interface 1514Mark an interface as a 1515.Dq private 1516interface. 1517A private interface does not forward any traffic to any other port that is also 1518a private interface. 1519.It Cm -private Ar interface 1520Clear the 1521.Dq private 1522attribute on a member interface. 1523.It Cm span Ar interface 1524Add the interface named by 1525.Ar interface 1526as a span port on the bridge. 1527Span ports transmit a copy of every frame received by the bridge. 1528This is most useful for snooping a bridged network passively on 1529another host connected to one of the span ports of the bridge. 1530.It Cm -span Ar interface 1531Delete the interface named by 1532.Ar interface 1533from the list of span ports of the bridge. 1534.It Cm stp Ar interface 1535Enable Spanning Tree protocol on 1536.Ar interface . 1537The 1538.Xr if_bridge 4 1539driver has support for the IEEE 802.1D Spanning Tree protocol (STP). 1540Spanning Tree is used to detect and remove loops in a network topology. 1541.It Cm -stp Ar interface 1542Disable Spanning Tree protocol on 1543.Ar interface . 1544This is the default for all interfaces added to a bridge. 1545.It Cm edge Ar interface 1546Set 1547.Ar interface 1548as an edge port. 1549An edge port connects directly to end stations cannot create bridging 1550loops in the network, this allows it to transition straight to forwarding. 1551.It Cm -edge Ar interface 1552Disable edge status on 1553.Ar interface . 1554.It Cm autoedge Ar interface 1555Allow 1556.Ar interface 1557to automatically detect edge status. 1558This is the default for all interfaces added to a bridge. 1559.It Cm -autoedge Ar interface 1560Disable automatic edge status on 1561.Ar interface . 1562.It Cm ptp Ar interface 1563Set the 1564.Ar interface 1565as a point to point link. 1566This is required for straight transitions to forwarding and 1567should be enabled on a direct link to another RSTP capable switch. 1568.It Cm -ptp Ar interface 1569Disable point to point link status on 1570.Ar interface . 1571This should be disabled for a half duplex link and for an interface 1572connected to a shared network segment, 1573like a hub or a wireless network. 1574.It Cm autoptp Ar interface 1575Automatically detect the point to point status on 1576.Ar interface 1577by checking the full duplex link status. 1578This is the default for interfaces added to the bridge. 1579.It Cm -autoptp Ar interface 1580Disable automatic point to point link detection on 1581.Ar interface . 1582.It Cm maxage Ar seconds 1583Set the time that a Spanning Tree protocol configuration is valid. 1584The default is 20 seconds. 1585The minimum is 6 seconds and the maximum is 40 seconds. 1586.It Cm fwddelay Ar seconds 1587Set the time that must pass before an interface begins forwarding 1588packets when Spanning Tree is enabled. 1589The default is 15 seconds. 1590The minimum is 4 seconds and the maximum is 30 seconds. 1591.It Cm hellotime Ar seconds 1592Set the time between broadcasting of Spanning Tree protocol 1593configuration messages. 1594The hello time may only be changed when operating in legacy stp mode. 1595The default is 2 seconds. 1596The minimum is 1 second and the maximum is 2 seconds. 1597.It Cm priority Ar value 1598Set the bridge priority for Spanning Tree. 1599The default is 32768. 1600The minimum is 0 and the maximum is 61440. 1601.It Cm proto Ar value 1602Set the Spanning Tree protocol. 1603The default is rstp. 1604The available options are stp and rstp. 1605.It Cm holdcnt Ar value 1606Set the transmit hold count for Spanning Tree. 1607This is the number of packets transmitted before being rate limited. 1608The default is 6. 1609The minimum is 1 and the maximum is 10. 1610.It Cm ifpriority Ar interface Ar value 1611Set the Spanning Tree priority of 1612.Ar interface 1613to 1614.Ar value . 1615The default is 128. 1616The minimum is 0 and the maximum is 240. 1617.It Cm ifpathcost Ar interface Ar value 1618Set the Spanning Tree path cost of 1619.Ar interface 1620to 1621.Ar value . 1622The default is calculated from the link speed. 1623To change a previously selected path cost back to automatic, set the 1624cost to 0. 1625The minimum is 1 and the maximum is 200000000. 1626.It Cm ifmaxaddr Ar interface Ar size 1627Set the maximum number of hosts allowed from an interface, packets with unknown 1628source addresses are dropped until an existing host cache entry expires or is 1629removed. 1630Set to 0 to disable. 1631.El 1632.Pp 1633The following parameters are specific to lagg interfaces: 1634.Bl -tag -width indent 1635.It Cm laggport Ar interface 1636Add the interface named by 1637.Ar interface 1638as a port of the aggregation interface. 1639.It Cm -laggport Ar interface 1640Remove the interface named by 1641.Ar interface 1642from the aggregation interface. 1643.It Cm laggproto Ar proto 1644Set the aggregation protocol. 1645The default is failover. 1646The available options are failover, fec, lacp, loadbalance, roundrobin and 1647none. 1648.El 1649.Pp 1650The following parameters are specific to IP tunnel interfaces, 1651.Xr gif 4 : 1652.Bl -tag -width indent 1653.It Cm tunnel Ar src_addr dest_addr 1654Configure the physical source and destination address for IP tunnel 1655interfaces. 1656The arguments 1657.Ar src_addr 1658and 1659.Ar dest_addr 1660are interpreted as the outer source/destination for the encapsulating 1661IPv4/IPv6 header. 1662.It Fl tunnel 1663Unconfigure the physical source and destination address for IP tunnel 1664interfaces previously configured with 1665.Cm tunnel . 1666.It Cm deletetunnel 1667Another name for the 1668.Fl tunnel 1669parameter. 1670.El 1671.Pp 1672The following parameters are specific to 1673.Xr pfsync 4 1674interfaces: 1675.Bl -tag -width indent 1676.It Cm maxupd Ar n 1677Set the maximum number of updates for a single state which 1678can be collapsed into one. 1679This is an 8-bit number; the default value is 128. 1680.El 1681.Pp 1682The following parameters are specific to 1683.Xr vlan 4 1684interfaces: 1685.Bl -tag -width indent 1686.It Cm vlan Ar vlan_tag 1687Set the VLAN tag value to 1688.Ar vlan_tag . 1689This value is a 16-bit number which is used to create an 802.1Q 1690VLAN header for packets sent from the 1691.Xr vlan 4 1692interface. 1693Note that 1694.Cm vlan 1695and 1696.Cm vlandev 1697must both be set at the same time. 1698.It Cm vlandev Ar iface 1699Associate the physical interface 1700.Ar iface 1701with a 1702.Xr vlan 4 1703interface. 1704Packets transmitted through the 1705.Xr vlan 4 1706interface will be 1707diverted to the specified physical interface 1708.Ar iface 1709with 802.1Q VLAN encapsulation. 1710Packets with 802.1Q encapsulation received 1711by the parent interface with the correct VLAN tag will be diverted to 1712the associated 1713.Xr vlan 4 1714pseudo-interface. 1715The 1716.Xr vlan 4 1717interface is assigned a 1718copy of the parent interface's flags and the parent's ethernet address. 1719The 1720.Cm vlandev 1721and 1722.Cm vlan 1723must both be set at the same time. 1724If the 1725.Xr vlan 4 1726interface already has 1727a physical interface associated with it, this command will fail. 1728To 1729change the association to another physical interface, the existing 1730association must be cleared first. 1731.Pp 1732Note: if the hardware tagging capability 1733is set on the parent interface, the 1734.Xr vlan 4 1735pseudo 1736interface's behavior changes: 1737the 1738.Xr vlan 4 1739interface recognizes that the 1740parent interface supports insertion and extraction of VLAN tags on its 1741own (usually in firmware) and that it should pass packets to and from 1742the parent unaltered. 1743.It Fl vlandev Op Ar iface 1744If the driver is a 1745.Xr vlan 4 1746pseudo device, disassociate the parent interface from it. 1747This breaks the link between the 1748.Xr vlan 4 1749interface and its parent, 1750clears its VLAN tag, flags and its link address and shuts the interface down. 1751The 1752.Ar iface 1753argument is useless and hence deprecated. 1754.El 1755.Pp 1756The following parameters are specific to 1757.Xr carp 4 1758interfaces: 1759.Bl -tag -width indent 1760.It Cm advbase Ar seconds 1761Specifies the base of the advertisement interval in seconds. 1762The acceptable values are 1 to 255. 1763The default value is 1. 1764.\" The default value is 1765.\" .Dv CARP_DFLTINTV . 1766.It Cm advskew Ar interval 1767Specifies the skew to add to the base advertisement interval to 1768make one host advertise slower than another host. 1769It is specified in 1/256 of seconds. 1770The acceptable values are 1 to 254. 1771The default value is 0. 1772.It Cm pass Ar phrase 1773Set the authentication key to 1774.Ar phrase . 1775.It Cm vhid Ar n 1776Set the virtual host ID. 1777This is a required setting. 1778Acceptable values are 1 to 255. 1779.El 1780.Pp 1781The 1782.Nm 1783utility displays the current configuration for a network interface 1784when no optional parameters are supplied. 1785If a protocol family is specified, 1786.Nm 1787will report only the details specific to that protocol family. 1788.Pp 1789If the 1790.Fl m 1791flag is passed before an interface name, 1792.Nm 1793will display the capability list and all 1794of the supported media for the specified interface. 1795If 1796.Fl L 1797flag is supplied, address lifetime is displayed for IPv6 addresses, 1798as time offset string. 1799.Pp 1800Optionally, the 1801.Fl a 1802flag may be used instead of an interface name. 1803This flag instructs 1804.Nm 1805to display information about all interfaces in the system. 1806The 1807.Fl d 1808flag limits this to interfaces that are down, and 1809.Fl u 1810limits this to interfaces that are up. 1811When no arguments are given, 1812.Fl a 1813is implied. 1814.Pp 1815The 1816.Fl l 1817flag may be used to list all available interfaces on the system, with 1818no other additional information. 1819Use of this flag is mutually exclusive 1820with all other flags and commands, except for 1821.Fl d 1822(only list interfaces that are down) 1823and 1824.Fl u 1825(only list interfaces that are up). 1826.Pp 1827The 1828.Fl v 1829flag may be used to get more verbose status for an interface. 1830.Pp 1831The 1832.Fl C 1833flag may be used to list all of the interface cloners available on 1834the system, with no additional information. 1835Use of this flag is mutually exclusive with all other flags and commands. 1836.Pp 1837The 1838.Fl k 1839flag causes keying information for the interface, if available, to be 1840printed. 1841For example, the values of 802.11 WEP keys will be printed, if accessible to 1842the current user. 1843This information is not printed by default, as it may be considered 1844sensitive. 1845.Pp 1846If the network interface driver is not present in the kernel then 1847.Nm 1848will attempt to load it. 1849The 1850.Fl n 1851flag disables this behavior. 1852.Pp 1853Only the super-user may modify the configuration of a network interface. 1854.Sh NOTES 1855The media selection system is relatively new and only some drivers support 1856it (or have need for it). 1857.Sh EXAMPLES 1858Assign the IPv4 address 1859.Li 192.0.2.10 , 1860with a network mask of 1861.Li 255.255.255.0 , 1862to the interface 1863.Li fxp0 : 1864.Dl # ifconfig fxp0 inet 192.0.2.10 netmask 255.255.255.0 1865.Pp 1866Add the IPv4 address 1867.Li 192.0.2.45 , 1868with the CIDR network prefix 1869.Li /28 , 1870to the interface 1871.Li ed0 , 1872using 1873.Cm add 1874as a synonym for the canonical form of the option 1875.Cm alias : 1876.Dl # ifconfig ed0 inet 192.0.2.45/28 add 1877.Pp 1878Remove the IPv4 address 1879.Li 192.0.2.45 1880from the interface 1881.Li ed0 : 1882.Dl # ifconfig ed0 inet 192.0.2.45 -alias 1883.Pp 1884Add the IPv6 address 1885.Li 2001:DB8:DBDB::123/48 1886to the interface 1887.Li em0 : 1888.Dl # ifconfig em0 inet6 2001:db8:bdbd::123 prefixlen 48 alias 1889Note that lower case hexadecimal IPv6 addresses are acceptable. 1890.Pp 1891Remove the IPv6 address added in the above example, 1892using the 1893.Li / 1894character as shorthand for the network prefix, 1895and using 1896.Cm delete 1897as a synonym for the canonical form of the option 1898.Fl alias : 1899.Dl # ifconfig em0 inet6 2001:db8:bdbd::123/48 delete 1900.Pp 1901Configure the interface 1902.Li xl0 , 1903to use 100baseTX, full duplex Ethernet media options: 1904.Dl # ifconfig xl0 media 100baseTX mediaopt full-duplex 1905.Pp 1906Create the software network interface 1907.Li gif1 : 1908.Dl # ifconfig gif1 create 1909.Pp 1910Destroy the software network interface 1911.Li gif1 : 1912.Dl # ifconfig gif1 destroy 1913.Sh DIAGNOSTICS 1914Messages indicating the specified interface does not exist, the 1915requested address is unknown, or the user is not privileged and 1916tried to alter an interface's configuration. 1917.Sh SEE ALSO 1918.Xr netstat 1 , 1919.Xr carp 4 , 1920.Xr netintro 4 , 1921.Xr pfsync 4 , 1922.Xr polling 4 , 1923.Xr vlan 4 , 1924.\" .Xr eon 5 , 1925.Xr rc 8 , 1926.Xr routed 8 , 1927.Xr sysctl 8 1928.Sh HISTORY 1929The 1930.Nm 1931utility appeared in 1932.Bx 4.2 . 1933.Sh BUGS 1934Basic IPv6 node operation requires a link-local address on each 1935interface configured for IPv6. 1936Normally, such an address is automatically configured by the 1937kernel on each interface added to the system; this behaviour may 1938be disabled by setting the sysctl MIB variable 1939.Va net.inet6.ip6.auto_linklocal 1940to 0. 1941.Pp 1942If you delete such an address using 1943.Nm , 1944the kernel may act very odd. 1945Do this at your own risk. 1946