CentOS7 missing Net-Tools Package and why you should not install it moving forward
In 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 |
_Today's inspirational quote:_ | |
[![bust_of_marcusaurelius](/img/2016/11/bust_of_marcusaurelius.jpg)](/img/2016/11/bust_of_marcusaurelius.jpg) |
|