– configure a network interface
ifconfig [interface]ifconfig interface [aftype] options | address …
This program is obsolete! For replacement, see ip addr and ip link. For statistics, use ip -s link.
Ifconfig is used to configure kernel-resident network interfaces. It is used at boot time to configure interfaces as needed. After that, it is usually only needed when debugging or when the system needs to be adjusted.
If no arguments are provided, ifconfig displays the status of the currently active interfaces. If a single interface argument is given, it only displays the state of the given interface; If a single -a argument is given, displays the status of all interfaces, even those that are inactive. Otherwise, configure 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 to decode and display 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 can be decimal, octal, or hexadecimal, as specified in the ISO C standard (i.e., an initial 0x or 0X implies hexadecimal; otherwise, an initial ‘0’ implies octal; otherwise, the number is interpreted as decimal). The use of hexamedial and octal numbers is not compatible with RFC and therefore their use is discouraged and may disappear. Interface options
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. up This indicator causes the interface to activate. Implicitly specifies whether to assign an address to the interface. down This indicator causes the driver for this interface to close. [-]arp Enable or disable the use of the ARP protocol in this interface. [-]promiscellaneous Enable or disable the promiscuous mode of the interface. If selected, all network packets will be received by the interface. [-]allmulti Enable or disable full multicast mode. If selected, all multicast packets on the network will be received by the interface. metric N This parameter sets the interface metric. It is not available under GNU/Linux. mtu N This parameter sets the maximum transfer unit (MTU) of an interface. dstaddr addr Set the remote IP address for a point-to-point link (such as PPP). This keyword is now obsolete; Use the pointopoint keyword instead. netmask addr Set the IP netmask for this interface. This default value is the usual class A, B, or C netmask (derived from the IP address of the interface), but can be set to any value. Add addr/prefixlen Add an IPv6 address to an interface. of the addr/prefixlen Remove an IPv6 address from an interface. tunnel ::aa.bb.cc.dd Create a new SIT (IPv6-in-IPv4) device, tunneling to the given destination. IRQ Addr Set the interrupt line used by this device. Not all devices can dynamically change their IRQ settings. io_addr addr Set the start address to the I/O space for this device. mem_start addr Set the boot address of the shared memory used by this device. Only a few devices need this. Media Type Set the physical port or media type that the device will use. Not all devices can change these settings, and those that may vary in the values they support. Typical values for the type are 10base2 (thin Ethernet), 10baseT (10 Mbps twisted pair Ethernet), AUI (external transceiver), and so on. The special medium type of car can be used to tell the driver to automatically detect the media. Again, not all drivers can do this. [-]broadcast [addr] If the address argument is provided, 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, which means that it is a direct link between two machines without anyone else listening on it. If the address argument is also given, set the protocol address on the other side of the binding, just as the dstaddr keyword is obsolete. Otherwise, set or clear the IFF_POINTOPOINT flag for the interface. HW Class Address 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. Currently supported hardware classes include ether (Ethernet), ax25 (AMPR AX.25), ARCnet, and netrom (AMPR NET/ROM). multicast Set the multicast flag on the interface. This should normally not be necessary as drivers set the flag correctly themselves. address The IP address to be assigned to this interface. txqueuelen longitud Set the length of the device’s transmission queue. It is useful to set this to small values for slower devices with high latency (modem links, ISDN) to prevent fast bulk transfers from disturbing interactive traffic such as telnet too much.
Since kernel version 2.2 there are no longer explicit interface statistics for alias interfaces. Statistics printed for the original address are shared with all alias addresses on the same device. If you want statistics by address, you must add explicit accounting rules for the address using the ipchains(8) command.
Outage issues with Ethernet device drivers fail with EAGAIN. See http://www.scyld.com/expert/irq-conflict.html for more information.
uses an outdated kernel interface. It uses the ioctl access method to obtain complete address information, limiting hardware addresses to 8 bytes. Because an Infiniband address is 20 bytes, only the first 8 bytes of the Infiniband address are displayed.
Although the appletalk DDP and IPX addresses will be displayed, this command cannot modify them.
Fred N. van Kempen, <email@example.com> Alan Cox, <Alan.Cox@linux.org> Phil Blundell, <Philip.Blundell@pobox.com> Andi Kleen
avahi-autoipd.action(8), bing(8), bmon(1), ebtables(8), edge(8), ferm(1), garp(8), getifaddrs(3), hb_report(8), hping2(8), hping3(8), if_nameindex(3), if_ nametoindex(3), ifconfig_selinux(8), ifinfo(8), ifplugd(8), ifrename(8), iftab(5), ipsec_ipsec_pluto(8), ipsec_pluto(8), iwconfig(8), iwgetid(8), n2n_v2(7), openvpn(8), pifconfig(8), ping(8), plipconfig(8), proc(5), route(8), sk98lin(4), strongswan_pluto(8), supernode(1), tc-pfifo(8), tc-pfifo_fast(8), telnet(1), thttpd(8), vconfig(8), vnstat(1), vpnc(8), vtund.conf(5), wavelan(4), wicd(8)