Packet going out of wrong interface due to OS adding cache route - OS trying to route through default route even if static route exist


#1

RHEL 7.0, IPv6

Scenario:
I have routed specific network using network scripts.

  1. “ip -6 route show” shows that route has been added. ( with metric 1024)
  2. Ping of the specific IP through that route is successful.
  3. Now after few days, for some reason, we see that cache route appears for that given destination IP with lower metric ( which is actually trying to take it through interface/bond of the default route.)Ping to that destination IP fails then because packet is going out of wrong interface.
  4. If I delete that cache route, again the packet starts going out of the correct interface ( which is not interface of the default route) and ping is successful.

Has anyone faced similar issue with REHL. I am using RHEL 7
Questions:
Q1. In what situation OS will try to route through default, even if static route for specific IP/network exists.
Q2. How to configure the route so that OS does not fall back on default route. Please note, we can not delete the default route.
Q3. Even if OS is creating cache route for some temporary situation, why is it not detecting that situation has normalized and why it is not deleting the automatically created cache route then. ( assuming that some temporary network side failure caused this issue )

Please note, this issue is observed only for IPV6. We did not observed this issue with IPV4
Can anyone suggest on how to permanently resolve this situation ?