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

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

Some help needed with BGP


I have 2 main questions.

1. I am connected to 2 ISP's, to both of them I am advertising one of my /24 network. When I use BGP looking glasses, they only show the shortest paths, only the paths to the nearest ISP for them, there is no path for the second ISP. Why ? After that I have a question, then how will the AS Path Prepend work ? How can I manipulate the incoming flow of Data ?

2. If I advertise my whole network /20 to one of the ISP's, and then advertise /24 to another, then the advertisement of /20 is stopped. I have read some ducs and there is no such a statement that if you advertise some routes that are more specific then some others, then you need to agregate the specific ones. But it seems it has to be agregated. Then I have a question, If I agregate my /24 advertisements, can I set as path prepends or any other atribute to some of the specific /24's that will be agregated, so that this atributes wouldnt be dropped ? or more easily, if I need to advertise 1-2 /24's to ISP1 and do not advertise them to ISP2(not advertising also can be considered as prepending huge as path to this /24s). This must not be done by breaking my /20 advertisement to /24 /23's, as they will be agregated by upstream ISPs that is not acceptable.

If you have any advice, idea, URL... something regarding this issues I would be very thankful for them.

Thank you in advance.


Re: Some help needed with BGP

1. BGP does everything in it's power to select the best path only, and forwards that on to it's peers. Load balancing is not what it tries to do. You prepend AS paths when you want one path to be preferred (I use the word preferred as you can only influence another AS, not force them to do anything). The longer the path, the worse the path becomes.

See link on path selection:

2. Here is a link on aggregation in case you haven't seen it:

When you aggregate your /24s, you can aggregate and send the specific /24s, or only send the aggregate. It is your choice which you do, you aren't forced one way or the other. To preserve or change attributes see the aggregation link. You can aggregate some routes in the range and not others, and hence can prepend (change attributes you want) the routes you want. But then you say they will get aggregated by your upstream. No good.

To answer your question, you can use the as-set command to preserve the as-path info in your aggregation, but it will apply to your aggregate (if you use summary only), not individual routes. You can have the aggregate inherit attributes, but again, it won't apply to individual routes anymore, as from the upstream peer's perspective, they (the individual routes that is) no longer exist, only your aggregate does.

Also, get the book by Halabi, Internet Routing Architectures. Explains BGP beautifully.

Hope it helps.


New Member

Re: Some help needed with BGP

You see, I was confused with the fact that, some BGP routers see only path "1" and some only path "2". Then how will the AS-path prepend work, if the BGP router has only 1 path to select... (in 1 path I am considering ISP1 or 2)

As for the agregation, as I have written in my previous post, when I am advertising /20 or /21 blocks, and after that I decide to advertise /24, the advertisement of /20 and /21's are stopped... and after that fact, I got an idea that maybe if I agregate that /24 into /21 or /20, then the old /20 or /21 advertisement will Not be stopped...

Thank you very much for links I will read them very cearfully (again), and will try to find the book you adviced.


Re: Some help needed with BGP

The ISP may see 2 routes, but will only select the best one to route to and to pass on to the peer. The prepending will influence which route is selected as the best.

All the best.


New Member

Re: Some help needed with BGP

I was using BGP looking glass - (the first in altavista, by BGP looking glass) I have tried other as well. There I submit one of the IP's form my network, and chose international, and in the result there are 2-3 paths, one of them is the best, But all of the paths are to the same ISP, there is no path for the second ISP in there. Example my AS 130, ISP1 AS - 110, ISP2 AS - 120


1. AS10 - AS20 - AS110 - AS130

2. AS10 - AS30 - AS 40 - AS110 - AS130

3. AS10 - AS110 - AS130

There is no path for the ISP2, there is no path like AS10 - Someone's AS's - AS120 - AS110.

is that right ?

If there was the path for ISP2, then it is logical that the prepend would work, but when there is no such path ... ?

New Member

Re: Some help needed with BGP


we had exactly the same problem.

the solution was to send a certain community to our "backupprovider"

in which we manipulated the local preference so that they send pakets for us not over the direct connected link to us - they send traffic over the whole internet (over our primaryprovider).

the only thing you have to check is if your provider has comunity implemented in which you can manipulate their local preference. !

hope this helps and greetings from austria