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

bgp advertisment

hey experts,

i hav 2 routers running ibgp asn1 each router connect to difrent isp with ebgp ispa asn2 ispb asn3. i have customer using diffretn asn from mine which is asn4 but connect to my one of my router. how should i advertise only my asn/prefix and asn/prefix of only ispa and asn/prefix coming from ispa to my customer? if i ever able to do that, how can i prevent my custmer to choose ispb when he reach my router?


Re: bgp advertisment

On the ASN4 router you can define the folowing AS-Path access-lists

ip as-path access-list 1 deny _3_

ip as-path access-list 1 permit .*

router bgp 4

neighbor filter-list 1 in

This will deny all the routes that contain the ISP ASN i.e 3

For the second question, you can deny the AS 4 from being advertised to ISPB from AS1 and configure PBR to always point it to ISPA. Not sure whether its the best way though

HTH, rate if it does


Community Member

Re: bgp advertisment


thats good. but what happen if i traceroute a remote host from my customer router with asn4, when the traceroute reach my router and my router have the best route for the remote host through ispb, won't the traceroute be dropped or will it choose ispa?

Community Member

Re: bgp advertisment

While the previous post will indeed filter the information about which prefix's customer (as 4) learns, its up to each router in the path to decide the BEST route based on DESTINATION.

So while AS 4 may only *know* about as 1, as 2, AS 1 is perfectly free to choose ANY route it wishes to deliver the packets to their destination, including AS 3.

So, a policy route is necessary on the routers in AS 1 to ensure if your source is an IP ADDRESS in AS 4, then you will never exit AS 1 via AS 3.

I dont recommend policy routing for this type of multi-as bgp network. What is the downside to AS-4 taking AS-3 anywhere, from AS-1?

Here is another option, perhaps you can look into. Run MPLS between AS-4 and AS-1. Export only AS-2 routes into the AS-4 vrf table.

How is that?

Community Member

Re: bgp advertisment

How about increasing the local-pref value for the Rtr connecting to ISP-A in AS-2

CreatePlease to create content