mardi 13 septembre 2011

Failover Cisco


Soit le réseau suivant:

Configuration sur R1



!

ip sla 1

icmp-echo 192.168.0.12 source-interface FastEthernet1/0

timeout 1000

threshold 250

frequency 3

ip sla schedule 1 life forever start-time now

ip sla 2

icmp-echo 172.20.0.13 source-interface FastEthernet1/1

timeout 1000

threshold 250

frequency 3

ip sla schedule 2 life forever start-time now

!

track 1 rtr 1 reachability

!

track 2 rtr 2 reachability

!

interface FastEthernet1/0

ip address 192.168.0.12 255.255.255.0

ip load-sharing per-packet

duplex auto

speed auto

!

interface FastEthernet1/1

ip address 172.20.0.13 255.255.255.0

ip load-sharing per-packet

duplex auto

speed auto

!

interface FastEthernet2/0

ip address 172.16.0.15 255.255.255.0

ip load-sharing per-packet

duplex auto

speed auto

!

interface FastEthernet2/1

no ip address

shutdown

duplex auto

speed auto

!

ip route 0.0.0.0 0.0.0.0 192.168.0.21 track 1

ip route 0.0.0.0 0.0.0.0 172.20.0.31 track 2

!





Test du basculement:

Pour tester que le basculement, on va utiliser la commande ping sur le routeur R5 et on va « pinguer » R7.

On va d’abord désactiver l’interface f1/0 de R2 :

R2(config)#int f1/0

R2(config-if)#shut

On va tester que la connexion entre R5 et R7 reste établi :

R5#ping 10.30.0.74

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.30.0.74, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1872/1884/1900 ms

On va réactiver l’interface f1/0 de R2 et désactiver le f1/0 de R3 :

R2(config)#int f1/0

R2(config-if)#no shut

R3(config)#int f1/0

R3(config-if)#shut

On va tester que la connexion entre R5 et R7 reste établi :

R5 #ping 10.30.0.74

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.30.0.74, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1828/1848/1888 ms