What is ifconfig Command ?

Key Features And Usages of ifconfig

What is ifconfig Command ?

ifconfig is a system administration utility in Unix-like operating systems for network interface configuration

Common uses for ifconfig include setting the IP addressand subnetmaskof a network interface and disabling or enabling an interface.

Key Features :

  • Setting IP Addresses and Subnet Masks: ifconfig is used to assign IP addresses and netmasks to network interfaces.

  • Enabling/Disabling Interfaces: It can activate or deactivate network interfaces.

  • MAC Address Configuration: ifconfig can change the medium access control (MAC) address of an interface.

  • Interactive Tool: System administrators use it to display and analyze network interface parameters.

    Common Usages Of The ifconfig Command:

  • Displaying Interface Information:

    ifconfig

    This command without any arguments displays information about all active network interfaces on your system, including their IP addresses, MAC addresses, and other relevant details.

  • Enabling or Disabling an Interface:

    ➤ ifconfig <interface_name> up

    ➤ ifconfig <interface_name> down

    This enables (up) or disables (down) a specific network interface.

  • Setting IP Address:

    ➤ ifconfig <interface_name> <ip_address>

    This sets the IP address for a specific network interface.

  • Changing MAC Address:

    ➤ ifconfig <interface_name> hw ether <new_mac_address>

    This changes the MAC address of a network interface.

  • Promiscuous Mode:

    ➤ ifconfig <interface_name> promisc

    This puts a network interface into promiscuous mode, allowing it to capture all network traffic, not just traffic specifically addressed to it.

  • Displaying Specific Interface:

    ➤ ifconfig <interface_name>

    This shows detailed information about a specific network interface.

  • Deleting an IP Address:

    ➤ ifconfig <interface_name> 0.0.0.0

    This removes the IP address from a specific network interface.

Conclusion :-

ifconfig remains a fundamental tool for configuring network interfaces in Unix-like systems. However, its usage is gradually being replaced by more modern alternatives like the IP suite. Understanding how to use ifconfig is essential for system administrators managing network configurations