How to see that AS-Prepends are Going out to an External Neighbor

Unanswered Question
Mar 28th, 2008

The IOS Command show ip bgp neighbor a.b.c.d advertised-routes doesn't show the AS-Path one of my route-map is perpending on outgoing routes to an eBGP neighbor. I don't have access to that neighbor.

Is there a way availble to see the Adj-Rib-out with all the changes done by the outgoing route-map?


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3.8 (5 ratings)
sundar.palaniappan Fri, 03/28/2008 - 12:03

I am not in front of a router to check. Have you tried the 'show ip bgp ' command and I believe that might show the prepended AS path and who that's being advertised to.



Edison Ortiz Fri, 03/28/2008 - 12:25

I tried with all debugs possible and that information isn't displayed. Very good question.

I don't think you can see from the originating router as the AS_PATH is being altered as it exits the router, not before.




sundar.palaniappan Fri, 03/28/2008 - 12:57

ok, I justed checked this in my lab and don't see a direct way to establish the as-path is being prepended in updates sent out.

But, whatever match criteria you are using in the route map, acl/prefix lists etc, to prepend the as-path would show the hit count in the access-list or prefix-lists. If it's matched there then we could fairly assume the as-path is being prepended for those prefixes.



marikakis Fri, 03/28/2008 - 15:28


As far as I know people here are right, you cannot see this information in the originating router. So, unless somebody here knows better, I would suggest you checked some looking glasses to see how your routes are propagated to the Internet. Even if your router could show you the information you are looking for, the looking glass is still a better way to check things out, because it shows you how your routes are propagated further away from your own router.

I suppose that for you to be using the prepends, you have more than one BGP session over which you advertise your networks to the Internet. This means that you might have to check various looking glasses or routers in a particular looking glass to see the route with the prepends (because each router makes own choice). You might have to check a few routers the first time, but later, if need arises again, you would be more familiar and go directly to the looking glass and router that interests you.

Some looking glasses you can try are the following:

Kind Regards,


p.s. If you have difficulties seeing the route with the prepends, I would suggest you checked routers in different continents (in Europe and in US for example). If you cannot see it, it doesn't mean it is not out there (unless something is really wrong), but rather that probably you have to search more. Check also if your provider or one of its upstreams has a looking glass. That would be even more helpful.

Harold Ritter Sat, 03/29/2008 - 12:57


In IOS, the Adj-RIB-out is not implemented as a separate entity. Attributes are rather changed as updates are sent to the neighbors. The command "show ip bgp nei a.b.c.d advertised-routes" show you the routes that are advertised to a specific peer but the attributes reflect their value in the loc-rib.

The comamnd "debug ip bgp update " will show some of the attributes but unfortunately not the as-path.

The same command with the detail keyword will dump the entire BGP update but in hex format. Not very useful unless you are very familiar with the BGP protocol and attribute codes or if you have a tool to convert the BGP hex message into something readable.


mohammedmahmoud Sun, 03/30/2008 - 13:35


Agree with everybody, the "show ip bgp neighbors x.x.x.x advertised-routes" command does not take into account any outbound policies, which is sometimes a problem when doing troubleshooting. But i believe that i've read somewhere that this should be changed in future IOS versions, Harold, am i correct about this, does this mean that the Adj-RIB-out is going to be a separate entity updated with all the modified attributes (edit: per neighbor), i believe that Juniper routers do so.


Mohammed Mahmoud.

Harold Ritter Mon, 03/31/2008 - 18:21


It is still being worked on. I do not think the idea is to create a separate structure for the Adj-RIB-out but rather to apply the outbound policy dynamically to the updates as the show command is performed and to show the resulting output.


mohammedmahmoud Tue, 04/01/2008 - 00:51

Hi Harold,

Thanks, i believe that this is a logical modification that needs to be looked at, and i agree that having it done dynamically on the fly makes more sense than creating a separate structure for the Adj-RIB-out.


Mohammed Mahmoud.

Harold Ritter Tue, 04/01/2008 - 03:46


By the way, congratulations for being the featured NetPro of the quarter. Fully deserved.


mohammedmahmoud Tue, 04/01/2008 - 04:07


Thank you very much, being a part of NetPro with people like your self means a lot to me.


Mohammed Mahmoud.


This Discussion