1IFCONFIG(8) Linux Programmer's Manual IFCONFIG(8)
2
3
4
6 ifconfig - configure a network interface
7
9 ifconfig [interface]
10 ifconfig interface [aftype] options | address ...
11
13 Ifconfig is used to configure the kernel-resident network interfaces.
14 It is used at boot time to set up interfaces as necessary. After that,
15 it is usually only needed when debugging or when system tuning is
16 needed.
17
18 If no arguments are given, ifconfig displays the status of the cur‐
19 rently active interfaces. If a single interface argument is given, it
20 displays the status of the given interface only; if a single -a argu‐
21 ment is given, it displays the status of all interfaces, even those
22 that are down. Otherwise, it configures an interface.
23
24
26 If the first argument after the interface name is recognized as the
27 name of a supported address family, that address family is used for
28 decoding and displaying all protocol addresses. Currently supported
29 address families include inet (TCP/IP, default), inet6 (IPv6), ax25
30 (AMPR Packet Radio), ddp (Appletalk Phase 2), ipx (Novell IPX) and
31 netrom (AMPR Packet radio). All numbers supplied as parts in IPv4 dot‐
32 ted decimal notation may be decimal, octal, or hexadecimal, as speci‐
33 fied in the ISO C standard (that is, a leading 0x or 0X implies hexa‐
34 decimal; otherwise, a leading '0' implies octal; otherwise, the number
35 is interpreted as decimal). Use of hexamedial and octal numbers is not
36 RFC-compliant and therefore its use is discouraged and may go away.
37
39 interface
40 The name of the interface. This is usually a driver name fol‐
41 lowed by a unit number, for example eth0 for the first Ethernet
42 interface.
43
44 up This flag causes the interface to be activated. It is implic‐
45 itly specified if an address is assigned to the interface.
46
47 down This flag causes the driver for this interface to be shut down.
48
49 [-]arp Enable or disable the use of the ARP protocol on this interface.
50
51 [-]promisc
52 Enable or disable the promiscuous mode of the interface. If
53 selected, all packets on the network will be received by the
54 interface.
55
56 [-]allmulti
57 Enable or disable all-multicast mode. If selected, all multi‐
58 cast packets on the network will be received by the interface.
59
60 metric N
61 This parameter sets the interface metric.
62
63 mtu N This parameter sets the Maximum Transfer Unit (MTU) of an inter‐
64 face.
65
66 dstaddr addr
67 Set the remote IP address for a point-to-point link (such as
68 PPP). This keyword is now obsolete; use the pointopoint keyword
69 instead.
70
71 netmask addr
72 Set the IP network mask for this interface. This value defaults
73 to the usual class A, B or C network mask (as derived from the
74 interface IP address), but it can be set to any value.
75
76 add addr/prefixlen
77 Add an IPv6 address to an interface.
78
79 del addr/prefixlen
80 Remove an IPv6 address from an interface.
81
82 tunnel aa.bb.cc.dd
83 Create a new SIT (IPv6-in-IPv4) device, tunnelling to the given
84 destination.
85
86 irq addr
87 Set the interrupt line used by this device. Not all devices can
88 dynamically change their IRQ setting.
89
90 io_addr addr
91 Set the start address in I/O space for this device.
92
93 mem_start addr
94 Set the start address for shared memory used by this device.
95 Only a few devices need this.
96
97 media type
98 Set the physical port or medium type to be used by the device.
99 Not all devices can change this setting, and those that can vary
100 in what values they support. Typical values for type are
101 10base2 (thin Ethernet), 10baseT (twisted-pair 10Mbps Ethernet),
102 AUI (external transceiver) and so on. The special medium type
103 of auto can be used to tell the driver to auto-sense the media.
104 Again, not all drivers can do this.
105
106 [-]broadcast [addr]
107 If the address argument is given, set the protocol broadcast
108 address for this interface. Otherwise, set (or clear) the
109 IFF_BROADCAST flag for the interface.
110
111 [-]pointopoint [addr]
112 This keyword enables the point-to-point mode of an interface,
113 meaning that it is a direct link between two machines with
114 nobody else listening on it.
115 If the address argument is also given, set the protocol address
116 of the other side of the link, just like the obsolete dstaddr
117 keyword does. Otherwise, set or clear the IFF_POINTOPOINT flag
118 for the interface.
119
120 hw class address
121 Set the hardware address of this interface, if the device driver
122 supports this operation. The keyword must be followed by the
123 name of the hardware class and the printable ASCII equivalent of
124 the hardware address. Hardware classes currently supported
125 include ether (Ethernet), ax25 (AMPR AX.25), ARCnet and netrom
126 (AMPR NET/ROM).
127
128 multicast
129 Set the multicast flag on the interface. This should not nor‐
130 mally be needed as the drivers set the flag correctly them‐
131 selves.
132
133 address
134 The IP address to be assigned to this interface.
135
136 txqueuelen length
137 Set the length of the transmit queue of the device. It is useful
138 to set this to small values for slower devices with a high
139 latency (modem links, ISDN) to prevent fast bulk transfers from
140 disturbing interactive traffic like telnet too much.
141
143 Since kernel release 2.2 there are no explicit interface statistics for
144 alias interfaces anymore. The statistics printed for the original
145 address are shared with all alias addresses on the same device. If you
146 want per-address statistics you should add explicit accounting rules
147 for the address using the ipchains(8) command.
148
149 Interrupt problems with Ethernet device drivers fail with EAGAIN. See
150 http://www.scyld.com/expert/irq-conflict.html for more information.
151
153 /proc/net/socket
154 /proc/net/dev
155 /proc/net/if_inet6
156
158 While appletalk DDP and IPX addresses will be displayed they cannot be
159 altered by this command.
160
162 route(8), netstat(8), arp(8), rarp(8), ipchains(8)
163
165 Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
166 Alan Cox, <Alan.Cox@linux.org>
167 Phil Blundell, <Philip.Blundell@pobox.com>
168 Andi Kleen
169
170
171
172net-tools 14 August 2000 IFCONFIG(8)