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