Linux ifconfig(1) Manual Page

Table of Contents

NAME

ifconfig - configure a network interface

SYNOPSIS

ifconfig [interface]
ifconfig interface [aftype] options | address ...

DESCRIPTION

Ifconfig is used to set up (and maintain thereafter) the kernel-resident network interfaces. It is used at boot time to configure most of them to a running state. After that, it is usually only needed when debugging or when system tuning is needed.

If no arguments are given, ifconfig just displays the status of the currently defined interfaces. If the single interface argument is given, it displays the status of the given interface only. Otherwise, it assumes that things have to be set up.

Address Families

If the first argument after the interface name is recognized as the name of a supported address family, that address family is used for decoding and displaying all protocol addresses. Currently supported address families include inet (TCP/IP, default) ax25 (AMPR Packet Radio), ddp (Appletalk Phase 2), ipx (Novell IPX) and netrom (AMPR Packet radio).

OPTIONS

interface
The name of the NET interface. This usually is a name like eth0 , sl3 or something like that: a device driver name followed by a unit number.

up
This flag causes the interface to be activated. It is implicitly specified if the interface is given a new address (see below).

down This flag causes the driver for this interface to be shut down, and is useful when things start going wrong.

[-]arp Enable or disable the use of the ARP protocol on this interface. If the minus (-)sign is present, the flag is turned OFF.

[-]trailers
Enable or disable the use of trailers on Ethernet frames. This is not used in the current implementation of NET.

[-]allmulti
Enable or disable the promiscuous mode of the interface. This means that all incoming frames get sent to the network layer of the system kernel, allowing for networking monitoring.

metric N
This parameter sets the interface metric. It is not used at present, but we implement it for the future.

mtu N This parameter sets the Maximum Transfer Unit (MTU) of an interface. For Ethernet, this is a number in the range of 1000-2000 (default is 1500). For SLIP, use something between 200 and 4096. Note, that the current implementation does not handle IP fragmentation yet, so you'd better make the MTU large enough!

dstaddr addr
Set the "other end"'s IP address in case of a Point-To-Point link, like PPP. This keywords is obsoleted by the new pointopoint keyword.

netmask addr
Set the IP network mask for this interface. This value defaults to the usual class A, B or C network mask (as deducted from the interface IP address), but it can be set to any value for the use of subnetting.

irq addr
Set the interrupt line used by this device. Many devices don't support dynamic IRQ setting.

[-]broadcast [addr]
If the address argument is also given, set the protocol broadcast address for this interface. Otherwise, it only sets the IFF_BROADCAST flag of the interface. If the keyword was preceded by a minus (-) sign, then the flag is cleared instead.

[-]pointopoint [addr]
This keyword enables the point-to-point mode of an interface, meaning that it is a direct link between two machines with nobody else listening on it (or, at least we hope that this is the case, grin :-) If the address argument is also given, set the protocol address of the other side of the link, just like the obsolete dstaddr keyword does. Otherwise, it only sets the IFF_POINTOPOINT flag of the interface. If the keyword was preceded by a minus (-) sign, then the flag is cleared instead.

hw
Set the hardware address of this interface, if the device driver supports this operation. The keyword must be followed by the name of the hardware class and the printable ASCII equivalent of the hardware address. Hardware classes currently supported include ether (Ethernet), ax25 (AMPR AX.25), ARCnet and netrom (AMPR NET/ROM).

multicast
Set the multicast flag on the interface. This should not normally be needed as the drivers set the flag correctly themselves.

address
The host name or IP address (a host name will be resolved into an IP address) of that interface. This parameter is required, although the syntax doesn't currently require it.

FILES

/proc/net/socket
/proc/net/dev
/etc/init.d/network

BUGS

While appletalk DDP and IPX addresses will be displayed they cannot be altered by this command.

AUTHORS

Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> Alan Cox, <Alan.Cox@linux.org>