05-13-2016 08:46 AM - edited 03-08-2019 05:45 AM
track 1 ip sla 1 reachability
delay down 20 up 20
!
ip sla 1
icmp-echo 10.78.243.7 source-ip 172.16.90.4
timeout 3000
threshold 3000
frequency 10
ip sla schedule 1 life forever start-time now
!
ip route 0.0.0.0 0.0.0.0 172.16.90.5 track 1
ip route 0.0.0.0 0.0.0.0 172.16.90.6 20
When reachability to 10.78.243.7 fails, the default route changes from 172.16.90.5 to 172.16.90.6. Perfect.
Now, I have this configuration. The same but adding the same function for another subnet:
track 1 ip sla 1 reachability
delay down 20 up 20
!
track 2 ip sla 2 reachability
delay down 20 up 20
!
ip sla 1
icmp-echo 10.78.243.7 source-ip 172.16.90.4
timeout 3000
threshold 3000
frequency 10
ip sla schedule 1 life forever start-time now
ip sla 2
icmp-echo 8.8.8.8 source-ip 172.17.90.4
timeout 3000
threshold 3000
frequency 10
ip sla schedule 2 life forever start-time now
!
ip route 0.0.0.0 0.0.0.0 172.16.90.5 track 1
ip route 0.0.0.0 0.0.0.0 172.16.90.6 20 track 1
ip route 0.0.0.0 0.0.0.0 172.17.90.6 track 2
ip route 0.0.0.0 0.0.0.0 172.17.90.5 20 track 2
Gateway of last resort is 172.17.90.6 to network 0.0.0.0
172.17.0.0/24 is subnetted, 1 subnets
C 172.17.90.0 is directly connected, Vlan30
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.90.0 is directly connected, Vlan20
8.0.0.0/32 is subnetted, 1 subnets
S 8.8.8.8 [1/0] via 172.17.90.6
10.0.0.0/24 is subnetted, 1 subnets
S 10.78.243.0 [1/0] via 172.16.90.5
C 192.168.0.0/24 is directly connected, Vlan1
S* 0.0.0.0/0
[1/0] via 172.17.90.6
[1/0] via 172.16.90.5
When reachability to 10.78.243.7 fails, the default route DOES NOT CHANGE from 172.16.90.5 to 172.16.90.6. Instead, the route for this network dropped completely as shown here.
172.17.0.0/24 is subnetted, 1 subnets
C 172.17.90.0 is directly connected, Vlan30
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.90.0 is directly connected, Vlan20
8.0.0.0/32 is subnetted, 1 subnets
S 8.8.8.8 [1/0] via 172.17.90.6
10.0.0.0/24 is subnetted, 1 subnets
S 10.78.243.0 [1/0] via 172.16.90.5
C 192.168.0.0/24 is directly connected, Vlan1
S* 0.0.0.0/0
[1/0] via 172.17.90.6
05-13-2016 09:37 AM
Hi Denis,
Hope you are doing good?
Please explain, what exactly you want to achieve?
You have got 4 gateways mentioned below,
set - 1
172.16.90.5 -1
172.16.90.6 20 - 2
set - 2
172.17.90.6 - 3
172.17.90.5 20 - 4
you want one gateway from each set to be active (means two default routes at least in the routing table) and if the first one in any set goes down, second one has to be active in that set right?
Thanks,
Sheshu.
05-13-2016 10:27 AM
Sheshu, That is exactly what I need.
An active gateway for each subnet.
05-17-2016 02:27 AM
ok.. we may need write multiple same static routes with different AD values and tracks. Can we use more than two tracks? If so what we can track?
Sheshu.
05-17-2016 04:37 AM
I am currently using 2 tracks that monitor the reachability of different sources (1 internal to our network and 1 external). I just don't know why when I apply track 2, nothing is reachable and when 1 track goes down, it doesn't not fail over.
05-17-2016 06:30 AM
Tried below?
ip route 0.0.0.0 0.0.0.0 172.16.90.5 track 1
ip route 0.0.0.0 0.0.0.0 172.16.90.6 20
ip route 0.0.0.0 0.0.0.0 172.17.90.6 track 1
ip route 0.0.0.0 0.0.0.0 172.17.90.5 20
05-17-2016 06:44 AM
Yes. Here are the results.
With Track 1 up:
S* 0.0.0.0/0 [1/0] via 172.17.90.6
[1/0] via 172.16.90.5
With Track 1 down:
S* 0.0.0.0/0 [20/0] via 172.17.90.5
I still don't see 172.16.90.6
05-17-2016 07:07 AM
Strange!!!! You should see..
Can you please paste "show run | i ip route 0.0.0.0" output.
05-17-2016 07:11 AM
ip route 0.0.0.0 0.0.0.0 172.16.90.5 track 1
ip route 0.0.0.0 0.0.0.0 172.17.90.6 track 1
ip route 0.0.0.0 0.0.0.0 172.16.90.6 20
ip route 0.0.0.0 0.0.0.0 172.17.90.5 20
05-17-2016 07:33 AM
hmmm....There seems something wrong.
05-17-2016 08:12 AM
Can you please do one thing?
Remove these 3 routes
ip route 0.0.0.0 0.0.0.0 172.16.90.5 track 1
ip route 0.0.0.0 0.0.0.0 172.17.90.6 track 1
ip route 0.0.0.0 0.0.0.0 172.16.90.6 20
keep just along with AD
ip route 0.0.0.0 0.0.0.0 172.17.90.5 20
and check if that shows up in routing table?
05-17-2016 11:47 AM
With Track 1 UP:
S* 0.0.0.0/0 [20/0] via 172.17.90.5
With Track 1 DOWN
S* 0.0.0.0/0 [20/0] via 172.17.90.5
90-sw_aft#sh ip route | i 0.0.0.0
Gateway of last resort is 172.17.90.5 to network 0.0.0.0
S* 0.0.0.0/0 [20/0] via 172.17.90.5
05-17-2016 02:52 AM
You can try this for a moment.
ip route 0.0.0.0 0.0.0.0 172.16.90.5 track 1
ip route 0.0.0.0 0.0.0.0 172.16.90.6 20
ip route 0.0.0.0 0.0.0.0 172.17.90.6 track 1
ip route 0.0.0.0 0.0.0.0 172.17.90.5 20
if track 1 goes down, both primary default routes goes inactive in each set, secondary default routes get active.
I am trying more flexible options, let us know if we can use more than two tracks?
Sheshu.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide