Search This Blog

Wednesday, September 11, 2013

EIGRP load balance with route manipulation



Here is the lab scenario:



R1 and R2 are both running EIGRP and connected with 2 links (10.1.12.0/24 and 10.2.12.0/24), also both routers have static routes to R3 and R4 networks (loopbacks) respectively. 

The required solution is to allow networks 1 (192.168.31.0/24 and 192.168.41.0/24) to route through link 1 and networks 2 (192.168.32.0/24 and 192.168.42.0/24) route through link 2 while having redundancy in case of link failure.

So first let’s look on R1 and R2 routing tables:

R1# show ip route     
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

S    192.168.31.0/24 [1/0] via 10.1.13.3
D EX 192.168.42.0/24 [170/30720] via 10.2.12.2, 00:00:01, FastEthernet2/0
                     [170/30720] via 10.1.12.2, 00:00:01, FastEthernet1/1
D EX 192.168.41.0/24 [170/30720] via 10.2.12.2, 00:00:01, FastEthernet2/0
                     [170/30720] via 10.1.12.2, 00:00:01, FastEthernet1/1
     10.0.0.0/24 is subnetted, 4 subnets
C       10.2.12.0 is directly connected, FastEthernet2/0
C       10.1.13.0 is directly connected, FastEthernet1/0
C       10.1.12.0 is directly connected, FastEthernet1/1
D       10.1.24.0 [90/30720] via 10.2.12.2, 00:00:01, FastEthernet2/0
                  [90/30720] via 10.1.12.2, 00:00:01, FastEthernet1/1
S    192.168.32.0/24 [1/0] via 10.1.13.3

R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

D EX 192.168.31.0/24 [170/30720] via 10.2.12.1, 00:01:26, FastEthernet2/0
                     [170/30720] via 10.1.12.1, 00:01:26, FastEthernet1/1
S    192.168.42.0/24 [1/0] via 10.1.24.4
S    192.168.41.0/24 [1/0] via 10.1.24.4
     10.0.0.0/24 is subnetted, 4 subnets
C       10.2.12.0 is directly connected, FastEthernet2/0
D       10.1.13.0 [90/30720] via 10.2.12.1, 00:01:26, FastEthernet2/0
                  [90/30720] via 10.1.12.1, 00:01:26, FastEthernet1/1
C       10.1.12.0 is directly connected, FastEthernet1/1
C       10.1.24.0 is directly connected, FastEthernet1/0
D EX 192.168.32.0/24 [170/30720] via 10.2.12.1, 00:01:26, FastEthernet2/0
                     [170/30720] via 10.1.12.1, 00:01:26, FastEthernet1/1

We can see that each router (R1 and R2) are learning networks 1 and 2 through both links.
Now let’s configure the route manipulation on R1:

ip prefix-list PL_NET1 seq 5 permit 192.168.31.0/24
!
ip prefix-list PL_NET2 seq 5 permit 192.168.32.0/24
!
route-map RM_EIGRP1 permit 10
 match ip address prefix-list PL_NET2
 set metric 100000
!
route-map RM_EIGRP1 permit 20
!
route-map RM_EIGRP2 permit 10
 match ip address prefix-list PL_NET1
 set metric 100000
!
route-map RM_EIGRP2 permit 20

Note that the same should be configured on R2 with the corresponding IP segments.
Now let’s configure it on the EIGRP process:

router eigrp 1
 redistribute static
 network 10.1.12.1 0.0.0.0
 network 10.1.13.1 0.0.0.0
 network 10.2.12.1 0.0.0.0
 distribute-list route-map RM_EIGRP1 out FastEthernet1/1
 distribute-list route-map RM_EIGRP2 out FastEthernet2/0
 no auto-summary

Route-map EIGRP1, which add metric to network 2, is configured on link 1 and route-map EIGRP2, which add metric to network 1, is configured on link 2.

Now let’s see R2 routing table:

R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

D EX 192.168.31.0/24 [170/30720] via 10.1.12.1, 00:02:28, FastEthernet1/1
S    192.168.42.0/24 [1/0] via 10.1.24.4
S    192.168.41.0/24 [1/0] via 10.1.24.4
     10.0.0.0/24 is subnetted, 4 subnets
C       10.2.12.0 is directly connected, FastEthernet2/0
D       10.1.13.0 [90/30720] via 10.2.12.1, 00:11:17, FastEthernet2/0
                  [90/30720] via 10.1.12.1, 00:11:17, FastEthernet1/1
C       10.1.12.0 is directly connected, FastEthernet1/1
C       10.1.24.0 is directly connected, FastEthernet1/0
D EX 192.168.32.0/24 [170/30720] via 10.2.12.1, 00:02:33, FastEthernet2/0

R2 is preferring network 192.168.31.0/24 through link 1 (Fa1/1) and network 192.168.32.0/24 through link 2 (Fa2/0).

We can also check it with extended ping from R4, ping from 192.168.41.0/24 to 192.168.31.0/24:

R4#ping
Protocol [ip]:
Target IP address: 192.168.31.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 192.168.41.1
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]: Record
Number of hops [ 9 ]:
Loose, Strict, Record, Timestamp, Verbose[RV]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.31.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.41.1
Packet has IP options:  Total option bytes= 39, padded length=40
 Record route: <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)

Reply to request 0 (228 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.1.12.2)
   (10.1.13.1)
   (192.168.31.1)
   (10.1.13.3)
   (10.1.12.1)
   (10.1.24.2)
   (192.168.41.1) <*>
   (0.0.0.0)
 End of list

Reply to request 1 (52 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.1.12.2)
   (10.1.13.1)
   (192.168.31.1)
   (10.1.13.3)
   (10.1.12.1)
   (10.1.24.2)
   (192.168.41.1) <*>
   (0.0.0.0)
 End of list

Reply to request 2 (44 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.1.12.2)
   (10.1.13.1)
   (192.168.31.1)
   (10.1.13.3)
   (10.1.12.1)
   (10.1.24.2)
   (192.168.41.1) <*>
   (0.0.0.0)
 End of list

Reply to request 3 (100 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.1.12.2)
   (10.1.13.1)
   (192.168.31.1)
   (10.1.13.3)
   (10.1.12.1)
   (10.1.24.2)
   (192.168.41.1) <*>
   (0.0.0.0)
 End of list

Reply to request 4 (72 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.1.12.2)
   (10.1.13.1)
   (192.168.31.1)
   (10.1.13.3)
   (10.1.12.1)
   (10.1.24.2)
   (192.168.41.1) <*>
   (0.0.0.0)
 End of list

Success rate is 100 percent (5/5), round-trip min/avg/max = 44/99/228 ms

Ping from 192.168.42.0/24 to 192.168.31.0/24:

R4#ping
Protocol [ip]:
Target IP address: 192.168.31.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 192.168.42.1
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]: Record
Number of hops [ 9 ]:
Loose, Strict, Record, Timestamp, Verbose[RV]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.31.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.42.1
Packet has IP options:  Total option bytes= 39, padded length=40
 Record route: <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)

Reply to request 0 (116 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.1.12.2)
   (10.1.13.1)
   (192.168.31.1)
   (10.1.13.3)
   (10.2.12.1)
   (10.1.24.2)
   (192.168.42.1) <*>
   (0.0.0.0)
 End of list

Reply to request 1 (68 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.1.12.2)
   (10.1.13.1)
   (192.168.31.1)
   (10.1.13.3)
   (10.2.12.1)
   (10.1.24.2)
   (192.168.42.1) <*>
   (0.0.0.0)
 End of list

Reply to request 2 (40 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.1.12.2)
   (10.1.13.1)
   (192.168.31.1)
   (10.1.13.3)
   (10.2.12.1)
   (10.1.24.2)
   (192.168.42.1) <*>
   (0.0.0.0)
 End of list

