- View network settings of an ethernet adapter:ifconfig eth0- Display details of all interfaces, including disabled interfaces:ifconfig -a- Disable eth0 interface:ifconfig eth0 down- Enable eth0 interface:ifconfig eth0 up- Assign IP address to eth0 interface:ifconfig eth0 [ip_address]
ifconfig [-v] [-a] [-s] [interface] ifconfig [-v] 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). All numbers supplied as parts in IPv4 dotted decimal notation may be decimal, octal, or hexadecimal, as specified in the ISO C standard (that is, a leading 0x or 0X implies hexadecimal; otherwise, a leading '0' implies octal; otherwise, the number is interpreted as decimal). Use of hexadecimal and octal numbers is not RFC-compliant and therefore its use is discouraged.
Since kernel release 2.2 there are no explicit interface statistics for alias interfaces anymore. The statistics printed for the original address are shared with all alias addresses on the same device. If you want per-address statistics you should add explicit accounting rules for the address using the iptables(8) command.
Interrupt problems with Ethernet device drivers fail with EAGAIN (SIOCSIIFLAGS: Resource temporarily unavailable) it is most likely a interrupt conflict. See http://www.scyld.com/expert/irq-conflict.html for more information.
Ifconfig uses the ioctl access method to get the full address information, which limits hardware addresses to 8 bytes. Because Infiniband hardware address has 20 bytes, only the first 8 bytes are displayed correctly. Please use ip link command from iproute2 package to display link layer informations including the hardware address.
While appletalk DDP and IPX addresses will be displayed they cannot be altered by this command.
route(8), netstat(8), arp(8), rarp(8), iptables(8), ifup(8), interfaces(5). http://physics.nist.gov/cuu/Units/binary.html - Prefixes for binary multiples
Fred N. van Kempen, <email@example.com> Alan Cox, <Alan.Cox@linux.org> Phil Blundell, <Philip.Blundell@pobox.com> Andi Kleen Bernd Eckenfels, <firstname.lastname@example.org>