Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

bgp - multiple match command

Can I use a match in a single route-map like this?

route-map prefmyroute permit 5

match as-path 7

match ip address 2

set local-preference 200

ip as-path access-list 7 permit ^200$

access-list 2 permit 10.10.10.0 0.0.0.255

I want to match ip address 10.10.10.0 comming from as 200 and stamp it with local preference of 200. Is this the command to do it?

  • WAN Routing and Switching
1 REPLY

Re: bgp - multiple match command

Yes you can do that.

Action will be taken only when it satisfies both the match statements

The above command will try to match the prefix 10.10.10.0/24 and assign a Local pref value of 200 if the AS path only has 200 and nothing else

If you want to match the prefix if the as path includes 200 then the as-path access-list should be something like

ip as-path access-list 7 permit ^200_

HTH

Narayan

106
Views
3
Helpful
1
Replies