Debian Codegraph @

upstream/debian-unstable/man8/ifconfig.8

raw
1 .TH IFCONFIG 8 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual"
2 .SH NAME
3 ifconfig \- configure a network interface
4 .SH SYNOPSIS
5 .B "ifconfig [-v] [-a] [-s] [interface]"
6 .br
7 .B "ifconfig [-v] interface [aftype] options | address ..."
8 .SH DESCRIPTION
9 .B Ifconfig
10 is used to configure the kernel-resident network interfaces. It is
11 used at boot time to set up interfaces as necessary. After that, it
12 is usually only needed when debugging or when system tuning is needed.
13 .LP
14 If no arguments are given,
15 .B ifconfig
16 displays the status of the currently active interfaces. If
17 a single
18 .B interface
19 argument is given, it displays the status of the given interface
20 only; if a single
21 .B \-a
22 argument is given, it displays the status of all interfaces, even
23 those that are down. Otherwise, it configures an interface.
24
25 .SH Address Families
26 If the first argument after the interface name is recognized as
27 the name of a supported address family, that address family is
28 used for decoding and displaying all protocol addresses. Currently
29 supported address families include
30 .B inet
31 (TCP/IP, default),
32 .B inet6
33 (IPv6),
34 .B ax25
35 (AMPR Packet Radio),
36 .B ddp
37 (Appletalk Phase 2),
38 .B ipx
39 (Novell IPX) and
40 .B netrom
41 (AMPR Packet radio).
42 All numbers supplied as parts in IPv4 dotted decimal notation may be decimal,
43 octal, or hexadecimal, as specified in the ISO C standard (that is, a leading 0x
44 or 0X implies hexadecimal; otherwise, a leading '0' implies octal; otherwise,
45 the number is interpreted as decimal). Use of hexadecimal and octal numbers
46 is not RFC-compliant and therefore its use is discouraged.
47 .SH OPTIONS
48 .TP
49 .B -a
50 display all interfaces which are currently available, even if down
51 .TP
52 .B -s
53 display a short list (like netstat -i)
54 .TP
55 .B -v
56 be more verbose for some error conditions
57 .TP
58 .B interface
59 The name of the interface. This is usually a driver name followed by
60 a unit number, for example
61 .B eth0
62 for the first Ethernet interface. If your kernel supports alias interfaces,
63 you can specify them with syntax like
64 .B eth0:0
65 for the first alias of eth0. You can use them to assign more addresses. To
66 delete an alias interface use
67 .BR "ifconfig eth0:0 down" .
68 Note: for every scope (i.e. same net with address/netmask combination) all
69 aliases are deleted, if you delete the first (primary).
70 .TP
71 .B up
72 This flag causes the interface to be activated. It is implicitly
73 specified if an address is assigned to the interface; you can suppress this
74 behavior when using an alias interface by appending an
75 .BR "-"
76 to the alias (e.g.
77 .BR "eth0:0-" ).
78 It is also suppressed when using the IPv4 0.0.0.0 address as the kernel will
79 use this to implicitly delete alias interfaces.
80 .TP
81 .B down
82 This flag causes the driver for this interface to be shut down.
83 .TP
84 .B "[\-]arp"
85 Enable or disable the use of the ARP protocol on this interface.
86 .TP
87 .B "[\-]promisc"
88 Enable or disable the
89 .B promiscuous
90 mode of the interface. If selected, all packets on the network will
91 be received by the interface.
92 .TP
93 .B "[\-]allmulti"
94 Enable or disable
95 .B all-multicast
96 mode. If selected, all multicast packets on the network will be
97 received by the interface.
98 .TP
99 .B "mtu N"
100 This parameter sets the Maximum Transfer Unit (MTU) of an interface.
101 .TP
102 .B "dstaddr addr"
103 Set the remote IP address for a point-to-point link (such as
104 PPP). This keyword is now obsolete; use the
105 .B pointopoint
106 keyword instead.
107 .TP
108 .B "netmask addr"
109 Set the IP network mask for this interface. This value defaults to the
110 usual class A, B or C network mask (as derived from the interface IP
111 address), but it can be set to any value.
112 .TP
113 .B "add addr/prefixlen"
114 Add an IPv6 address to an interface.
115 .TP
116 .B "del addr/prefixlen"
117 Remove an IPv6 address from an interface.
118 .TP
119 .B "tunnel ::aa.bb.cc.dd"
120 Create a new SIT (IPv6-in-IPv4) device, tunnelling to the given destination.
121 .TP
122 .B "irq addr"
123 Set the interrupt line used by this device. Not all devices can
124 dynamically change their IRQ setting.
125 .TP
126 .B "io_addr addr"
127 Set the start address in I/O space for this device.
128 .TP
129 .B "mem_start addr"
130 Set the start address for shared memory used by this device. Only a
131 few devices need this.
132 .TP
133 .B "media type"
134 Set the physical port or medium type to be used by the device. Not
135 all devices can change this setting, and those that can vary in what
136 values they support. Typical values for
137 .B type
138 are
139 .B 10base2
140 (thin Ethernet),
141 .B 10baseT
142 (twisted-pair 10Mbps Ethernet),
143 .B AUI
144 (external transceiver) and so on. The special medium type of
145 .B auto
146 can be used to tell the driver to auto-sense the media. Again, not
147 all drivers can do this.
148 .TP
149 .B "[\-]broadcast [addr]"
150 If the address argument is given, set the protocol broadcast
151 address for this interface. Otherwise, set (or clear) the
152 .B IFF_BROADCAST
153 flag for the interface.
154 .TP
155 .B "[\-]pointopoint [addr]"
156 This keyword enables the
157 .B point-to-point
158 mode of an interface, meaning that it is a direct link between two
159 machines with nobody else listening on it.
160 .br
161 If the address argument is also given, set the protocol address of
162 the other side of the link, just like the obsolete
163 .B dstaddr
164 keyword does. Otherwise, set or clear the
165 .B IFF_POINTOPOINT
166 flag for the interface.
167 .TP
168 .B hw class address
169 Set the hardware address of this interface, if the device driver
170 supports this operation. The keyword must be followed by the
171 name of the hardware class and the printable ASCII equivalent of
172 the hardware address. Hardware classes currently supported include
173 .B ether
174 (Ethernet),
175 .B ax25
176 (AMPR AX.25),
177 .B ARCnet
178 and
179 .B netrom
180 (AMPR NET/ROM).
181 .TP
182 .B multicast
183 Set the multicast flag on the interface. This should not normally be needed
184 as the drivers set the flag correctly themselves.
185 .TP
186 .B address
187 The IP address to be assigned to this interface.
188 .TP
189 .B txqueuelen length
190 Set the length of the transmit queue of the device. It is useful to set this
191 to small values for slower devices with a high latency (modem links, ISDN)
192 to prevent fast bulk transfers from disturbing interactive traffic like
193 telnet too much.
194 .TP
195 .B name \fInewname\fR
196 Change the name of this interface to \fInewname\fR. The interface must be shut
197 down first.
198 .SH NOTES
199 Since kernel release 2.2 there are no explicit interface statistics for
200 alias interfaces anymore. The statistics printed for the original address
201 are shared with all alias addresses on the same device. If you want per-address
202 statistics you should add explicit accounting
203 rules for the address using the
204 .BR iptables (8)
205 command.
206 .LP
207 Since net\-tools 1.60\-4 ifconfig is printing byte counters and human readable
208 counters with IEC 60027-2 units. So 1 KiB are 2^10 byte. Note, the numbers
209 are truncated to one decimal (which can by quite a large error if you
210 consider 0.1 PiB is 112.589.990.684.262 bytes :)
211 .LP
212 Interrupt problems with Ethernet device drivers fail with EAGAIN
213 .I (SIOCSIIFLAGS: Resource temporarily unavailable)
214 it is most likely a interrupt conflict. See
215 .I http://www.scyld.com/expert/irq\-conflict.html
216 for more information.
217 .SH FILES
218 .I /proc/net/dev
219 .br
220 .I /proc/net/if_inet6
221 .SH BUGS
222 Ifconfig uses the ioctl access method to get the full address information,
223 which limits hardware addresses to 8 bytes.
224 Because Infiniband hardware address has 20 bytes,
225 only the first 8 bytes are displayed correctly.
226 Please use
227 .B ip link
228 command from
229 .B iproute2
230 package to display link layer informations including the hardware address.
231 .LP
232 While appletalk DDP and IPX addresses will be displayed they cannot be
233 altered by this command.
234 .SH SEE ALSO
235 .BR route (8),
236 .BR netstat (8),
237 .BR arp (8),
238 .BR rarp (8),
239 .BR iptables (8),
240 .BR ifup (8),
241 .BR interfaces (5)
242 .br
243 http://physics.nist.gov/cuu/Units/binary.html - Prefixes for binary multiples
244 .SH AUTHORS
245 Fred N. van Kempen, <[email protected]>
246 .br
247 Alan Cox, <[email protected]>
248 .br
249 Phil Blundell, <[email protected]>
250 .br
251 Andi Kleen
252 .br
253 Bernd Eckenfels, <net\[email protected]>