cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1249
Views
0
Helpful
6
Replies

Redustributing routes using route-maps

jidesai01
Level 1
Level 1

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

6 Replies 6

Edison Ortiz
Hall of Fame
Hall of Fame

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

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

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

Giuseppe Larosa
Hall of Fame
Hall of Fame

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

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?

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: