BGP path selection

Ondrej Zajicek santiago at crfreenet.org
Mon Mar 29 11:58:04 CEST 2010


On Sun, Mar 28, 2010 at 10:19:59PM +0100, David J Craigon wrote:
> Hello,
> 
> Here's what I want to do. I've got bird running BGP to two transit
> network providers. I want my path selection to be like this:
> 
> 1) Choose the shortest AS path.
> 2) If the AS path is equal in length, prioritise one provider (the
> cheaper one!) over the other.
> 
> Possible, or not? I can do it with local priority, but then all
> traffic goes down one provider. I want to supply the tiebreaker when
> it comes to equal length AS paths.


There are several ways to do that, but they are not straightforward.

One possibility is to abuse origin attribute for this purpose.
Comparison of origin attribute is used as a tiebreaker after AS path
length comparison. So you could modify origin attribute in import filter
(all routes from the first provider get one value, all routes from the
second provider get another value). But you should not export such
modified routes to anybody (as origin attribute is not expected to be
modified), so this way is possible only for non-transit ASes.

But i would suggest something different - just prepend one AS number to
AS path of less prefered provider in import filter. This would lead to
slightly different, but similar behavior. Advantage of this approach is
that you can do it symmetrically in other direction (prepending your AS
number in export filter) and alter incoming traffic and not just outgoing
traffic.

-- 
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20100329/8f899a38/attachment-0001.asc>


More information about the Bird-users mailing list