Commit | Line | Data |
---|---|---|
2dfdcc57 KB |
1 | .\" Copyright (c) 1983 The Regents of the University of California. |
2 | .\" All rights reserved. | |
09e42bf2 | 3 | .\" |
2dfdcc57 KB |
4 | .\" Redistribution and use in source and binary forms are permitted |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
09e42bf2 | 15 | .\" |
2dfdcc57 KB |
16 | .\" @(#)ifconfig.8 6.6 (Berkeley) %G% |
17 | .\" | |
18 | .TH IFCONFIG 8 "" | |
09e42bf2 KM |
19 | .UC 5 |
20 | .SH NAME | |
21 | ifconfig \- configure network interface parameters | |
22 | .SH SYOPNSIS | |
23 | .B /etc/ifconfig | |
a6fc3a52 | 24 | interface address_family |
09e42bf2 KM |
25 | [ |
26 | .I address | |
292f29f3 KM |
27 | [ |
28 | .I dest_address | |
29 | ] ] [ | |
09e42bf2 KM |
30 | .I parameters |
31 | ] | |
a6fc3a52 KS |
32 | .br |
33 | .B /etc/ifconfig | |
34 | interface | |
35 | [ | |
36 | protocol_family | |
37 | ] | |
09e42bf2 KM |
38 | .SH DESCRIPTION |
39 | .I Ifconfig | |
40 | is used to assign an address | |
41 | to a network interface and/or configure | |
42 | network interface parameters. | |
43 | .I Ifconfig | |
44 | must be used at boot time to define the network address | |
45 | of each interface present on a machine; it may also be used at | |
4b19f826 MK |
46 | a later time to redefine an interface's address |
47 | or other operating parameters. The | |
09e42bf2 | 48 | .I interface |
a6fc3a52 KS |
49 | parameter is a string of the form ``name unit'', e.g. ``en0''. |
50 | .LP | |
51 | Since an interface may receive transmissions in differing protocols, | |
4b19f826 | 52 | each of which may require separate naming schemes, it is necessary |
a6fc3a52 | 53 | to specify the |
4b19f826 | 54 | .IR address_family , |
a6fc3a52 | 55 | which may change the interpretation of the remaining parameters. |
4b19f826 | 56 | The address families currently supported are ``inet'' and ``ns''. |
a6fc3a52 KS |
57 | .LP |
58 | For the DARPA-Internet family, | |
09e42bf2 KM |
59 | the address is either a host name present in the host name data |
60 | base, | |
61 | .IR hosts (5), | |
62 | or a DARPA Internet address expressed in the Internet standard | |
63 | ``dot notation''. | |
a6fc3a52 KS |
64 | For the Xerox Network Systems(tm) family, |
65 | addresses are | |
66 | .IR net:a.b.c.d.e.f , | |
67 | where | |
68 | .I net | |
69 | is the assigned network number (in decimal), | |
4b19f826 MK |
70 | and each of the six bytes of the host number, |
71 | .I a | |
72 | through | |
73 | .IR f , | |
74 | are specified in hexadecimal. | |
75 | The host number may be omitted on 10Mb/s Ethernet interfaces, | |
76 | which use the hardware physical address, | |
77 | and on interfaces other than the first. | |
09e42bf2 KM |
78 | .PP |
79 | The following parameters may be set with | |
80 | .IR ifconfig : | |
81 | .TP 15 | |
82 | .B up | |
83 | Mark an interface ``up''. | |
d9344a10 MK |
84 | This may be used to enable an interface after an ``ifconfig down.'' |
85 | It happens automatically when setting the first address on an interface. | |
86 | If the interface was reset when previously marked down, | |
87 | the hardware will be re-initialized. | |
09e42bf2 KM |
88 | .TP 15 |
89 | .B down | |
90 | Mark an interface ``down''. When an interface is | |
91 | marked ``down'', the system will not attempt to | |
92 | transmit messages through that interface. | |
d9344a10 | 93 | If possible, the interface will be reset to disable reception as well. |
4b19f826 | 94 | This action does not automatically disable routes using the interface. |
09e42bf2 KM |
95 | .TP 15 |
96 | .B trailers | |
d9344a10 | 97 | Request the use of a ``trailer'' link level encapsulation when |
09e42bf2 KM |
98 | sending (default). |
99 | If a network interface supports | |
100 | .IR trailers , | |
101 | the system will, when possible, encapsulate outgoing | |
102 | messages in a manner which minimizes the number of | |
103 | memory to memory copy operations performed by the receiver. | |
d9344a10 MK |
104 | On networks that support the Address Resolution Protocol (see |
105 | .IR arp (4P); | |
106 | currently, only 10 Mb/s Ethernet), | |
107 | this flag indicates that the system should request that other | |
108 | systems use trailers when sending to this host. | |
109 | Similarly, trailer encapsulations will be sent to other | |
110 | hosts that have made such requests. | |
4b19f826 | 111 | Currently used by Internet protocols only. |
09e42bf2 KM |
112 | .TP 15 |
113 | .B \-trailers | |
114 | Disable the use of a ``trailer'' link level encapsulation. | |
115 | .TP 15 | |
116 | .B arp | |
117 | Enable the use of the Address Resolution Protocol in mapping | |
118 | between network level addresses and link level addresses (default). | |
119 | This is currently implemented for mapping between DARPA Internet | |
292f29f3 | 120 | addresses and 10Mb/s Ethernet addresses. |
09e42bf2 KM |
121 | .TP 15 |
122 | .B \-arp | |
123 | Disable the use of the Address Resolution Protocol. | |
292f29f3 | 124 | .TP 15 |
d9344a10 MK |
125 | .BI metric " n" |
126 | Set the routing metric of the interface to | |
127 | .IR n , | |
128 | default 0. | |
129 | The routing metric is used by the routing protocol | |
130 | .RI ( routed (8c)). | |
131 | Higher metrics have the effect of making a route | |
132 | less favorable; metrics are counted as addition hops | |
133 | to the destination network or host. | |
134 | .TP 15 | |
292f29f3 KM |
135 | .B debug |
136 | Enable driver dependent debugging code; usually, this turns on | |
137 | extra console error logging. | |
138 | .TP 15 | |
139 | .B \-debug | |
140 | Disable driver dependent debugging code. | |
a6fc3a52 | 141 | .TP 15 |
d9344a10 MK |
142 | .BI netmask " mask" |
143 | (Inet only) | |
4b19f826 | 144 | Specify how much of the address to reserve for subdividing |
d9344a10 | 145 | networks into sub-networks. |
4b19f826 MK |
146 | The mask includes the network part of the local address |
147 | and the subnet part, which is taken from the host field of the address. | |
d9344a10 | 148 | The mask can be specified as a single hexadecimal number |
4b19f826 MK |
149 | with a leading 0x, with a dot-notation Internet address, |
150 | or with a pseudo-network name listed in the network table | |
151 | .IR networks (5). | |
152 | The mask contains 1's for the bit positions in the 32-bit address | |
d9344a10 MK |
153 | which are to be used for the network and subnet parts, |
154 | and 0's for the host part. | |
155 | The mask should contain at least the standard network portion, | |
4b19f826 | 156 | and the subnet field should be contiguous with the network |
d9344a10 | 157 | portion. |
a6fc3a52 | 158 | .TP 15 |
b030b7c8 | 159 | .B dest_address |
d9344a10 MK |
160 | Specify the address of the correspondent on the other end |
161 | of a point to point link. | |
a6fc3a52 KS |
162 | .TP 15 |
163 | .B broadcast | |
d9344a10 | 164 | (Inet only) |
4b19f826 | 165 | Specify the address to use to represent broadcasts to the |
a6fc3a52 | 166 | network. |
4b19f826 | 167 | The default broadcast address is the address with a host part of all 1's. |
a6fc3a52 KS |
168 | .TP 15 |
169 | .B ipdst | |
4b19f826 MK |
170 | (NS only) |
171 | This is used to specify an Internet host who is willing to receive | |
d9344a10 | 172 | ip packets encapsulating NS packets bound for a remote network. |
a6fc3a52 | 173 | In this case, an apparent point to point link is constructed, and |
4b19f826 | 174 | the address specified will be taken as the NS address and network |
a6fc3a52 | 175 | of the destinee. |
09e42bf2 KM |
176 | .PP |
177 | .I Ifconfig | |
178 | displays the current configuration for a network interface | |
179 | when no optional parameters are supplied. | |
a6fc3a52 KS |
180 | If a protocol family is specified, |
181 | Ifconfig will report only the details specific to that protocol family. | |
09e42bf2 KM |
182 | .PP |
183 | Only the super-user may modify the configuration of a network interface. | |
184 | .SH DIAGNOSTICS | |
185 | Messages indicating the specified interface does not exit, the | |
4b19f826 | 186 | requested address is unknown, or the user is not privileged and |
09e42bf2 KM |
187 | tried to alter an interface's configuration. |
188 | .SH "SEE ALSO" | |
2dfdcc57 | 189 | netstat(1), netintro(4), rc(8) |