03-06-2013 01:04 AM - edited 03-04-2019 07:12 PM
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
03-06-2013 01:15 AM
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
03-06-2013 01:20 AM
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.
03-06-2013 01:35 AM
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
03-06-2013 02:07 AM
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.
03-06-2013 02:22 AM
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.
03-06-2013 02:49 AM
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
03-06-2013 03:10 AM
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.
03-06-2013 03:51 AM
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
03-06-2013 07:18 AM
So the solution in the pdf does not work?
03-06-2013 08:45 AM
Yes, It does not work
03-06-2013 09:00 AM
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
03-06-2013 09:23 AM
No, the default-information originate does not work in a NSSA Area. For more information and a good explanation:
03-06-2013 11:05 AM
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
03-07-2013 07:41 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide