ifconfig - configure a network interface
ifconfig [interface]
ifconfig interface [aftype] options | address ...
Ifconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system tuning is needed.
If no arguments are given, ifconfig displays the status of the currently active interfaces. If a single interface argument is given, it displays the status of the given interface only; if a single -a argument is given, it displays the status of all interfaces, even those that are down. Otherwise, it configures an interface.
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), inet6 (IPv6), ax25 (AMPR Packet Radio), ddp (Appletalk Phase 2), ipx (Novell IPX) and netrom (AMPR Packet radio).
interface
The name of the interface. This is usually a
driver name followed by a unit number, for example
eth0 for the first Ethernet interface.
down This flag causes the driver for this interface to be shut down.
[-]arp Enable or disable the use of the ARP protocol on this interface.
[-]trailers
Enable or disable the use of trailers on Ethernet
frames. This is not used by the current network
code.
[-]promisc
Enable or disable the promiscuous mode of the
interface. If selected, all packets on the network
will be received by the interface.
[-]allmulti
Enable or disable all-multicast mode. If selected,
all multicast packets on the network will be
received by the interface.
metric N
This parameter sets the interface metric.
mtu N This parameter sets the Maximum Transfer Unit (MTU) of an interface.
dstaddr addr
Set the remote IP address in case of a point-topoint
link, like PPP. This keyword 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.
add addr/prefixlen
Add an IPv6 address to an interface.
del addr/prefixlen
Remove an IPv6 address from an interface.
irq addr
Set the interrupt line used by this device. Many
devices don't support dynamic IRQ setting.
io_addr addr
Set the start address in I/O space for this device.
mem_start addr
Set the start address for shared memory used by
this device. Only a few devices need this.
[-]broadcast [addr]
If the address argument is given, set the protocol
broadcast address for this interface. Otherwise,
set (or clear) the IFF_BROADCAST flag for the
interface.
[-]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.
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,
set or clear the IFF_POINTOPOINT flag for the
interface.
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.
/proc/net/socket
/proc/net/dev
/proc/net/if_inet6
/etc/init.d/network
While appletalk DDP and IPX addresses will be displayed they cannot be altered by this command.
Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
Alan Cox, <Alan.Cox@linux.org>
Phil Blundell, <Philip.Blundell@pobox.com>