RHEL 7 Minimal Needs net-tools

Update Nov 17, 2016 – some alternatives to the old Linux networking commands are preferred in modern Linux systems (Ubuntu 16.04, RHEL 7.x, CentOS 7.x).

  • ip address show
    • # will show secondary ip addresses in addition to primary for each interface
    • # alternative to old “ifconfig -a” (fails to show secondary ip’s)
  • ip route show
    • # will show route table entries
    • # alternative to old “netstat -nr”
  • ip route get 1.2.3.4
    • # will show “best” route-table entry next-hop, interface, and source ip for given destination ip (example: 1.2.3.4)
    • # not sure of an “old” command that accomplishes this new feature

Original content follows (from July 2014) …

The popularity of virtual machines has created a huge need to reduce the resource footprint of individual guest systems to maximize the combined performance of vm’s on a single hardware host. Part of this effort to reduce guest requirements has led to the trend of “minimal” Linux server package sets on a default system install. In addition to increased resources available to server applications and better performance for users, the reduced package set limits the attack vectors available (less potentially vulnerable packages and services available to be exploited).

The recently released Red Hat Enterprise Linux 7 (RHEL 7) release continues this trend with a default “minimal” server install option. Some key missing features are the “ifconfig” and “netstat” network tools. To quickly add these tools to your system, use the “yum install net-tools” command. I also like to use the “nslookup” tool which is also missing in the minimal install. Use “yum install bind-utils” to add nslookup to your system.

Advertisements

About notesbytom

Keeping technology notes on WordPress.com to free up my mind to solve new problems rather than figuring out the same ones repeatedly :-).
This entry was posted in Linux and tagged , , , . Bookmark the permalink.

5 Responses to RHEL 7 Minimal Needs net-tools

  1. Alex Chekholko says:

    Instead of “ifconfig” you should use “ip addr show”, instead of “netstat”, you need something like ‘lsof -i 4 -a’, instead of “nslookup”, you want “dig”.

    • notesbytom says:

      Good points Alex, I can also use “ip route show” as a similar alternative to netstat -nr to view routing table as well. Note that “lsof” and “dig” are not installed in RHEL 7 minimal either. They’re provided by the “lsof” and “bind-utils” packages.

  2. Andor says:

    Theoretically net-tools is becoming deprecated, being a tool very unmantained.

    Check the tool ‘ss’.
    I.e.: ‘ss -t4lp’ lists listening connections (l) in tcp (t) v4 (4) and show the proccess owning them (p).

  3. John Fulton says:

    In place of `apr` use `ip n`.

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