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