Home ·
BGP Expert Test ·
What is BGP? ·
BGP Vendors ·
Links ·
Archives ·
Books ·
My BGP Book | ||
(advertisement) |
The effectiveness of AS path prepending (posted 2021-05-13)
In a recent blog post The Effectiveness of AS Path Prepending (1) Russ White asks:
Just about everyone prepends AS’ to shift inbound traffic from one provider to another—but does this really work? (AS path prepending means making the network path as BGP sees it longer to make a path less attractive so traffic will flow over another, shorter path.) That's an interesting question, as I've been telling people for a long time that it often works too well. A single prepend can flip more than half your traffic from one link to another. In part because of that, Rolf Winter and I worked on a new Origin Preference Attribute that would provide a finer-grained tool for BGP traffic engineering. (Slides, old Internet-Draft, SAC'12 publication.) But the answer that Russ cites from research into AS path prepending makes sense:
We observe that the effectiveness of prepending can strongly depend on the location (for around 20% of cases, ASPP has moved no targets, while for another 20% , it moved almost all targets). The the fact that different networks get such different results when performing AS path prepending can be explained by looking at the type of network and the type of connectivity they have. Suppose a small network X has connections to big ISPs A and B. A and B have direct peering relations with most of the other large ISPs. So to the rest of the world, the two paths to X are the same length:
A X = 2 hops When X now prepends towards A, it's A X X = 3 hops vs B X = 2 hops so most traffic will now flow through the B X path. Prepending was extremely effective. But what if instead of X doing prepending, A prepends. Now for traffic to X, it's still:
A A X = 3 hops But other networks that directly connect to A and have traffic for A itself, it doesn't matter if they see A = 1 hop or A A = 2 hops: the traffic needs to go to A, so the path length isn't considered. Even when network C is a customer of B and C sees a direct path and a path over B:
A A A = 3 hops C will use the direct path, even though it's longer, because the rule is: paths to customers are prioritized over paths to peers and paths to peers over paths to transit providers. So: will AS path prepending be effective? As with most things in life, it depends.
|