cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
605
Views
3
Helpful
1
Replies

bgp - multiple match command

cisconoobie
Level 2
Level 2

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?

1 Reply 1

royalblues
Level 10
Level 10

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

Review Cisco Networking for a $25 gift card