initialize inode and directory buffer pointers for each run
[unix-history] / usr / src / sbin / ifconfig / ifconfig.8
CommitLineData
2dfdcc57
KB
1.\" Copyright (c) 1983 The Regents of the University of California.
2.\" All rights reserved.
09e42bf2 3.\"
2dfdcc57
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
09e42bf2 15.\"
10560e59 16.\" @(#)ifconfig.8 6.8 (Berkeley) %G%
2dfdcc57
KB
17.\"
18.TH IFCONFIG 8 ""
09e42bf2
KM
19.UC 5
20.SH NAME
21ifconfig \- configure network interface parameters
10560e59 22.SH SYNOPSIS
09e42bf2 23.B /etc/ifconfig
a6fc3a52 24interface address_family
09e42bf2
KM
25[
26.I address
292f29f3
KM
27[
28.I dest_address
29] ] [
09e42bf2
KM
30.I parameters
31]
a6fc3a52
KS
32.br
33.B /etc/ifconfig
34interface
35[
36protocol_family
37]
09e42bf2
KM
38.SH DESCRIPTION
39.I Ifconfig
40is used to assign an address
41to a network interface and/or configure
42network interface parameters.
43.I Ifconfig
44must be used at boot time to define the network address
45of each interface present on a machine; it may also be used at
4b19f826
MK
46a later time to redefine an interface's address
47or other operating parameters. The
09e42bf2 48.I interface
a6fc3a52
KS
49parameter is a string of the form ``name unit'', e.g. ``en0''.
50.LP
51Since an interface may receive transmissions in differing protocols,
4b19f826 52each of which may require separate naming schemes, it is necessary
a6fc3a52 53to specify the
4b19f826 54.IR address_family ,
a6fc3a52 55which may change the interpretation of the remaining parameters.
15fe05ca 56The address families currently supported are ``inet'', ``iso'', and ``ns''.
a6fc3a52
KS
57.LP
58For the DARPA-Internet family,
09e42bf2
KM
59the address is either a host name present in the host name data
60base,
61.IR hosts (5),
62or a DARPA Internet address expressed in the Internet standard
63``dot notation''.
a6fc3a52
KS
64For the Xerox Network Systems(tm) family,
65addresses are
66.IR net:a.b.c.d.e.f ,
67where
68.I net
69is the assigned network number (in decimal),
4b19f826
MK
70and each of the six bytes of the host number,
71.I a
72through
73.IR f ,
74are specified in hexadecimal.
75The host number may be omitted on 10Mb/s Ethernet interfaces,
76which use the hardware physical address,
77and on interfaces other than the first.
15fe05ca
KS
78For the ISO family, addresses are specified as a long hexadecimal string,
79as in the Xerox family. However, two consecutive dots imply a zero
80byte, and the dots are optional, if the user wishes to (carefully)
81count out long strings of digits in network byte order.
09e42bf2
KM
82.PP
83The following parameters may be set with
84.IR ifconfig :
85.TP 15
86.B up
87Mark an interface ``up''.
d9344a10
MK
88This may be used to enable an interface after an ``ifconfig down.''
89It happens automatically when setting the first address on an interface.
90If the interface was reset when previously marked down,
91the hardware will be re-initialized.
09e42bf2
KM
92.TP 15
93.B down
94Mark an interface ``down''. When an interface is
95marked ``down'', the system will not attempt to
96transmit messages through that interface.
d9344a10 97If possible, the interface will be reset to disable reception as well.
4b19f826 98This action does not automatically disable routes using the interface.
09e42bf2
KM
99.TP 15
100.B trailers
d9344a10 101Request the use of a ``trailer'' link level encapsulation when
09e42bf2
KM
102sending (default).
103If a network interface supports
104.IR trailers ,
105the system will, when possible, encapsulate outgoing
106messages in a manner which minimizes the number of
107memory to memory copy operations performed by the receiver.
d9344a10
MK
108On networks that support the Address Resolution Protocol (see
109.IR arp (4P);
110currently, only 10 Mb/s Ethernet),
111this flag indicates that the system should request that other
112systems use trailers when sending to this host.
113Similarly, trailer encapsulations will be sent to other
114hosts that have made such requests.
4b19f826 115Currently used by Internet protocols only.
09e42bf2
KM
116.TP 15
117.B \-trailers
118Disable the use of a ``trailer'' link level encapsulation.
119.TP 15
120.B arp
121Enable the use of the Address Resolution Protocol in mapping
122between network level addresses and link level addresses (default).
123This is currently implemented for mapping between DARPA Internet
292f29f3 124addresses and 10Mb/s Ethernet addresses.
09e42bf2
KM
125.TP 15
126.B \-arp
127Disable the use of the Address Resolution Protocol.
292f29f3 128.TP 15
d9344a10
MK
129.BI metric " n"
130Set the routing metric of the interface to
131.IR n ,
132default 0.
133The routing metric is used by the routing protocol
134.RI ( routed (8c)).
135Higher metrics have the effect of making a route
136less favorable; metrics are counted as addition hops
137to the destination network or host.
138.TP 15
292f29f3
KM
139.B debug
140Enable driver dependent debugging code; usually, this turns on
141extra console error logging.
142.TP 15
143.B \-debug
144Disable driver dependent debugging code.
a6fc3a52 145.TP 15
d9344a10 146.BI netmask " mask"
15fe05ca 147(Inet and Iso)
4b19f826 148Specify how much of the address to reserve for subdividing
d9344a10 149networks into sub-networks.
4b19f826
MK
150The mask includes the network part of the local address
151and the subnet part, which is taken from the host field of the address.
d9344a10 152The mask can be specified as a single hexadecimal number
4b19f826
MK
153with a leading 0x, with a dot-notation Internet address,
154or with a pseudo-network name listed in the network table
155.IR networks (5).
156The mask contains 1's for the bit positions in the 32-bit address
d9344a10
MK
157which are to be used for the network and subnet parts,
158and 0's for the host part.
159The mask should contain at least the standard network portion,
4b19f826 160and the subnet field should be contiguous with the network
d9344a10 161portion.
a6fc3a52 162.TP 15
b030b7c8 163.B dest_address
d9344a10
MK
164Specify the address of the correspondent on the other end
165of a point to point link.
a6fc3a52
KS
166.TP 15
167.B broadcast
d9344a10 168(Inet only)
4b19f826 169Specify the address to use to represent broadcasts to the
a6fc3a52 170network.
4b19f826 171The default broadcast address is the address with a host part of all 1's.
a6fc3a52
KS
172.TP 15
173.B ipdst
15fe05ca 174(NS and ISO)
4b19f826 175This is used to specify an Internet host who is willing to receive
15fe05ca
KS
176ip packets encapsulating packets bound for a remote network.
177For the NS case, an apparent point to point link is constructed, and
4b19f826 178the address specified will be taken as the NS address and network
a6fc3a52 179of the destinee.
15fe05ca
KS
180For the ISO case, the eon
181.IR eon (5)
182interface must be specified, the supplied iso address must
183conform to RFC1070, IP address will indicate the status bits.
184.TP 15
185.B alias
186Establish an additional network address for this interface.
187This is sometimes useful when changing network numbers, and
188one wishes to accept packets addressed to the old interface.
189.TP 15
190.B delete
191Remove the network address specified.
192This would be used if you incorrectly specified an alias, or it
193was no longer needed.
194If you have incorrectly set an NS address having the side effect
195of specifying the host portion, removing all NS addresses will
196allow you to respecify the host portion.
09e42bf2
KM
197.PP
198.I Ifconfig
199displays the current configuration for a network interface
200when no optional parameters are supplied.
a6fc3a52
KS
201If a protocol family is specified,
202Ifconfig will report only the details specific to that protocol family.
09e42bf2
KM
203.PP
204Only the super-user may modify the configuration of a network interface.
205.SH DIAGNOSTICS
206Messages indicating the specified interface does not exit, the
4b19f826 207requested address is unknown, or the user is not privileged and
09e42bf2
KM
208tried to alter an interface's configuration.
209.SH "SEE ALSO"
2dfdcc57 210netstat(1), netintro(4), rc(8)