cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
650
Views
0
Helpful
3
Replies

BGP Policy Accounting matching AS number

german.persello
Level 1
Level 1

Hello everyone,

I'm trying to get some statistics on two bgp connections (multihoming, 1 router connected to two different ISP's, different AS numbers ). I've read this documentation -> http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/15-mt/irg-15-mt-book/bgp_policy_accounting.html#d78151e506a1635 which covers almost everything I intend to do. However, I'd like to do the same without communities, matching by destination AS number. According to the docs it's possible but I can't seem to find a way to do this. I'm thinking the config steps should be something like this:

1) route-map my-map permit 10

2) match.... -> Here's where i don't know how to match with the destination AS number

3) set traffic-index <>

then applying:

1) router bgp xxx

2) table-map my-map

3) interface xxx

4) no ip directed-broadcast

5) bgp-policy accounting

Any help would be appreciated. Thanks!

1 Accepted Solution

Accepted Solutions

Francesco Molino
VIP Alumni
VIP Alumni

Hi 

Under the route-map it will be something like match as-path x. 

Indeed you need to build as-path acl using regular expression. 

If you never done that take a look on this INE blog that explain how to achieve that. They're including some examples depending if you want to catch originated as-path or passing through certain as-path...

http://blog.ine.com/2008/01/06/understanding-bgp-regular-expressions/

If you need more help, let new know. 

Thanks 

PS: Please don't forget to rate and mark as correct answer if this answered your question


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

View solution in original post

3 Replies 3

Francesco Molino
VIP Alumni
VIP Alumni

Hi 

Under the route-map it will be something like match as-path x. 

Indeed you need to build as-path acl using regular expression. 

If you never done that take a look on this INE blog that explain how to achieve that. They're including some examples depending if you want to catch originated as-path or passing through certain as-path...

http://blog.ine.com/2008/01/06/understanding-bgp-regular-expressions/

If you need more help, let new know. 

Thanks 

PS: Please don't forget to rate and mark as correct answer if this answered your question


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

Thanks Francesco, I haven't had the chance to try this out but seems the way to go. Thanks for the link!

You're welcome


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question