Friday, 26 July 2013

Redistribution configuration with example - EIGRP and OSPF

This post explains the re-distributional behaviors of OSPF and EIGRP routing protocols. I believe that you already have a little knowledge about both of those protocols.

What is Redistribution?

Route Redistribution allows routes from one routing protocol to be advertised into another routing protocol. The routing protocol receiving these redistributed routes usually marks the routes as external. External routes are usually less preferred than locally-originated routes.
At least one redistribution point needs to exist between the two routing domains. This device will actually run both routing protocols. Thus, to perform redistribution in the following example, R2 would require at least one interface in both the EIGRP and OSPF Routing domains.
It is possible to redistribute from one routing protocol to the same routing protocol, such as between two separate OSPF domains (distinguished by unique process ID’s). Static routes and connected interfaces can be redistributed into a routing protocol as well.

Routes will only be redistributed if they exist in the routing table. Routes that are simply in a topology database (for example, an EIGRP Feasible Successor), will never be redistributed.

Routing metrics are a key consideration when performing route redistribution. With the exception of IGRP and EIGRP, each routing protocol utilizes a unique (and thus incompatible) metric. Routes redistributed from the injecting protocol must be manually (or globally) stamped with a metric that is understood by the receiving protocol. 

Before we Start:

I want to clarify some common doubts which confuses much before we proceed.

  1. A single network link cannot have two routing protocols running, I mean you cannot run EIGRP in R3's f0/0 when OSPF is running on R2's f0/1
  2. At least a router should be placed to redistribute the protocols (In our case R2 is doing the redistribution job)
  3. Redistribution is possible between any two routing protocols. 
  4. If you do not mention any Metric values while redistributing, protocols take a default metric called Seed Metric.
  5. Routing protocols are enabled based on ports(interface).
  6. All you need to know is only one command redistribute. The syntax of the command will vary according to the protocol being redistributed. I recommend you to check Cisco man pages to know more. The following figure could give you some idea.

Objectives:

  1. Create 2 loopback interfaces in all the routers (R1, R2, R3)
  2. Configure the physical links and bring them up
  3. Configure routing protocol and do redistribution in R2 router
  4. Verify the configurations

Configuration:

Our Topology looks like this. (See the picture above)

  1. Three routers are interconnected by Fast Ethernet cables
  2. R1 is running OSPF, R3 is running EIGRP, whereas R2 is running both of those routing protocols.
  3. Each router is having two loopback interfaces (A logical interface created for this lab purpose) 
Now we are ready to move on to the configurations.

Step1: Configuring the interfaces: 

First you have to get into Global configuration mode.

R1:

interface Loopback1
 ip address 1.1.1.1 255.255.255.255
 !
interface Loopback2
 ip address 11.11.11.11 255.255.255.255
 !
interface FastEthernet0/0
 ip address 10.0.0.1 255.255.255.252
 no shut

R2:

interface Loopback1
 ip address 2.2.2.2 255.255.255.255
!
interface Loopback2
 ip address 22.22.22.22 255.255.255.255
!

interface FastEthernet0/0
 ip address 10.0.0.2 255.255.255.252
 no shut
 ip ospf 1 area 0
!
interface FastEthernet0/1
 ip address 10.0.0.5 255.255.255.252
 no shut

R3:

interface Loopback1
 ip address 3.3.3.3 255.255.255.255
!
interface Loopback2
 ip address 33.33.33.33 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.0.0.6 255.255.255.252
 no shut


Now, all the interfaces should be up. Sample output from R2 is below.

R2#sh ip int br | i up
FastEthernet0/0            10.0.0.2        YES manual up                    up
FastEthernet0/1            10.0.0.5        YES manual up                    up
Loopback1                  2.2.2.2         YES manual up                    up
Loopback2                  22.22.22.22     YES manual up                    up

Step 2: Configuring Routing Protocols EIGRP and OSPF

Now, we can configure routing protocols in all the routers. Kindly figure out the configuration settings required below.

R1: (Just to show you that you can enable routing protocols per based ports also)

interface Loopback1
 ip ospf 1 area 0
!
interface Loopback2
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip ospf 1 area 0
!

R2:

router eigrp 1
 redistribute ospf 1 metric 10000 1 255 1 1500
 network 2.2.2.2 0.0.0.0
 network 10.0.0.4 0.0.0.3
 network 22.22.22.22 0.0.0.0
 no auto-summary
!
router ospf 1
 log-adjacency-changes
 redistribute eigrp 1 metric 50000 subnets
 network 10.0.0.0 0.0.0.3 area 0
!

R3:

router eigrp 1
 network 3.3.3.3 0.0.0.0
 network 10.0.0.4 0.0.0.3
 network 33.33.33.33 0.0.0.0
 auto-summary

Verification

We are done with the configuration here. All we need to do now is verification of the configurations. Which can be done show commands :)

First I want to show you the routing tables of all three routers. According to our configuration all routes should be advertised.

R1:

R1#sh ip rou
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

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback1
     2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2    2.2.2.2/32 [110/50000] via 10.0.0.2, 03:09:20, FastEthernet0/0
O E2    2.0.0.0/8 [110/50000] via 10.0.0.2, 03:09:20, FastEthernet0/0
O E2 33.0.0.0/8 [110/50000] via 10.0.0.2, 03:07:59, FastEthernet0/0
O E2 3.0.0.0/8 [110/50000] via 10.0.0.2, 03:08:06, FastEthernet0/0
     22.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2    22.22.22.22/32 [110/50000] via 10.0.0.2, 03:09:07, FastEthernet0/0
O E2    22.0.0.0/8 [110/50000] via 10.0.0.2, 03:09:07, FastEthernet0/0
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C       10.0.0.0/30 is directly connected, FastEthernet0/0
O E2    10.0.0.0/8 [110/50000] via 10.0.0.2, 03:09:20, FastEthernet0/0
O E2    10.0.0.4/30 [110/50000] via 10.0.0.2, 03:09:38, FastEthernet0/0
     11.0.0.0/32 is subnetted, 1 subnets
C       11.11.11.11 is directly connected, Loopback2
R1#

R2:

R2#sh ip rou
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

     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/2] via 10.0.0.1, 03:12:24, FastEthernet0/0
     2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       2.2.2.2/32 is directly connected, Loopback1
D       2.0.0.0/8 is a summary, 03:11:47, Null0
D    33.0.0.0/8 [90/156160] via 10.0.0.6, 03:10:26, FastEthernet0/1
D    3.0.0.0/8 [90/156160] via 10.0.0.6, 03:10:32, FastEthernet0/1
     22.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       22.22.22.22/32 is directly connected, Loopback2
D       22.0.0.0/8 is a summary, 03:11:34, Null0
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C       10.0.0.0/30 is directly connected, FastEthernet0/0
D       10.0.0.0/8 is a summary, 03:11:47, Null0
C       10.0.0.4/30 is directly connected, FastEthernet0/1
     11.0.0.0/32 is subnetted, 1 subnets
O       11.11.11.11 [110/2] via 10.0.0.1, 03:12:25, FastEthernet0/0
R2#

R3:

R3#sh ip rou
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

     1.0.0.0/32 is subnetted, 1 subnets
D EX    1.1.1.1 [170/258816] via 10.0.0.5, 03:11:15, FastEthernet0/0
D    2.0.0.0/8 [90/156160] via 10.0.0.5, 03:11:15, FastEthernet0/0
     33.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       33.33.33.33/32 is directly connected, Loopback2
D       33.0.0.0/8 is a summary, 03:10:57, Null0
     3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       3.3.3.3/32 is directly connected, Loopback1
D       3.0.0.0/8 is a summary, 03:11:04, Null0
D    22.0.0.0/8 [90/156160] via 10.0.0.5, 03:11:15, FastEthernet0/0
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
D EX    10.0.0.0/30 [170/258816] via 10.0.0.5, 03:11:15, FastEthernet0/0
D       10.0.0.0/8 is a summary, 03:11:04, Null0
C       10.0.0.4/30 is directly connected, FastEthernet0/0
     11.0.0.0/32 is subnetted, 1 subnets
D EX    11.11.11.11 [170/258816] via 10.0.0.5, 03:11:15, FastEthernet0/0
R3#

As expected, all the routes are being advertised and we can see them in the routing table.

Hope you understood the redistribution concept, let me know in case of any doubts!


Share:

0 comments:

Post a Comment