ODOC: ifconfig

ifconfig – CONFIGure a `network’ InterFace

Summary :

ifconfig is used to display/configure the kernel-resident network interfaces. It is used at boot time to set up interfaces.


$ ifconfig — Show info abt the active network interfaces like IP Address, MAC address, Subnet mask, and status.

$ ifconfig -a — Show the status of active and inactive interfaces.

# ifconfig eth0 down — Deactivate/Shutdown the eth0 interface.

# ifconfig eth0 up — Activate the eth0 interface.

# ifconfig eth0 netmask up — Activate an interface with specific IP address.

# ifconfig eth0:0 netmask broadcast

# ifconfig eth0:1 netmask — Creating alias for eth0, ie Assign more than one IP address to eth0.

# ifconfig eth0 arp — Enable the use of the ARP protocol on eth0.

# ifconfig eth0 -arp — Disable the use of the ARP protocol on eth0.

# ifconfig eth0 promisc — Enable the promiscuous mode on eth0.

# ifconfig eth0 hw ether 09:08:07:06:05:04 — Change eth0 MAC address.

# ifconfig eth0 mtu 1412 — Change Max Transfer Unit of eth0.


  • Deactivate the interface before changing the IP/MAC.
  • Note down the original MAC, Otherwise Reboot needed to get the original MAC Address.
  • Some command sequence needs super user permission.

Read : man ifconfig

ifconfig, network, odoc, linux, gnu/linux