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