added description of new LLC options.
[unix-history] / usr / src / sbin / ifconfig / ifconfig.8
CommitLineData
0fccfdb8 1.\" Copyright (c) 1983, 1991 The Regents of the University of California.
2dfdcc57 2.\" All rights reserved.
09e42bf2 3.\"
58dc7ee4 4.\" %sccs.include.redist.man%
09e42bf2 5.\"
fb99294f 6.\" @(#)ifconfig.8 6.14 (Berkeley) %G%
2dfdcc57 7.\"
0fccfdb8
CL
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
09e42bf2
KM
27is used to assign an address
28to a network interface and/or configure
29network interface parameters.
0fccfdb8 30.Nm Ifconfig
09e42bf2
KM
31must be used at boot time to define the network address
32of each interface present on a machine; it may also be used at
4b19f826 33a later time to redefine an interface's address
0fccfdb8
CL
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,
09e42bf2
KM
43the address is either a host name present in the host name data
44base,
0fccfdb8
CL
45.Xr hosts 5 ,
46or a
47.Tn DARPA
48Internet address expressed in the Internet standard
49.Dq dot notation .
a6fc3a52
KS
50For the Xerox Network Systems(tm) family,
51addresses are
0fccfdb8 52.Ar net:a.b.c.d.e.f ,
a6fc3a52 53where
0fccfdb8 54.Ar net
a6fc3a52 55is the assigned network number (in decimal),
4b19f826 56and each of the six bytes of the host number,
0fccfdb8 57.Ar a
4b19f826 58through
0fccfdb8 59.Ar f ,
4b19f826
MK
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.
0fccfdb8
CL
64For the
65.Tn ISO
66family, addresses are specified as a long hexadecimal string,
15fe05ca
KS
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.
0fccfdb8
CL
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
09e42bf2 91The following parameters may be set with
0fccfdb8
CL
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
09e42bf2
KM
128Mark an interface ``down''. When an interface is
129marked ``down'', the system will not attempt to
130transmit messages through that interface.
d9344a10 131If possible, the interface will be reset to disable reception as well.
4b19f826 132This action does not automatically disable routes using the interface.
0fccfdb8
CL
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
d9344a10 143Set the routing metric of the interface to
0fccfdb8 144.Ar n ,
d9344a10
MK
145default 0.
146The routing metric is used by the routing protocol
0fccfdb8 147.Pq Xr routed 8 .
d9344a10
MK
148Higher metrics have the effect of making a route
149less favorable; metrics are counted as addition hops
150to the destination network or host.
0fccfdb8 151.It Cm netmask Ar mask
15fe05ca 152(Inet and Iso)
4b19f826 153Specify how much of the address to reserve for subdividing
d9344a10 154networks into sub-networks.
4b19f826
MK
155The mask includes the network part of the local address
156and the subnet part, which is taken from the host field of the address.
d9344a10 157The mask can be specified as a single hexadecimal number
4b19f826
MK
158with a leading 0x, with a dot-notation Internet address,
159or with a pseudo-network name listed in the network table
0fccfdb8 160.Xr networks 5 .
4b19f826 161The mask contains 1's for the bit positions in the 32-bit address
d9344a10
MK
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,
4b19f826 165and the subnet field should be contiguous with the network
d9344a10 166portion.
0fccfdb8
CL
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
c954a922 174used for local identification, the remaining leading part of which is
0fccfdb8
CL
175taken to be the
176.Tn NET
177(Network Entity Title).
178The default value is 1, which is conformant to US
179.Tn GOSIP .
c954a922 180When an iso address is set in an ifconfig command,
0fccfdb8
CL
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.
c954a922 190There is some evidence that a number different 1 may be useful
0fccfdb8
CL
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.
fb99294f
WN
212.It Cm llc[0-3]
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 llc[0-3]
218Disables special processing at the link level with the specified interface.
0fccfdb8
CL
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
09e42bf2
KM
229displays the current configuration for a network interface
230when no optional parameters are supplied.
a6fc3a52
KS
231If a protocol family is specified,
232Ifconfig will report only the details specific to that protocol family.
0fccfdb8 233.Pp
09e42bf2 234Only the super-user may modify the configuration of a network interface.
0fccfdb8 235.Sh DIAGNOSTICS
09e42bf2 236Messages indicating the specified interface does not exit, the
4b19f826 237requested address is unknown, or the user is not privileged and
09e42bf2 238tried to alter an interface's configuration.
0fccfdb8
CL
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 .