cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
165
Views
0
Helpful
4
Replies
Highlighted
Beginner

Route-Map with multiple statements.

Hello.

I need to have a route-map that will advertise only a default route (0.0.0.0) and set MED to a neighbor.

Is there an easy way to do this (combine both route maps into 1)

These are my 2 route-maps:

 

! Under BGP area

neighbor 1.1.1.1 route-map route-map-name out

 

! Main area

route-map def-rout-only permit 10

match ip address 1

!

route-map set-med-25 permit 10

match ip address 2

set metric 25

!

access-list 1 permit 0.0.0.0

access-list 2 permit any

 

Thanks.

4 REPLIES 4
VIP Mentor

Re: Route-Map with multiple statements.

Hello,

 

try the below:

 

route-map R_MAP permit 10
match ip address 1
continue 20
exit
route-map R_MAP permit 20
match ip address 2
set metric 25

Beginner

Re: Route-Map with multiple statements.

HI.

I did that and my MED values and prepending are getting pushed to the peer my routes summarisation isn't working. I can see all routes at the peer and from this Router sh ip bgp neigh x.x.x.x adv I can see all routes are getting advertised out.

 

VIP Advisor

Re: Route-Map with multiple statements.

Hello


@James L wrote:

HI.

I did that and my MED values and prepending are getting pushed to the peer my routes summarisation isn't working. I can see all routes at the peer and from this Router sh ip bgp neigh x.x.x.x adv I can see all routes are getting advertised out.

 


Note sure what you mean by route summerization isnt working, However note when you set bgp metric this is ONLY advertised to the neighboring ASN and if that ASN advertises the same prefix to another ASN then that MED you initially set isnt carried in that update.

 



kind regards
Paul

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future
Beginner

Re: Route-Map with multiple statements.

HI.
I got it working by using both Prefix Lists and a Route Map.
I had weird things going on when I was using the continue and linking both RM's together. I was getting the MED and Prepend getting passed down but the default route was coming over plus all other routes.

extract of the configs:
-----------------------------------------
Router connected to Telco

ASN 65000
neighbor (peer with downstream router) prefix-list default-route-only out
neighbor (peer with downstream router) route-map set-med out

ip prefix-list default-route-only seq 10 permit 0.0.0.0/0

access-list 2 permit any

route-map set-med permit 10
match ip address 2
set metric 38
-----------------------------------------
Another Router connected to the Telco:

ASN 65000
neighbor (peer with downstream router) prefix-list default-route-only out
neighbor (peer with downstream router) route-map set-prepend out

ip prefix-list default-route-only seq 10 permit 0.0.0.0/0

access-list 2 permit any

route-map set-prepend permit 10
match ip address 2
set as-path prepend 65000 65000
-----------------------------------------

Downstream Router that is dual connected to the Router's above (nothing special... )

ASN 65001
The-CORE#sh bgp
BGP table version is 23, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
* 0.0.0.0 203.0.113.253 0 65000 65000 65000 1221 1 i
*> 203.0.113.254 38 0 65000 1221 1 i
*> 10.1.1.0/24 0.0.0.0 0 32768 i
*> 203.0.113.0 0.0.0.0 0 32768 i
CORE1#


So looking good. I now am only receiving a default route and MED is also set.
2nd preference upstream router is sending me a default route but with prepend x2
CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards