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