Commit | Line | Data |
---|---|---|
6502d104 WJ |
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. | |
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. | |
143 | .It Cm delete | |
144 | Remove the network address specified. | |
145 | This would be used if you incorrectly specified an alias, or it | |
146 | was no longer needed. | |
147 | If you have incorrectly set an NS address having the side effect | |
148 | of specifying the host portion, removing all NS addresses will | |
149 | allow you to respecify the host portion. | |
150 | .It Cm dest_address | |
151 | Specify the address of the correspondent on the other end | |
152 | of a point to point link. | |
153 | .It Cm down | |
154 | Mark an interface ``down''. When an interface is | |
155 | marked ``down'', the system will not attempt to | |
156 | transmit messages through that interface. | |
157 | If possible, the interface will be reset to disable reception as well. | |
158 | This action does not automatically disable routes using the interface. | |
159 | .It Cm ipdst | |
160 | This is used to specify an Internet host who is willing to receive | |
161 | ip packets encapsulating NS packets bound for a remote network. | |
162 | An apparent point to point link is constructed, and | |
163 | the address specified will be taken as the NS address and network | |
164 | of the destination. | |
165 | IP encapsulation of | |
166 | .Tn CLNP | |
167 | packets is done differently. | |
168 | .It Cm metric Ar n | |
169 | Set the routing metric of the interface to | |
170 | .Ar n , | |
171 | default 0. | |
172 | The routing metric is used by the routing protocol | |
173 | .Pq Xr routed 8 . | |
174 | Higher metrics have the effect of making a route | |
175 | less favorable; metrics are counted as addition hops | |
176 | to the destination network or host. | |
177 | .It Cm netmask Ar mask | |
178 | (Inet and Iso) | |
179 | Specify how much of the address to reserve for subdividing | |
180 | networks into sub-networks. | |
181 | The mask includes the network part of the local address | |
182 | and the subnet part, which is taken from the host field of the address. | |
183 | The mask can be specified as a single hexadecimal number | |
184 | with a leading 0x, with a dot-notation Internet address, | |
185 | or with a pseudo-network name listed in the network table | |
186 | .Xr networks 5 . | |
187 | The mask contains 1's for the bit positions in the 32-bit address | |
188 | which are to be used for the network and subnet parts, | |
189 | and 0's for the host part. | |
190 | The mask should contain at least the standard network portion, | |
191 | and the subnet field should be contiguous with the network | |
192 | portion. | |
193 | .\" see | |
194 | .\" Xr eon 5 . | |
195 | .It Cm nsellength Ar n | |
196 | .Pf ( Tn ISO | |
197 | only) | |
198 | This specifies a trailing number of bytes for a received | |
199 | .Tn NSAP | |
200 | used for local identification, the remaining leading part of which is | |
201 | taken to be the | |
202 | .Tn NET | |
203 | (Network Entity Title). | |
204 | The default value is 1, which is conformant to US | |
205 | .Tn GOSIP . | |
206 | When an iso address is set in an ifconfig command, | |
207 | it is really the | |
208 | .Tn NSAP | |
209 | which is being specified. | |
210 | For example, in | |
211 | .Tn US GOSIP , | |
212 | 20 hex digits should be | |
213 | specified in the | |
214 | .Tn ISO NSAP | |
215 | to be assigned to the interface. | |
216 | There is some evidence that a number different 1 may be useful | |
217 | for | |
218 | .Tn AFI | |
219 | 37 type addresses. | |
220 | .It Cm trailers | |
221 | Request the use of a ``trailer'' link level encapsulation when | |
222 | sending (default). | |
223 | If a network interface supports | |
224 | .Cm trailers , | |
225 | the system will, when possible, encapsulate outgoing | |
226 | messages in a manner which minimizes the number of | |
227 | memory to memory copy operations performed by the receiver. | |
228 | On networks that support the Address Resolution Protocol (see | |
229 | .Xr arp 4 ; | |
230 | currently, only 10 Mb/s Ethernet), | |
231 | this flag indicates that the system should request that other | |
232 | systems use trailers when sending to this host. | |
233 | Similarly, trailer encapsulations will be sent to other | |
234 | hosts that have made such requests. | |
235 | Currently used by Internet protocols only. | |
236 | .It Fl trailers | |
237 | Disable the use of a ``trailer'' link level encapsulation. | |
238 | .It Cm up | |
239 | Mark an interface ``up''. | |
240 | This may be used to enable an interface after an ``ifconfig down.'' | |
241 | It happens automatically when setting the first address on an interface. | |
242 | If the interface was reset when previously marked down, | |
243 | the hardware will be re-initialized. | |
244 | .El | |
245 | .Pp | |
246 | .Pp | |
247 | .Nm Ifconfig | |
248 | displays the current configuration for a network interface | |
249 | when no optional parameters are supplied. | |
250 | If a protocol family is specified, | |
251 | Ifconfig will report only the details specific to that protocol family. | |
252 | .Pp | |
253 | Only the super-user may modify the configuration of a network interface. | |
254 | .Sh DIAGNOSTICS | |
255 | Messages indicating the specified interface does not exit, the | |
256 | requested address is unknown, or the user is not privileged and | |
257 | tried to alter an interface's configuration. | |
258 | .Sh SEE ALSO | |
259 | .Xr netstat 1 , | |
260 | .Xr netintro 4 , | |
261 | .Xr rc 8 , | |
262 | .Xr routed 8 , | |
263 | .\" .Xr eon 5 | |
264 | .Sh HISTORY | |
265 | The | |
266 | .Nm | |
267 | command appeared in | |
268 | .Bx 4.2 . |