i have two gateways for single route Ex.

destination  gateways and

I want to add both routes in my route add if one is fail traffic goes automatically from other source.

route add mask 
route add mask 

what metric do I install for both routes and both IP addresses for single Ethernet..

  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Commented Aug 12, 2017 at 4:35

2 Answers 2


Firstly, you need some kinda mechanism to track the feasibility status of a route. So, you assign higher metric to the backup route, and when the tracking mechanism sense that the route is not active, it will switch to the backup route.

In Cisco IOS, this could be achieved by SLA and Track. In JunOS, you have to use IP Monitoring and RPM.


If your are having two route for different gateways for same destination . Then one route will act as active and another one as passive this can be accomplished by adding AD value higher than one ..

route add mask 1

route add mask 2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.