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