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

BGP config assistance needed

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

3 REPLIES
Cisco Employee

Re: BGP config assistance needed

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,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Community Member

Re: BGP config assistance needed

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

Cisco Employee

Re: BGP config assistance needed

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

http://www.cisco.com/en/US/partner/products/sw/iosswrel/ps1835/products_configuration_guide_chapter09186a00800ca7e6.html

Hope this helps,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
102
Views
5
Helpful
3
Replies
CreatePlease to create content