Sunday, February 27, 2011

EIGRP & OSPF Mutual Redistribution

There are two network types exist in this lab; EIGRP 100 and OSPF
Both internal and external routes will redistribute each other through R2 and R3.

Download complete GNS3 lab files from https://docs.google.com/leaf?id=0B889ogd4ltI2OWUwOTIxZjQtNGVmYS00M2FlLWI2MjEtZDI5MzVlNmRiYWVk&hl=en&authkey=CITduiY

Here is lab topology



















The lab objectives are as follow;






The main point of this lab is how to block the routes from EIGRP network  pass through R2 and R3 not to inject back to EIGRP as external routes.
At the same time, how to prevent routes from OSPF network redistributed to EIGRP through R3 and R2 to inject back to OSPF as external routes.

All of the above two goals are achieve by using route-map and access-lists in both R2 and R3.

(1) Check R2's EIGRP to OSPF redistribution

router ospf 1
 log-adjacency-changes
 redistribute eigrp 100 subnets route-map EIGRP-TO-OSPF
 network 10.1.12.0 0.0.0.255 area 0

Let's check route-map EIGRP-TO-OSPF
------------------------
route-map EIGRP-TO-OSPF deny 5
 match tag 40
!
route-map EIGRP-TO-OSPF permit 10
 match ip address 1
 set metric 100
 set tag 10
!
route-map EIGRP-TO-OSPF permit 20
 match ip address 2
 set metric 200
 set tag 20
!
route-map EIGRP-TO-OSPF deny 30
 match ip address 3
!
route-map EIGRP-TO-OSPF permit 40
 set metric 300
 set tag 30
-----------------------------------------
Interstringly, match tag 40 is deny. Let's see detail of tag 40. Tag 40 is the redistribute routes from OSPF to EIGRP through R2 and R3.
All the access list used for redistrubtion of EIGRP to OSPF are using tag 10 for (10.4.0.0, 10.4.1.0), tag 20 (10.4.2.0, 10.4.3.0) and tag 30
for others.

access-list 1 permit 10.4.0.0 0.0.0.255
access-list 1 permit 10.4.1.0 0.0.0.255
access-list 2 permit 10.4.2.0 0.0.0.255
access-list 2 permit 10.4.3.0 0.0.0.255
access-list 3 permit 10.4.4.0 0.0.0.255
=====================

Route-map configuration for redistrubution from OSPF to EIGRP in R2 are as follow;

route-map OSPF-TO-EIGRP deny 5
 match tag 10 20 30
!
(* The above route-map is for blocking networks from EIGRP to injecting to network itself.)

route-map OSPF-TO-EIGRP permit 10
 set metric 400 20 255 1 1500
 set tag 40
---------------

router ospf 1
 log-adjacency-changes
 redistribute eigrp 100 subnets route-map EIGRP-TO-OSPF
 network 10.1.12.0 0.0.0.255 area 0


======================================================
Let's start in R3 configutation in detail. All of the route-maps and configurtation will be the same as in R2 as the lab demonstrate for mutual redistrubution.
Route configurations are as follow;

router eigrp 100
 redistribute ospf 1 route-map OSPF-TO-EIGRP
 network 10.1.23.0 0.0.0.255
 no auto-summary
!
router ospf 1
 log-adjacency-changes
 redistribute eigrp 100 subnets route-map EIGRP-TO-OSPF
 network 10.1.13.0 0.0.0.255 area 0
-------------------
Route-map configuation are as follow;

route-map EIGRP-TO-OSPF deny 5
 match tag 40
!
route-map EIGRP-TO-OSPF permit 10
 match ip address 1
 set metric 100
 set tag 10
!
route-map EIGRP-TO-OSPF permit 20
 match ip address 2
 set metric 200
 set tag 20
!
route-map EIGRP-TO-OSPF deny 30
 match ip address 3
!
route-map EIGRP-TO-OSPF permit 40
 set metric 300
 set tag 30
!
route-map OSPF-TO-EIGRP deny 5
 match tag 10 20 30
!
route-map OSPF-TO-EIGRP permit 10
 set metric 400 20 255 1 1500
 set tag 40

==========================================
Final goal of the lab can achive as follow;

To reach R1's loopback 10.1.0.0 network from R4, default path is R4-R2-R1. Instead of using this path, how to establish to achive as the path
R4-R2-R3-R1. The solution is to change the advertised EIGRP distance from 110 to 105.

Configuration in R2 is as follow;

router eigrp 100
 redistribute ospf 1 route-map OSPF-TO-EIGRP
 network 10.1.23.0 0.0.0.255
 network 10.1.24.0 0.0.0.255
 distance eigrp 90 105
 no auto-summary
======================

Checking whether routes are going as R4-R2-R3-R1 path using traceroute in R4 as follow;

R4#traceroute 10.1.0.1


Type escape sequence to abort.
Tracing the route to 10.1.0.1


  1 10.1.24.2 52 msec 32 msec 40 msec
  2 10.1.23.3 48 msec 32 msec 28 msec
  3 10.1.13.1 52 msec *  76 msec
=======================

Route in R2 are as follow.

     10.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
D EX    10.1.13.0/24 [105/6917120] via 10.1.23.3, 00:47:56, Serial1/1
C       10.1.12.0/24 is directly connected, Serial1/0
D       10.4.4.0/24 [90/2297856] via 10.1.24.4, 00:47:56, Serial1/2
D EX    10.1.0.1/32 [105/6917120] via 10.1.23.3, 00:47:54, Serial1/1
D       10.4.2.0/24 [90/2297856] via 10.1.24.4, 00:47:56, Serial1/2
D       10.4.3.0/24 [90/2297856] via 10.1.24.4, 00:47:56, Serial1/2
D       10.4.0.0/24 [90/2297856] via 10.1.24.4, 00:47:56, Serial1/2
D       10.4.1.0/24 [90/2297856] via 10.1.24.4, 00:47:56, Serial1/2
C       10.1.24.0/24 is directly connected, Serial1/2
C       10.1.23.0/24 is directly connected, Serial1/1
-------------------------
Route in R3 are as follow;

     10.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
C       10.1.13.0/24 is directly connected, Serial1/0
O       10.1.12.0/24 [110/128] via 10.1.13.1, 00:48:27, Serial1/0
D       10.4.4.0/24 [90/2809856] via 10.1.23.2, 00:48:28, Serial1/1
O       10.1.0.1/32 [110/65] via 10.1.13.1, 00:48:27, Serial1/0
D       10.4.2.0/24 [90/2809856] via 10.1.23.2, 00:48:28, Serial1/1
D       10.4.3.0/24 [90/2809856] via 10.1.23.2, 00:48:28, Serial1/1
D       10.4.0.0/24 [90/2809856] via 10.1.23.2, 00:48:28, Serial1/1
D       10.4.1.0/24 [90/2809856] via 10.1.23.2, 00:48:28, Serial1/1
D       10.1.24.0/24 [90/2681856] via 10.1.23.2, 00:48:28, Serial1/1
C       10.1.23.0/24 is directly connected, Serial1/1
---------------------

Route in R4 (EIGRP) are as follow;

     10.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
D EX    10.1.13.0/24 [170/7429120] via 10.1.24.2, 00:49:16, Serial1/0
D EX    10.1.12.0/24 [170/6917120] via 10.1.24.2, 00:49:16, Serial1/0
C       10.4.4.0/24 is directly connected, Loopback4
D EX    10.1.0.1/32 [170/7429120] via 10.1.24.2, 00:49:14, Serial1/0
C       10.4.2.0/24 is directly connected, Loopback2
C       10.4.3.0/24 is directly connected, Loopback3
C       10.4.0.0/24 is directly connected, Loopback0
C       10.4.1.0/24 is directly connected, Loopback1
C       10.1.24.0/24 is directly connected, Serial1/0
D       10.1.23.0/24 [90/2681856] via 10.1.24.2, 00:49:16, Serial1/0

-----------------------
Route in R1 (OSPF) are as follow. As there are two routes path receiving external routers, R2 and R3, two load balacing paths are found.

     10.0.0.0/24 is subnetted, 9 subnets
C       10.1.13.0 is directly connected, Serial1/1
C       10.1.12.0 is directly connected, Serial1/0
C       10.1.0.0 is directly connected, Loopback0
O E2    10.4.2.0 [110/200] via 10.1.13.3, 00:49:37, Serial1/1
                 [110/200] via 10.1.12.2, 00:49:37, Serial1/0
O E2    10.4.3.0 [110/200] via 10.1.13.3, 00:49:37, Serial1/1
                 [110/200] via 10.1.12.2, 00:49:37, Serial1/0
O E2    10.4.0.0 [110/100] via 10.1.13.3, 00:49:37, Serial1/1
                 [110/100] via 10.1.12.2, 00:49:37, Serial1/0
O E2    10.4.1.0 [110/100] via 10.1.13.3, 00:49:37, Serial1/1
                 [110/100] via 10.1.12.2, 00:49:37, Serial1/0
O E2    10.1.24.0 [110/300] via 10.1.12.2, 00:49:37, Serial1/0
                  [110/300] via 10.1.13.3, 00:49:37, Serial1/1
O E2    10.1.23.0 [110/300] via 10.1.12.2, 00:49:38, Serial1/0
                  [110/300] via 10.1.13.3, 00:49:38, Serial1/1

No comments:

Post a Comment