02-11-2010 06:16 AM - edited 03-06-2019 09:40 AM
I am redistributing static and eigrp routes into bgp using route-maps. The problem I am seeing is that all static and eigrp routes are being redistributed into BGP instead of the ones permitted by the access lists. Here is my configuration:
router bgp xxxxx
no synchronization
network x.x.x.x mask x.x.x.x
redistribute eigrp 1 route-map filtereigrptobgp
redistribute static route-map nodefault
default-information originate
no auto-summary
neighbor-x.x.x.x remote-as xxxxx
route-map nodefault permit 10
match ip address 99
route-map nodefault permit 20
route-map filtereigrptobgp permit 10
match ip address 97
access-list 99 permit 0.0.0.0
access-list 97 permit x.x.x.x
access-list 97 permit y.y.y.y
02-11-2010 06:54 AM
I can't see the problem with the EIGRP but your STATIC has 2 route-map entries.
The 2nd route-map entry will allow all routes into BGP.
In addition, your ACL equals to permit any.
If you want to redistribute just the Quad 0, I suggest using a prefix-list instead.
ip prefix-list test permit 0.0.0.0/0
02-12-2010 07:17 AM
Hi Edison,
a small correction here:
access-list 99 permit 0.0.0.0
is not equal to permit any.
It's equal to permitting Quad 0, in fact, while used to filter prefixes.
Using a standard ACL for this purpose is quite tricky, see https://supportforums.cisco.com/message/3011227#3011227
I definitely agree ip prefix-list is much more user-friendly and intuitive.
BR,
Milan
02-12-2010 01:42 PM
I did remove the second route-map entry, and that stopped all the other static routes from being advertised into bgp. Thanks.
02-12-2010 01:32 PM
Hello Jidesai01,
From a route-map named nodefault I would expect a logic like the following:
route-map nodefault deny 10
match ip address 99
route-map nodefault permit 20
in this case this route-map explicitly denies static route 0.0.0.0 from being redistributed into BGP (if exists such a static route) because it matches access-list 99 (the prefix part matches 0.0.0.0)
the second route-map block will permit all other static routes that are present in the IP routing table.
In your case having a permit 10 block instead of a deny 10 block the end result is a "redistribute all existing static routes" into BGP.
if the objective would be to allow ony a default I would use a prefix-list like the one suggested by Edison.
However, even if the default route would be denied by the nodefault route-map you then have the command
default-information originate
that can generate a BGP default route.
So, if a default route is present in the IP routing table the BGP neighbor will receive a BGP prefix 0.0.0.0/0 with whatever formulation of nodefault route-map.
Hope to help
Giuseppe
02-12-2010 01:40 PM
Thanks all for your help. The objective of my configuration was to only advertise the default route and block all other static routes. My understanding on advertising the default route with BGP is that in addition to having the default information originate command, you have to redistribute the default route into bgp. Is that not the case?
02-12-2010 03:55 PM
You're right. You need to redistribute of you use the default information originate command. However, since its obvious that the default route exists in the IGP RIB already, you can use the network statement instead and not worry about explicit redistribution.
Victor
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