cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3779
Views
0
Helpful
12
Replies

Static routes with IP SLA and Track

dglevasseur
Level 1
Level 1
I have the following configuration on my 3560 switch:
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
Am I missing something here?  I've only added another network to the equation.
Thanks,
Denis

12 Replies 12

nagasheshu2010
Level 1
Level 1

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.

Sheshu, That is exactly what I need.

An active gateway for each subnet.

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.

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.

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

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

Strange!!!! You should see..

Can you please paste "show run | i ip route 0.0.0.0" output.

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

hmmm....There seems something wrong.

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?

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

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.