Reply to request 3 (116 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.1.12.2)
   (10.1.13.1)
   (192.168.31.1)
   (10.1.13.3)
   (10.2.12.1)
   (10.1.24.2)
   (192.168.42.1) <*>
   (0.0.0.0)
 End of list

Reply to request 4 (48 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.1.12.2)
   (10.1.13.1)
   (192.168.31.1)
   (10.1.13.3)
   (10.2.12.1)
   (10.1.24.2)
   (192.168.42.1) <*>
   (0.0.0.0)
 End of list

Success rate is 100 percent (5/5), round-trip min/avg/max = 40/77/116 ms

And ping from 192.168.42.0/24 to 192.168.32.0/24:


R4#ping
Protocol [ip]: 
Target IP address: 192.168.32.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 192.168.42.1
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]: Record
Number of hops [ 9 ]:
Loose, Strict, Record, Timestamp, Verbose[RV]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.32.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.42.1
Packet has IP options:  Total option bytes= 39, padded length=40
 Record route: <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)

Reply to request 0 (160 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.2.12.2)
   (10.1.13.1)
   (192.168.32.1)
   (10.1.13.3)
   (10.2.12.1)
   (10.1.24.2)
   (192.168.42.1) <*>
   (0.0.0.0)
 End of list

Reply to request 1 (76 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.2.12.2)
   (10.1.13.1)
   (192.168.32.1)
   (10.1.13.3)
   (10.2.12.1)
   (10.1.24.2)
   (192.168.42.1) <*>
   (0.0.0.0)
 End of list

Reply to request 2 (48 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.2.12.2)
   (10.1.13.1)
   (192.168.32.1)
   (10.1.13.3)
   (10.2.12.1)
   (10.1.24.2)
   (192.168.42.1) <*>
   (0.0.0.0)
 End of list

Reply to request 3 (108 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.2.12.2)
   (10.1.13.1)
   (192.168.32.1)
   (10.1.13.3)
   (10.2.12.1)
   (10.1.24.2)
   (192.168.42.1) <*>
   (0.0.0.0)
 End of list

Reply to request 4 (72 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (10.1.24.4)
   (10.2.12.2)
   (10.1.13.1)
   (192.168.32.1)
   (10.1.13.3)
   (10.2.12.1)
   (10.1.24.2)
   (192.168.42.1) <*>
   (0.0.0.0)
 End of list

Success rate is 100 percent (5/5), round-trip min/avg/max = 48/92/160 ms

We can see that the traffic is traversing on the correct links according to our route manipulation.

Now let’s shut down link 2 (Fa2/0) on R2 and see R1 routing table:

R1#
*Sep 11 14:05:57.502: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 10.2.12.2 (FastEthernet2/0) is down: holding time expired
R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

S    192.168.31.0/24 [1/0] via 10.1.13.3
D EX 192.168.42.0/24 [170/25602560] via 10.1.12.2, 00:00:03, FastEthernet1/1
D EX 192.168.41.0/24 [170/30720] via 10.1.12.2, 01:33:02, FastEthernet1/1
     10.0.0.0/24 is subnetted, 4 subnets
C       10.2.12.0 is directly connected, FastEthernet2/0
C       10.1.13.0 is directly connected, FastEthernet1/0
C       10.1.12.0 is directly connected, FastEthernet1/1
D       10.1.24.0 [90/30720] via 10.1.12.2, 00:00:03, FastEthernet1/1
S    192.168.32.0/24 [1/0] via 10.1.13.3

Soon as the neighbor goes down R1 has got both networks through link 1, note the metric of network 2





1 comment:

  1. Best Places To Bet On Boxing - Mapyro
    Where To 토토 Bet On Boxing. It's a sports betting event in which you bet on the outcome of a game. In 출장안마 the boxing world, casinosites.one each 1xbet 먹튀 player must decide if or not to

    ReplyDelete