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