EIGRP Redistribution – Changing Metric and AD

This is using the same Topology setup as the RIP / OSPF Redistribution posts, however as noted in micro-text on the Topology below, I’ve changed the OSPF Area 0 to EIGRP AS 100, and removed any loopbacks in the EIGRP route domain as they are not necessary for now:

EIGRPtoRIP_Redist_Top

To change the metric or ‘seed metric’ in EIGRP, you have two options / commands:

  • “default-metric 1544 10 255 1 1500” in router configuration mode for EIGRP, this changes all seed metrics to use the following values to calculate it, those numbers in order being Bandwidth, Delay, Reliability, BW Again, and MTU – This changes the default metric for all Redistributed routes into the EIGRP routing domain
  • “redistribute rip metric …” to only change the metric for routes coming from a particular protocol, whereas “default-metric …” sets a seed for all protocols

Here is an example, step by step, of configuring Redistributing RIP into the EIGRP routing domain, with ?’s to see what about is required, and also how the routes change.

Here is R2’s routes to R1’s Loopbacks before Redistribution:

R2#show ip route rip
20.0.0.0/24 is subnetted, 1 subnets
R       20.1.1.0 [120/1] via 172.12.123.1, 00:00:04, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
R       10.1.1.0 [120/1] via 172.12.123.1, 00:00:04, Serial0/0
15.0.0.0/24 is subnetted, 1 subnets
R       15.1.1.0 [120/1] via 172.12.123.1, 00:00:04, Serial0/0

Now I will do Redistribution, and ? every step of the way to demonstrate the metrics needed to input, first time around we will define the protocol the metric is being set for:

R3(config)#router eigrp 100
R3(config-router)#redist rip ?
metric     Metric for redistributed routes
route-map  Route map reference
<cr>

R3(config-router)#redist rip metric ?
<1-4294967295>  Bandwidth metric in Kbits per second

R3(config-router)#redist rip metric 1544 ?
<0-4294967295>  EIGRP delay metric, in 10 microsecond units

R3(config-router)#redist rip metric 1544 10 ?
<0-255>  EIGRP reliability metric where 255 is 100% reliable

R3(config-router)#redist rip metric 1544 10 255 ?
<1-255>  EIGRP Effective bandwidth metric (Loading) where 255 is 100% loaded

R3(config-router)#redist rip metric 1544 10 255 1 ?
<1-65535>  EIGRP MTU of the path

R3(config-router)#redist rip metric 1544 10 255 1 1500 ?
route-map  Route map reference
<cr>

R3(config-router)#redist rip metric 1544 10 255 1 1500
R3(config-router)#

Now RIP Routes will be Redistributing into the EIGRP routing domain, however only the seed metric was adjusted so far, NOT the AD. Now to see if it affected R2’s routes:

R2#show ip route rip
20.0.0.0/24 is subnetted, 1 subnets
R       20.1.1.0 [120/1] via 172.12.123.1, 00:00:09, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
R       10.1.1.0 [120/1] via 172.12.123.1, 00:00:09, Serial0/0
15.0.0.0/24 is subnetted, 1 subnets
R       15.1.1.0 [120/1] via 172.12.123.1, 00:00:09, Serial0/0

Same thing, which should be happening, as RIP’s AD of 120 is lower than EIGRP External route AD of 170, but I want to confirm they are still known to R2 as backup routes so I tested this by shutting down the interface in the RIP routing domain:

R2(config)#int s0/0
R2(config-if)#shut
R2(config-if)#
*Mar  1 10:17:49.899: %LINK-5-CHANGED: Interface Serial0/0, changed state to administratively down
*Mar  1 10:17:50.901: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
R2(config-if)#do show ip route rip

R2(config-if)#do show ip route eigrp
20.0.0.0/24 is subnetted, 1 subnets
D EX    20.1.1.0 [170/1662976] via 30.1.1.3, 00:00:22, FastEthernet0/0
172.12.0.0/24 is subnetted, 1 subnets
D EX    172.12.123.0 [170/1662976] via 30.1.1.3, 00:00:22, FastEthernet0/0
10.0.0.0/24 is subnetted, 1 subnets
D EX    10.1.1.0 [170/1662976] via 30.1.1.3, 00:00:22, FastEthernet0/0
15.0.0.0/24 is subnetted, 1 subnets
D EX    15.1.1.0 [170/1662976] via 30.1.1.3, 00:00:22, FastEthernet0/0

And there are the EIGRP routes once that RIP interface drops.

Now I am going to try a different approach to setting the seed metric, using the “default-metric” command, then just doing “redistribute eigrp” on the ASBR to see how or if this changes the routes and metrics being passed to R2 (after removing old Redist commands):

R3(config-router)#no redist rip metric 1544 10 255 1 1500
R3(config-router)#default-metric 1544 10 255 1 1500
R3(config-router)#redist rip

Then go over to R2 to verify if any behaviors changed between the two methods:

R2#show ip route rip
20.0.0.0/24 is subnetted, 1 subnets
R       20.1.1.0 [120/1] via 172.12.123.1, 00:00:11, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
R       10.1.1.0 [120/1] via 172.12.123.1, 00:00:11, Serial0/0
15.0.0.0/24 is subnetted, 1 subnets
R       15.1.1.0 [120/1] via 172.12.123.1, 00:00:11, Serial0/0
R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#int s0/0
R2(config-if)#shut
R2(config-if)#
*Mar  1 10:56:01.227: %LINK-5-CHANGED: Interface Serial0/0, changed state to administratively down
*Mar  1 10:56:02.229: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
R2(config-if)#do show ip route eigrp
20.0.0.0/24 is subnetted, 1 subnets
D EX    20.1.1.0 [170/1662976] via 30.1.1.3, 00:00:12, FastEthernet0/0
172.12.0.0/24 is subnetted, 1 subnets
D EX    172.12.123.0 [170/1662976] via 30.1.1.3, 00:00:12, FastEthernet0/0
10.0.0.0/24 is subnetted, 1 subnets
D EX    10.1.1.0 [170/1662976] via 30.1.1.3, 00:00:12, FastEthernet0/0
15.0.0.0/24 is subnetted, 1 subnets
D EX    15.1.1.0 [170/1662976] via 30.1.1.3, 00:00:12, FastEthernet0/0
R2(config-if)#

Nothing has changed at all, except that the default metric of EIGRP routes will be calculated from the values configured on “default-metric” – However I was wondering what would happen if I just did “redist rip” without any sort of metric changing? Here is what it looks like:

R3(config)#router eigrp 100
R3(config-router)#no redist rip
R3(config-router)#no default-metric 1544 10 255 1 1500
R3(config-router)#redist rip
R3(config-router)#
ASR#2
[Resuming connection 2 to r2 … ]

*Mar  1 11:10:18.673: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 11:10:19.402: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up[OK]
R2#sh ip route rip
20.0.0.0/24 is subnetted, 1 subnets
R       20.1.1.0 [120/1] via 172.12.123.1, 00:00:26, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
R       10.1.1.0 [120/1] via 172.12.123.1, 00:00:26, Serial0/0
15.0.0.0/24 is subnetted, 1 subnets
R       15.1.1.0 [120/1] via 172.12.123.1, 00:00:26, Serial0/0
R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#int s0/0
R2(config-if)#shut
R2(config-if)#
*Mar  1 11:42:32.118: %LINK-5-CHANGED: Interface Serial0/0, changed state to administratively down
*Mar  1 11:42:33.120: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
R2(config-if)#do show ip route eigrp

R2(config-if)#

There is nothing at all to display, and that is because EIGRP much alike RIP does not have a default or ‘seed’ metric for Redistribution, so if you do not enter metric values using either of the above methods than we do not get EIGRP Redistribution of RIP routes!

 

Now to work with Administrative Distance on the Boarder Router

First I wanted to try the “distance # (IP) (WC Mask)” first to see how this would react with EIGRP, as with OSPF it uses the sources routers RID but EIGRP has no RID to be used:

R2(config-router)#distance 119 30.1.1.3 0.0.0.0
R2(config-router)#^Z
R2#
*Mar  1 13:45:39.095: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 30.1.1.5 (FastEthernet0/0) is down: route configuration changed
*Mar  1 13:45:39.095: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 30.1.1.4 (FastEthernet0/0) is down: route configuration changed
*Mar  1 13:45:39.099: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 30.1.1.3 (FastEthernet0/0) is down: route configuration changed
R2#clear
*Mar  1 13:45:40.157: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 13:45:40.237: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 30.1.1.5 (FastEthernet0/0) is up: new adjacency
*Mar  1 13:45:40.249: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 30.1.1.4 (FastEthernet0/0) is up: new adjacency
*Mar  1 13:45:40.253: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 30.1.1.3 (FastEthernet0/0) is up: new adjacency
R2#show ip route
[Route codes redacted]

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback2
20.0.0.0/24 is subnetted, 1 subnets
R       20.1.1.0 [120/1] via 172.12.123.1, 00:00:17, Serial0/0
172.12.0.0/24 is subnetted, 1 subnets
C       172.12.123.0 is directly connected, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
R       10.1.1.0 [120/1] via 172.12.123.1, 00:00:17, Serial0/0
30.0.0.0/24 is subnetted, 1 subnets
C       30.1.1.0 is directly connected, FastEthernet0/0
15.0.0.0/24 is subnetted, 1 subnets
R       15.1.1.0 [120/1] via 172.12.123.1, 00:00:18, Serial0/0

So this essentially changed nothing in the case of Redistribution, and this has not been covered yet in material I have studied (which all uses ‘distance eigrp …’), so I have to assume this changes the distance of Internal EIGRP routes which I will later try to confirm.

However, I did confirm with EIGRP, the distance command by itself did use the source routers neighbor interface address, as the adjacencies did drop but immediately reformed, so it did change something on the network – Unfortunately my AS is all on one Ethernet segment so there isn’t any dynamic learning of routes at this time. VERY INTERESTING.

Moving right along, we will do this the tried and true method using ‘distance eigrip …’:

R2(config-router)#distance eigrp 90 119
R2(config-router)#do show ip route
[Route codes redacted]

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback2
20.0.0.0/24 is subnetted, 1 subnets
D EX    20.1.1.0 [119/1660672] via 30.1.1.3, 00:02:03, FastEthernet0/0
172.12.0.0/24 is subnetted, 1 subnets
C       172.12.123.0 is directly connected, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
D EX    10.1.1.0 [119/1660672] via 30.1.1.3, 00:02:03, FastEthernet0/0
30.0.0.0/24 is subnetted, 1 subnets
C       30.1.1.0 is directly connected, FastEthernet0/0
15.0.0.0/24 is subnetted, 1 subnets
D EX    15.1.1.0 [119/1660672] via 30.1.1.3, 00:02:04, FastEthernet0/0

A couple of important thing to note with the above command, and following output:

  • When entering the command, the first number is Internal AD and the second is External routes AD, I did not need to type internal or external, and Internal will always come before the external #
  • I provided an External AD lower than RIP’s default AD of 120, so routes leading to the NBMA RIP network are now being placed into the route table, as when two paths to the same destination are presented to a router the lowest AD is the tie breaker
  • “Distance eigrp …” is the option you MUST use to change the AD of routes being Redistributed, however there is no further options to filter changes to Administrative Distance so you must use a Distribution-List on the ASBR to filter routes

And this is where the lesson ends on Changing the Seed Metric and Administrative Distance for EIGRP, as now we have come to the point that to filter certain routes, change the AD for certain routes, etc, we will need Distribution-Lists and even Route-Maps on the router doing the Redistribution to make that happen.

 

OSPF to RIP, 4 ways to change AD, Sub-Optimal Routing & Route Loops

I will be using the same Topology for this lab to demonstrate 4 different ways to Redistribute OSPF routes, using the same Topology as before as follows:

OSPFtoRIP_Redist_Top

I removed the static route from R5 as a return route to RIP land, and will now be doing 2 way redistribution between the routing domains, but first wanted to touch on sub-optimal routing and routing loops in general to the extent of my understanding this far into Redistribution studies.

First, Routing Loops can occur when you do not plan your redistributing carefully, and bring in unnecessary routes or enter blanket redistribution statements like “redistribute connected subnets” or “redistribute static subnets” when you have none that currently need to be Redistributed. This can lead to someone in the future entering a static route, not knowing it is being Redistributed, and thus creating a routing loop without knowing it.

This can also lead to sub-optimal routing situations, like the one we will see when I introduce RIP routes in the OSPF routing domain, as the routing table will always bring in the route with the lowest Administrative Distance as the preferred route to a destination network if there are matching routes so we need to know how to manipulate those to overcome sub-optimal routing!

There are several ways of changing Administrative Distance for protocols to overcome sub-optimal routing, including the following different approaches:

  • Changing the AD for an entire Routing Protocol
  • Changing the AD for all routes from a specific protocol, from a specific source
  • Changing the AD for specific routes via access-list
  • Changing the AD for OSPF External, Inter-Area, and Intra-Area routes

***One thing to note, these will always (at this time in my studies) be configured on Boarder Routers or ABR’s, and not on the ASBR doing the Redistribution.***

First let’s look at R2’s full routing table to see where it’s routes are pointing, and what is happening BEFORE we introduce two-way Redistribution injecting RIP routes into the OSPF routing domain:

R2#show ip route
[Route codes redacted]

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback2
3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/2] via 172.12.123.3, 00:00:11, Serial0/0
4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/2] via 30.1.1.4, 01:04:49, FastEthernet0/0
5.0.0.0/32 is subnetted, 1 subnets
O IA    5.5.5.5 [110/2] via 30.1.1.5, 01:04:49, FastEthernet0/0
172.12.0.0/24 is subnetted, 1 subnets
C       172.12.123.0 is directly connected, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
R       10.1.1.0 [120/1] via 172.12.123.1, 00:00:12, Serial0/0
30.0.0.0/24 is subnetted, 1 subnets
C       30.1.1.0 is directly connected, FastEthernet0/0

To begin I removed the Static route from the R5 as the return route to the RIP domain, and now I will perform two-way Redistribution:

R3(config-router)#redistribute rip subnets
R3(config-router)#
ASR#2
[Resuming connection 2 to r2 … ]

R2#show ip route
[Route codes redacted]

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback2
3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/2] via 172.12.123.3, 00:00:12, Serial0/0
4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/2] via 30.1.1.4, 00:00:19, FastEthernet0/0
5.0.0.0/32 is subnetted, 1 subnets
O IA    5.5.5.5 [110/2] via 30.1.1.5, 00:00:19, FastEthernet0/0
172.12.0.0/24 is subnetted, 1 subnets
C       172.12.123.0 is directly connected, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
O E2    10.1.1.0 [110/20] via 30.1.1.3, 00:00:21, FastEthernet0/0
30.0.0.0/24 is subnetted, 1 subnets
C       30.1.1.0 is directly connected, FastEthernet0/0

 

The Loopback on R1 of 10.1.1.0/24 is now showing as an External OSPF route, which means traffic going through R2 towards R1’s loopback network will be forced to take R2-R3-R1, rather than directly from R2-R1 over the NBMA network – This is the beginning of sub-optimal routing. To address this, the AD for OSPF routes needs to be made to be higher than RIPs AD of 120, so it will be changed to 121 on the ABR firstly to see what happens.

This first method I will try will be changing the AD directly on the ABR, so that all OSPF routes learned by the router will have an AD of 121:

R2(config-router)#distance 121
R2(config-router)#
*Mar  1 09:40:04.746: %SYS-5-CONFIG_I: Configured from console by console
R2#show ip route
[Route codes redacted]

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback2
3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/2] via 172.12.123.3, 00:00:08, Serial0/0
4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/3] via 172.12.123.3, 00:00:08, Serial0/0
5.0.0.0/32 is subnetted, 1 subnets
R       5.5.5.5 [120/3] via 172.12.123.3, 00:00:08, Serial0/0
172.12.0.0/24 is subnetted, 1 subnets
C       172.12.123.0 is directly connected, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
R       10.1.1.0 [120/1] via 172.12.123.1, 00:00:09, Serial0/0
30.0.0.0/24 is subnetted, 1 subnets
C       30.1.1.0 is directly connected, FastEthernet0/0

We have solved one problem, R2 is now has the optimal network path to the 10.1.1.0/24 network as a RIP route, but we have introduced a new problem of all the OSPF loopbacks turning into RIP routes as well – So traffic destined for those networks passing through R2 will now be sent to R3 before reaching R4 or R5. So we will need to take that command off, and review options on how we can tweak the Admin Distance on the ABR R2.

I will attempt to change only the AD for OSPF route learned from a particular source:

R2(config)#router ospf 1
R2(config-router)#no distance 121
R2(config-router)#distance ?
<1-255>  Administrative distance
ospf     OSPF distance

R2(config-router)#distance 121 ?
A.B.C.D  IP Source address
<cr>

R2(config-router)#distance 121 30.1.1.3 ?
A.B.C.D  Wildcard bits

R2(config-router)#distance 121 30.1.1.3 0.0.0.0 ?
<1-99>       IP Standard access list number
<1300-1999>  IP Standard expanded access list number
WORD         Standard access-list name
<cr>

R2(config-router)#distance 121 30.1.1.3 0.0.0.0
R2(config-router)#do show ip route
[Route codes redacted]

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback2
3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/2] via 172.12.123.3, 00:00:22, Serial0/0
4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/2] via 30.1.1.4, 00:00:24, FastEthernet0/0
5.0.0.0/32 is subnetted, 1 subnets
O IA    5.5.5.5 [110/2] via 30.1.1.5, 00:00:24, FastEthernet0/0
172.12.0.0/24 is subnetted, 1 subnets
C       172.12.123.0 is directly connected, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
O E2    10.1.1.0 [110/20] via 30.1.1.3, 00:00:25, FastEthernet0/0
30.0.0.0/24 is subnetted, 1 subnets
C       30.1.1.0 is directly connected, FastEthernet0/0

The route table seems to be back to square one, however given the syntax, it appears it should be giving OSPF Process 1 routes learned from IP 30.1.1.3 the AD of 121 – So what happened? What happened was the command actually requires the source routers RID IP, not the actual OSPF interface IP address, so to get the RID we can use “sh ip ospf nei”:

R2(config-router)#do sh ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           1   2WAY/DROTHER    00:00:34    30.1.1.3        FastEthernet0/0
4.4.4.4           1   FULL/BDR        00:00:30    30.1.1.4        FastEthernet0/0
5.5.5.5           1   FULL/DR         00:00:39    30.1.1.5        FastEthernet0/0

Now I will remove the old statement, ALWAYS remove old statements with Redistribution, and enter it again using the RID and the host wildcard mask of 0.0.0.0:

R2(config-router)#no distance 121 30.1.1.3 0.0.0.0
R2(config-router)#distance 121 3.3.3.3 0.0.0.0
R2(config-router)#do sh ip route
[Route codes redacted]

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback2
3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/2] via 172.12.123.3, 00:00:19, Serial0/0
4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/2] via 30.1.1.4, 00:01:11, FastEthernet0/0
5.0.0.0/32 is subnetted, 1 subnets
O IA    5.5.5.5 [110/2] via 30.1.1.5, 00:01:11, FastEthernet0/0
172.12.0.0/24 is subnetted, 1 subnets
C       172.12.123.0 is directly connected, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
R       10.1.1.0 [120/1] via 172.12.123.1, 00:00:21, Serial0/0
30.0.0.0/24 is subnetted, 1 subnets
C       30.1.1.0 is directly connected, FastEthernet0/0

And there we have it, the traffic destined for R1’s loopback from R2 will now go out the RIP enabled interface, taking the optimal path to the network. If the RIP enabled interface were to go down, it will put the O E2 route back in as a backup path, for example:

R2(config)#int s0/0
R2(config-if)#shut
R2(config-if)#
*Mar  1 11:14:34.456: %LINK-5-CHANGED: Interface Serial0/0, changed state to administratively down
*Mar  1 11:14:35.458: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
R2(config-if)#do sh ip route
[Route codes redacted]

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback2
4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/2] via 30.1.1.4, 00:06:32, FastEthernet0/0
5.0.0.0/32 is subnetted, 1 subnets
O IA    5.5.5.5 [110/2] via 30.1.1.5, 00:06:32, FastEthernet0/0
172.12.0.0/24 is subnetted, 1 subnets
O E2    172.12.123.0 [121/20] via 30.1.1.3, 00:00:18, FastEthernet0/0
10.0.0.0/24 is subnetted, 1 subnets
O E2    10.1.1.0 [121/20] via 30.1.1.3, 00:00:18, FastEthernet0/0
30.0.0.0/24 is subnetted, 1 subnets
C       30.1.1.0 is directly connected, FastEthernet0/0

Now not only is the path to the 10.1.1.0/24 network using the Redistributed route as a backup route, but now all traffic headed for the NBMA network will be routed to R3 as a network learned via OSPF Redistribution.

I will now turn back on S0/0 on R2, and add a couple of loopbacks to R1 to be Redistributed into OSPF over to R2, and we will see how we can change just particular routes by creating an Access-List to define the source traffic to be affected by the AD command. For this I will be using “show ip route rip” and “show ip route ospf” instead of the full routing table now that we get how funky things can get very quickly.

After configuring 15.1.1.0/24 and 20.1.1.0/24 on R1, let’s look at R2’s route table for them:

R2#show ip route rip
3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/2] via 172.12.123.3, 00:00:00, Serial0/0
R2#show ip route ospf
4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/2] via 30.1.1.4, 00:00:41, FastEthernet0/0
20.0.0.0/24 is subnetted, 1 subnets
O E2    20.1.1.0 [110/20] via 30.1.1.3, 00:00:41, FastEthernet0/0
     5.0.0.0/32 is subnetted, 1 subnets
O IA    5.5.5.5 [110/2] via 30.1.1.5, 00:00:41, FastEthernet0/0
10.0.0.0/24 is subnetted, 1 subnets
O E2    10.1.1.0 [110/20] via 30.1.1.3, 00:00:41, FastEthernet0/0
     15.0.0.0/24 is subnetted, 1 subnets
O E2    15.1.1.0 [110/20] via 30.1.1.3, 00:00:41, FastEthernet0/0

Now we will use these multiple O E2 routes to demonstrate a couple of things, but first we (for whatever reason) want the newly added 15.1.1.0/24 and 20.1.1.0 /24 networks to remain O E2 routes, however we want the 10.1.1.0 /24 network to take RIP over the NBMA rather than going through the ASBR R3. To do this, we will need to use the same distance command, using the same RID of the ASBR as before, except we will continue the command with the access-list output we saw previously in configurations above.

First, we must make an access-list to use in the distance command, defining our network(s) that we want to change the AD for:

R2(config)#access-list 25 permit 10.1.1.0 0.0.0.255
R2(config)#router ospf 1
R2(config-router)#distance 121 3.3.3.3 0.0.0.0 ?
<1-99>       IP Standard access list number
<1300-1999>  IP Standard expanded access list number
WORD         Standard access-list name
<cr>

R2(config-router)#distance 121 3.3.3.3 0.0.0.0 25 ?
<cr>

R2(config-router)#distance 121 3.3.3.3 0.0.0.0 25

I did leave the output for after the ? to show the ACL is called out by the ACL Name or Number created for it, and now that it is already applied to the “distance …” command, when I look at the RIP routing table only that destination network from R1’s loopbacks should be in the RIP table, along with R3’s connected Loopback 3.3.3.3 that I brought into RIP with “redist connected”:

R2(config-router)#do sh ip route rip
3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/2] via 172.12.123.3, 00:00:13, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
R       10.1.1.0 [120/1] via 172.12.123.1, 00:00:13, Serial0/0

And there it is, simple as that. Now what if we want any O E2 routes hitting this router to be preferred by the RIP routing domain you may ask, as it’s next hop will always be the best path as it is a Boarder Router – Let’s find out! First I will remove the current distance command, and review the other option after “distance” in OSPF router config mode:

R2(config-router)#distance ?
<1-255>  Administrative distance
ospf     OSPF distance

R2(config-router)#distance ospf ?
  external    External type 5 and type 7 routes
  inter-area  Inter-area routes
  intra-area  Intra-area routes

R2(config-router)#distance ospf

And there is the key to the recipe, if you use “distance ospf [external | inter-area | intra-area] 121” you can force either the O E2, IA, or O routes to change their AD on this router. You can either do one of the three, or all three in the same line, and I’ve about beat this topic to death so I will only be configuring this for External / O E2 routes on R2 after of course remove the previous Administrative Distance configurations for OSPF Process 1:

R2(config-router)#distance ospf external 121
R2(config-router)#do sh ip route ospf
4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/2] via 30.1.1.4, 00:01:55, FastEthernet0/0
5.0.0.0/32 is subnetted, 1 subnets
O IA    5.5.5.5 [110/2] via 30.1.1.5, 00:01:55, FastEthernet0/0
R2(config-router)#do sh ip route rip
     3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/2] via 172.12.123.3, 00:00:00, Serial0/0
     20.0.0.0/24 is subnetted, 1 subnets
R       20.1.1.0 [120/1] via 172.12.123.1, 00:00:00, Serial0/0
     10.0.0.0/24 is subnetted, 1 subnets
R       10.1.1.0 [120/1] via 172.12.123.1, 00:00:00, Serial0/0
     15.0.0.0/24 is subnetted, 1 subnets
R       15.1.1.0 [120/1] via 172.12.123.1, 00:00:00, Serial0/0

And there we have it! If any traffic destined for the RIP domain is processed by R2, is will send it directly to the Hub R1 rather than taking the LAN to R3, then being relayed up to the Hub Router.

This concludes OSPF Redistribution for now, next up will be EIGRP Redistribution! Woo!

OSPF to RIP Redist / Static routing, 4 OSPF routers in 1 Broadcast Domain output

The following will be a demonstration of one way route redistribution between RIP and OSPF routing domains, and how to get two way communication between the two routing domains with a static route, rather than redistributing both protocols on the ASBR R3:

OSPFtoRIP_Redist_Top

After configuring the NBMA network which is now a RIPv2 domain with the proper commands:

R1(config)#int s0/0
R1(config-if)#no ip split-horizon
R1(config-if)#router rip
R1(config-router)#ver 2
R1(config-router)#no auto
R1(config-router)#network 172.12.123.0
R1(config-router)#network 10.1.1.0

Of course for the NBMA the Hub needs the no ip split-horizon configured for it to propagate routes correctly for RIP and EIGRP, and configured R2 and R3 for RIP. Then I connected the Fa0/0 interface of each OSPF router to my 3560, place them in one broadcast domain.

While I have 4 routers on 1 Broadcast segment, I wanted to grab an example of a lesson earlier in OSPF, that the two DROTHER routers will show the other DROTHERs State as 2WAY/DROTHER ***ONLY BETWEEN THE DROTHERS, THE DR AND BDR SHOWS THEM AS FULL/DROTHER***:

R5#show ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DROTHER    00:00:39    30.1.1.2        FastEthernet0/0
3.3.3.3           1   FULL/DROTHER    00:00:38    30.1.1.3        FastEthernet0/0
4.4.4.4           1   FULL/DR         00:00:36    30.1.1.4        FastEthernet0/0

R4#show ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DROTHER    00:00:30    30.1.1.2        FastEthernet0/0
3.3.3.3           1   FULL/DROTHER    00:00:32    30.1.1.3        FastEthernet0/0
5.5.5.5           1   FULL/BDR        00:00:32    30.1.1.5        FastEthernet0/0

R3#show ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   2WAY/DROTHER    00:00:32    30.1.1.2        FastEthernet0/0
4.4.4.4           1   FULL/DR         00:00:31    30.1.1.4        FastEthernet0/0
5.5.5.5           1   FULL/BDR        00:00:33    30.1.1.5        FastEthernet0/0

R2#show ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           1   2WAY/DROTHER    00:00:34    30.1.1.3        FastEthernet0/0
4.4.4.4           1   FULL/DR         00:00:39    30.1.1.4        FastEthernet0/0
5.5.5.5           1   FULL/BDR        00:00:31    30.1.1.5        FastEthernet0/0

I will spare the further router output, but these neighbors will learn routes and have Layer 3 connectivity as a normal Adjacency, however they will get stuck in this State in eachothers “show ip ospf nei” table however this is not the the more complex issue known as “stuck in 2way” oddly enough.

Now, back to Redistribution and Static routing.

 

To start redistribution, I first wanted to test one way redistribution, and returning traffic with a static route so I issued the following commands:

R3(config)#router rip
R3(config-router)#redistribute connect
R3(config-router)#redistribute ospf 1 metric 2

So as of now the OSPF routing domain is being redistributed into RIP, along with connected routes on R3, however the oddity with RIP is that you don’t need to use “redistribute connected subnets” – Only “redistribute connected” much alike how you don’t enter subnet mask information into the network statements during router configuration for RIP.

So now the OSPF routers are obviously not getting RIP routes injected to them yet, however I did want to verify from the back end router R1 to make sure everything is looking good and confirming that the correct response to a ping would occur:

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

2.0.0.0/32 is subnetted, 1 subnets
R       2.2.2.2 [120/1] via 172.12.123.2, 00:00:10, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/1] via 172.12.123.3, 00:00:04, Serial0/0
4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/2] via 172.12.123.3, 00:00:04, Serial0/0
5.0.0.0/32 is subnetted, 1 subnets
R       5.5.5.5 [120/2] via 172.12.123.3, 00:00:04, Serial0/0
172.12.0.0/24 is subnetted, 1 subnets
C       172.12.123.0 is directly connected, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, Loopback1
30.0.0.0/24 is subnetted, 1 subnets
R       30.1.1.0 [120/1] via 172.12.123.3, 00:00:20, Serial0/0

R1#ping 5.5.5.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
…..
Success rate is 0 percent (0/5)

The RIP domain knows about R5’s loopback of 5.5.5.5, however no Redistribution has been done to advertise a return route into the OSPF routing domain, and I did this on purpose so I could confirm that static routes are straight forward with Redistribution:

R5(config)#ip route 172.12.123.0 255.255.255.0 30.1.1.3
ASR#1
[Resuming connection 1 to r1 … ]
R1#ping 5.5.5.5
*Mar  1 12:13:26.272: %SYS-5-CONFIG_I: Configured from console by console

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/65/69 ms

And there it is! Simply adding the ip route statement to R5 allowed the two way communication we would have gotten, had we also redistributed RIP routes into OSPF on the ASBR R3 – However that can lead to sub-optimal routing at it’s finest which I will cover on my next post.

I was going to add it to this post, but creating a Topology in paint using two different colors took it out of me, next up on the post list will be working with AD to overcome sub-optimal routing!

Route redistribution OSPF into RIP and back

Just a very quick post tonight regarding Redistribution of OSPF into RIP and back, as it will be getting much more complex very shortly, but wanted a quick post to start things off even though I’ve already posted of some route redistribution from the OSPF section, such as redistributing connected routes.

Route redistribution is not distributing one routing protocol into another, it is taking a set of routes and putting them into another routing domain, including connected and static routes – This is a very important distinction. The Redistribution can be one way, as one side may only need to know the other sides routes, but for two-way communication to occur between routing domains you must either redistribute both ways OR static routes can be used to get there as well.

For redistribution, you must watch your entrance and exit points, as routing loops can occur easily if you have multiple routers sharing routes between domains (So for all intensive purposes the less ASBR routers the better).

A quick word on automatic Redistribution, it will ALWAYS involve EIGRP (at this time), such as the outdated IGRP (LAN Protocol) would automatically redistribute into an EIGRP routing domain if they shared the AS number. There are some other scenarios, however they involve EIGRP and AppleTalk / IPX, and I am going to leave it at that for now.

“redistribute …” in router config mode will always be how you begin the redistribution, and you will want to redistribute the desired protocols route in the current protocols configuration, which is incredibly hard to explain without this example:

To redistribute RIP routes into an ospf domain, you would go in the router ospf (process #) configuration mode and type in the following command:

“redistribute rip subnets” – Not a lot to it, like redistributing connected subnets

However to redistribute OSPF routes into RIP, you will need to add the metric to the routes you will be injecting on the ASBR, as RIP has a maximum cost / metric / HOP COUNT of 15 before the route is considered invalid. Being that this is the case, I used the same topology as posted in my last few OSPF posts, only the NBMA network was a RIPv2 domain and R1-R5 was my OSPF Area 0. This is the command issued on the ASBR in RIP config:

R1(config-router)#redistribute ospf 1 metric 2 <- For OSPF process 1, and the metric of 2

The metric is needed because both RIP and EIGRP do not have a ‘seed metric’ that they inherently assign redistributed routes (Like OSPF E2 routes), so it will bring in OSPF’s cost / metric into the RIP domain which will make the routes not appear at all because they are considered invalid due to their high cost / metric – and this is why it must be assigned.

***Very important to note, the metric set for OSPF routes being redistributed into RIP is the ‘beginning’ metric or hop count, which will then increment as it propagates through the RIP network – Be sure to keep that hop count below 15***

Another thing to note, which I found confusing, where as OSPF will label redistributed routes as E2 and I believe EIGRP is D EX, RIP routes learnt via redistribution still just have a route table code of R. So because the route has the R next to it, it may be learnt via route redistribution.

Another note, this is only so RIP can have other protocols redistributed into it, I will be doing a “wr er” on all routers now and finally making a new topology to look at changing Administrative Distances, and how to overcome suboptimal routing – more to come.