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