Is it normal to see a path as such in my BGP update ?

12 34 33 2 2 45 331 

As I can see from the path above, AS number "2" appears twice ! Is it normal ? Are they any scenarios that could have made this to happen ? Is it an anomaly ? If it's like that, how does routing occur after a packet has reached AS 2 ? will AS 2 forward the traffic to itself again prior sending to 45 ?

2 Answers 2


Yes, this can be done by BGP and is called AS prepending.

The objective is to change the best route taken by BGP, since the shortest AS path is preferred by BGP.

In your case there might be another path with one AS 2 only, thus BGP will select the other route, not this one.

Example would be a site with 2 WAN links to the internet, if we prepend our AS on one of the links, then hosts from outside of our AS will prefer the other link when sending traffic to us because the see shorter AS path to 2nd link.

Traffic is routed normally to to next AS when it reaches AS 2.

  • 1
    to add to your answer: AS-Path Prepending is a Basic route manipulation technique used to attract traffic to certain links by making other links look unattractive. Ex: you have 2 links to different providers for redundancy reason, one costing you more than the other and unfortunately they're very well connected and would normally be prefered. You simply add a few of your own AS to all prefix advertised to that provider and Voila, this provider now has a longer AS-Path for your prefix and isn't the prefered one anymore! Commented Feb 7, 2014 at 17:54
  1. This is called AS path prepending. This is generally done using route maps. For designating one path as bestpath, other paths to the same destinations is augmented with AS numbers, thus incrementing their AS path length.

  2. When some route with this AS path (12 34 33 2 2 45 331 ) reaches AS 2, AS 2 will see a routing loop and will not add it in its Loc-RIB. Hence this route will not be forwarded to its neighbours.

  • 1
    The 2nd statement is not correct. AS2 will forward the traffic to AS45, this is in no way considered a routing loop.
    – Teun Vink
    Commented Feb 9, 2014 at 17:34
  • Soumen Das implies "BGP Update" route loop.
    – t3mp
    Commented Feb 10, 2014 at 12:35
  • When some update NLRI with AS path (12 34 33 2 2 45 331 ) reaches AS2, it will consider it as a routing loop and wouldn't store it in its Loc-RIB
    – Soumen Das
    Commented Feb 10, 2014 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.