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