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.3 (Berkeley) 01/05/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.It Cm delete 118Remove the network address specified. 119This would be used if you incorrectly specified an alias, or it 120was no longer needed. 121If you have incorrectly set an NS address having the side effect 122of specifying the host portion, removing all NS addresses will 123allow you to respecify the host portion. 124.It Cm dest_address 125Specify the address of the correspondent on the other end 126of a point to point link. 127.It Cm down 128Mark an interface ``down''. When an interface is 129marked ``down'', the system will not attempt to 130transmit messages through that interface. 131If possible, the interface will be reset to disable reception as well. 132This action does not automatically disable routes using the interface. 133.It Cm ipdst 134This is used to specify an Internet host who is willing to receive 135ip packets encapsulating NS packets bound for a remote network. 136An apparent point to point link is constructed, and 137the address specified will be taken as the NS address and network 138of the destination. 139IP encapsulation of 140.Tn CLNP 141packets is done differently. 142.It Cm metric Ar n 143Set the routing metric of the interface to 144.Ar n , 145default 0. 146The routing metric is used by the routing protocol 147.Pq Xr routed 8 . 148Higher metrics have the effect of making a route 149less favorable; metrics are counted as addition hops 150to the destination network or host. 151.It Cm netmask Ar mask 152(Inet and ISO) 153Specify how much of the address to reserve for subdividing 154networks into sub-networks. 155The mask includes the network part of the local address 156and the subnet part, which is taken from the host field of the address. 157The mask can be specified as a single hexadecimal number 158with a leading 0x, with a dot-notation Internet address, 159or with a pseudo-network name listed in the network table 160.Xr networks 5 . 161The mask contains 1's for the bit positions in the 32-bit address 162which are to be used for the network and subnet parts, 163and 0's for the host part. 164The mask should contain at least the standard network portion, 165and the subnet field should be contiguous with the network 166portion. 167.\" see 168.\" Xr eon 5 . 169.It Cm nsellength Ar n 170.Pf ( Tn ISO 171only) 172This specifies a trailing number of bytes for a received 173.Tn NSAP 174used for local identification, the remaining leading part of which is 175taken to be the 176.Tn NET 177(Network Entity Title). 178The default value is 1, which is conformant to US 179.Tn GOSIP . 180When an ISO address is set in an ifconfig command, 181it is really the 182.Tn NSAP 183which is being specified. 184For example, in 185.Tn US GOSIP , 18620 hex digits should be 187specified in the 188.Tn ISO NSAP 189to be assigned to the interface. 190There is some evidence that a number different from 1 may be useful 191for 192.Tn AFI 19337 type addresses. 194.It Cm trailers 195Request the use of a ``trailer'' link level encapsulation when 196sending (default). 197If a network interface supports 198.Cm trailers , 199the system will, when possible, encapsulate outgoing 200messages in a manner which minimizes the number of 201memory to memory copy operations performed by the receiver. 202On networks that support the Address Resolution Protocol (see 203.Xr arp 4 ; 204currently, only 10 Mb/s Ethernet), 205this flag indicates that the system should request that other 206systems use trailers when sending to this host. 207Similarly, trailer encapsulations will be sent to other 208hosts that have made such requests. 209Currently used by Internet protocols only. 210.It Fl trailers 211Disable the use of a ``trailer'' link level encapsulation. 212.It Cm link[0-2] 213Enable special processing of the link level of the interface. 214These three options are interface specific in actual effect, however, 215they are in general used to select special modes of operation. An example 216of this is to enable SLIP compression. Currently, only used by SLIP. 217.It Fl link[0-2] 218Disable special processing at the link level with the specified interface. 219.It Cm up 220Mark an interface ``up''. 221This may be used to enable an interface after an ``ifconfig down.'' 222It happens automatically when setting the first address on an interface. 223If the interface was reset when previously marked down, 224the hardware will be re-initialized. 225.El 226.Pp 227.Pp 228.Nm Ifconfig 229displays the current configuration for a network interface 230when no optional parameters are supplied. 231If a protocol family is specified, 232Ifconfig will report only the details specific to that protocol family. 233.Pp 234Only the super-user may modify the configuration of a network interface. 235.Sh DIAGNOSTICS 236Messages indicating the specified interface does not exit, the 237requested address is unknown, or the user is not privileged and 238tried to alter an interface's configuration. 239.Sh SEE ALSO 240.Xr netstat 1 , 241.Xr netintro 4 , 242.Xr rc 8 , 243.Xr routed 8 , 244.\" .Xr eon 5 245.Sh HISTORY 246The 247.Nm 248command appeared in 249.Bx 4.2 . 250