1.\" $NetBSD: ifconfig.8,v 1.109 2014/10/20 14:50:09 roy Exp $ 2.\" 3.\" Copyright (c) 1983, 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)ifconfig.8 8.4 (Berkeley) 6/1/94 31.\" 32.Dd October 12, 2014 33.Dt IFCONFIG 8 34.Os 35.Sh NAME 36.Nm ifconfig 37.Nd configure network interface parameters 38.Sh SYNOPSIS 39.Nm 40.Op Fl N 41.Ar interface address_family 42.Oo 43.Ar address 44.Op Ar dest_address 45.Oc 46.Op Ar parameters 47.Nm 48.Op Fl hLmNvz 49.Ar interface 50.Op Ar protocol_family 51.Nm 52.Fl a 53.Op Fl bdhLNmsuvz 54.Op Ar protocol_family 55.Nm 56.Fl l 57.Op Fl bdsu 58.Nm 59.Fl s 60.Ar interface 61.Nm 62.Fl w 63.Ar secs 64.Nm 65.Fl C 66.Sh DESCRIPTION 67.Nm 68is used to assign an address 69to a network interface and/or configure 70network interface parameters. 71.Nm 72must be used at boot time to define the network address 73of each interface present on a machine; it may also be used at 74a later time to redefine an interface's address 75or other operating parameters. 76.Pp 77Available operands for 78.Nm : 79.Bl -tag -width Ds 80.It Ar address 81For the 82.Tn DARPA-Internet 83family, 84the address is either a host name present in the host name data 85base, 86.Xr hosts 5 , 87or a 88.Tn DARPA 89Internet address expressed in the Internet standard 90.Dq dot notation . 91For the Xerox Network Systems(tm) family, 92addresses are 93.Ar net:a.b.c.d.e.f , 94where 95.Ar net 96is the assigned network number 97.Pq in decimal , 98and each of the six bytes of the host number, 99.Ar a 100through 101.Ar f , 102are specified in hexadecimal. 103The host number may be omitted on Ethernet interfaces, 104which use the hardware physical address, 105and on interfaces other than the first. 106For the 107.Tn ISO 108family, addresses are specified as a long hexadecimal string, 109as in the Xerox family. 110However, two consecutive dots imply a zero 111byte, and the dots are optional, if the user wishes to 112.Pq carefully 113count out long strings of digits in network byte order. 114.It Ar address_family 115Specifies the 116.Ar address_family 117which affects interpretation of the remaining parameters. 118Since an interface can receive transmissions in differing protocols 119with different naming schemes, specifying the address family is recommended. 120The address or protocol families currently 121supported are 122.Dq inet , 123.Dq inet6 , 124.Dq atalk , 125.Dq iso , 126and 127.Dq link . 128.It Ar interface 129The 130.Ar interface 131parameter is a string of the form 132.Dq name unit , 133for example, 134.Dq en0 135.El 136.Pp 137The following parameters may be set with 138.Nm : 139.Bl -tag -width dest_addressxx 140.It Cm active 141This keyword applies when 142.Nm 143adds or modifies any link-layer address. 144It indicates that 145.Nm 146should 147.Dq activate 148the address. 149Activation makes an address the default source for transmissions 150on the interface. 151You may not delete the active address from an interface. 152You must activate some other address, first. 153.It Cm advbase Ar n 154If the driver is a 155.Xr carp 4 156pseudo-device, set the base advertisement interval to 157.Ar n 158seconds. 159This ia an 8-bit number; the default value is 1 second. 160.It Cm advskew Ar n 161If the driver is a 162.Xr carp 4 163pseudo-device, skew the advertisement interval by 164.Ar n . 165This is an 8-bit number; the default value is 0. 166.Pp 167Taken together the 168.Cm advbase 169indicate how frequently, in seconds, the host will advertise the fact that it 170considers itself the master of the virtual host. 171The formula is 172.Cm advbase 173+ 174.Pf ( Cm advskew 175/ 256). 176If the master does not advertise within three times this interval, this host 177will begin advertising as master. 178.It Cm alias 179Establish an additional network address for this interface. 180This is sometimes useful when changing network numbers, and 181one wishes to accept packets addressed to the old interface. 182.It Fl alias 183Remove the specified network address alias. 184.It Cm arp 185Enable the use of the Address Resolution Protocol in mapping 186between network level addresses and link level addresses 187.Pq default . 188This is currently implemented for mapping between 189.Tn DARPA 190Internet 191addresses and Ethernet addresses. 192.It Fl arp 193Disable the use of the Address Resolution Protocol. 194.It Cm anycast 195.Pq inet6 only 196Set the IPv6 anycast address bit. 197.It Fl anycast 198.Pq inet6 only 199Clear the IPv6 anycast address bit. 200.It Cm broadcast Ar mask 201.Pq Inet only 202Specify the address to use to represent broadcasts to the 203network. 204The default broadcast address is the address with a host part of all 1's. 205.It Cm carpdev Ar iface 206If the driver is a 207.Xr carp 4 208pseudo-device, attach it to 209.Ar iface . 210If not specified, the kernel will attempt to select an interface with 211a subnet matching that of the carp interface. 212.It Cm debug 213Enable driver dependent debugging code; usually, this turns on 214extra console error logging. 215.It Fl debug 216Disable driver dependent debugging code. 217.It Cm delete 218Remove the network address specified. 219This would be used if you incorrectly specified an alias, or it 220was no longer needed. 221If you have incorrectly set an NS address having the side effect 222of specifying the host portion, removing all NS addresses will 223allow you to respecify the host portion. 224.Cm delete 225does not work for IPv6 addresses. 226Use 227.Fl alias 228with explicit IPv6 address instead. 229.It Ar dest_address 230Specify the address of the correspondent on the other end 231of a point to point link. 232.It Cm down 233Mark an interface ``down''. 234When an interface is 235marked ``down'', the system will not attempt to 236transmit messages through that interface. 237If possible, the interface will be reset to disable reception as well. 238This action does not automatically disable routes using the interface. 239.It Cm ipdst 240This is used to specify an Internet host who is willing to receive 241ip packets encapsulating NS packets bound for a remote network. 242An apparent point to point link is constructed, and 243the address specified will be taken as the NS address and network 244of the destination. 245IP encapsulation of 246.Tn CLNP 247packets is done differently. 248.It Cm media Ar type 249Set the media type of the interface to 250.Ar type . 251Some interfaces support the mutually exclusive use of one of several 252different physical media connectors. 253For example, a 10Mb/s Ethernet 254interface might support the use of either 255.Tn AUI 256or twisted pair connectors. 257Setting the media type to 258.Dq 10base5 259or 260.Dq AUI 261would change the currently active connector to the AUI port. 262Setting it to 263.Dq 10baseT 264or 265.Dq UTP 266would activate twisted pair. 267Refer to the interfaces' driver 268specific man page for a complete list of the available types 269and the 270.Xr ifmedia 4 271manual page for a list of media types. 272See the 273.Fl m 274flag below. 275.It Cm mediaopt Ar opts 276Set the specified media options on the interface. 277.Ar opts 278is a comma delimited list of options to apply to the interface. 279Refer to the interfaces' driver specific man page for a complete 280list of available options. 281Also see the 282.Xr ifmedia 4 283manual page for a list of media options. 284.It Fl mediaopt Ar opts 285Disable the specified media options on the interface. 286.It Cm mode Ar mode 287If the driver supports the media selection system, set the specified 288operating mode on the interface to 289.Ar mode . 290For IEEE 802.11 wireless interfaces that support multiple operating modes 291this directive is used to select between 802.11a 292.Pq Dq 11a , 293802.11b 294.Pq Dq 11b , 295and 802.11g 296.Pq Dq 11g 297operating modes. 298.It Cm instance Ar minst 299Set the media instance to 300.Ar minst . 301This is useful for devices which have multiple physical layer interfaces 302.Pq PHYs . 303Setting the instance on such devices may not be strictly required 304by the network interface driver as the driver may take care of this 305automatically; see the driver's manual page for more information. 306.It Cm metric Ar n 307Set the routing metric of the interface to 308.Ar n , 309default 0. 310The routing metric is used by the routing protocol 311.Pq Xr routed 8 . 312Higher metrics have the effect of making a route 313less favorable; metrics are counted as addition hops 314to the destination network or host. 315.It Cm mtu Ar n 316Set the maximum transmission unit of the interface to 317.Ar n . 318Most interfaces don't support this option. 319.It Cm netmask Ar mask 320.Pq inet, inet6, and ISO 321Specify how much of the address to reserve for subdividing 322networks into sub-networks. 323The mask includes the network part of the local address 324and the subnet part, which is taken from the host field of the address. 325The mask can be specified as a single hexadecimal number 326with a leading 0x, with a dot-notation Internet address, 327or with a pseudo-network name listed in the network table 328.Xr networks 5 . 329The mask contains 1's for the bit positions in the 32-bit address 330which are to be used for the network and subnet parts, 331and 0's for the host part. 332The mask should contain at least the standard network portion, 333and the subnet field should be contiguous with the network 334portion. 335.Pp 336For INET and INET6 addresses, the netmask can also be given with 337slash-notation after the address 338.Pq e.g 192.168.17.3/24 . 339.\" see 340.\" Xr eon 5 . 341.It Cm nsellength Ar n 342.Pf ( Tn ISO 343only) 344This specifies a trailing number of bytes for a received 345.Tn NSAP 346used for local identification, the remaining leading part of which is 347taken to be the 348.Tn NET 349.Pq Network Entity Title . 350The default value is 1, which is conformant to US 351.Tn GOSIP . 352When an ISO address is set in an ifconfig command, 353it is really the 354.Tn NSAP 355which is being specified. 356For example, in 357.Tn US GOSIP , 35820 hex digits should be 359specified in the 360.Tn ISO NSAP 361to be assigned to the interface. 362There is some evidence that a number different from 1 may be useful 363for 364.Tn AFI 36537 type addresses. 366.It Cm state Ar state 367Explicitly force the 368.Xr carp 4 369pseudo-device to enter this state. 370Valid states are 371.Ar init , 372.Ar backup , 373and 374.Ar master . 375.It Cm frag Ar threshold 376.Pq IEEE 802.11 devices only 377Configure the fragmentation threshold for IEEE 802.11-based wireless 378network interfaces. 379.It Cm rts Ar threshold 380.Pq IEEE 802.11 devices only 381Configure the RTS/CTS threshold for IEEE 802.11-based wireless 382network interfaces. 383This controls the number of bytes used for the RTS/CTS handshake boundary. 384The 385.Ar threshold 386can be any value between 0 and 2347. 387The default is 2347, which indicates the RTS/CTS mechanism should not be used. 388.It Cm ssid Ar id 389.Pq IEEE 802.11 devices only 390Configure the Service Set Identifier (a.k.a. the network name) 391for IEEE 802.11-based wireless network interfaces. 392The 393.Ar id 394can either be any text string up to 32 characters in length, 395or a series of up to 64 hexadecimal digits preceded by 396.Dq 0x . 397Setting 398.Ar id 399to the empty string allows the interface to connect to any available 400access point. 401.It Cm nwid Ar id 402Synonym for 403.Dq ssid . 404.It Cm hidessid 405.Pq IEEE 802.11 devices only 406When operating as an access point, do not broadcast the SSID 407in beacon frames or respond to probe request frames unless 408they are directed to the ap (i.e., they include the ap's SSID). 409By default, the SSID is included in beacon frames and 410undirected probe request frames are answered. 411.It Fl hidessid 412.Pq IEEE 802.11 devices only 413When operating as an access point, broadcast the SSID 414in beacon frames and answer and respond to undirected probe 415request frames (default). 416.It Cm nwkey Ar key 417.Pq IEEE 802.11 devices only 418Enable WEP encryption for IEEE 802.11-based wireless network interfaces 419with the 420.Ar key . 421The 422.Ar key 423can either be a string, a series of hexadecimal digits preceded by 424.Dq 0x , 425or a set of keys in the form 426.Ar n:k1,k2,k3,k4 , 427where 428.Ar n 429specifies which of keys will be used for all transmitted packets, 430and four keys, 431.Ar k1 432through 433.Ar k4 , 434are configured as WEP keys. 435Note that the order must be match within same network if multiple keys 436are used. 437For IEEE 802.11 wireless network, the length of each key is restricted to 43840 bits, i.e. 5-character string or 10 hexadecimal digits, 439while the WaveLAN/IEEE Gold cards accept the 104 bits 440.Pq 13 characters 441key. 442.It Cm nwkey Cm persist 443.Pq IEEE 802.11 devices only 444Enable WEP encryption for IEEE 802.11-based wireless network interfaces 445with the persistent key written in the network card. 446.It Cm nwkey Cm persist: Ns Ar key 447.Pq IEEE 802.11 devices only 448Write the 449.Ar key 450to the persistent memory of the network card, and 451enable WEP encryption for IEEE 802.11-based wireless network interfaces 452with the 453.Ar key . 454.It Fl nwkey 455.Pq IEEE 802.11 devices only 456Disable WEP encryption for IEEE 802.11-based wireless network interfaces. 457.It Cm apbridge 458.Pq IEEE 802.11 devices only 459When operating as an access point, pass packets between 460wireless clients directly (default). 461.It Fl apbridge 462.Pq IEEE 802.11 devices only 463When operating as an access point, pass packets through 464the system so that they can be forwared using some other mechanism. 465Disabling the internal bridging is useful when traffic 466is to be processed with packet filtering. 467.It Cm pass Ar passphrase 468If the driver is a 469.Xr carp 4 470pseudo-device, set the authentication key to 471.Ar passphrase . 472There is no passphrase by default 473.It Cm powersave 474.Pq IEEE 802.11 devices only 475Enable 802.11 power saving mode. 476.It Fl powersave 477.Pq IEEE 802.11 devices only 478Disable 802.11 power saving mode. 479.It Cm powersavesleep Ar duration 480.Pq IEEE 802.11 devices only 481Set the receiver sleep duration in milliseconds for 802.11 power saving mode. 482.It Cm bssid Ar bssid 483.Pq IEEE 802.11 devices only 484Set the desired BSSID for IEEE 802.11-based wireless network interfaces. 485.It Fl bssid 486.Pq IEEE 802.11 devices only 487Unset the desired BSSID for IEEE 802.11-based wireless network interfaces. 488The interface will automatically select a BSSID in this mode, which is 489the default. 490.It Cm chan Ar chan 491.Pq IEEE 802.11 devices only 492Select the channel 493.Pq radio frequency 494to be used for IEEE 802.11-based wireless network interfaces. 495.It Fl chan 496.Pq IEEE 802.11 devices only 497Unset the desired channel to be used 498for IEEE 802.11-based wireless network interfaces. 499It doesn't affect the channel to be created for IBSS or hostap mode. 500.It Cm list scan 501.Pq IEEE 802.11 devices only 502Display the access points and/or ad-hoc neighbors 503located in the vicinity. 504The 505.Fl v 506flag may be used to display long SSIDs. 507.Fl v 508also causes received information elements to be displayed symbolically. 509The interface must be up before any scanning operation. 510Only the super-user can use this command. 511.It Cm tunnel Ar src_addr Ns Oo Ar ,src_port Oc Ar dest_addr Ns Oo Ar ,dest_port 512.Oc 513.Pq IP tunnel devices only 514Configure the physical source and destination address for IP tunnel 515interfaces, including 516.Xr gif 4 . 517The arguments 518.Ar src_addr 519and 520.Ar dest_addr 521are interpreted as the outer source/destination for the encapsulating 522IPv4/IPv6 header. 523.Pp 524On a 525.Xr gre 4 526interface in UDP mode, the arguments 527.Ar src_port 528and 529.Ar dest_port 530are interpreted as the outer source/destination port for the encapsulating 531UDP header. 532.It Cm deletetunnel 533Unconfigure the physical source and destination address for IP tunnel 534interfaces previously configured with 535.Cm tunnel . 536.It Cm create 537Create the specified network pseudo-device. 538.It Cm destroy 539Destroy the specified network pseudo-device. 540.It Cm pltime Ar n 541.Pq inet6 only 542Set preferred lifetime for the address. 543.It Cm prefixlen Ar n 544.Pq inet and inet6 only 545Effect is similar to 546.Cm netmask . 547but you can specify by prefix length by digits. 548.It Cm deprecated 549.Pq inet6 only 550Set the IPv6 deprecated address bit. 551.It Fl deprecated 552.Pq inet6 only 553Clear the IPv6 deprecated address bit. 554.It Cm eui64 555.Pq inet6 only 556Fill interface index 557.Pq lowermost 64bit of an IPv6 address 558automatically. 559.It Cm link[0-2] 560Enable special processing of the link level of the interface. 561These three options are interface specific in actual effect, however, 562they are in general used to select special modes of operation. 563An example 564of this is to enable SLIP compression, or to select the connector type 565for some Ethernet cards. 566Refer to the man page for the specific driver 567for more information. 568.It Fl link[0-2] 569Disable special processing at the link level with the specified interface. 570.It Cm linkstr 571Set a link-level string parameter for the interface. 572This functionality varies from interface to interface. 573Refer to the man page for the specific driver 574for more information. 575.It Fl linkstr 576Remove an interface link-level string parameter. 577.It Cm up 578Mark an interface ``up''. 579This may be used to enable an interface after an ``ifconfig down.'' 580It happens automatically when setting the first address on an interface. 581If the interface was reset when previously marked down, 582the hardware will be re-initialized. 583.It Cm vhid Ar n 584If the driver is a 585.Xr carp 4 586pseudo-device, set the virtual host ID to 587.Ar n . 588Acceptable values are 1 to 255. 589.It Cm vlan Ar vid 590If the interface is a 591.Xr vlan 4 592pseudo-interface, set the VLAN identifier to 593.Ar vid . 594These are the first 12 bits (0-4095) from a 16-bit integer used 595to create an 802.1Q VLAN header for packets sent from the 596.Xr vlan 4 597interface. 598Note that 599.Cm vlan 600and 601.Cm vlanif 602must be set at the same time. 603.It Cm vlanif Ar iface 604If the interface is a 605.Xr vlan 4 606pseudo-interface, associate the physical interface 607.Ar iface 608with it. 609Packets transmitted through the 610.Xr vlan 4 611interface will be diverted to the specified physical interface 612.Ar iface 613with 802.1Q VLAN encapsulation. 614Packets with 802.1Q encapsulation received 615by the physical interface with the correct VLAN tag will be diverted to the 616associated 617.Xr vlan 4 618pseudo-interface. 619The VLAN interface is assigned a copy of the physical 620interface's flags and 621.Tn Ethernet 622address. 623If the 624.Xr vlan 4 625interface already has a physical interface associated with it, this command 626will fail. 627To change the association to another physical interface, the 628existing association must be cleared first. 629Note that 630.Cm vlanif 631and 632.Cm vlan 633must be set at the same time. 634.It Cm -vlanif Ar iface 635Dissociate 636.Ar iface 637from the 638.Xr vlan 4 639interface. 640.It Cm agrport Ar iface 641Add 642.Ar iface 643to the 644.Xr agr 4 645interface. 646.It Cm -agrport Ar iface 647Remove 648.Ar iface 649from the 650.Xr agr 4 651interface. 652.It Cm vltime Ar n 653.Pq inet6 only 654Set valid lifetime for the address. 655.It Cm ip4csum 656Shorthand of 657.Dq ip4csum-tx ip4csum-rx 658.It Cm -ip4csum 659Shorthand of 660.Dq -ip4csum-tx -ip4csum-rx 661.It Cm tcp4csum 662Shorthand of 663.Dq tcp4csum-tx tcp4csum-rx 664.It Cm -tcp4csum 665Shorthand of 666.Dq -tcp4csum-tx -tcp4csum-rx 667.It Cm udp4csum 668Shorthand of 669.Dq udp4csum-tx udp4csum-rx 670.It Cm -udp4csum 671Shorthand of 672.Dq -udp4csum-tx -udp4csum-rx 673.It Cm tcp6csum 674Shorthand of 675.Dq tcp6csum-tx tcp6csum-rx 676.It Cm -tcp6csum 677Shorthand of 678.Dq -tcp6csum-tx -tcp6csum-rx 679.It Cm udp6csum 680Shorthand of 681.Dq udp6csum-tx udp6csum-rx 682.It Cm -udp6csum 683Shorthand of 684.Dq -udp6csum-tx -udp6csum-rx 685.It Cm ip4csum-tx 686Enable hardware-assisted IPv4 header checksums for the out-bound direction. 687.It Cm -ip4csum-tx 688Disable hardware-assisted IPv4 header checksums for the out-bound direction. 689.It Cm ip4csum-rx 690Enable hardware-assisted IPv4 header checksums for the in-bound direction. 691.It Cm -ip4csum-rx 692Disable hardware-assisted IPv4 header checksums for the in-bound direction. 693.It Cm tcp4csum-tx 694Enable hardware-assisted TCP/IPv4 checksums for the out-bound direction. 695.It Cm -tcp4csum-tx 696Disable hardware-assisted TCP/IPv4 checksums for the out-bound direction. 697.It Cm tcp4csum-rx 698Enable hardware-assisted TCP/IPv4 checksums for the in-bound direction. 699.It Cm -tcp4csum-rx 700Disable hardware-assisted TCP/IPv4 checksums for the in-bound direction. 701.It Cm udp4csum-tx 702Enable hardware-assisted UDP/IPv4 checksums for the out-bound direction. 703.It Cm -udp4csum-tx 704Disable hardware-assisted UDP/IPv4 checksums for the out-bound direction. 705.It Cm udp4csum-rx 706Enable hardware-assisted UDP/IPv4 checksums for the in-bound direction. 707.It Cm -udp4csum-rx 708Disable hardware-assisted UDP/IPv4 checksums for the in-bound direction. 709.It Cm tcp6csum-tx 710Enable hardware-assisted TCP/IPv6 checksums for the out-bound direction. 711.It Cm -tcp6csum-tx 712Disable hardware-assisted TCP/IPv6 checksums for the out-bound direction. 713.It Cm tcp6csum-rx 714Enable hardware-assisted TCP/IPv6 checksums for the in-bound direction. 715.It Cm -tcp6csum-rx 716Disable hardware-assisted TCP/IPv6 checksums for the in-bound direction. 717.It Cm udp6csum-tx 718Enable hardware-assisted UDP/IPv6 checksums for the out-bound direction. 719.It Cm -udp6csum-tx 720Disable hardware-assisted UDP/IPv6 checksums for the out-bound direction. 721.It Cm udp6csum-rx 722Enable hardware-assisted UDP/IPv6 checksums for the in-bound direction. 723.It Cm -udp6csum-rx 724Disable hardware-assisted UDP/IPv6 checksums for the in-bound direction. 725.It Cm tso4 726Enable hardware-assisted TCP/IPv4 segmentation on interfaces that 727support it. 728.It Cm -tso4 729Disable hardware-assisted TCP/IPv4 segmentation on interfaces that 730support it. 731.It Cm tso6 732Enable hardware-assisted TCP/IPv6 segmentation on interfaces that 733support it. 734.It Cm -tso6 735Disable hardware-assisted TCP/IPv6 segmentation on interfaces that 736support it. 737.It Cm maxupd Ar n 738If the driver is a 739.Xr pfsync 4 740pseudo-device, indicate the maximum number 741of updates for a single state which can be collapsed into one. 742This is an 8-bit number; the default value is 128. 743.It Cm syncdev Ar iface 744If the driver is a 745.Xr pfsync 4 746pseudo-device, use the specified interface 747to send and receive pfsync state synchronisation messages. 748.It Fl syncdev 749If the driver is a 750.Xr pfsync 4 751pseudo-device, stop sending pfsync state 752synchronisation messages over the network. 753.It Cm syncpeer Ar peer_address 754If the driver is a 755.Xr pfsync 4 756pseudo-device, make the pfsync link point-to-point rather than using 757multicast to broadcast the state synchronisation messages. 758The peer_address is the IP address of the other host taking part in 759the pfsync cluster. 760With this option, 761.Xr pfsync 4 762traffic can be protected using 763.Xr ipsec 4 . 764.It Fl syncpeer 765If the driver is a 766.Xr pfsync 4 767pseudo-device, broadcast the packets using multicast. 768.El 769.Pp 770.Nm 771displays the current configuration for a network interface 772when no optional parameters are supplied. 773If a protocol family is specified, 774.Nm 775will report only the details specific to that protocol 776family. 777.Pp 778If the 779.Fl s 780flag is passed before an interface name, 781.Nm 782will attempt to query the interface for its media status. 783If the 784interface supports reporting media status, and it reports that it does 785not appear to be connected to a network, 786.Nm 787will exit with status of 1 788.Pq false ; 789otherwise, it will exit with a 790zero 791.Pq true 792exit status. 793Not all interface drivers support media 794status reporting. 795.Pp 796If the 797.Fl m 798flag is passed before an interface name, 799.Nm 800will display all of the supported media for the specified interface. 801If the 802.Fl L 803flag is supplied, address lifetime is displayed for IPv6 addresses, 804as time offset string. 805.Pp 806Optionally, the 807.Fl a 808flag may be used instead of an interface name. 809This flag instructs 810.Nm 811to display information about all interfaces in the system. 812This is also the default behaviour when no arguments are given to 813.Nm 814on the command line. 815When 816.Fl a 817is used, the output can be modified by adding more flags: 818.Fl d 819limits this to interfaces that are down, 820.Fl u 821limits this to interfaces that are up, 822.Fl b 823limits this to broadcast interfaces, and 824.Fl s 825omits interfaces which appear not to be connected to a network. 826.Pp 827The 828.Fl l 829flag may be used to list all available interfaces on the system, with 830no other additional information. 831Use of this flag is mutually exclusive 832with all other flags and commands, except for 833.Fl d 834.Pq only list interfaces that are down , 835.Fl u 836.Pq only list interfaces that are up , 837.Fl s 838.Pq only list interfaces that may be connected , 839.Fl b 840.Pq only list broadcast interfaces . 841.Pp 842The 843.Fl C 844flag may be used to list all of the interface cloners available on 845the system, with no additional information. 846Use of this flag is 847mutually exclusive with all other flags and commands. 848.Pp 849The 850.Fl v 851flag prints statistics on packets sent and received on the given 852interface. 853If 854.Fl h 855is used in conjunction with 856.Fl v , 857the byte statistics will be printed in "human-readable" format. 858The 859.Fl z 860flag is identical to the 861.Fl v 862flag except that it zeros the interface input and output statistics 863after printing them. 864.Pp 865The 866.Fl w 867flag may be used to wait 868.Ar seconds 869seconds for the 870.Cm tentative 871flag to be removed from all addresses. 8720 seconds means to wait indefinitely until all addresses no longer have the 873.Cm tentative 874flag. 875.Pp 876The 877.Fl N 878flag is just the opposite of the 879.Fl n 880flag in 881.Xr netstat 1 882or in 883.Xr route 8 : 884it tells 885.Nm 886to try to resolve numbers to hostnames or to service names. 887The default 888.Nm 889behavior is to print numbers instead of names. 890.Pp 891Only the super-user may modify the configuration of a network interface. 892.Sh EXAMPLES 893Add a link-layer (MAC) address to an Ethernet: 894.Pp 895.Ic ifconfig sip0 link 00:11:22:33:44:55 896.Pp 897Add and activate a link-layer (MAC) address: 898.Pp 899.Ic ifconfig sip0 link 00:11:22:33:44:55 active 900.Sh DIAGNOSTICS 901Messages indicating the specified interface does not exist, the 902requested address is unknown, or the user is not privileged and 903tried to alter an interface's configuration. 904.Sh SEE ALSO 905.Xr netstat 1 , 906.Xr agr 4 , 907.Xr carp 4 , 908.Xr ifmedia 4 , 909.Xr netintro 4 , 910.Xr pfsync 4 , 911.Xr vlan 4 , 912.Xr ifconfig.if 5 , 913.\" .Xr eon 5 , 914.Xr rc 8 , 915.Xr routed 8 916.Sh HISTORY 917The 918.Nm 919command appeared in 920.Bx 4.2 . 921