cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2625
Views
3
Helpful
15
Replies

BGP to OSPF - NSSA default information originate - conditional

Bilal Nawaz
VIP Alumni
VIP Alumni

Hello,

I have an ASBR and another router within the same NSSA area. The ASBR has a BGP peering with ISP and is receiving prefixes 0.0.0.0/0 and 1.0.0.0/24.

1.0.0.0/24 is not in the ISP AS, but learned route from another AS.

I know that when I issue the command 'area 254 nssa default-information-originate', a default route is generated in to the nssa area which is fine. However, I want to have the option to do this command 'default-information originate route-map AS1_DEFAULT_IF1'

This would say inject the default route downstream only if 1.0.0.0 is in the routing table. But when command is issued, this doesn't work. Could anyone tell me why this doesn't work?

I'm trying to follow this document, on section 6-14 at the bottom https://learningnetwork.cisco.com/servlet/JiveServlet/previewBody/3423-102-1-9434/ccmigration_09186a008014ee4e.pdf

In this case it is suggested the NSSA area is used, what harm is there if I use a normal area (not area 0). Because the non NSSA solution will work fine.

ASBR:

router ospf 254

log-adjacency-changes

area 254 nssa

default-information originate always route-map AS1_DEFAULT_IF1

!

ip prefix-list bgplist seq 5 permit 1.0.0.0/24

!

route-map AS1_DEFAULT_IF1 permit 10

match ip address prefix-list bgplist

show ip route

B*   0.0.0.0/0 [20/0] via 172.16.10.1, 10:00:07

B       1.0.0.0 [20/0] via 172.16.10.1, 09:56:20

O       172.16.252.0 [110/20] via 172.16.254.2, 00:21:48, FastEthernet0/0

C       172.16.254.0 is directly connected, FastEthernet0/0

C       172.16.10.0 is directly connected, FastEthernet0/1

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
15 Replies 15

blau grana
Level 7
Level 7

Hi Bilal

Try

default-information originate route-map AS1_DEFAULT_IF1

instead

default-information originate always route-map AS1_DEFAULT_IF1

More info:

http://packetlife.net/blog/2008/dec/12/ospf-conditional-default-route-injection/

Best Regards

Please rate helpful posts and close solved questions

Best Regards Please rate all helpful posts and close solved questions

Hi Blau,

Thanks for the reply. The always keyword does not work. And it also defeats the purpose of the condition, because regardless of that, it would always inject the default route.

If 1.0.0.0 is in the routing table, 0.0.0.0/0 should be advertised. If 1.0.0.0 is not in the routing table, 0.0.0.0/0 should stop being advertised. With always keyword to my understanding, it will be advertised anyway.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Hi Bilal,

Exactly, always keyword defeat conditional advertisement so I do not understand why did you included it in configuration.

area 254 nssa

default-information originate always route-map AS1_DEFAULT_IF1

!

Get rid off always keyword and it should work. Document which I included earlier is dealing with same problem as you ->

http://packetlife.net/blog/2008/dec/12/ospf-conditional-default-route-injection/

Best Regards

Please rate helpful posts and close solved questions

Best Regards Please rate all helpful posts and close solved questions

Okay, sorry - I should have stated, I've tried with the always keyword and without, this still does not work.

It only advertised default route with this command 'area 254 nssa default-information-originate'

but then I lose my condition, which I want to keep. It works without nssa area.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Hi,

I think two ways to conditionally advertise the default in this case are:

- changing the area type to standard, but I suppose you do not want to do that.

- split the default route in two parts and advertise it via summary-address plus tracking the 1.0.0.0/24 adding two dummy routes will do the trick.

HTH,

Jose.

Hi Jose,

How would I accomplish this please?

- split the default route in two parts and advertise it via summary-address plus tracking the 1.0.0.0/24 adding two dummy routes will do the trick.

Kind Regards,

Bilal

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

For example:

- Tracking the route:

track 1 ip route 1.1.1.0 255.255.255.0 reachability

- Create two dummy routes:

ip route 11.11.11.11 255.255.255.255 Null0 track 1

ip route 129.129.129.129 255.255.255.255 Null0 track 1

- Redistribute to OSPF

ip prefix-list STATIC seq 5 permit 11.11.11.11/32

ip prefix-list STATIC seq 10 permit 129.129.129.129/32

router ospf 1

summary-address 0.0.0.0 128.0.0.0

summary-address 128.0.0.0 128.0.0.0

redistribute static subnets route-map STATIC

discard-route external 255 ---------------------------- To filter the discard routes created by the summary-address

HTH,

Jose.

I think easier and cleaner solution would be to get rid off the nssa area.

Best Regards

Please rate helpful posts and close solved questions

Best Regards Please rate all helpful posts and close solved questions

So the solution in the pdf does not work?

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Yes, It does not work

It does work, sort of.

#default-information originate create default route [LSA type 5] but LSA type 5 are not distributed into stub areas. So in your case, default route will be advertised to entire OSPF domain, but not into stub areas.

In pdf nssa area is used because some redistribution is needed in nssa area. But if you do not need nssa area in your topology, you can use this solution and it will work as you expect, just omit area xyz nssa in configuration.

Best Regards

Please rate helpful posts and close solved questions

Best Regards Please rate all helpful posts and close solved questions

No, the default-information originate does not work in a NSSA Area. For more information and a good explanation:

http://wiki.nil.com/External_default_route_in_NSSA_area

I didnt say that it works in NSSA area. I said that default route (LSA type 5) is not distributed into stub areas, it means stub, totally stub, nssa, totally nssa. Because LSA type 5 is not distributed into stub areas.

But if Bilal remove nssa area and make it regular area, everything will be working the way he wants.

Best Regards

Please rate helpful posts and close solved questions

Best Regards Please rate all helpful posts and close solved questions

blau grana:

I think is clear, as Bilal wrote in the first post, that it would work in a standard area.  On the other hand, he asked specifically:

"So the solution in the pdf does not work?"

As the solution in the pdf uses a NSSA Area and a default-information originate, it does not work.

Then, he may use different solutions. I guess that he does not want to change the type of area because in his very first post in this thread he was aware that this would work in a standard area. By the way, it is not than simple to change an area type because it may have serious implications, depending on the size of the network, type of routers, etc...

He may use the solution I posted or the standard way via area nssa default-information ..... but in this one you can not use a route-map. Or go ahead and use an EEM Applet, not the best config to maintain but it would work:

event manager applet DEFAULT

event syslog pattern "ip route 1.0.0.0/8 reachability Down->Up"

action 1.0 cli command "enable"

action 1.1 cli command "configure terminal"

action 1.2 cli command "router ospf 254"

action 1.3 cli command "area 254 nssa default-information-originate"

action 1.4 syslog msg "Default Route Generated"

event manager applet NO_DEFAULT

event syslog pattern "ip route 1.0.0.0/8 reachability Up->Down"

action 1.0 cli command "enable"

action 1.1 cli command "configure terminal"

action 1.2 cli command "router ospf 254"

action 1.3 cli command "no area 254 nssa default-information-originate"

action 1.4 syslog msg "Default Route Not Generated"

Hope this helps,

Jose