added documentation about SI prefixes for decimal numbers
[oss-qm-packages.git] / man / en_US / ifconfig.8
blob64647ac253546b6e8b62efe3830b1c2f067b41c5
1 .TH IFCONFIG 8 "11 Nov 2001" "net-tools" "Linux Programmer's Manual"
2 .SH NAME
3 ifconfig \- configure a network interface
4 .SH SYNOPSIS
5 .B "ifconfig [interface]"
6 .br
7 .B "ifconfig 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.
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 .SH OPTIONS
43 .TP
44 .B interface
45 The name of the interface.  This is usually a driver name followed by
46 a unit number, for example
47 .B eth0
48 for the first Ethernet interface.
49 .TP
50 .B up
51 This flag causes the interface to be activated.  It is implicitly
52 specified if an address is assigned to the interface.
53 .TP
54 .B down
55 This flag causes the driver for this interface to be shut down.
56 .TP
57 .B "[\-]arp"
58 Enable or disable the use of the ARP protocol on this interface.
59 .TP
60 .B "[\-]promisc"
61 Enable or disable the
62 .B promiscuous
63 mode of the interface.  If selected, all packets on the network will
64 be received by the interface.
65 .TP
66 .B "[\-]allmulti"
67 Enable or disable 
68 .B all-multicast
69 mode.  If selected, all multicast packets on the network will be
70 received by the interface.
71 .TP
72 .B "metric N"
73 This parameter sets the interface metric.
74 .TP
75 .B "mtu N"
76 This parameter sets the Maximum Transfer Unit (MTU) of an interface.
77 .TP
78 .B "dstaddr addr"
79 Set the remote IP address for a point-to-point link (such as
80 PPP).  This keyword is now obsolete; use the
81 .B pointopoint
82 keyword instead.
83 .TP
84 .B "netmask addr"
85 Set the IP network mask for this interface.  This value defaults to the
86 usual class A, B or C network mask (as derived from the interface IP
87 address), but it can be set to any value.
88 .TP
89 .B "add addr/prefixlen"
90 Add an IPv6 address to an interface. 
91 .TP
92 .B "del addr/prefixlen"
93 Remove an IPv6 address from an interface.
94 .TP
95 .B "tunnel aa.bb.cc.dd"
96 Create a new SIT (IPv6-in-IPv4) device, tunnelling to the given destination.
97 .TP
98 .B "irq addr"
99 Set the interrupt line used by this device.  Not all devices can
100 dynamically change their IRQ setting.
102 .B "io_addr addr"
103 Set the start address in I/O space for this device. 
105 .B "mem_start addr"
106 Set the start address for shared memory used by this device.  Only a
107 few devices need this.
109 .B "media type"
110 Set the physical port or medium type to be used by the device.  Not
111 all devices can change this setting, and those that can vary in what
112 values they support.  Typical values for
113 .B type
114 are 
115 .B 10base2
116 (thin Ethernet),
117 .B 10baseT
118 (twisted-pair 10Mbps Ethernet),
119 .B AUI 
120 (external transceiver) and so on.  The special medium type of
121 .B auto
122 can be used to tell the driver to auto-sense the media.  Again, not
123 all drivers can do this.
125 .B "[-]broadcast [addr]"
126 If the address argument is given, set the protocol broadcast
127 address for this interface.  Otherwise, set (or clear) the
128 .B IFF_BROADCAST
129 flag for the interface.
131 .B "[-]pointopoint [addr]"
132 This keyword enables the
133 .B point-to-point
134 mode of an interface, meaning that it is a direct link between two
135 machines with nobody else listening on it.
137 If the address argument is also given, set the protocol address of
138 the other side of the link, just like the obsolete
139 .B dstaddr
140 keyword does.  Otherwise, set or clear the
141 .B IFF_POINTOPOINT
142 flag for the interface. 
144 .B hw class address
145 Set the hardware address of this interface, if the device driver
146 supports this operation.  The keyword must be followed by the
147 name of the hardware class and the printable ASCII equivalent of
148 the hardware address.  Hardware classes currently supported include
149 .B ether
150 (Ethernet),
151 .B ax25
152 (AMPR AX.25),
153 .B ARCnet
155 .B netrom
156 (AMPR NET/ROM).
158 .B multicast
159 Set the multicast flag on the interface. This should not normally be needed
160 as the drivers set the flag correctly themselves.
162 .B address
163 The IP address to be assigned to this interface.
165 .B txqueuelen length
166 Set the length of the transmit queue of the device. It is useful to set this
167 to small values for slower devices with a high latency (modem links, ISDN)
168 to prevent fast bulk transfers from disturbing interactive traffic like
169 telnet too much. 
170 .SH NOTES
171 Since kernel release 2.2 there are no explicit interface statistics for
172 alias interfaces anymore. The statistics printed for the original address
173 are shared with all alias addresses on the same device. If you want per-address
174 statistics you should add explicit accounting
175 rules for the address using the 
176 .BR ipchains(8)
177 command.
179 Since net-tools 1.61 ifconfig is printing byte counters with SI units. So
180 1 KiB are 2^10 byte. Note, the numbers are truncated to one decimal (which can
181 by quite a large error if you consider 0.1 PiB is 112.589.990.684.262
182 bytes :)
184 Interrupt problems with Ethernet device drivers fail with EAGAIN
185 .I (SIOCSIIFLAGS: Resource temporarily unavailable)
186 it is most likely a interrupt conflict. See
187 .I http://www.scyld.com/expert/irq-conflict.html
188 for more information.
189 .SH FILES
190 .I /proc/net/socket 
192 .I /proc/net/dev
194 .I /proc/net/if_inet6
195 .SH BUGS
196 While appletalk DDP and IPX addresses will be displayed they cannot be
197 altered by this command.
198 .SH SEE ALSO
199 route(8), netstat(8), arp(8), rarp(8), ipchains(8)
201 http://physics.nist.gov/cuu/Units/binary.html - Prefixes for binary multiples
202 .SH AUTHORS
203 Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
205 Alan Cox, <Alan.Cox@linux.org>
207 Phil Blundell, <Philip.Blundell@pobox.com>
209 Andi Kleen; 
211 Bernd Eckenfels, <net-tools@lina.inka.de>