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