RHEL 7 doesn't support "route" command?
I found "route" command is not include in RHEL 7 beta release. Although, we should use "ip route" instead of "route" as much as possibles, there are still old code and scripts using the command "route".
The question is whether the command will be removed or not.
Responses
Hi Yue,
First - try a install if the rpm named "net-tools" and/or see if it exists: If you get no output from the rpm command, it is not installed. The rpm 'net-tools' provides the route command (in rhel 6).
rpm -q net-tools
yum install net-tools
I can't answer (right now, not near my rhel 7 system) if the command will ba removed or not (hopefully someone else can address this), but if you wanted to create a route for a system, another method is
1) create a file called /etc/sysconfig/network-scripts/route-eth0 # make the "eth0" part the name of the interface you want a route for a different subnet...
2) To use the /etc/sysconfig/network-scripts/route-ethX bit, follow the instructions at this link
It looks like you are familiar with the '/sbin/ip r s' (aka '/sbin/ip route sho' , and the ip command can be used to add routes as well), and probably netstat -rn just for queries.
Again, hopefully someone will address if the 'route' command itself, but check to see if yum install net-tools will install it for you (I would suspect net-tools would be on most installations...)
Hello Yue and Remmele,
Looking at the release-notes, I see no plans to mark net-tools as deprecated. However, even the rpm itself notes that most of the binaries in there are obsolete and that we should be looking to the iproute package as much as possible.
I also see some very recent package updates on my RHEL 7 testing system.
That the package is not called out in the Beta Release Notes for deprecation and that I see the package being updated in the latest RHEL 7 composes, is a strong indication that this package will be around for the life of RHEL 7.
Obviously, I'll drop a note to Product Management to confirm my understanding, but at this time, I see no risk to scripts relying on net-tools for the forseeable future, but we would recommend that you investigate updating the scripts to make use of iproute at the earliest opportunity.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
