cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1774
Views
0
Helpful
1
Replies

Static Route Load Balance and Failover

mustafa.chapal
Level 1
Level 1

We have a Cisco 3925e router and we have two different ISPs connected. We have three WAN links from which ISP1 has a primary and backup link and ISP2 has just one primary link.

We load balance traffic between ISP1 and ISP2 and we want to configure failover if ISP1 primary link goes down and ISP2 link should work regardless. When ISP1 primary link goes down, the ISP1 backup link default route does not get injected in the routing table.

Please help us resolve this issue.

track 1 ip sla 1 reachability

!

track 2 ip sla 2 reachability

!

track 3 ip sla 3 reachability

!

interface GigabitEthernet0/0 (ISP1 Primary Link)

 ip address 1.1.1.2 255.255.255.252

 no ip redirects

 no ip unreachables

 no ip proxy-arp

 ip flow ingress

 ip virtual-reassembly in

 ip verify unicast reverse-path

 load-interval 30

 duplex auto

 speed auto

 no cdp enable

 no mop enabled

!

interface GigabitEthernet0/1 (ISP1 Backup Link)

 ip address 2.2.2.2 255.255.255.252

 no ip redirects

 no ip unreachables

 no ip proxy-arp

 ip flow ingress

 ip virtual-reassembly in

 ip verify unicast reverse-path

 load-interval 30

 duplex auto

 speed auto

 no cdp enable

 no mop enabled

!

interface GigabitEthernet0/2 (ISP2 Primary Link)

 ip address 3.3.3.2 255.255.255.252

 no ip redirects

 no ip unreachables

 no ip proxy-arp

 ip flow ingress

 ip virtual-reassembly in

 ip verify unicast reverse-path

 load-interval 30

 duplex auto

 speed auto

 no cdp enable

 no mop enabled

!

interface GigabitEthernet0/3

 ip address 192.168.0.1 255.255.255.0

 no ip redirects

 no ip unreachables

 no ip proxy-arp

 ip flow ingress

 ip virtual-reassembly in

 ip verify unicast reverse-path

 load-interval 30

 duplex auto

 speed auto

 no cdp enable

!

ip route 0.0.0.0 0.0.0.0 1.1.1.1 track 1

ip route 0.0.0.0 0.0.0.0 3.3.3.1 track 3

ip route 0.0.0.0 0.0.0.0 2.2.2.1 10

!

ip sla 1

 icmp-echo 1.1.1.1 source-interface GigabitEthernet0/0

ip sla schedule 1 life forever start-time now

ip sla 2

 icmp-echo 2.2.2.1 source-interface GigabitEthernet0/1

ip sla schedule 2 life forever start-time now

ip sla 3

 icmp-echo 3.3.3.1 source-interface GigabitEthernet0/2

ip sla schedule 3 life forever start-time now

1 Accepted Solution

Accepted Solutions

Hi

You could use an script (or many scripts) and adjust it to your requirements, the following script is just and example:

*If an response is not received from a specific destination, a script will be triggered automatically, removing the primary default route. I usually create an static routing pointing to the primary ISP  and to a public IP as my destination for the SLA.

Example: ip route 8.8.8.8 255.255.255.255 1.1.1.1  (primary ISP)

track 10 ip sla 10 reachability
delay down 10

ip sla 10
icmp-echo 8.8.8.8 source-ip 10.0.1.1
timeout 10000
frequency 15


ip sla schedule 10 life forever start-time now
ip sla enable reaction-alerts

event manager applet FAILOVER-INTERNET
 event tag prim syslog occurs 1 pattern "%TRACKING-5-STATE: 10 rtr 10 state Up->Down"
 event tag sec syslog occurs 1 pattern "%TRACKING-5-STATE: 10 rtr 10 reachability Up->Down"
 trigger
  correlate event prim or event sec
 action 1.0 cli command "enable"
 action 2.0 cli command "no ip route 0.0.0.0 0.0.0.0 1.1.1.1 track 10"  <--remove the current default route.
 action 3.0 cli command "ip route 0.0.0.0 0.0.0.0 2.2.2.2 10"   <--create a new default route pointing to other next hop
 action 4.0 cli command "exit"
 action 5.0 cli command "write memory"
Hope it is useful
:-)



>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

View solution in original post

1 Reply 1

Hi

You could use an script (or many scripts) and adjust it to your requirements, the following script is just and example:

*If an response is not received from a specific destination, a script will be triggered automatically, removing the primary default route. I usually create an static routing pointing to the primary ISP  and to a public IP as my destination for the SLA.

Example: ip route 8.8.8.8 255.255.255.255 1.1.1.1  (primary ISP)

track 10 ip sla 10 reachability
delay down 10

ip sla 10
icmp-echo 8.8.8.8 source-ip 10.0.1.1
timeout 10000
frequency 15


ip sla schedule 10 life forever start-time now
ip sla enable reaction-alerts

event manager applet FAILOVER-INTERNET
 event tag prim syslog occurs 1 pattern "%TRACKING-5-STATE: 10 rtr 10 state Up->Down"
 event tag sec syslog occurs 1 pattern "%TRACKING-5-STATE: 10 rtr 10 reachability Up->Down"
 trigger
  correlate event prim or event sec
 action 1.0 cli command "enable"
 action 2.0 cli command "no ip route 0.0.0.0 0.0.0.0 1.1.1.1 track 10"  <--remove the current default route.
 action 3.0 cli command "ip route 0.0.0.0 0.0.0.0 2.2.2.2 10"   <--create a new default route pointing to other next hop
 action 4.0 cli command "exit"
 action 5.0 cli command "write memory"
Hope it is useful
:-)



>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card