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