Add the adduser and configit programs. ROD: Please commit these to the BETA
[unix-history] / sbin / ifconfig / ifconfig.8
CommitLineData
15637ed4
RG
1.\" Copyright (c) 1983, 1991 The Regents of the University of California.
2.\" 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 6.13 (Berkeley) 3/16/91
33.\"
34.Dd March 16, 1991
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.
0178d331
GW
133.It Cm altphys
134Instruct the adapter to use a physical network connection other than
135the default, such as the AUI port rather than a built-in transceiver.
136(See
137.Cm aui ,
138which is another name for the same flag, below.)
139.It Fl altphys
140Disable the use of the alternate physical network connection.
141.It Cm aui
142On certain Ethernet drivers, configures the adapter to use the AUI
143port rather than the default built-in transceiver. (See also
144.Cm altphys ) .
145.It Cm bnc
146On certain Ethernet drivers, configures the adapter to use the
147built-in transceiver rather than the AUI port. (See also
148.Cm Fl altphys ) .
15637ed4
RG
149.It Cm broadcast
150(Inet only)
151Specify the address to use to represent broadcasts to the
152network.
153The default broadcast address is the address with a host part of all 1's.
154.It Cm debug
155Enable driver dependent debugging code; usually, this turns on
156extra console error logging.
157.It Fl debug
158Disable driver dependent debugging code.
159.It Cm delete
160Remove the network address specified.
161This would be used if you incorrectly specified an alias, or it
162was no longer needed.
163If you have incorrectly set an NS address having the side effect
164of specifying the host portion, removing all NS addresses will
165allow you to respecify the host portion.
166.It Cm dest_address
167Specify the address of the correspondent on the other end
168of a point to point link.
169.It Cm down
170Mark an interface ``down''. When an interface is
171marked ``down'', the system will not attempt to
172transmit messages through that interface.
173If possible, the interface will be reset to disable reception as well.
174This action does not automatically disable routes using the interface.
175.It Cm ipdst
176This is used to specify an Internet host who is willing to receive
177ip packets encapsulating NS packets bound for a remote network.
178An apparent point to point link is constructed, and
179the address specified will be taken as the NS address and network
180of the destination.
181IP encapsulation of
182.Tn CLNP
183packets is done differently.
0178d331
GW
184.It Cm llc0
185Enable use of IEEE 802.2 LLC class 0. (Currently
186unimplemented.)
187.It Fl llc0
188Disable IEEE 802.2 LLC class 0. Not all interfaces may permit this,
189as most 802 networks have no alternative link layer other than 802.2.
190.It Cm llc1
191Enable use of IEEE 802.2 LLC class 1. (Currently unimplemented.)
192.It Fl llc1
193Disable use of IEEE 802.2 LLC class 1.
194.It Cm llc2
195Enable use of IEEE 802.2 LLC class 2. (Currently unimplemented.)
196.It Fl llc2
197Disable use of IEEE 802.2 LLC class 2.
15637ed4
RG
198.It Cm metric Ar n
199Set the routing metric of the interface to
200.Ar n ,
201default 0.
202The routing metric is used by the routing protocol
203.Pq Xr routed 8 .
204Higher metrics have the effect of making a route
205less favorable; metrics are counted as addition hops
206to the destination network or host.
207.It Cm netmask Ar mask
208(Inet and Iso)
209Specify how much of the address to reserve for subdividing
210networks into sub-networks.
211The mask includes the network part of the local address
212and the subnet part, which is taken from the host field of the address.
213The mask can be specified as a single hexadecimal number
214with a leading 0x, with a dot-notation Internet address,
215or with a pseudo-network name listed in the network table
216.Xr networks 5 .
217The mask contains 1's for the bit positions in the 32-bit address
218which are to be used for the network and subnet parts,
219and 0's for the host part.
220The mask should contain at least the standard network portion,
221and the subnet field should be contiguous with the network
222portion.
223.\" see
224.\" Xr eon 5 .
225.It Cm nsellength Ar n
226.Pf ( Tn ISO
227only)
228This specifies a trailing number of bytes for a received
229.Tn NSAP
230used for local identification, the remaining leading part of which is
231taken to be the
232.Tn NET
233(Network Entity Title).
234The default value is 1, which is conformant to US
235.Tn GOSIP .
236When an iso address is set in an ifconfig command,
237it is really the
238.Tn NSAP
239which is being specified.
240For example, in
241.Tn US GOSIP ,
24220 hex digits should be
243specified in the
244.Tn ISO NSAP
245to be assigned to the interface.
246There is some evidence that a number different 1 may be useful
247for
248.Tn AFI
24937 type addresses.
250.It Cm trailers
251Request the use of a ``trailer'' link level encapsulation when
252sending (default).
253If a network interface supports
254.Cm trailers ,
255the system will, when possible, encapsulate outgoing
256messages in a manner which minimizes the number of
257memory to memory copy operations performed by the receiver.
258On networks that support the Address Resolution Protocol (see
259.Xr arp 4 ;
260currently, only 10 Mb/s Ethernet),
261this flag indicates that the system should request that other
262systems use trailers when sending to this host.
263Similarly, trailer encapsulations will be sent to other
264hosts that have made such requests.
265Currently used by Internet protocols only.
266.It Fl trailers
267Disable the use of a ``trailer'' link level encapsulation.
268.It Cm up
269Mark an interface ``up''.
270This may be used to enable an interface after an ``ifconfig down.''
271It happens automatically when setting the first address on an interface.
272If the interface was reset when previously marked down,
273the hardware will be re-initialized.
274.El
275.Pp
276.Pp
277.Nm Ifconfig
278displays the current configuration for a network interface
279when no optional parameters are supplied.
280If a protocol family is specified,
281Ifconfig will report only the details specific to that protocol family.
282.Pp
283Only the super-user may modify the configuration of a network interface.
284.Sh DIAGNOSTICS
285Messages indicating the specified interface does not exit, the
286requested address is unknown, or the user is not privileged and
287tried to alter an interface's configuration.
288.Sh SEE ALSO
289.Xr netstat 1 ,
290.Xr netintro 4 ,
291.Xr rc 8 ,
292.Xr routed 8 ,
293.\" .Xr eon 5
294.Sh HISTORY
295The
296.Nm
297command appeared in
298.Bx 4.2 .