Why "ip route" command is not validating the ip address used for gateway.

Solution In Progress - Updated -

Issue

  • ip route command not throwing any error for adding/replacing gateway ip as network address in priority table.
  • Why ip route allowing to use invalid ip address as gateway ip in ip route add command?
  • Why ip route command allowing network address to be used as gateway ip address while adding/replacing the route?

Environment

  • Red Hat Enterprise Linux 7.7 and newer
  • kernel-3.10.0-1039.el7 and newer
  • ip route
  • Policy Based Routing

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