MyThinkPond

On Java, Python, Groovy, Grails, Spring, Node.js, Linux, Arduino, ARM, Embedded Devices & Web

CentOS7 missing Net-Tools Package and why you should not install it moving forward

Posted by Venkatt Guhesan on December 9, 2016

centos_logoIn CentOS 7, a lot of the command-line utilities for configuring and troubleshooting network properties like arp, ifconfig, iptunnel, iwconfig, nameif, netstat, route – are no longer there in the new CentOS 7 version. While still included in many Linux Distributions, (and you may be tempted to run – ‘yum install net-tools’ – to get them back into your Linux footprint). But they are considered deprecated and therefore should be phased out in favor of more modern replacements. If you visit the link to net-tools project [and here] you will see that the last build of the tar.bz2 file was sometime back in October 14th, 2011.

This opens up some possibility for security vulnerabilities that may not get adequately patched. When you are developing applications for the Linux Platforms or running server configurations on Linux out in the cloud, you should move away from leveraging the net-tools as part of your portfolio. You will also notice that the modern tools leverage multi-core processing & parallelization (in some cases) to speed things up and you may notice a slight performance improvement in some of the commands. If your script is iterating through a collection running a certain net-tools command, your script will see a noticeable difference in time.

The CentOS 7 team has decided to move to iproute2 but some of the commands are not as trivial and requires a bit of familiarization before you can readily use it.

For example, the ss command that aids in determining if a port is open or used when compared with netstat can yield faster results because it directly queries the kernel using Netlink and the classic sockets API rather than going through the proc-fs file system (/proc/net/tcp) to acquire the system network information. So this approach makes the results come back faster. You can see the fun and gory code details here.

Here is a quick table that summarizes the older net-tools command and it’s new IPRoute2 equivalent:

Net-Tool *old* Command IPRoute2 *new* Command Purpose/Notes
arp ip neigh (ip neighbor) Neighbors
ifconfig ip addr, ip link, ip -s Address and Link Configuration
route ip r, ip route Routing Tables
iptunnel ip tunnel Tunnels (but simplified)
nameif ip link, ifrename Rename Network Interfaces (very useful since CentOS 7 names tdem like enp0s3 instead of tdaditional etd0)
netstat ss, ip route (for netstat -r), ip -s link (for netstat -i), ip maddr (for netstat -g) Display networking statistics (good for monitoring your net stack)
ipmaddr ip maddr For multicasting – very useful for all tde micro-services, auto-discovery protocols etc

Cheers!

Today’s inspirational quote:
bust_of_marcusaurelius
  • The impediment to action advances action. What stands in the way becomes the way.
  • Here is one way to think of hardship: I am a failure. I have met the end. Finito. I’m stupid. or
    Here is another way to think of the same hardship: A chance to learn about endurance, patience, resilience, struggle. An opportunity to prove. An opportunity to learn from the mistakes.When faced with an obstacle, think of it as the way forward. Until you acknowledge it and accept it as defeat within your confines of your mind, it remains as an opportunity and a way forward!
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: