Currently I am using Alma-Linux, where I need to create 2 default gateways for the same NIC. Main intent of 2 default gateway configuration is.. when any one of the gateways is down then it will fall back to other working gateway
Gateway Configuration Below IPs are used for routing
- 11.12.13.2 (default gateway - with lower metric value 30)
- 11.12.13.1 (default gateway configured via static route - with higher metric value 40)
Both IPs are ping-able.
For testing fail over scenario, I disabled the gateway ip with lower metrics IP(11.12.13.2) and performed the traceroute command on a random remote host which is in different subnet.
command : traceroute 17.18.19.2
but traceroute result is destination unreachable.
In this scenario, I assume packets will go through default gateway route 11.12.13.1 ip as a fall back option. since configured gateway is down. It is not working as I expected.
Note: In windows, gateway fall back is happening irrespective of metric values.