Commit | Line | Data |
---|---|---|
15637ed4 RG |
1 | .\" Copyright (c) 1983, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
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. | |
19 | .\" | |
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. | |
31 | .\" | |
32 | .\" @(#)ifconfig.8 6.13 (Berkeley) 3/16/91 | |
33 | .\" | |
34 | .Dd March 16, 1991 | |
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 | |
53 | is used to assign an address | |
54 | to a network interface and/or configure | |
55 | network interface parameters. | |
56 | .Nm Ifconfig | |
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 | |
59 | a later time to redefine an interface's address | |
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, | |
69 | the address is either a host name present in the host name data | |
70 | base, | |
71 | .Xr hosts 5 , | |
72 | or a | |
73 | .Tn DARPA | |
74 | Internet address expressed in the Internet standard | |
75 | .Dq dot notation . | |
76 | For the Xerox Network Systems(tm) family, | |
77 | addresses are | |
78 | .Ar net:a.b.c.d.e.f , | |
79 | where | |
80 | .Ar net | |
81 | is the assigned network number (in decimal), | |
82 | and each of the six bytes of the host number, | |
83 | .Ar a | |
84 | through | |
85 | .Ar f , | |
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. | |
90 | For the | |
91 | .Tn ISO | |
92 | family, addresses are specified as a long hexadecimal string, | |
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. | |
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 | |
117 | The following parameters may be set with | |
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. | |
0178d331 GW |
133 | .It Cm altphys |
134 | Instruct the adapter to use a physical network connection other than | |
135 | the default, such as the AUI port rather than a built-in transceiver. | |
136 | (See | |
137 | .Cm aui , | |
138 | which is another name for the same flag, below.) | |
139 | .It Fl altphys | |
140 | Disable the use of the alternate physical network connection. | |
141 | .It Cm aui | |
142 | On certain Ethernet drivers, configures the adapter to use the AUI | |
143 | port rather than the default built-in transceiver. (See also | |
144 | .Cm altphys ) . | |
145 | .It Cm bnc | |
146 | On certain Ethernet drivers, configures the adapter to use the | |
147 | built-in transceiver rather than the AUI port. (See also | |
148 | .Cm Fl altphys ) . | |
15637ed4 RG |
149 | .It Cm broadcast |
150 | (Inet only) | |
151 | Specify the address to use to represent broadcasts to the | |
152 | network. | |
153 | The default broadcast address is the address with a host part of all 1's. | |
154 | .It Cm debug | |
155 | Enable driver dependent debugging code; usually, this turns on | |
156 | extra console error logging. | |
157 | .It Fl debug | |
158 | Disable driver dependent debugging code. | |
159 | .It Cm delete | |
160 | Remove the network address specified. | |
161 | This would be used if you incorrectly specified an alias, or it | |
162 | was no longer needed. | |
163 | If you have incorrectly set an NS address having the side effect | |
164 | of specifying the host portion, removing all NS addresses will | |
165 | allow you to respecify the host portion. | |
166 | .It Cm dest_address | |
167 | Specify the address of the correspondent on the other end | |
168 | of a point to point link. | |
169 | .It Cm down | |
170 | Mark an interface ``down''. When an interface is | |
171 | marked ``down'', the system will not attempt to | |
172 | transmit messages through that interface. | |
173 | If possible, the interface will be reset to disable reception as well. | |
174 | This action does not automatically disable routes using the interface. | |
175 | .It Cm ipdst | |
176 | This is used to specify an Internet host who is willing to receive | |
177 | ip packets encapsulating NS packets bound for a remote network. | |
178 | An apparent point to point link is constructed, and | |
179 | the address specified will be taken as the NS address and network | |
180 | of the destination. | |
181 | IP encapsulation of | |
182 | .Tn CLNP | |
183 | packets is done differently. | |
0178d331 GW |
184 | .It Cm llc0 |
185 | Enable use of IEEE 802.2 LLC class 0. (Currently | |
186 | unimplemented.) | |
187 | .It Fl llc0 | |
188 | Disable IEEE 802.2 LLC class 0. Not all interfaces may permit this, | |
189 | as most 802 networks have no alternative link layer other than 802.2. | |
190 | .It Cm llc1 | |
191 | Enable use of IEEE 802.2 LLC class 1. (Currently unimplemented.) | |
192 | .It Fl llc1 | |
193 | Disable use of IEEE 802.2 LLC class 1. | |
194 | .It Cm llc2 | |
195 | Enable use of IEEE 802.2 LLC class 2. (Currently unimplemented.) | |
196 | .It Fl llc2 | |
197 | Disable use of IEEE 802.2 LLC class 2. | |
15637ed4 RG |
198 | .It Cm metric Ar n |
199 | Set the routing metric of the interface to | |
200 | .Ar n , | |
201 | default 0. | |
202 | The routing metric is used by the routing protocol | |
203 | .Pq Xr routed 8 . | |
204 | Higher metrics have the effect of making a route | |
205 | less favorable; metrics are counted as addition hops | |
206 | to the destination network or host. | |
207 | .It Cm netmask Ar mask | |
208 | (Inet and Iso) | |
209 | Specify how much of the address to reserve for subdividing | |
210 | networks into sub-networks. | |
211 | The mask includes the network part of the local address | |
212 | and the subnet part, which is taken from the host field of the address. | |
213 | The mask can be specified as a single hexadecimal number | |
214 | with a leading 0x, with a dot-notation Internet address, | |
215 | or with a pseudo-network name listed in the network table | |
216 | .Xr networks 5 . | |
217 | The mask contains 1's for the bit positions in the 32-bit address | |
218 | which are to be used for the network and subnet parts, | |
219 | and 0's for the host part. | |
220 | The mask should contain at least the standard network portion, | |
221 | and the subnet field should be contiguous with the network | |
222 | portion. | |
223 | .\" see | |
224 | .\" Xr eon 5 . | |
225 | .It Cm nsellength Ar n | |
226 | .Pf ( Tn ISO | |
227 | only) | |
228 | This specifies a trailing number of bytes for a received | |
229 | .Tn NSAP | |
230 | used for local identification, the remaining leading part of which is | |
231 | taken to be the | |
232 | .Tn NET | |
233 | (Network Entity Title). | |
234 | The default value is 1, which is conformant to US | |
235 | .Tn GOSIP . | |
236 | When an iso address is set in an ifconfig command, | |
237 | it is really the | |
238 | .Tn NSAP | |
239 | which is being specified. | |
240 | For example, in | |
241 | .Tn US GOSIP , | |
242 | 20 hex digits should be | |
243 | specified in the | |
244 | .Tn ISO NSAP | |
245 | to be assigned to the interface. | |
246 | There is some evidence that a number different 1 may be useful | |
247 | for | |
248 | .Tn AFI | |
249 | 37 type addresses. | |
250 | .It Cm trailers | |
251 | Request the use of a ``trailer'' link level encapsulation when | |
252 | sending (default). | |
253 | If a network interface supports | |
254 | .Cm trailers , | |
255 | the system will, when possible, encapsulate outgoing | |
256 | messages in a manner which minimizes the number of | |
257 | memory to memory copy operations performed by the receiver. | |
258 | On networks that support the Address Resolution Protocol (see | |
259 | .Xr arp 4 ; | |
260 | currently, only 10 Mb/s Ethernet), | |
261 | this flag indicates that the system should request that other | |
262 | systems use trailers when sending to this host. | |
263 | Similarly, trailer encapsulations will be sent to other | |
264 | hosts that have made such requests. | |
265 | Currently used by Internet protocols only. | |
266 | .It Fl trailers | |
267 | Disable the use of a ``trailer'' link level encapsulation. | |
268 | .It Cm up | |
269 | Mark an interface ``up''. | |
270 | This may be used to enable an interface after an ``ifconfig down.'' | |
271 | It happens automatically when setting the first address on an interface. | |
272 | If the interface was reset when previously marked down, | |
273 | the hardware will be re-initialized. | |
274 | .El | |
275 | .Pp | |
276 | .Pp | |
277 | .Nm Ifconfig | |
278 | displays the current configuration for a network interface | |
279 | when no optional parameters are supplied. | |
280 | If a protocol family is specified, | |
281 | Ifconfig will report only the details specific to that protocol family. | |
282 | .Pp | |
283 | Only the super-user may modify the configuration of a network interface. | |
284 | .Sh DIAGNOSTICS | |
285 | Messages indicating the specified interface does not exit, the | |
286 | requested address is unknown, or the user is not privileged and | |
287 | tried to alter an interface's configuration. | |
288 | .Sh SEE ALSO | |
289 | .Xr netstat 1 , | |
290 | .Xr netintro 4 , | |
291 | .Xr rc 8 , | |
292 | .Xr routed 8 , | |
293 | .\" .Xr eon 5 | |
294 | .Sh HISTORY | |
295 | The | |
296 | .Nm | |
297 | command appeared in | |
298 | .Bx 4.2 . |