jump to navigation

Simple failover of leased lines January 14, 2009

Posted by Ravindu Jayalath in Technical.
add a comment

untitled

According to the above picture we have 2 leased lines between 2 routers. Configurations of achieving failover between those two lines are shown below. Here are the IP addresses of interfaces.

Router 1:

R1#show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 172.18.20.251 YES manual up up

Serial1/0 10.0.0.1 YES manual up up

Serial1/1 10.0.0.5 YES manual up up

Router 2:

R2#show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 192.168.0.1 YES manual up up

Serial1/0 10.0.0.2 YES manual up up

Serial1/1 10.0.0.6 YES manual up up

Then we are going to configure static routes of both routers.

Router 1:

R1(config)#ip route 192.168.0.0 255.255.255.0 10.0.0.2

R1(config)#ip route 192.168.0.0 255.255.255.0 10.0.0.6

R1#show ip route

Gateway of last resort is not set

172.18.0.0/24 is subnetted, 1 subnets

C 172.18.20.0 is directly connected, FastEthernet0/0

10.0.0.0/30 is subnetted, 2 subnets

C 10.0.0.0 is directly connected, Serial1/0

C 10.0.0.4 is directly connected, Serial1/1

S 192.168.0.0/24 [1/0] via 10.0.0.6

[1/0] via 10.0.0.2

Router 2:

R2(config)#ip route 172.18.20.0 255.255.255.0 10.0.0.1

R2(config)#ip route 172.18.20.0 255.255.255.0 10.0.0.5

R2#show ip route

172.18.0.0/24 is subnetted, 1 subnets

S 172.18.20.0 [1/0] via 10.0.0.5

[1/0] via 10.0.0.1

10.0.0.0/30 is subnetted, 2 subnets

C 10.0.0.0 is directly connected, Serial1/0

C 10.0.0.4 is directly connected, Serial1/1

C 192.168.0.0/24 is directly connected, FastEthernet0/0

According to the routing tables you can identify that to access 192.168.0.0/24 and 172.18.0.0/24 networks we have 2 paths.

S 192.168.0.0/24 [1/0] via 10.0.0.6 S 172.18.20.0 [1/0] via 10.0.0.5

[1/0] via 10.0.0.2 [1/0] via 10.0.0.1

Then we will simulate the failover mechanism.

I will do a repeat ping from R1 to R2 Ethernet interface and I will enable icmp packet capture in R2 router to identify the packets coming to the R2.

R1#ping 192.168.0.1 repeat 1000000000

Type escape sequence to abort.

Sending 1000000000, 100-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

R2#debug ip icmp

ICMP packet debugging is on

*Jan 14 12:53:02.087: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.1

*Jan 14 12:53:02.399: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.1

*Jan 14 12:53:02.495: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.1

*Jan 14 12:53:02.591: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.1

*Jan 14 12:53:03.275: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.1

As you can see now traffic is coming via 10.0.0.1 that is via line 1. Now I’m going to disable line 1 and let’s see the results in R1 and R2.

R2(config)#int s1/0

R2(config-if)#shutdown

Let’s see what will happen to the ping after line1 is disabled.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!……………

*Jan 14 13:05:09.899: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0,

changed state to down.!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

R2 Output:

*Jan 14 13:02:06.015: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.1

*Jan 14 13:02:06.159: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.1

*Jan 14 13:02:07.191: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.1

*Jan 14 13:02:08.779: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.1

*Jan 14 13:02:11.103: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.1

*Jan 14 13:02:15.735: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.5

*Jan 14 13:02:15.879: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.5

*Jan 14 13:02:16.023: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.5

*Jan 14 13:02:16.095: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.5

*Jan 14 13:02:16.167: ICMP: echo reply sent, src 192.168.0.1, dst 10.0.0.5

As you can see above ping in R1 gets interrupted for a while due to the shutdown of line 1 and it starts again after a while and you can clearly identify the difference from the R2 output. Source changes from 10.0.0.1 to 10.0.0.5. That means traffic is transferred to the line2 as line1 was disabled.

This scenario can be used in any number of lines. It is very simple and easy to trouble shoot.