Why does "route" command print "gateway" or "_gateway" string instead of gateway IP address?
Issue
- Why does
route
command printgateway
or_gateway
(for RHEL8, 9) string instead of gateway IP address? - Actual output:
# /sbin/route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default gateway 0.0.0.0 UG 0 0 0 em1
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 em1
- Expected output:
# /sbin/route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.0.0.1 0.0.0.0 UG 0 0 0 em1
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 em1
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
route
command fromnet-tools
package
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.