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. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by the University of 15.\" California, Berkeley and its contributors. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 33.\" 34.Dd January 5, 1994 35.Dt IFCONFIG 8 36.Os BSD 4.2 37.Sh NAME 38.Nm ifconfig 39.Nd configure network interface parameters 40.Sh SYNOPSIS 41.Nm ifconfig 42.Ar interface address_family 43.Oo 44.Ar address 45.Op Ar dest_address 46.Oc 47.Op Ar parameters 48.Nm ifconfig 49.Ar interface 50.Op Ar protocol_family 51.Sh DESCRIPTION 52.Nm Ifconfig 53is used to assign an address 54to a network interface and/or configure 55network interface parameters. 56.Nm Ifconfig 57must be used at boot time to define the network address 58of each interface present on a machine; it may also be used at 59a later time to redefine an interface's address 60or other operating parameters. 61.Pp 62Available operands for 63.Nm ifconfig: 64.Bl -tag -width Ds 65.It Ar Address 66For the 67.Tn DARPA-Internet 68family, 69the address is either a host name present in the host name data 70base, 71.Xr hosts 5 , 72or a 73.Tn DARPA 74Internet address expressed in the Internet standard 75.Dq dot notation . 76For the Xerox Network Systems(tm) family, 77addresses are 78.Ar net:a.b.c.d.e.f , 79where 80.Ar net 81is the assigned network number (in decimal), 82and each of the six bytes of the host number, 83.Ar a 84through 85.Ar f , 86are specified in hexadecimal. 87The host number may be omitted on 10Mb/s Ethernet interfaces, 88which use the hardware physical address, 89and on interfaces other than the first. 90For the 91.Tn ISO 92family, addresses are specified as a long hexadecimal string, 93as in the Xerox family. However, two consecutive dots imply a zero 94byte, and the dots are optional, if the user wishes to (carefully) 95count out long strings of digits in network byte order. 96.It Ar address_family 97Specifies the 98.Ar address family 99which affects interpretation of the remaining parameters. 100Since an interface can receive transmissions in differing protocols 101with different naming schemes, specifying the address family is recommeded. 102The address or protocol families currently 103supported are 104.Dq inet , 105.Dq iso , 106and 107.Dq ns . 108.It Ar Interface 109The 110.Ar interface 111parameter is a string of the form 112.Dq name unit , 113for example, 114.Dq en0 115.El 116.Pp 117The following parameters may be set with 118.Nm ifconfig : 119.Bl -tag -width dest_addressxx 120.It Cm alias 121Establish an additional network address for this interface. 122This is sometimes useful when changing network numbers, and 123one wishes to accept packets addressed to the old interface. 124.It Cm arp 125Enable the use of the Address Resolution Protocol in mapping 126between network level addresses and link level addresses (default). 127This is currently implemented for mapping between 128.Tn DARPA 129Internet 130addresses and 10Mb/s Ethernet addresses. 131.It Fl arp 132Disable the use of the Address Resolution Protocol. 133.It Cm broadcast 134(Inet only) 135Specify the address to use to represent broadcasts to the 136network. 137The default broadcast address is the address with a host part of all 1's. 138.It Cm debug 139Enable driver dependent debugging code; usually, this turns on 140extra console error logging. 141.It Fl debug 142Disable driver dependent debugging code. 143.It Cm delete 144Remove the network address specified. 145This would be used if you incorrectly specified an alias, or it 146was no longer needed. 147If you have incorrectly set an NS address having the side effect 148of specifying the host portion, removing all NS addresses will 149allow you to respecify the host portion. 150.It Cm dest_address 151Specify the address of the correspondent on the other end 152of a point to point link. 153.It Cm down 154Mark an interface ``down''. When an interface is 155marked ``down'', the system will not attempt to 156transmit messages through that interface. 157If possible, the interface will be reset to disable reception as well. 158This action does not automatically disable routes using the interface. 159.It Cm ipdst 160This is used to specify an Internet host who is willing to receive 161ip packets encapsulating NS packets bound for a remote network. 162An apparent point to point link is constructed, and 163the address specified will be taken as the NS address and network 164of the destination. 165IP encapsulation of 166.Tn CLNP 167packets is done differently. 168.It Cm metric Ar n 169Set the routing metric of the interface to 170.Ar n , 171default 0. 172The routing metric is used by the routing protocol 173.Pq Xr routed 8 . 174Higher metrics have the effect of making a route 175less favorable; metrics are counted as addition hops 176to the destination network or host. 177.It Cm netmask Ar mask 178(Inet and ISO) 179Specify how much of the address to reserve for subdividing 180networks into sub-networks. 181The mask includes the network part of the local address 182and the subnet part, which is taken from the host field of the address. 183The mask can be specified as a single hexadecimal number 184with a leading 0x, with a dot-notation Internet address, 185or with a pseudo-network name listed in the network table 186.Xr networks 5 . 187The mask contains 1's for the bit positions in the 32-bit address 188which are to be used for the network and subnet parts, 189and 0's for the host part. 190The mask should contain at least the standard network portion, 191and the subnet field should be contiguous with the network 192portion. 193.\" see 194.\" Xr eon 5 . 195.It Cm nsellength Ar n 196.Pf ( Tn ISO 197only) 198This specifies a trailing number of bytes for a received 199.Tn NSAP 200used for local identification, the remaining leading part of which is 201taken to be the 202.Tn NET 203(Network Entity Title). 204The default value is 1, which is conformant to US 205.Tn GOSIP . 206When an ISO address is set in an ifconfig command, 207it is really the 208.Tn NSAP 209which is being specified. 210For example, in 211.Tn US GOSIP , 21220 hex digits should be 213specified in the 214.Tn ISO NSAP 215to be assigned to the interface. 216There is some evidence that a number different from 1 may be useful 217for 218.Tn AFI 21937 type addresses. 220.It Cm trailers 221Request the use of a ``trailer'' link level encapsulation when 222sending (default). 223If a network interface supports 224.Cm trailers , 225the system will, when possible, encapsulate outgoing 226messages in a manner which minimizes the number of 227memory to memory copy operations performed by the receiver. 228On networks that support the Address Resolution Protocol (see 229.Xr arp 4 ; 230currently, only 10 Mb/s Ethernet), 231this flag indicates that the system should request that other 232systems use trailers when sending to this host. 233Similarly, trailer encapsulations will be sent to other 234hosts that have made such requests. 235Currently used by Internet protocols only. 236.It Fl trailers 237Disable the use of a ``trailer'' link level encapsulation. 238.It Cm link[0-2] 239Enable special processing of the link level of the interface. 240These three options are interface specific in actual effect, however, 241they are in general used to select special modes of operation. An example 242of this is to enable SLIP compression. Currently, only used by SLIP. 243.It Fl link[0-2] 244Disable special processing at the link level with the specified interface. 245.It Cm up 246Mark an interface ``up''. 247This may be used to enable an interface after an ``ifconfig down.'' 248It happens automatically when setting the first address on an interface. 249If the interface was reset when previously marked down, 250the hardware will be re-initialized. 251.El 252.Pp 253.Pp 254.Nm Ifconfig 255displays the current configuration for a network interface 256when no optional parameters are supplied. 257If a protocol family is specified, 258Ifconfig will report only the details specific to that protocol family. 259.Pp 260Only the super-user may modify the configuration of a network interface. 261.Sh DIAGNOSTICS 262Messages indicating the specified interface does not exit, the 263requested address is unknown, or the user is not privileged and 264tried to alter an interface's configuration. 265.Sh SEE ALSO 266.Xr netstat 1 , 267.Xr netintro 4 , 268.Xr rc 8 , 269.Xr routed 8 , 270.\" .Xr eon 5 271.Sh HISTORY 272The 273.Nm 274command appeared in 275.Bx 4.2 . 276