7 Replies Latest reply: Aug 27, 2019 3:40 AM by arteq RSS

    as path prepend

    kp

      Hi,

       

      set as-path prepend 100 100 100 100 100


      set as-path prepend 100 100


      Is there any difference in adding  2 times  or more than times


      Thanks


        • 1. Re: as path prepend
          Ing_Percy

          Hi!

           

          About the AS PATH prepend:

           

          "We can add our own autonomous system number multiple times so the as path becomes longer. Since BGP prefers a shorter AS path we can influence our routing. This is called AS path prepending"

           

          Source: How to configure BGP AS Path Prepending | NetworkLessons.com

           

          More information about it:

          AS Prepend in BGP

           

          Using AS path prepending to influence inbound routing — Evil Routers

           

          Best regards!

          • 2. Re: as path prepend
            Samer

            kp wrote:

             

            Hi,

             

            set as-path prepend 100 100 100 100 100


            set as-path prepend 100 100


            Is there any difference in adding  2 times  or more than times


            Thanks


            This is according to your need, for example let's say you got three links to different paths to same destination as in this diagram:

             

            Site A can use prepend to change the inbound traffic to be coming from path B instead of A, but if you prepended more you might end up getting inbound from C instead, so you need to use in a way that you dont get your inbound from a source that makes traffic travel from multiple Autonomous systems and instead choose you prepended AS's after good calculation.

            • 3. Re: as path prepend
              Steven Davidson

              kp wrote:

               

              Hi,

               

              set as-path prepend 100 100 100 100 100


              set as-path prepend 100 100


              Is there any difference in adding  2 times  or more than times


              Thanks


              When everything is left at the default values then AS-PATH length is typically the very first attribute used to make a best path selection and the length is all the matters.  The more you add, the less likely it will be that the path is selected.  So, yes, 100 100 100 100 100 is different than 100 100,

              • 4. Re: as path prepend
                Martin

                In case of as-path it is like a hop count; shortest is equal to lowest number of hops that wins;

                as-path is also used for loop-avoidance, aka loop-free BGP paths

                • 5. Re: as path prepend
                  Elvin Arias

                  When the decision to choose the best route is at the point of the AS-path length, adding additional instances of the AS-path is key.

                   

                  Elvin

                  • 6. Re: as path prepend
                    Ri0N

                    As the others have mentioned, there is a difference in how many times you prepend the AS number. The more times you add the AS number, the less preferred the route becomes (provided that the AS_PATH length is the deciding factor). The BGP path selection algorithm is quite complex and the preferred route is not always based on the AS_PATH attribute.

                    • 7. Re: as path prepend
                      arteq

                      it is considered bad form to do more than a couple, and often isp's will ignore the TE you're trying to accomplish wholesale... most providers have strict rules... obviously for labbing it doesn't matter

                       

                      you are artificially increasing the path so it isn't preferred...