Posts Tagged ‘link failover’

In this post I am going to show how to setup automatic Link Failover using Cisco IP SLA (Service Level Agreement). In this configuration, the primary and backup Links are from two separate providers. Router R1 at Site A tracks the interface fa0/1 of router R5 and Router R4 at Site B tracks the interface fa0/1 of Router R2. In the event a tracked interfaces is not reachable, the communication automatically fails over to the Backup Link. Communication automatically fails back to the Primary Link when the tracked interfaces are both reachable.

Site Topology

Configuration Router R1

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip subnet-zero
ip cef
!
!
no ip domain lookup
ip sla monitor 10
type echo protocol ipIcmpEcho 10.100.12.2 source-ipaddr 10.100.11.1
timeout 1000
threshold 2
frequency 3
ip sla monitor schedule 10 life forever start-time now
!
!
track 10 rtr 10 reachability
!
!
interface FastEthernet0/0
ip address 10.100.10.1 255.255.255.0
speed 100
full-duplex
!
interface FastEthernet0/1
no ip address
shutdown
speed 100
full-duplex
!
interface FastEthernet1/0
switchport access vlan 20
duplex full
speed 100
!
interface FastEthernet1/1
switchport access vlan 20
duplex full
speed 100
!
interface FastEthernet1/2
!
interface FastEthernet1/3
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Vlan1
no ip address
!
interface Vlan20
ip address 10.100.11.1 255.255.255.248
!
ip local policy route-map SLA-POLICY-DEFAULT
ip classless
ip route 10.100.12.0 255.255.255.248 10.100.11.2 track 10
ip route 10.100.13.0 255.255.255.0 10.100.11.2 track 10
!
!
no ip http server
no ip http secure-server
!
access-list 101 permit ip 10.100.0.0 0.0.255.255 10.100.12.0 0.0.0.255
access-list 102 permit ip 10.100.0.0 0.0.255.255 10.100.13.0 0.0.0.255
!
route-map SLA-POLICY-DEFAULT permit 10
match ip address 101
set ip next-hop verify-availability 10.100.11.2 1 track 10
set ip next-hop 10.100.11.3
!
route-map SLA-POLICY-DEFAULT permit 20
match ip address 102
set ip next-hop verify-availability 10.100.11.2 2 track 10
set ip next-hop 10.100.11.3
!
!
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end

Configuration Router R2

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip subnet-zero
ip cef
!
!
no ip domain lookup
!
!
interface FastEthernet0/0
ip address 172.200.100.1 255.255.255.248
speed 100
full-duplex
!
interface FastEthernet0/1
ip address 10.100.11.2 255.255.255.248
speed 100
full-duplex
!
router rip
version 2
network 10.0.0.0
network 172.200.0.0
no auto-summary
!
ip classless
ip route 10.100.10.0 255.255.255.0 10.100.11.1
ip route 10.100.13.0 255.255.255.0 172.200.100.2
!
!
no ip http server
no ip http secure-server
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end

Configuration Router R3 

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip subnet-zero
ip cef
!
!
no ip domain lookup
!
!
interface FastEthernet0/0
ip address 172.200.200.1 255.255.255.248
speed 100
full-duplex
!
interface FastEthernet0/1
ip address 10.100.11.3 255.255.255.248
speed 100
full-duplex
!
ip classless
ip route 10.100.10.0 255.255.255.248 10.100.11.1
ip route 10.100.12.0 255.255.255.248 172.200.200.2
ip route 10.100.13.0 255.255.255.0 172.200.200.2
!
!
no ip http server
no ip http secure-server
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end

Configuration Router R4

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip subnet-zero
ip cef
!
!
no ip domain lookup
ip sla monitor 10
type echo protocol ipIcmpEcho 10.100.11.2 source-ipaddr 10.100.12.1
timeout 1000
threshold 2
frequency 3
ip sla monitor schedule 10 life forever start-time now
!
!
track 10 rtr 10 reachability
!
!
interface FastEthernet0/0
ip address 10.100.13.1 255.255.255.0
speed 100
full-duplex
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
switchport access vlan 20
duplex full
speed 100
!
interface FastEthernet1/1
switchport access vlan 20
duplex full
speed 100
!
interface FastEthernet1/2
!
interface FastEthernet1/3
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Vlan1
no ip address
!
interface Vlan20
ip address 10.100.12.1 255.255.255.248
!
ip local policy route-map SLA-POLICY-DEFAULT
ip classless
ip route 10.100.11.0 255.255.255.248 10.100.12.2 track 10
ip route 10.100.10.0 255.255.255.0 10.100.12.2 track 10
!
!
no ip http server
no ip http secure-server
!
access-list 110 permit ip 10.100.0.0 0.0.255.255 10.100.11.0 0.0.0.255
access-list 120 permit ip 10.100.0.0 0.0.255.255 10.100.10.0 0.0.0.255
!
route-map SLA-POLICY-DEFAULT permit 10
match ip address 110
set ip next-hop verify-availability 10.100.12.2 1 track 10
set ip next-hop 10.100.12.3
!
route-map SLA-POLICY-DEFAULT permit 20
match ip address 120
set ip next-hop verify-availability 10.100.12.2 2 track 10
set ip next-hop 10.100.12.3
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end

Configuration Router R5 

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R5
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip subnet-zero
ip cef
!
!
no ip domain lookup
!
!
interface FastEthernet0/0
ip address 172.200.100.2 255.255.255.248
speed 100
full-duplex
!
interface FastEthernet0/1
ip address 10.100.12.2 255.255.255.248
speed 100
full-duplex
!
router rip
version 2
network 10.0.0.0
network 172.200.0.0
no auto-summary
!
ip classless
ip route 10.100.10.0 255.255.255.0 172.200.100.1
ip route 10.100.13.0 255.255.255.0 10.100.12.1
!
!
no ip http server
no ip http secure-server
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end

Configuration Router R6

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R6
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip subnet-zero
ip cef
!
!
no ip domain lookup
!
!
interface FastEthernet0/0
ip address 172.200.200.2 255.255.255.248
speed 100
full-duplex
!
interface FastEthernet0/1
ip address 10.100.12.3 255.255.255.248
speed 100
full-duplex
!
ip classless
ip route 10.100.10.0 255.255.255.0 172.200.200.1
ip route 10.100.11.0 255.255.255.248 172.200.200.1
ip route 10.100.13.0 255.255.255.0 10.100.12.1
!
!
no ip http server
no ip http secure-server
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end