why are there several times repeated AS number appearing in certain AS path?

1.4k views Asked by At

I try to use the bgpdump shared library to read routeview's MRT format file. In the output, I found the following AS path:

1299 9318 38091 38091 38091 38091 38091 18313

The are many of them and this is only one example.

My question is why the ASN 38091 appears several times? Is it some kind of error? If it is not, why does it happen?

1

There are 1 answers

0
Mike Pennington On BEST ANSWER

You are not seeing an error; the practice of adding an AS number multiple times is called AS Path Prepending (see "Traffic Engineering via Prepending").

One of the criteria that eBGP uses in its best-path selection algorithm is AS-Path-length. In many cases, BGP selects a path paths based on the shortest AS path, therefore AS Path prepending makes those announcements less preferred than announcements that were not prepended.

Some multi-homed eBGP autonomous systems use AS path prepending for traffic-engineering.

As an FYI, this is a short summary of the Cisco IOS BGP Path Selection algorithm (summarized from the hyperlink above)...

  1. Highest weight (a vendor-specific bgp parameter)
  2. Highest local-preference
  3. Prefer if the prefix was locally-originated by the router via a network or aggregate BGP subcommand, or through redistribution from an IGP like OSPF or ISIS.
  4. Prefer the path with shortest AS-Path length. <--- the decision point I mentioned above.
  5. Prefer the path with the lowest origin type.
  6. Prefer the path with the lowest multi-exit discriminator (MED).
  7. Prefer eBGP over iBGP paths.
  8. Prefer the path with the lowest IGP metric to the BGP next hop.
  9. Consider whether multiple paths should be installed (i.e. BGP Multipath)
  10. When both paths are external, prefer the path that was received first (the oldest one).