Support for 4B ASN in BGP

Martin Mares mj at ucw.cz
Mon Oct 6 14:53:27 CEST 2008


Hi!

> Although in some situations (like having more 4B-non-aware neighbors)
> this implementation might lead to unnecessary converting compared to
> lazy variant, i think it is much simpler and therefore error-proof
> becouse otherwise we have to do reconstruction of real 4B PATH in
> many places (like filter code, printing ...).

Well, keeping all paths in the routing table in a single format would
have the advantage that the filters wouldn't need to care about the
2B/4B issues at all, which looks simpler to me.

The conversion between the format has to be implemented anyway, so we
can convert on both input and output in BGP and let the rest of BIRD
use a common format.

The only disadvantage of this approach I see is that we waste memory
on storing paths with 16-bit AS numbers in the 32-bit format. However,
it is likely that in the future everybody will have to use 32-bit
AS numbers anyway, so it does not make sense to optimize for the
16-bit case too much.

> Variable 'bgp_as4_support' decides whether this router support 4B ASN or
> not. It is possible to disable 4B ASN support (using global option
> 'disable_bgp_as4') (for example for testing or to workaround a bug in
> the neighbor implementation of 4B ASN) but it shouldn't be neccessary to
> change this setting. When bgs_as4_support is enabled, then native
> representation of AS_PATH (type EAF_TYPE_AS_PATH) is 4 B per ASN,
> otherwise it is 2 B per ASN.

I would really like to have this configurable per protocol instance
-- when you want to work around a bug, you usually do not wish to
disable the feature for the whole router, but only for the particular
neighbor.

> The extended attribute AS4_PATH is used only when 4B-aware and
> 4B-non-aware routers communicate together. If BIRD is 4B-aware,
> then it discards such attribute ASAP, and when BIRD is not
> 4B-aware, it is opaque attribute for it.

I have missed the fact that the attribute is only temporary at the
first reading.

As a temporary attribute, it can well be opaque, but we should convert
it to a common fixed format as soon as possible.

				Have a nice fortnight
-- 
Martin `MJ' Mares                          <mj at ucw.cz>   http://mj.ucw.cz/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
DRM 'manages access' in the same way that jail 'manages freedom.'



More information about the Bird-users mailing list