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

Regular Expressions Help - Limiting to Two ASN Prepending

Hello,

I want to limit a incoming advertisement in BGP to allowing a maximum of Two ASN's both of which may be prepended.

Need some help with the regular expression.

I have the regular expression that shows only the two ASN's I want that can both be prepended.

Basically I want a customer to be able to advertise their ASN and customer ASN's, but if they don't tell us about customer/customer asn's want to be able to block these from coming into my network;

 

ISP1#show ip bgp regexp ^(60000_)+(59000+)

BGP table version is 56, local router ID is 172.6.101.2
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
*> 10.0.180.0/24    172.6.100.2                            0 60000 60000 59000 59000 59000 59000 ?
*> 10.0.250.0/24    172.6.100.2                            0 60000 60000 59000 59000 59000 59000 ?
*> 192.168.230.0    172.6.100.2                            0 60000 60000 59000 59000 59000 59000 57000 ?  <---- want to exclude this one
*> 192.168.250.0/32 172.6.100.2                            0 60000 60000 59000 59000 59000 59000 ?
*> 192.168.250.1/32 172.6.100.2                            0 60000 60000 59000 59000 59000 59000 i
*> 192.168.251.1/32 172.6.100.2                            0 60000 60000 59000 59000 59000 59000 ?

 

I though it would be something like this

^(60000_)+(59000+)$), but does not work

Any help appreciated.

 

 

 

1 REPLY
New Member

What if you just check

What if you just check "ending in 59000"?

44
Views
0
Helpful
1
Replies