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