11-10-2010 10:59 PM - edited 03-04-2019 10:26 AM
Hi
I have originated the default route in OSPF but i want it to limit the propogation of same to one router only. For same I have configured the route-map & matched the access-list with loopback ip address of the router.
But I observered the another router with loopback ip address 10.100.100.2 also receiving the default router. Is there any misconfiguration in below config.
router ospf 100
default-information originate route-map Default_Route
R1#sh route-map Default_Route
route-map Default_Route, permit, sequence 10
Match clauses:
ip address (access-lists): default_route
Set clauses:
Policy routing matches: 0 packets, 0 bytes
R1#sh access-lists default_route
Standard IP access list default_route
10 permit 10.100.100.1 (38036 matches)
regards,
Nilesh
11-11-2010 12:02 AM
Hello Nilesh,
You cannot limit a propagation of the default route in the OSPF in the way you did. The route-map construct used with the default-originate command is used only to modify some parameters (attributes) of how the default route is injected into OSPF but once it has been injected into it, the originating router has no further influence where it will be spread and which routers will learn it.
If you need to configure a router to not install an OSPF-learned route in the routing table, you can configure it as follows:
ip prefix-list AllowedOSPFRoutes deny 0.0.0.0/0
ip prefix-list AllowedOSPFRoutes permit 0.0.0.0/0 le 32
router ospf 1
distribute-list prefix AllowedOSPFRoutes in
The prefix-list AllowedOSPFRoutes denies the default route and allows all other routes learned from OSPF to be inserted into the routing table. This configuration has to be applied on all OSPF routers that should not learn the default route via OSPF because for OSPF, this kind of route filtering has effect only on the router where it is configured, and does not influence other routers.
If you, however, need to install the OSPF-learned default route only on a single router and all other routers shall not learn it then there is a question whether is it actually appropriate to use the OSPF to distribute the default route information. You could use a static route on the single router (if a static routing is fine), or use the IP SLA to dynamically install/remove the default route basing on some active test.
Best regards,
Peter
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