cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1877
Views
10
Helpful
6
Replies

creating a second static route to branch

baselzind
Level 6
Level 6

currently, on my network, I have a static route "ip route ..." to my branch through the isp router as a next hop. I made a second data link with another isp to the same branch for redundancy. can I simply create a second static route and give it an administrative distance of 2 at the end of the ip route command so that if the main one go down it will go through the second one?

1 Accepted Solution

Accepted Solutions

Hello,

 

the floating static route will only work in conjunction with an IP SLA. This should look something like below:

 

interface GigabitEthernet0/1

description Primary Link to ISP_1

ip address 192.168.1.1 255.255.255.252

!

interface GigabitEthernet0/2

description Backup Link to ISP_2

ip address 192.168.2.1 255.255.255.252

!

track 1 ip sla 1 reachability

!

ip sla 1

icmp-echo 8.8.8.8 source-ip 192.168.1.1

!

ip sla schedule 1 start-time now life forever

!

ip route 0.0.0.0 0.0.0.0 192.168.1.2 track 1

ip route 0.0.0.0 0.0.0.0 192.168.2.2 200

 

View solution in original post

6 Replies 6

Hello,

 

the floating static route will only work in conjunction with an IP SLA. This should look something like below:

 

interface GigabitEthernet0/1

description Primary Link to ISP_1

ip address 192.168.1.1 255.255.255.252

!

interface GigabitEthernet0/2

description Backup Link to ISP_2

ip address 192.168.2.1 255.255.255.252

!

track 1 ip sla 1 reachability

!

ip sla 1

icmp-echo 8.8.8.8 source-ip 192.168.1.1

!

ip sla schedule 1 start-time now life forever

!

ip route 0.0.0.0 0.0.0.0 192.168.1.2 track 1

ip route 0.0.0.0 0.0.0.0 192.168.2.2 200

 

can you explain in regard to the command "ip route 0.0.0.0 0.0.0.0 192.168.1.2 track 1" what happens when the ping from 192.168.1.1 to 8.8.8.8 fails? how it uses ip route 0.0.0.0 0.0.0.0 192.168.2.2 200 instead? i don't see anything connecting the two routes?

 

also my core sw is old and it doesn't have the above sla commands, instead  it have the below instead. applying the below logic how would the commands be if we use your same ip addresses as an example?

 

Router(config)#track 11 ip route 10.2.95.0 255.255.255.0 reachability
Router(config-track)#delay down 5 up 5
Router(config-track)#exit
Router(config)#ip route 0.0.0.0 0.0.0.0 10.3.12.26 track 11
Router(config)#end

 

Hello,

 

are you running a 12.x version ? The commands you suggest are (very) old indeed but should work.

 

The IP SLA I suggested tracks the status of the SLA, if it is down, the primary default route is removed, and the secondary default route (with the higher administrative distance) is installed.

please can you explain "Router(config)#track 11 ip route 10.2.95.0 255.255.255.0 reachability" does it ping the ip in question? should the ip be one of the branch ip?

Hello,

 

it does not ping anything, it just tracks the existence of a specific route in the routing table. If the route is not there, or is removed, it will install the backup route.

so even if the first static route isn't reachable it will remain in the routing table, therefore, rendering my scenario useless right