use library version of rmut
[unix-history] / usr / src / sbin / ifconfig / ifconfig.8
CommitLineData
09e42bf2
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
b030b7c8 5.\" @(#)ifconfig.8 6.5 (Berkeley) %G%
09e42bf2 6.\"
292f29f3 7.TH IFCONFIG 8C ""
09e42bf2
KM
8.UC 5
9.SH NAME
10ifconfig \- configure network interface parameters
11.SH SYOPNSIS
12.B /etc/ifconfig
a6fc3a52 13interface address_family
09e42bf2
KM
14[
15.I address
292f29f3
KM
16[
17.I dest_address
18] ] [
09e42bf2
KM
19.I parameters
20]
a6fc3a52
KS
21.br
22.B /etc/ifconfig
23interface
24[
25protocol_family
26]
09e42bf2
KM
27.SH DESCRIPTION
28.I Ifconfig
29is used to assign an address
30to a network interface and/or configure
31network interface parameters.
32.I Ifconfig
33must be used at boot time to define the network address
34of each interface present on a machine; it may also be used at
4b19f826
MK
35a later time to redefine an interface's address
36or other operating parameters. The
09e42bf2 37.I interface
a6fc3a52
KS
38parameter is a string of the form ``name unit'', e.g. ``en0''.
39.LP
40Since an interface may receive transmissions in differing protocols,
4b19f826 41each of which may require separate naming schemes, it is necessary
a6fc3a52 42to specify the
4b19f826 43.IR address_family ,
a6fc3a52 44which may change the interpretation of the remaining parameters.
4b19f826 45The address families currently supported are ``inet'' and ``ns''.
a6fc3a52
KS
46.LP
47For the DARPA-Internet family,
09e42bf2
KM
48the address is either a host name present in the host name data
49base,
50.IR hosts (5),
51or a DARPA Internet address expressed in the Internet standard
52``dot notation''.
a6fc3a52
KS
53For the Xerox Network Systems(tm) family,
54addresses are
55.IR net:a.b.c.d.e.f ,
56where
57.I net
58is the assigned network number (in decimal),
4b19f826
MK
59and each of the six bytes of the host number,
60.I a
61through
62.IR f ,
63are specified in hexadecimal.
64The host number may be omitted on 10Mb/s Ethernet interfaces,
65which use the hardware physical address,
66and on interfaces other than the first.
09e42bf2
KM
67.PP
68The following parameters may be set with
69.IR ifconfig :
70.TP 15
71.B up
72Mark an interface ``up''.
d9344a10
MK
73This may be used to enable an interface after an ``ifconfig down.''
74It happens automatically when setting the first address on an interface.
75If the interface was reset when previously marked down,
76the hardware will be re-initialized.
09e42bf2
KM
77.TP 15
78.B down
79Mark an interface ``down''. When an interface is
80marked ``down'', the system will not attempt to
81transmit messages through that interface.
d9344a10 82If possible, the interface will be reset to disable reception as well.
4b19f826 83This action does not automatically disable routes using the interface.
09e42bf2
KM
84.TP 15
85.B trailers
d9344a10 86Request the use of a ``trailer'' link level encapsulation when
09e42bf2
KM
87sending (default).
88If a network interface supports
89.IR trailers ,
90the system will, when possible, encapsulate outgoing
91messages in a manner which minimizes the number of
92memory to memory copy operations performed by the receiver.
d9344a10
MK
93On networks that support the Address Resolution Protocol (see
94.IR arp (4P);
95currently, only 10 Mb/s Ethernet),
96this flag indicates that the system should request that other
97systems use trailers when sending to this host.
98Similarly, trailer encapsulations will be sent to other
99hosts that have made such requests.
4b19f826 100Currently used by Internet protocols only.
09e42bf2
KM
101.TP 15
102.B \-trailers
103Disable the use of a ``trailer'' link level encapsulation.
104.TP 15
105.B arp
106Enable the use of the Address Resolution Protocol in mapping
107between network level addresses and link level addresses (default).
108This is currently implemented for mapping between DARPA Internet
292f29f3 109addresses and 10Mb/s Ethernet addresses.
09e42bf2
KM
110.TP 15
111.B \-arp
112Disable the use of the Address Resolution Protocol.
292f29f3 113.TP 15
d9344a10
MK
114.BI metric " n"
115Set the routing metric of the interface to
116.IR n ,
117default 0.
118The routing metric is used by the routing protocol
119.RI ( routed (8c)).
120Higher metrics have the effect of making a route
121less favorable; metrics are counted as addition hops
122to the destination network or host.
123.TP 15
292f29f3
KM
124.B debug
125Enable driver dependent debugging code; usually, this turns on
126extra console error logging.
127.TP 15
128.B \-debug
129Disable driver dependent debugging code.
a6fc3a52 130.TP 15
d9344a10
MK
131.BI netmask " mask"
132(Inet only)
4b19f826 133Specify how much of the address to reserve for subdividing
d9344a10 134networks into sub-networks.
4b19f826
MK
135The mask includes the network part of the local address
136and the subnet part, which is taken from the host field of the address.
d9344a10 137The mask can be specified as a single hexadecimal number
4b19f826
MK
138with a leading 0x, with a dot-notation Internet address,
139or with a pseudo-network name listed in the network table
140.IR networks (5).
141The mask contains 1's for the bit positions in the 32-bit address
d9344a10
MK
142which are to be used for the network and subnet parts,
143and 0's for the host part.
144The mask should contain at least the standard network portion,
4b19f826 145and the subnet field should be contiguous with the network
d9344a10 146portion.
a6fc3a52 147.TP 15
b030b7c8 148.B dest_address
d9344a10
MK
149Specify the address of the correspondent on the other end
150of a point to point link.
a6fc3a52
KS
151.TP 15
152.B broadcast
d9344a10 153(Inet only)
4b19f826 154Specify the address to use to represent broadcasts to the
a6fc3a52 155network.
4b19f826 156The default broadcast address is the address with a host part of all 1's.
a6fc3a52
KS
157.TP 15
158.B ipdst
4b19f826
MK
159(NS only)
160This is used to specify an Internet host who is willing to receive
d9344a10 161ip packets encapsulating NS packets bound for a remote network.
a6fc3a52 162In this case, an apparent point to point link is constructed, and
4b19f826 163the address specified will be taken as the NS address and network
a6fc3a52 164of the destinee.
09e42bf2
KM
165.PP
166.I Ifconfig
167displays the current configuration for a network interface
168when no optional parameters are supplied.
a6fc3a52
KS
169If a protocol family is specified,
170Ifconfig will report only the details specific to that protocol family.
09e42bf2
KM
171.PP
172Only the super-user may modify the configuration of a network interface.
173.SH DIAGNOSTICS
174Messages indicating the specified interface does not exit, the
4b19f826 175requested address is unknown, or the user is not privileged and
09e42bf2
KM
176tried to alter an interface's configuration.
177.SH "SEE ALSO"
4b19f826 178netstat(1), intro(4N), rc(8)