Rabu, 12 Oktober 2011

IP SLA - Failover 2 link

Saat kita memiliki 2 link internet ke ISP1 dan ISP2 kita pasti berpikir kenapa tidak dibikin failover, saat ISP link 1 mati maka link internet akan berpindah ke link ISP 2.

Berikut cara agar hal tersebut terwujud :



Config hanya ada di R1:

hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
archive
log config
hidekeys
!
!
track 1 rtr 1 reachability
!
!
!
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
no ip address
shutdown
clock rate 2000000
!
interface FastEthernet0/1
ip address 13.13.13.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/1
no ip address
shutdown
clock rate 2000000
!
interface Serial0/2
no ip address
shutdown
clock rate 2000000
!
interface FastEthernet1/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 12.12.12.2 track 1
ip route 0.0.0.0 0.0.0.0 13.13.13.3 10
!
!
no ip http server
no ip http secure-server
!
ip sla 1
icmp-echo 12.12.12.2 source-interface FastEthernet1/0
timeout 500
frequency 3
ip sla schedule 1 life forever start-time now


------------------------------------------------

logging :

*Mar 1 00:48:28.791: %TRACKING-5-STATE: 1 rtr 1 reachability Down->Up

R1#sh ip sla statistics

Round Trip Time (RTT) for Index 1
Latest RTT: 20 milliseconds
Latest operation start time: *00:48:57.755 UTC Fri Mar 1 2002
Latest operation return code: OK
Number of successes: 123
Number of failures: 798
Operation time to live: Forever

-----------------------------------------------------
ping ke 4.4.4.4 (internet)

R5#ping 4.4.4.4 re 10000

Type escape sequence to abort.
Sending 10000, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.
Success rate is 96 percent (29/30), round-trip min/avg/max = 48/64/92 ms


traceroute 4.4.4.4 :

Type escape sequence to abort.
Tracing the route to 4.4.4.4

1 192.168.1.1 44 msec 64 msec 16 msec
2 12.12.12.2 48 msec 16 msec 72 msec ------------> melalui ISP 1 Primary (Normal)
3 24.24.24.4 128 msec * 72 msec

coba kita shut interface primary isp arah ke router cust :

R2(config)#int f0/1
R2(config-if)#sh
R2(config-if)#
*Mar 1 01:28:19.115: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down
*Mar 1 01:28:20.115: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

Lihat di Router Cust yg di setting SLA :

*Mar 1 00:51:38.791: %TRACKING-5-STATE: 1 rtr 1 reachability Up->Down

R5#ping 4.4.4.4 re 10000

Type escape sequence to abort.
Sending 10000, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!....!!!
!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 97 percent (188/192), round-trip min/avg/max = 44/66/112 ms

Lihat router sempat rto sebentar dan lanjut kembali begitu SLA beraksi :)
Dan akan kembali normal begitu interface kita no shut kembali.

Tidak ada komentar: