cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1475
Views
5
Helpful
8
Replies

OSPF redistribution query

craig.juhas
Level 4
Level 4

Hi, I'm hoping this is a relatively straight forward question for a routing expert but I'm falling over with OSPF at the moment! Essentially this is the config I have in a Nexus switch:

ip route 10.50.48.0/22 10.50.33.254

ip route 4.2.2.1/32 10.50.33.254

ip prefix-list static-advs seq 10 permit 10.50.48.0/22

ip prefix-list static-advs seq 20 permit 4.2.2.1/32

route-map static-to-ospf permit 10

match ip address prefix-list static-advs

router ospf 144

router-id 10.50.255.1

redistribute static route-map static-to-ospf

log-adjacency-changes

summary-address 10.50.0.0/16

auto-cost reference-bandwidth 10000

Now if I go into one of the OSPF neighbours I can see the 4.2.2.1/32 route but the 10.50.48.0/22 route doesn't appear. Where is it going wrong? Does it have something to do with the summary-address line in the OSPF config?

Any help would be much appreciated!

Craig

8 Replies 8

Edison Ortiz
Hall of Fame
Hall of Fame

I haven't played around much with Nexus but don't you need to include 'subnets' on the redistribute static command under OSPF?

The summary does indeed affect the advertising of 10.50.48.0/22.

___

Edison.

Yeah the Nexus are relatively new to me too. The subnets commands is not there in the NX-OS for that particular command.

I didn't put that summary-address command in there and I'm not entirely sure what it's for. Essentially that site is that class B network. Do I need it for any reason? Bare in mind I have alot of 10.50.x.0/24 VLANs on this site that need to be advertised.

Craig

"Do I need it for any reason? Bare in mind I have alot of 10.50.x.0/24 VLANs on this site that need to be advertised."

Only you can really answer that question. Bear in mind that the summary-address command is used to advertise summary addresses for routes that are external to the OSPF domain and are being redistributed on an ASBR. If all your other 10.50.x.0/24 subnets are internal to the OSPF domain then you may not need it but it's not really possible to say.

Jon

Yeah the Nexus are relatively new to me too. The subnets commands is not there in the NX-OS for that particular command.

Interesting, good to know - thanks.

Do I need it for any reason?

It is a design decision as to where summarization needs to be performed.

If you are only advertising a /20 from this router as a ASBR, changing the advertisement from /20 to /16 does not make a lot of sense unless you have another router doing the same advertising and you want that router to be preferred (longest mask).

HTH,

__

Edison

rohitrattan
Level 1
Level 1

Hello Craig,

Your configuration is right except that you will have to use the subnets keyword in the redistribute command otherwise only classful networks will be advertised and u require classless subnets to be redistributed.

redistribute static route-map static-to-ospf subnets

HTH

Rohit

In the Nexus there doesn't appear to be that command available. Here's what I get when I hit '?' after each part:

Nexus-Core(config-router)# red ?

bgp Border Gateway Protocol (BGP)

direct Directly connected

eigrp Enhanced Interior Gateway Protocol (EIGRP)

isis ISO Intermediate-to-Intermediate (IS-IS)

ospf Open Shortest Path First (OSPFv2)

rip Routing Information Protocol (RIP)

static Static

Nexus-Core(config-router)# red static ?

route-map Policy to constrain redistribution

Nexus-Core(config-router)# red static route-map ?

WORD A 'route-map' name (Max Size 63)

Nexus-Core(config-router)# red static route-map static-advs ?

Ok, i was actually testing and meanwhile a lot has been posted, but i have a workaround to this problem but there's a catch, but first let me tell you the solution. I have simulated the entire configuration and dont see the 4.2.2.1/32 route either, dont know how ur getting it.

The real issue is the missing "subnets" keyword which unfortunately is not available so this leaves us with the only alternative of redistributing classful subnets i.e 10.0.0.0 /8 and 4.0.0.0 /8. So if you DO NOT have discontiguous classful subnets (and thats the catch), you can try the following config (and it works)

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

ip route 4.0.0.0 255.0.0.0 Null0 tag 4

ip route 10.0.0.0 255.0.0.0 Null0 tag 10

route-map static-map

match tag 10

match tag 4

redistribute static route-map static-map

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

Now you will see the route to 10.0.0.0 and 4.0.0.0 in ur neighbors pointing to the local router. But as evident this solution would work only if you dont have any subnets/networks between 10.0.0.0 and 4.0.0.0 elsewhere in the network. The traffic to these classful subnets will be routed to the local router (the one doing redistribution) and then the already existing static routes in your routing table will be used as an exact match to route to the 10.50.48.0 and 4.2.2.1 subnets.

Complicated but the only solution we have

HTH

Rohit

Rohit

You are  a ccie in the making

I have spent 4 hours trying to work how to redistrbute static routes in to ospf under pressure from a  datacentre migration.   It's crazy there features dont work, tried everything but to think out the box ,  well done  shame i didnt think of it

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco