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