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