Debian Codegraph @

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