Pages

Thursday, June 29, 2017

ifconfig vs ip: What’s Difference and Comparing Network Configuration

Linux based distributions have featured set of commands which provide way to configure networking in easy and powerful way through command-line. These set of commands are available from net-tools package which has been there for a long time on almost all distributions, and includes commands like: ifconfigroutenameifiwconfigiptunnelnetstatarp.
Ifconfig Vs IP Command
Ifconfig Vs IP Command
These commands are just about sufficient in configuring the network in a way any novice or an expert Linux user would want, but due to advancement in Linux kernel over past years and unmaintainable of this packaged set of commands, they are getting deprecated and a more powerful alternative which has ability to replace all of these commands is emerging.
This alternative has also been there for quite some time now and is much more powerful than any of these commands. Rest of sections would highlight this alternative and compare it with one of the command from net-tools package i.e. ifconfig.

ip – A Replacement for ifconfig

ifconfig has been there for a long time and is still used to configure, display and control network interfaces by many, but a new alternative now exists on Linux distributions which is much more powerful than it. This alternative is ip command from iproute2util package.
Although this command might seem a bit complex at first site but it is much broader in functionality than ifconfig. It is functionally organized on two layers of Networking Stack i.e. Layer 2 (Link Layer), Layer 3 (IP Layer) and does the work of all the above mentioned commands from net-tools package.
While ifconfig mostly displays or modifies the interfaces of a system, this command is capable of doing following tasks:
  1. Displaying or Modifying Interface properties.
  2. Adding, Removing ARP Cache entries along creating new Static ARP entry for a host.
  3. Displaying MAC addresses associated with all the interfaces.
  4. Displaying and modifying kernel routing tables.
One of the main highlight which separates it from its ancient counterpart ifconfig is that latter uses ioctl for network configuration, which is a less appreciated way of interaction with kernel while former takes advantage of netlink socket mechanism for the same which is a much more flexible successor of ioctl for inter-communication between kernel and user space using rtnetlink (which adds networking environment manipulation capability).
We can now begin to highlight the features of ifconfig and how they are effectively replaced by ip command.
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                                    ► Read more: http://adf.ly/1nBiMH
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

No comments:

Post a Comment