02-09-2004 07:25 PM - edited 03-02-2019 01:29 PM
I have a bgp config with a single router connected to two service providers. One provider appears to be sending me about 29000 routes - I'm only receiving 1407 of them - the other is sending me about 571 routes - I'm receiving 32 of them. I can see this info by issuing the sh ip bgp neigh received-route, sh ip bgp neigh x.x.x.x routes, and sh bgp neigh commands.
Below is my partial config:
router bgp 12345
no synchronization
bgp log-neighbor-changes
network 12.12.12.0 mask 255.255.255.0
timers bgp 30 90
neighbor 12.13.14.15 remote-as 5678
neighbor 12.13.14.15 description ISP_A Peering
neighbor 12.13.14.15 soft-reconfiguration inbound
neighbor 12.13.14.15 route-map ISP_A in
neighbor 12.13.14.15 route-map localonly out
neighbor 20.20.20.20 remote-as 91011
neighbor 20.20.20.20 description ISP_B Peering
neighbor 20.20.20.20 soft-reconfiguration inbound
neighbor 20.20.20.20 route-map ISP_B in
neighbor 20.20.20.20 route-map localonly out
no auto-summary
ip as-path access-list 10 permit ^$
ip as-path access-list 20 permit ^5678$
ip as-path access-list 30 permit ^91011$
ip as-path access-list 30 permit ^12131$
route-map ISP_A permit 10
match as-path 20
!
route-map ISP_B permit 10
match as-path 30
!
route-map localonly permit 10
match as-path 10
From the sh ip bgp neigh x.x.x.x. received-routes command output, it appears as though there are more ASes associated with each of these service providers than I have listed in the as-path access-lists. Do I need to include all of the AS numbers associated with each service provider? Or is there an easier way to accomplish what I'm trying to do? The service providers are sending me their connected routes (partial routes, customer routes), and I want to filter accordingly.
Any assistance would be greatly appreciated.
Regards,
dk
02-09-2004 07:47 PM
According to the route-map applied inbound on your SP connections, you will only receive your SPs routes but not their customers. You would need an as-path access-list that looks something like this to recieve SP routes and directly connected customer routes:
ip as-path access-list 20 permit ^5678_[0-9]*$
ip as-path access-list 30 permit ^19011_[0-9]*$ <== I corrected the ASN since 91011 is not a valid ASN
ip as-path access-list 30 permit ^12131$ <== This is useless since this is not the address of your SP
Hope this helps,
02-10-2004 04:07 AM
Thank you, hritter. I appreciate you confirming my suspicion. I made up the AS numbers and IP addresses, which is why they look bogus.
I found some documentation on CCO that defines the BGP Regular Expressions.
Regards
dk
02-10-2004 04:17 AM
Here are two documents. The first one is BGP specific and the other one is about regexp in general.
http://www.cisco.com/warp/customer/459/26.html
Hope this helps,
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: