Why does "route" command print "gateway" or "_gateway" string instead of gateway IP address?

Solution Unverified - Updated -

Issue

  • Why does route command print gateway 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 from net-tools package

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content