cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
2117
Views
0
Helpful
16
Replies

Rip redistribution problem

mshahzadqadir
Level 1
Level 1

Hi There,

Can  anyone please help me? When i redistribute connected into ospf and specify a route map and then i redistribute routes using RIP, what happens is the routes filtered earlier using route map don't get advertised into OSPF even though they are in RIP database.

Thanks in advance

Shahzad.

16 Replies 16

Lei Tian
Cisco Employee
Cisco Employee

Hi Shahzad,

When you redistribute RIP into OSPF, there will have 2 things happen:

1, the RIP routes in RIB (routing information base) will be redistributed into OSPF.

2, the connected interfaces which participate in RIP process will be redistributed into OSPF.

When you redistribute the connected routes into OSPF, it actually breaks the 2nd step. So only routes match in the route-map will be redistributed into OSPF.

HTH,

Lei Tian

Thanks Lei, what I am trying to achieve is -

I want to redistribute one of the connected interfaces using red connected with a specific metric and other interface using rip. this is requirement of a lab I am doing at the moment, any cluses how I can do that?

Shahzad.

Hi Shahzad,

For example you have 3 interfaces, fa0/0, fa0/1 and fa0/2. fa0/1 and fa0/2 are participating in RIP process. You want redistribute fa0/0 into OSPF with a particular metric.

You can have 2 permit statement on your route-map; 1st statement match interface fa0/0 and set the metric, 2nd statement match interfaces fa0/1 and fa0/2 with your default metric.

HTH,

Lei Tian

Thanks but in this case both routes will appear as redistribute connected routes. they will not appear as rip routes.

Hi Shahzad,

The directly connected routes will appear as "C" regardless. They will not show as RIP routes in the local RIB. Not sure if that is what you were asking.

HTH,

Lei Tian

Hi Lei,

Actually what I was saying is when I do "show ip ospf database external" the routes redistributed into ospf will look as they were redistributed from connected. NOT as redistributed from RIP.

Thanks

Shahzad

Shahzad Qadir

Level 2 On-site Engineer

Dimension Data United Kingdom

Tel: +44 208 7606 476

Mob: +44 78 2598 1003

Fax: +44 12 5277 9010

shahzad.qadir@eu.didata.com

Dimension Data House, 2 Waterfront Business Park, Fleet Road, Fleet, Hampshire, GU51 3QT, United Kingdom

For further information about Dimension Data, please go to http://www.dimensiondata.com/

P Before printing this email please think about the environment

Hi Shahzad,

Can you post your show output and tell me exactly what difference did you see on the output?

Thanks,

Lei Tian

Lei,

Please have a look at following output:

R1 (RUNNING OSPF ONLY)

======================

R1#s

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 unassigned YES unset administratively down down

Serial0/0 10.10.10.1 YES manual up up

FastEthernet0/1 unassigned YES unset administratively down down

Serial0/1 unassigned YES unset administratively down down

R1#sh run | b router ospf

router ospf 1

log-adjacency-changes

network 10.10.10.1 0.0.0.0 area 0

R2 (RUNNING OSPF AND RIP)

=========================

R2#s

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 10.10.20.1 YES manual up up

Serial0/0 10.10.10.2 YES manual up up

FastEthernet0/1 unassigned YES unset administratively down down

Serial0/1 10.10.10.5 YES manual up up

Loopback1 unassigned YES unset up up

R2#sh run | b router ospf

router ospf 1

log-adjacency-changes

redistribute connected subnets tag 10 route-map con-2-ospf

redistribute rip subnets tag 20

network 10.10.10.2 0.0.0.0 area 0

!

router rip

version 2

passive-interface default

no passive-interface Serial0/1

network 10.0.0.0

no auto-summary

route-map con-2-ospf permit 10

match interface FastEthernet0/0

set metric-type type-1

!

route-map con-2-ospf permit 20

match interface Serial0/1

set metric-type type-2

R2#sh ip ospf data

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

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count

10.10.10.1 10.10.10.1 230 0x80000002 0x008087 2

10.10.10.5 10.10.10.5 15 0x80000002 0x002CD4 2

Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag

10.10.10.4 10.10.10.5 15 0x80000001 0x00E96A 10

10.10.20.0 10.10.10.5 15 0x80000001 0x003299 10

R2#sh ip ospf data

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

Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag

10.10.10.4 10.10.10.5 48 0x80000001 0x00E96A 10

10.10.20.0 10.10.10.5 48 0x80000001 0x003299 10

If you look at external database, the routes are appearing with tag=10 that is for connected. So no RIP routes are getting redistributed. Just connected routes are there.

I was wondering if there is any way I can actually redistribute rip routes (with tag=20).

I hope output make some sense.

Thanks for looking.

Shahzad.

Shahzad Qadir

Level 2 On-site Engineer

Dimension Data United Kingdom

Tel: +44 208 7606 476

Mob: +44 78 2598 1003

Fax: +44 12 5277 9010

shahzad.qadir@eu.didata.com

Dimension Data House, 2 Waterfront Business Park, Fleet Road, Fleet, Hampshire, GU51 3QT, United Kingdom

For further information about Dimension Data, please go to http://www.dimensiondata.com/

P Before printing this email please think about the environment

Hello Shahzad,

have you got a RIP neighbor on interface ser0/1 of this router?

post

sh ip route rip

if there is no RIP neighbor in the only active interface, no RIP routes can exist on the local node.

And the redistribute connected in OSPF arrives first.

Hope to help

Giuseppe

Hi Giuseppe,

Yes, RIP neighbor is active there and receiving other routes and I can see these routes in "show ip rip database" output.

Are you saying if ospf is learning same routes from red connected & red rip then router will prefer connected routes and ignore rip redistributed routes?

Shahzad.

Shahzad Qadir

Level 2 On-site Engineer

Dimension Data United Kingdom

Tel: +44 208 7606 476

Mob: +44 78 2598 1003

Fax: +44 12 5277 9010

shahzad.qadir@eu.didata.com

Dimension Data House, 2 Waterfront Business Park, Fleet Road, Fleet, Hampshire, GU51 3QT, United Kingdom

For further information about Dimension Data, please go to http://www.dimensiondata.com/

P Before printing this email please think about the environment

Hello Shahzad,

if I've understood you correctly there are RIP routes and and a RIP neighbor but no RIP route is redistributed into OSPF.

I think that the issue is the following:

an LSA external route cannot be advertised if its next-hop = forwarding address in OSPF terminology is not known via an internal route either intra or inter area.

All RIP routes have an IP next-hop of the router on the other side of serial 0/1.

section 16.4 RFc 2328

http://www.rfc-editor.org/rfc/rfc2328.txt

If the forwarding address is non-zero, look up the
            forwarding address in the routing table.[24] The matching
            routing table entry must specify an intra-area or inter-area
            path; if no such path exists, do nothing with the LSA and
            consider the next in the list.


So I would suggest the following:
under router ospf
add a network ... area command for ser0/1 IP subnet
+
passive-interface ser0/1

the redistribute connected provides an external route to RIP routes next-hop,
so they cannot be referenced in another external LSA as specified in RFC 2328.

This should make the RIP routes to appear as external routes in OSPF LS DB.

Hope to help
Giuseppe

Hi Giuseppe,

Sorry for the confusion, what I want is:

1. I have 2 interfaces on R2, one is part of RIP process and other is NOT.

2. I want to advertise RIP interface (also connected to R2) to be redistributed into OSPF as external RIP route

3. and I want other connected interface to be redistributed to OSPF as external Connected route.

Does it makes sense? I have no problem with RIP redistribution. Just I want to know why OSPF is preferring connected red routes over RIP red routes.

Hi Lei - my problem is not with route tags, all I want is external RIP routes not external connected route.

Thanks

Shahzad.

Shahzad Qadir

Level 2 On-site Engineer

Dimension Data United Kingdom

Tel: +44 208 7606 476

Mob: +44 78 2598 1003

Fax: +44 12 5277 9010

shahzad.qadir@eu.didata.com

Dimension Data House, 2 Waterfront Business Park, Fleet Road, Fleet, Hampshire, GU51 3QT, United Kingdom

For further information about Dimension Data, please go to http://www.dimensiondata.com/

P Before printing this email please think about the environment

Hello Shahzad,

for getting this you should:

deny the desired subnets from being redistributed into OSPF by using a route-map

access-list 11 permit 10.10.10.0

route-map selected_conn deny 10

match ip address 11

route-map selected_conn permit 20

router ospf

red connected subnets route-map selected_conn tag 10

red rip subnets tag 20

!

edit:

red connected arrives first, or to say more precisely is preferred over importing RIP routes

Hope to help

Giuseppe

Hi Giuseppe,

If I deny a route, it don't get advertised to OSPF. NOT from connected and not from RIP.

Thanks

Shahzad.

Shahzad Qadir

Level 2 On-site Engineer

Dimension Data United Kingdom

Tel: +44 208 7606 476

Mob: +44 78 2598 1003

Fax: +44 12 5277 9010

shahzad.qadir@eu.didata.com

Dimension Data House, 2 Waterfront Business Park, Fleet Road, Fleet, Hampshire, GU51 3QT, United Kingdom

For further information about Dimension Data, please go to http://www.dimensiondata.com/

P Before printing this email please think about the environment

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card