1 .\" Copyright (c) 1983, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
32 .\" @(#)ifconfig.8 8.4 (Berkeley) 6/1/94
39 .Nd configure network interface parameters
42 .Ar interface address_family
50 .Op Ar protocol_family
63 is used to assign an address
64 to a network interface and/or configure
65 network interface parameters.
67 must be used at boot time to define the network address
68 of each interface present on a machine; it may also be used at
69 a later time to redefine an interface's address
70 or other operating parameters.
72 Available operands for
79 the address is either a host name present in the host name data
84 Internet address expressed in the Internet standard
86 For the Xerox Network Systems(tm) family,
91 is the assigned network number (in decimal),
92 and each of the six bytes of the host number,
96 are specified in hexadecimal.
97 The host number may be omitted on 10Mb/s Ethernet interfaces,
98 which use the hardware physical address,
99 and on interfaces other than the first.
102 family, addresses are specified as a long hexadecimal string,
103 as in the Xerox family. However, two consecutive dots imply a zero
104 byte, and the dots are optional, if the user wishes to (carefully)
105 count out long strings of digits in network byte order.
106 .It Ar address_family
109 which affects interpretation of the remaining parameters.
110 Since an interface can receive transmissions in differing protocols
111 with different naming schemes, specifying the address family is recommeded.
112 The address or protocol families currently
121 parameter is a string of the form
127 The following parameters may be set with
129 .Bl -tag -width dest_addressxx
131 Establish an additional network address for this interface. This is
132 sometimes useful when changing network numbers, and one wishes to
133 accept packets addressed to the old interface.
136 should be used with this parameter.
139 ) address is on the same subnet as an existing address assigned to
140 this interface, the netmask must be "255.255.255.255". If a netmask
141 is not supplied, the command will use the one implied by the address
142 itself (e.g, Class A). If the 'all ones' netmask is used, the system
143 will handle route installation. If another netmask is used, a route
144 to that address must be installed by hand, e.g., "route add -host
145 XX.XX.XX.XX -interface 127.0.0.1", where "XX.XX.XX.XX" is the new
148 (8)). In either case, the administrator may have to remove a route
149 by hand when the alias is removed (
155 Enable the use of the Address Resolution Protocol in mapping
156 between network level addresses and link level addresses (default).
157 This is currently implemented for mapping between
160 addresses and 10Mb/s Ethernet addresses.
162 Disable the use of the Address Resolution Protocol.
165 Specify the address to use to represent broadcasts to the
167 The default broadcast address is the address with a host part of all 1's.
169 Enable driver dependent debugging code; usually, this turns on
170 extra console error logging.
172 Disable driver dependent debugging code.
175 Remove the network address specified.
176 This would be used if you incorrectly specified an alias, or it
177 was no longer needed.
178 If you have incorrectly set an NS address having the side effect
179 of specifying the host portion, removing all NS addresses will
180 allow you to respecify the host portion.
182 Specify the address of the correspondent on the other end
183 of a point to point link.
185 Mark an interface ``down''. When an interface is
186 marked ``down'', the system will not attempt to
187 transmit messages through that interface.
188 If possible, the interface will be reset to disable reception as well.
189 This action does not automatically disable routes using the interface.
191 This is used to specify an Internet host who is willing to receive
192 ip packets encapsulating NS packets bound for a remote network.
193 An apparent point to point link is constructed, and
194 the address specified will be taken as the NS address and network
198 packets is done differently.
200 Set the routing metric of the interface to
203 The routing metric is used by the routing protocol
205 Higher metrics have the effect of making a route
206 less favorable; metrics are counted as addition hops
207 to the destination network or host.
208 .It Cm netmask Ar mask
210 Specify how much of the address to reserve for subdividing
211 networks into sub-networks.
212 The mask includes the network part of the local address
213 and the subnet part, which is taken from the host field of the address.
214 The mask can be specified as a single hexadecimal number
215 with a leading 0x, with a dot-notation Internet address,
216 or with a pseudo-network name listed in the network table
218 The mask contains 1's for the bit positions in the 32-bit address
219 which are to be used for the network and subnet parts,
220 and 0's for the host part.
221 The mask should contain at least the standard network portion,
222 and the subnet field should be contiguous with the network
226 .It Cm nsellength Ar n
229 This specifies a trailing number of bytes for a received
231 used for local identification, the remaining leading part of which is
234 (Network Entity Title).
235 The default value is 1, which is conformant to US
237 When an ISO address is set in an ifconfig command,
240 which is being specified.
243 20 hex digits should be
246 to be assigned to the interface.
247 There is some evidence that a number different from 1 may be useful
252 Request the use of a ``trailer'' link level encapsulation when
254 If a network interface supports
256 the system will, when possible, encapsulate outgoing
257 messages in a manner which minimizes the number of
258 memory to memory copy operations performed by the receiver.
259 On networks that support the Address Resolution Protocol (see
261 currently, only 10 Mb/s Ethernet),
262 this flag indicates that the system should request that other
263 systems use trailers when sending to this host.
264 Similarly, trailer encapsulations will be sent to other
265 hosts that have made such requests.
266 Currently used by Internet protocols only.
268 Disable the use of a ``trailer'' link level encapsulation.
270 Enable special processing of the link level of the interface.
271 These three options are interface specific in actual effect, however,
272 they are in general used to select special modes of operation. An example
273 of this is to enable SLIP compression. Currently, only used by SLIP.
276 Disable special processing at the link level with the specified interface.
278 Mark an interface ``up''.
279 This may be used to enable an interface after an ``ifconfig down.''
280 It happens automatically when setting the first address on an interface.
281 If the interface was reset when previously marked down,
282 the hardware will be re-initialized.
289 Produce a full listing for all available interfaces.
291 Produce a name-only listing for all available interfaces.
293 limit the listing to those interfaces that are down.
295 limit the listing to those interfaces that are up.
300 displays the current configuration for a network interface
301 when no optional parameters are supplied.
302 If a protocol family is specified,
303 Ifconfig will report only the details specific to that protocol family.
305 Only the super-user may modify the configuration of a network interface.
307 Messages indicating the specified interface does not exit, the
308 requested address is unknown, or the user is not privileged and
309 tried to alter an interface's configuration.