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