Redustributing routes using route-maps

Unanswered Question
Feb 11th, 2010

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

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Edison Ortiz Thu, 02/11/2010 - 06:54

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

milan.kulik Fri, 02/12/2010 - 07:17

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

jidesai01 Fri, 02/12/2010 - 13:42

I did remove the second route-map entry, and that stopped all the other static routes from being advertised into bgp.   Thanks.

Giuseppe Larosa Fri, 02/12/2010 - 13:32

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

jidesai01 Fri, 02/12/2010 - 13:40

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?

lamav Fri, 02/12/2010 - 15:55

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

Actions

This Discussion