RE: Redistribution

From: Tom Martin (tig@wiltecinc.com)
Date: Tue Jun 29 2004 - 18:28:26 GMT-3


Hello,

I was puzzled by your question, so I recreated the problem in my lab. It
turned out to be a lot harder than I thought at first, but I ended up
working through a solution.

My configuration is slightly different since I used routers in my own
lab, and I used the interfaces that were convenient at the time. It
shouldn't be too difficult to translate though.

Problem:

R4 learns route 172.10.124.128/25 from R2 (S0/2) via RIP and from R7
(S0/1) via EIGRP. All RIP routes are to be redistributed into OSPF
except for 172.10.124.128/25. If the link to R7 goes down,
172.10.124.128/25 is also to be redistributed into OSPF. EIGRP routes
are never to be redistributed into OSPF. (If I misread your problem
please correct me. Even so, I learned from the lab so thanks! :)

Solution:

Router 2
--------
hostname r2
interface Loopback0
  description Network to be conditionally redistributed
  ip address 172.10.124.129 255.255.255.128
interface Loopback1
  description Another network that always gets redistributed
  ip address 172.10.124.1 255.255.255.128
interface Serial0
  description Connects to R4
  ip address 192.168.1.2 255.255.255.0
router rip
  version 2
  network 172.10.0.0
  network 192.168.1.0
  no auto-summary

Router 7
--------
hostname r7
interface Loopback0
  description Network to be conditionally redistributed
  ip address 172.10.124.130 255.255.255.128
interface Serial0
  ip address 192.168.2.7 255.255.255.0
router eigrp 1
  network 172.10.0.0
  network 192.168.2.0
  no auto-summary

Router 4
--------
hostname r4
interface FastEthernet0/0
  description An interface to run OSPF
  ip address 192.168.3.1 255.255.255.0
interface Serial0/1
  description Connects to R7
  ip address 192.168.2.4 255.255.255.0
  clockrate 57600
interface Serial0/2
  description Connects to R2
  ip address 192.168.1.4 255.255.255.0
  clockrate 57600
router eigrp 1
  network 192.168.2.0
  no auto-summary
router ospf 1
  redistribute rip subnets route-map RIP2OSPF
  network 192.168.3.0 0.0.0.255 area 0
router rip
  version 2
  network 192.168.1.0
  no auto-summary
ip prefix-list CONDROUTE seq 5 permit 172.10.124.128/25
ip prefix-list R2 seq 5 permit 192.168.1.2/32
route-map RIP2OSPF permit 10
  match ip address prefix-list CONDROUTE
  match ip next-hop R2
route-map RIP2OSPF deny 20
  match ip address prefix-list CONDROUTE
route-map RIP2OSPF permit 30

Please note that I retyped the configs, please forgive any typos. Output
when all routers are on-line (172.10.124.128/25 not redistributed):

r4#show ip ospf database

            OSPF Router with ID (192.168.3.1) (Process ID 1)

                Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link
count
192.168.3.1 192.168.3.1 1516 0x80000001 0x00A246 1

                Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag
172.10.124.0 192.168.3.1 1389 0x80000001 0x002D52 0
192.168.1.0 192.168.3.1 1389 0x80000001 0x0004C4 0
r4#

Output when R7 is off-line:
r4#show ip ospf database

            OSPF Router with ID (192.168.3.1) (Process ID 1)

                Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link
count
192.168.3.1 192.168.3.1 1572 0x80000001 0x00A246 1

                Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag
172.10.124.0 192.168.3.1 1445 0x80000001 0x002D52 0
172.10.124.128 192.168.3.1 14 0x80000001 0x0028D6 0
192.168.1.0 192.168.3.1 1445 0x80000001 0x0004C4 0

If it's not obvious from the config, your problem can be solved by
matching on the next hop for the route. If the next hop is the RIP
router, then advertise the route (seq 10). If the next hop is any other
router (such as the EIGRP router which has a lower administrative
distance) then do not advertise the route (seq 20). Advertise all other
routes (seq 30).

At the beginning of the lab, I assumed that "match ip next-hop" referred
to the next hop advertised by the redistributed protocol. That's wrong,
it's the next hop from the routing table perspective. See
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/
fiprrp_r/ind_r/1rfindp1.htm#wp1018782

-- Tom

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
gladston@br.ibm.com
Sent: Tuesday, June 29, 2004 3:02 PM
To: ccielab@groupstudy.com
Subject: Redistribution

RIP and Redistribution

R3 receives the route 172.10.124.128 from R4 (RIP serial 0) and from R2
(EIGRP Ethernet 0).
R3 redistributes RIP into OSPF; the net 172.10.124.128 is not
redistributed into OSPF. If Ethernet 0 goes down, net 172.10.124.128 is
redistributed.

I can see the route 172.10.124.128 arriving at R3 through RIP. But it
seems that the route is redistributed into OSPF only if RIP install the
route in the routing table.

Any explanation/reading sugestion?

The following commands shows that when the route is received from EIGRP,
RIP does not redistribute it into OSPF.
r3#sh ip os da

                Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag
172.10.124.128 172.10.43.3 24 0x80000001 0xACDA 0
195.1.1.0 172.10.43.3 59 0x80000001 0x3DB8 0

r3#c
Enter configuration commands, one per line. End with CNTL/Z.
r3(config)#int e0
r3(config-if)#no sh
r3(config-if)#^Z
r3#
r3#sh ip os da

                Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag
195.1.1.0 172.10.43.3 102 0x80000001 0x3DB8 0



This archive was generated by hypermail 2.1.4 : Sat Jul 03 2004 - 19:40:52 GMT-3