cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2320
Views
0
Helpful
10
Replies

Configure static routing fail-over to backup

getaway51
Level 2
Level 2

Hi,

 

I have 2 WAN links. Therefore I need to enable traffic to go to WAN1. WAN2 is just a backup.

If I just use metric, will the backup route@WAN2 works if main route fails? or need to configure "track"?

 

ip route 202.188.7.12 255.255.255.255 10.1.1.1---main route@WAN1

ip route 202.188.7.12 255.255.255.255 10.1.1.2 10-----backup route@WAN2

 

ip route 202.188.7.12 255.255.255.255 10.1.1.1?
<1-255> Distance metric for this route
multicast multicast route
name Specify name of the next hop
permanent permanent route
tag Set tag for this route
track Install route depending on tracked item

10 Replies 10

Hello


@getaway51 wrote:

Hi,

 

I have 2 WAN links. Therefore I need to enable traffic to go to WAN1. WAN2 is just a backup.

If I just use metric, will the backup route@WAN2 works if main route fails? or need to configure "track"?

 

ip route 202.188.7.12 255.255.255.255 10.1.1.1---main route@WAN1

ip route 202.188.7.12 255.255.255.255 10.1.1.2 10-----backup route@WAN2


Yes would suggest you use a conditional static route which would assist in failover to the less preferred static route if the primary path became unavailable.


 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Deepak Kumar
VIP Alumni
VIP Alumni

Hi,

Yes, it will be work. It will select the main route WAN1 and if it is down then it will go with the backup route. 

 

But if you want a true backup line as anything happens in the between at ISP or after 10.1.1.1 then go with the track.

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

If the main route next-hop is down, will it still use the main route? since there is no track, does it still works? 

When will the switch will use the 2nd route, based on what?

What is the best config for active-backup failover? 

Hi,

 

I saw many switches configured route without ip sla. 

Can i said tht the below main static route will still run even if 10.1.1.1 is down, since there is no ip sla?

 

ip route 202.188.7.12 255.255.255.255 10.1.1.1---main route@WAN1

ip route 202.188.7.12 255.255.255.255 10.1.1.2 10-----backup route@WAN2

 

Thanks for advice.

Hello @getaway51 ,

>> Can i said tht the below main static route will still run even if 10.1.1.1 is down, since there is no ip sla?

 

your understanding is correct in the worst case the main route will be removed only when the ARP entry for 10.1.1.1 will expire on the ARP table ( up to 4 hours with default settings !!!)

This can happen if :

a) you are using an SVI interface that has other links in addition to the WAN link (the so called autostate) the SVI will stay up even if the WAN link fails

b) it can happen even if you are using a dedicated SVI or a routed port for the WAN link if the fault does not cause the physical interface to go down ( remote fault with provider not using ethernet OAM to tear down the local port)

 

For all these reasons the use of IP SLA and tracking is recommended to be sure that fallback to secondary route will happen in a timely manner.

 

Edit:

the next-hop of the secondary route should be in a different IP subnet something like 10.1.2.1 (if using /24) or 10.1.1.5 ( if using /30 subnet)

 

Hope to help

Giuseppe

 

Hi,

 

May i know why "the next-hop of the secondary route should be in a different IP subnet"?

Is there any difference than putting all in same subnet?

 

Hello

I attached an example of a condictional static route with ipsla tracking which should provide you with what you are requesting - Have you tried this?


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hi,

 

I wanted to use both as active-active.Any one down, the switch will remove the route immediately.

 

conf t
ip sla 1
icmp-echo 10.1.1.1 source-ip 10.1.1.5
threshold 30=====>to failover if 30 seconds down
frequency 1
ip sla schedule 1 life forever start-time now

track 1 rtr 1 reachability

 

ip sla 2
icmp-echo 10.1.1.2 source-ip 10.1.1.5
threshold 30=====>to failover if 30 seconds down
frequency 1
ip sla schedule 1 life forever start-time now

track 2 rtr 2 reachability


ip route 202.188.7.12 255.255.255.255 10.1.1.1 track 1
ip route 202.188.7.12 255.255.255.255 10.1.1.2 track 2

Hello @getaway51 ,

you have described your scenario as having two WAN links WAN1 and WAN2 and I have supposed those two links are two routed links as a result of this they should be in different IP subnets.

If your WAN1 and WAN2 links are OSI layer2 links you can have a single IP subnet that covers both , but I would say that using different IP subnets is to be preferred as in this way you can have two different SVI or routed interface and if WAN1 fails on local side it triggers backup route.

If you want to use a single IP subnet on WAN1, WAN2 so that both next-hops are in the same IP subnet you need to use IP SLAs and tracking to be able to fallback to secondary path in a timely manner.

 

Hope to help

Giuseppe

 

Hi,

 

You mean if configured routing next-hop which is on 2 different subnets like vlan2 and vlan3, failover will trigger immediately, Just like "ip sla track"?

Any reason or do i get it wrong?

 

ip route 0.0.0.0 0.0.0.0 10.1.1.1---main route@WAN1

ip route 0.0.0.0 0.0.0.0 10.1.1.2 10-----backup route@WAN2

ip route 150.20.1.3 255.255.255.255 10.1.1.1----3rd dedicated routing

 

If 10.1.1.1 is down, the switch will not remove any routes above till 

expire on the ARP table ( up to 4 hours with default settings !!!) ??