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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

BGP and prepending

Hi,

I would like to know how does prepending works in BGP environment but before that what is prepending?

could you please explain how does BGP works.

9 REPLIES

Re: BGP and prepending

Hello,

AS path prepending will allow you to prolong the AS path by inserting your AS number several times.

A shorter AS path is prefered in BGP path selection.

This means, that you can try to influence the path selection of other ASes in the internet to send traffic back to your AS through your prefered BGP router.

It only makes sense in case you have at least two BGP peerings/connections to the Internet.

I hope this helps! Please rate all posts.

Regards, Martin

New Member

Re: BGP and prepending

Hi,

Prepending means nothing but just addition... IN BGP you can use prepending in case of attribute of AS_path..

IN BGP when a router advertise a route then it will aa its Autonomous system number in route, so in the same way when this route will pass through neighbor router,neighbor router prepend its AS number in the route..

For Examle:-- Router A belongs to AS no.1, Router B belongs to AS no.2 and router C belongs to AS no.3

When A advertise a route to B then in this route A will install its AS number in the AS_path attribute of the route. now the route is in Router B routing table. When B advertise this route to C then B will prepend its own AS number in this route( means add the AS number before the AS number of router A).

So in the route AS_path attribute will be like this...

IN router C

AS_path:-- 3,2,1

Advantage:-- When the same route reaches router 1 then router 1 will check its own as number in as_path attribute. when a will find its own AS number it will drop the packet. so no loops will be created.

Thanks

Mahi

New Member

Re: BGP and prepending

If I am correct all AS-Prepnding does is simply add its own AS # again to the route out to other interfaces ex: Router a router b router c, router a will send a tcp packet on top of layer 3 (igp) in the following format (as number source)ex: router a 65001 router b 65002 router c 65003 so basically when a router (providing it has a peer relationship) will send a packet like the following (65001, 65002) and when c sends the route outbound the packet will look like this (65001,65002,65003) obviously there is more info here(just showing a simple example here).No when we set the bgp prpend option the same route out of router c will look like this(65001,65002,65003,65001).

The best application for this option is when you have one or more links to an internet isp

New Member

Re: BGP and prepending

Hi,

Thanks for the feedback. If its not too much could you please illustrate in a schematic way or using a diagram for to visualized it better.

Thanks again.

br,

ramil

Silver

Re: BGP and prepending

Hi ram,

AS Path prepending is a technique of deliberately extending the AS Path length of a prefix advertisement by adding additional AS numbers into the AS Path of an advertised prefix. Normally the form of AS Path prepending uses the local AS number to perform the prepending.

Just go thro. this link explaining with an example,

http://ispcolumn.isoc.org/2005-08/as1.html

Rate if it does,

Rgs

Purple

Re: BGP and prepending

Hi Ramil,

I've done up a quick example for you which I have attached.

Hope that helps your understanding ...

Paresh

New Member

Re: BGP and prepending

Thank you very much, it gave me more understanding about BG prepending

New Member

Re: BGP and prepending

One quick question, if you configured prepending, is it permanent, I mean unles somebody changes the config, the same path will be taken as long as there is prepending?

Purple

Re: BGP and prepending

Hi,

Well, the router will continue to advertise the pre-pended routes as long you don't change the config.

However, depending on how many times you prepend your AS, changes in the global internet could mean fluctuations in which path is taken to your AS by any particular AS out on the Internet.

Hope that helps - pls do remember to rate posts that help.

Paresh

987
Views
25
Helpful
9
Replies
CreatePlease login to create content