written by Mark Horton; add Berkeley copyright
[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.\"
2dfdcc57
KB
16.\" @(#)ifconfig.8 6.6 (Berkeley) %G%
17.\"
18.TH IFCONFIG 8 ""
09e42bf2
KM
19.UC 5
20.SH NAME
21ifconfig \- configure network interface parameters
22.SH SYOPNSIS
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.
4b19f826 56The address families currently supported are ``inet'' 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.
09e42bf2
KM
78.PP
79The following parameters may be set with
80.IR ifconfig :
81.TP 15
82.B up
83Mark an interface ``up''.
d9344a10
MK
84This may be used to enable an interface after an ``ifconfig down.''
85It happens automatically when setting the first address on an interface.
86If the interface was reset when previously marked down,
87the hardware will be re-initialized.
09e42bf2
KM
88.TP 15
89.B down
90Mark an interface ``down''. When an interface is
91marked ``down'', the system will not attempt to
92transmit messages through that interface.
d9344a10 93If possible, the interface will be reset to disable reception as well.
4b19f826 94This action does not automatically disable routes using the interface.
09e42bf2
KM
95.TP 15
96.B trailers
d9344a10 97Request the use of a ``trailer'' link level encapsulation when
09e42bf2
KM
98sending (default).
99If a network interface supports
100.IR trailers ,
101the system will, when possible, encapsulate outgoing
102messages in a manner which minimizes the number of
103memory to memory copy operations performed by the receiver.
d9344a10
MK
104On networks that support the Address Resolution Protocol (see
105.IR arp (4P);
106currently, only 10 Mb/s Ethernet),
107this flag indicates that the system should request that other
108systems use trailers when sending to this host.
109Similarly, trailer encapsulations will be sent to other
110hosts that have made such requests.
4b19f826 111Currently used by Internet protocols only.
09e42bf2
KM
112.TP 15
113.B \-trailers
114Disable the use of a ``trailer'' link level encapsulation.
115.TP 15
116.B arp
117Enable the use of the Address Resolution Protocol in mapping
118between network level addresses and link level addresses (default).
119This is currently implemented for mapping between DARPA Internet
292f29f3 120addresses and 10Mb/s Ethernet addresses.
09e42bf2
KM
121.TP 15
122.B \-arp
123Disable the use of the Address Resolution Protocol.
292f29f3 124.TP 15
d9344a10
MK
125.BI metric " n"
126Set the routing metric of the interface to
127.IR n ,
128default 0.
129The routing metric is used by the routing protocol
130.RI ( routed (8c)).
131Higher metrics have the effect of making a route
132less favorable; metrics are counted as addition hops
133to the destination network or host.
134.TP 15
292f29f3
KM
135.B debug
136Enable driver dependent debugging code; usually, this turns on
137extra console error logging.
138.TP 15
139.B \-debug
140Disable driver dependent debugging code.
a6fc3a52 141.TP 15
d9344a10
MK
142.BI netmask " mask"
143(Inet only)
4b19f826 144Specify how much of the address to reserve for subdividing
d9344a10 145networks into sub-networks.
4b19f826
MK
146The mask includes the network part of the local address
147and the subnet part, which is taken from the host field of the address.
d9344a10 148The mask can be specified as a single hexadecimal number
4b19f826
MK
149with a leading 0x, with a dot-notation Internet address,
150or with a pseudo-network name listed in the network table
151.IR networks (5).
152The mask contains 1's for the bit positions in the 32-bit address
d9344a10
MK
153which are to be used for the network and subnet parts,
154and 0's for the host part.
155The mask should contain at least the standard network portion,
4b19f826 156and the subnet field should be contiguous with the network
d9344a10 157portion.
a6fc3a52 158.TP 15
b030b7c8 159.B dest_address
d9344a10
MK
160Specify the address of the correspondent on the other end
161of a point to point link.
a6fc3a52
KS
162.TP 15
163.B broadcast
d9344a10 164(Inet only)
4b19f826 165Specify the address to use to represent broadcasts to the
a6fc3a52 166network.
4b19f826 167The default broadcast address is the address with a host part of all 1's.
a6fc3a52
KS
168.TP 15
169.B ipdst
4b19f826
MK
170(NS only)
171This is used to specify an Internet host who is willing to receive
d9344a10 172ip packets encapsulating NS packets bound for a remote network.
a6fc3a52 173In this case, an apparent point to point link is constructed, and
4b19f826 174the address specified will be taken as the NS address and network
a6fc3a52 175of the destinee.
09e42bf2
KM
176.PP
177.I Ifconfig
178displays the current configuration for a network interface
179when no optional parameters are supplied.
a6fc3a52
KS
180If a protocol family is specified,
181Ifconfig will report only the details specific to that protocol family.
09e42bf2
KM
182.PP
183Only the super-user may modify the configuration of a network interface.
184.SH DIAGNOSTICS
185Messages indicating the specified interface does not exit, the
4b19f826 186requested address is unknown, or the user is not privileged and
09e42bf2
KM
187tried to alter an interface's configuration.
188.SH "SEE ALSO"
2dfdcc57 189netstat(1), netintro(4), rc(8)