Wednesday, 27 July 2011

IP SLA


 Scenario
 The diagram show four routers are connected. The router R4 having a loop-back interface with IP address 192.168.1.1/24. There are two path to reach the loop back form router R1. Let's say the primary   path is through router R2 and secondary path through router R3.The problem is if the router interface s0/0  of router R4 will down the router R1 keep on sending packet to via router  R2. To address this problem we will implement Cisco's wonderful technology IPSLA.
Find the configuration of all the routers. The IP SLA has been configured in ROUTER R1.You also can verify this by
command given below.


R1
R1#show run
Building configuration...

Current configuration : 926 bytes
!
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
!
!
ip cef
no ip domain lookup
!
!
ip sla monitor 1
 type echo protocol ipIcmpEcho 4.4.4.2 source-ipaddr 2.2.2.1
 timeout 500
 frequency 10
ip sla monitor schedule 1 life forever start-time now

!
track 1 rtr 1 reachability
!

!
interface FastEthernet0/0
 ip address 2.2.2.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 3.3.3.1 255.255.255.0
 duplex auto
 speed auto
!
ip route 0.0.0.0 0.0.0.0 2.2.2.2 track 1
ip route 0.0.0.0 0.0.0.0 3.3.3.2 100
!
no ip http server
no ip http secure-server

!
control-plane

gatekeeper
 shutdown
!

line con 0
 exec-timeout 0 0
 logging synchronous
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4

end
R2
R2#show run
Building configuration...

Current configuration : 703 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
memory-size iomem 15
no aaa new-model
ip subnet-zero
ip cef
!
!
no ip domain lookup
!
!

interface FastEthernet0/0
 ip address 2.2.2.2 255.255.255.0
 duplex auto
 speed auto
!
interface Serial0/0
 ip address 4.4.4.1 255.255.255.0
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 no ip address
 shutdown
!
no ip http server
ip classless
ip route 192.168.1.0 255.255.255.0 4.4.4.2

line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!

end

R3
3#show run
Building configuration...

Current configuration : 693 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
memory-size iomem 15
no aaa new-model
ip subnet-zero
ip cef
!
!
no ip domain lookup
!
!

interface FastEthernet0/0
 ip address 3.3.3.2 255.255.255.0
 duplex auto
 speed auto
!
interface Serial0/0
 ip address 5.5.5.1 255.255.255.0
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 no ip address
 shutdown
!
no ip http server
ip classless
ip route 0.0.0.0 0.0.0.0 5.5.5.2
!

line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
end
R4 
R4#show run
Building configuration...

Current configuration : 789 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
memory-size iomem 15
no aaa new-model
ip subnet-zero
ip cef
!
!
no ip domain lookup
!
!


interface Loopback0
 ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/0
 ip address 4.4.4.2 255.255.255.0
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 ip address 5.5.5.2 255.255.255.0
!
no ip http server
ip classless
ip route 0.0.0.0 0.0.0.0 4.4.4.1
ip route 0.0.0.0 0.0.0.0 5.5.5.1 10
!

line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
!
end
For Verify
R1#  sh track
Track 1
  Response Time Reporter 1 reachability
  Reachability is Up
    12 changes, last change 00:08:16
  Latest operation return code: OK
  Latest RTT (millisecs) 476
  Tracked by:
    STATIC-IP-ROUTING 0


R1#traceroute 192.168.1.1

Type escape sequence to abort.
Tracing the route to 192.168.1.1

  1 2.2.2.2 248 msec 204 msec 108 msec
  2 4.4.4.2 516 msec *  420 msec
R1#ping 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 264/380/580 ms
Now  shutdown the s0/0 of router R4 & checked the above command. Now no shutdown the s0/0 of router R4 & checked the above command.


Cheers