Commit | Line | Data |
---|---|---|
75940610 KB |
1 | .\" Copyright (c) 1983, 1991, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
09e42bf2 | 3 | .\" |
ad787160 C |
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. | |
09e42bf2 | 19 | .\" |
ad787160 C |
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. | |
2dfdcc57 | 31 | .\" |
fd88f5c5 | 32 | .\" @(#)ifconfig.8 8.4 (Berkeley) 6/1/94 |
ad787160 | 33 | .\" |
fd88f5c5 | 34 | .Dd June 1, 1994 |
0fccfdb8 CL |
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 | |
09e42bf2 KM |
53 | is used to assign an address |
54 | to a network interface and/or configure | |
55 | network interface parameters. | |
0fccfdb8 | 56 | .Nm Ifconfig |
09e42bf2 KM |
57 | must be used at boot time to define the network address |
58 | of each interface present on a machine; it may also be used at | |
4b19f826 | 59 | a later time to redefine an interface's address |
0fccfdb8 CL |
60 | or other operating parameters. |
61 | .Pp | |
62 | Available operands for | |
63 | .Nm ifconfig: | |
64 | .Bl -tag -width Ds | |
65 | .It Ar Address | |
66 | For the | |
67 | .Tn DARPA-Internet | |
68 | family, | |
09e42bf2 KM |
69 | the address is either a host name present in the host name data |
70 | base, | |
0fccfdb8 CL |
71 | .Xr hosts 5 , |
72 | or a | |
73 | .Tn DARPA | |
74 | Internet address expressed in the Internet standard | |
75 | .Dq dot notation . | |
a6fc3a52 KS |
76 | For the Xerox Network Systems(tm) family, |
77 | addresses are | |
0fccfdb8 | 78 | .Ar net:a.b.c.d.e.f , |
a6fc3a52 | 79 | where |
0fccfdb8 | 80 | .Ar net |
a6fc3a52 | 81 | is the assigned network number (in decimal), |
4b19f826 | 82 | and each of the six bytes of the host number, |
0fccfdb8 | 83 | .Ar a |
4b19f826 | 84 | through |
0fccfdb8 | 85 | .Ar f , |
4b19f826 MK |
86 | are specified in hexadecimal. |
87 | The host number may be omitted on 10Mb/s Ethernet interfaces, | |
88 | which use the hardware physical address, | |
89 | and on interfaces other than the first. | |
0fccfdb8 CL |
90 | For the |
91 | .Tn ISO | |
92 | family, addresses are specified as a long hexadecimal string, | |
15fe05ca KS |
93 | as in the Xerox family. However, two consecutive dots imply a zero |
94 | byte, and the dots are optional, if the user wishes to (carefully) | |
95 | count out long strings of digits in network byte order. | |
0fccfdb8 CL |
96 | .It Ar address_family |
97 | Specifies the | |
98 | .Ar address family | |
99 | which affects interpretation of the remaining parameters. | |
100 | Since an interface can receive transmissions in differing protocols | |
101 | with different naming schemes, specifying the address family is recommeded. | |
102 | The address or protocol families currently | |
103 | supported are | |
104 | .Dq inet , | |
105 | .Dq iso , | |
106 | and | |
107 | .Dq ns . | |
108 | .It Ar Interface | |
109 | The | |
110 | .Ar interface | |
111 | parameter is a string of the form | |
112 | .Dq name unit , | |
113 | for example, | |
114 | .Dq en0 | |
115 | .El | |
116 | .Pp | |
09e42bf2 | 117 | The following parameters may be set with |
0fccfdb8 CL |
118 | .Nm ifconfig : |
119 | .Bl -tag -width dest_addressxx | |
120 | .It Cm alias | |
121 | Establish an additional network address for this interface. | |
122 | This is sometimes useful when changing network numbers, and | |
123 | one wishes to accept packets addressed to the old interface. | |
124 | .It Cm arp | |
125 | Enable the use of the Address Resolution Protocol in mapping | |
126 | between network level addresses and link level addresses (default). | |
127 | This is currently implemented for mapping between | |
128 | .Tn DARPA | |
129 | Internet | |
130 | addresses and 10Mb/s Ethernet addresses. | |
131 | .It Fl arp | |
132 | Disable the use of the Address Resolution Protocol. | |
133 | .It Cm broadcast | |
134 | (Inet only) | |
135 | Specify the address to use to represent broadcasts to the | |
136 | network. | |
137 | The default broadcast address is the address with a host part of all 1's. | |
138 | .It Cm debug | |
139 | Enable driver dependent debugging code; usually, this turns on | |
140 | extra console error logging. | |
141 | .It Fl debug | |
142 | Disable driver dependent debugging code. | |
2e55f625 | 143 | .ne 1i |
0fccfdb8 CL |
144 | .It Cm delete |
145 | Remove the network address specified. | |
146 | This would be used if you incorrectly specified an alias, or it | |
147 | was no longer needed. | |
148 | If you have incorrectly set an NS address having the side effect | |
149 | of specifying the host portion, removing all NS addresses will | |
150 | allow you to respecify the host portion. | |
151 | .It Cm dest_address | |
152 | Specify the address of the correspondent on the other end | |
153 | of a point to point link. | |
154 | .It Cm down | |
09e42bf2 KM |
155 | Mark an interface ``down''. When an interface is |
156 | marked ``down'', the system will not attempt to | |
157 | transmit messages through that interface. | |
d9344a10 | 158 | If possible, the interface will be reset to disable reception as well. |
4b19f826 | 159 | This action does not automatically disable routes using the interface. |
0fccfdb8 CL |
160 | .It Cm ipdst |
161 | This is used to specify an Internet host who is willing to receive | |
162 | ip packets encapsulating NS packets bound for a remote network. | |
163 | An apparent point to point link is constructed, and | |
164 | the address specified will be taken as the NS address and network | |
165 | of the destination. | |
166 | IP encapsulation of | |
167 | .Tn CLNP | |
168 | packets is done differently. | |
169 | .It Cm metric Ar n | |
d9344a10 | 170 | Set the routing metric of the interface to |
0fccfdb8 | 171 | .Ar n , |
d9344a10 MK |
172 | default 0. |
173 | The routing metric is used by the routing protocol | |
0fccfdb8 | 174 | .Pq Xr routed 8 . |
d9344a10 MK |
175 | Higher metrics have the effect of making a route |
176 | less favorable; metrics are counted as addition hops | |
177 | to the destination network or host. | |
0fccfdb8 | 178 | .It Cm netmask Ar mask |
653ba8b6 | 179 | (Inet and ISO) |
4b19f826 | 180 | Specify how much of the address to reserve for subdividing |
d9344a10 | 181 | networks into sub-networks. |
4b19f826 MK |
182 | The mask includes the network part of the local address |
183 | and the subnet part, which is taken from the host field of the address. | |
d9344a10 | 184 | The mask can be specified as a single hexadecimal number |
4b19f826 MK |
185 | with a leading 0x, with a dot-notation Internet address, |
186 | or with a pseudo-network name listed in the network table | |
0fccfdb8 | 187 | .Xr networks 5 . |
4b19f826 | 188 | The mask contains 1's for the bit positions in the 32-bit address |
d9344a10 MK |
189 | which are to be used for the network and subnet parts, |
190 | and 0's for the host part. | |
191 | The mask should contain at least the standard network portion, | |
4b19f826 | 192 | and the subnet field should be contiguous with the network |
d9344a10 | 193 | portion. |
0fccfdb8 CL |
194 | .\" see |
195 | .\" Xr eon 5 . | |
196 | .It Cm nsellength Ar n | |
197 | .Pf ( Tn ISO | |
198 | only) | |
199 | This specifies a trailing number of bytes for a received | |
200 | .Tn NSAP | |
c954a922 | 201 | used for local identification, the remaining leading part of which is |
0fccfdb8 CL |
202 | taken to be the |
203 | .Tn NET | |
204 | (Network Entity Title). | |
205 | The default value is 1, which is conformant to US | |
206 | .Tn GOSIP . | |
653ba8b6 | 207 | When an ISO address is set in an ifconfig command, |
0fccfdb8 CL |
208 | it is really the |
209 | .Tn NSAP | |
210 | which is being specified. | |
211 | For example, in | |
212 | .Tn US GOSIP , | |
213 | 20 hex digits should be | |
214 | specified in the | |
215 | .Tn ISO NSAP | |
216 | to be assigned to the interface. | |
653ba8b6 | 217 | There is some evidence that a number different from 1 may be useful |
0fccfdb8 CL |
218 | for |
219 | .Tn AFI | |
220 | 37 type addresses. | |
221 | .It Cm trailers | |
222 | Request the use of a ``trailer'' link level encapsulation when | |
223 | sending (default). | |
224 | If a network interface supports | |
225 | .Cm trailers , | |
226 | the system will, when possible, encapsulate outgoing | |
227 | messages in a manner which minimizes the number of | |
228 | memory to memory copy operations performed by the receiver. | |
229 | On networks that support the Address Resolution Protocol (see | |
230 | .Xr arp 4 ; | |
231 | currently, only 10 Mb/s Ethernet), | |
232 | this flag indicates that the system should request that other | |
233 | systems use trailers when sending to this host. | |
234 | Similarly, trailer encapsulations will be sent to other | |
235 | hosts that have made such requests. | |
236 | Currently used by Internet protocols only. | |
237 | .It Fl trailers | |
238 | Disable the use of a ``trailer'' link level encapsulation. | |
c1daa431 | 239 | .It Cm link[0-2] |
fb99294f WN |
240 | Enable special processing of the link level of the interface. |
241 | These three options are interface specific in actual effect, however, | |
242 | they are in general used to select special modes of operation. An example | |
243 | of this is to enable SLIP compression. Currently, only used by SLIP. | |
2e55f625 | 244 | .ne 1i |
c1daa431 | 245 | .It Fl link[0-2] |
fc3b3999 | 246 | Disable special processing at the link level with the specified interface. |
0fccfdb8 CL |
247 | .It Cm up |
248 | Mark an interface ``up''. | |
249 | This may be used to enable an interface after an ``ifconfig down.'' | |
250 | It happens automatically when setting the first address on an interface. | |
251 | If the interface was reset when previously marked down, | |
252 | the hardware will be re-initialized. | |
253 | .El | |
254 | .Pp | |
255 | .Pp | |
256 | .Nm Ifconfig | |
09e42bf2 KM |
257 | displays the current configuration for a network interface |
258 | when no optional parameters are supplied. | |
a6fc3a52 KS |
259 | If a protocol family is specified, |
260 | Ifconfig will report only the details specific to that protocol family. | |
0fccfdb8 | 261 | .Pp |
09e42bf2 | 262 | Only the super-user may modify the configuration of a network interface. |
0fccfdb8 | 263 | .Sh DIAGNOSTICS |
09e42bf2 | 264 | Messages indicating the specified interface does not exit, the |
4b19f826 | 265 | requested address is unknown, or the user is not privileged and |
09e42bf2 | 266 | tried to alter an interface's configuration. |
0fccfdb8 CL |
267 | .Sh SEE ALSO |
268 | .Xr netstat 1 , | |
269 | .Xr netintro 4 , | |
270 | .Xr rc 8 , | |
271 | .Xr routed 8 , | |
272 | .\" .Xr eon 5 | |
273 | .Sh HISTORY | |
274 | The | |
275 | .Nm | |
276 | command appeared in | |
277 | .Bx 4.2 . |