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