announcing BGP prefixes from the same AS at different sites?

Tom Daly tjd at fastly.com
Sat Aug 30 01:36:41 CEST 2014


Hi,
It sounds like you might want to try disabling aspath loop detection for
eBGP. Checkout the bird option called "allow local as [number]" as
documented at http://bird.network.cz/?get_doc&f=bird-6.html#ss6.2. This
will allow you to import prefixes with your own ASN in the aspath.

However, one possible pitfall is that your upstream ISP's router might try
to be smart - and not send prefixes with your aspath in them too. Older
Foundry boxes do this and there is a per BGP peer knob you have to turn.

Overall, this should let you run everything over eBGP and run two simple
island networks.

Cheers,
Tom


On Fri, Aug 29, 2014 at 5:52 PM, Thomas Johnson <tommyj27 at gmail.com> wrote:

> I am trying to sort out a chicken-and-egg problem is probably more of a
> network design question than bird-specific.
>
> I am using bird to announce prefixes from two geographically-separate
> locations (A and B). I am announcing different prefixes at each, but with
> the same AS. The problem I am having is how to get these locations to add
> each other's routes.
>
> At location A, I have a pair of bird routers (X and Y), each connected to
> a different provider. Both routers announce the prefixes for this site over
> eBGP. These routers have an iBGP session between them.
>
> At location B, there is a single router (Z), connected to one ISP. It
> announces its own prefixes upstream.
>
> Since both sites announce with the same AS, they don't import the other's
> prefixes. An iBGP full-mesh seems to be the _correct_ solution, but I am
> having trouble getting this implemented correctly.
>
> If I configure the inter-site iBGP sessions to connect between the
> addresses on the WAN interfaces, I get partial success. At site A, router X
> correctly adds routes for site B. Router Y establishes a connection to
> router Z (site B), but adds the B prefixes as unreachable. The difference
> is that the Y->Z BGP connection (A->B direction) is routed via router X
> (shorter AS path via X ISP). My configuration files for this setup are
> below.
>
> If I attempt to establish the inter-site iBGP between the loopbacks on the
> routers, I have no success, since the loopback addresses fall with the
> subnets I announce at each site.
>
> Is there some bit of configuration I am missing? Am I going about this the
> wrong way? Any thoughts are appreciated.
>
> #
> # router Y
> # site A
> #
>
> protocol bgp bgp_he {
>     local as 12345;
>     neighbor 1.1.2.69 as 6939;
>
>     # Export exactly what prefixes we want advertised. No surprises.
>     export filter {
>         if proto = "static_bgp" then accept;
>         if proto = "portable_bgp" then accept;
>         reject;
>     };
>     # Import filtered routes from upstream.
>     import filter bgp_in_he;
> }
>
> protocol bgp ibgp_border {
>     local 6.9.5.212 as 12345;
>     neighbor 6.9.5.213 as 12345;
>     multihop 2;
>     import filter { accept; };
>     export filter {
>         if source != RTS_BGP then { reject; }
>         if proto = "ibgp_border" then { reject; }
>         accept;
>     };
> }
>
> protocol bgp ibgp_1b {
>     local 1.1.2.70 as 12345;
>     neighbor 7.4.2.132 as 12345;
>     multihop 10;
>     import filter { accept; };
>     export filter {
>         if proto = "static_bgp" then accept;
>         if proto = "portable_bgp" then accept;
>         reject;
>     };
> }
>
>
> protocol ospf {
>     # *snip*
> }
>
> #
> # router X
> # site A
> #
>
> protocol bgp bgp_cogent {
>     local as 12345;
>     neighbor 3.8.1.105 as 174;
>
>     # Export exactly what prefixes we want advertised. No surprises.
>     export filter {
>         if proto = "static_bgp" then accept;
>         if proto = "portable_bgp" && net.len <= 24 then accept;
>         reject;
>     };
>     # Import filtered routes from upstream.
>     import filter bgp_in_cogent;
> }
>
> protocol bgp ibgp_border {
>     local 6.9.5.213 as 12345;
>     neighbor 6.9.5.212 as 12345;
>     multihop 2;
>
>     # Send all routes learnt via BGP
>     import filter { accept; };
>     export filter {
>         if source != RTS_BGP then { reject; }
>         if proto = "ibgp_border" then { reject; }
>         accept;
>     };
> }
>
> protocol bgp ibgp_1b {
>     local 3.8.1.106 as 12345;
>     neighbor 7.4.2.132 as 12345;
>     multihop 10;
>     import filter { accept; };
>     export filter {
>         if proto = "static_bgp" then accept;
>         if proto = "portable_bgp" && net.len <= 24 then accept;
>         reject;
>     };
> }
>
> protocol ospf {
>     # *snip*
> }
>
> #
> # router Z
> # site B
> #
>
> template bgp ibgp_A {
>     debug all;
>     local 7.4.2.132 as 12345;
>     multihop 10;
>     import filter { accept; };
>     export filter {
>         if proto = "static_bgp" then accept;
>         if proto = "standby_bgp" then accept;
>         if proto = "portable_bgp" then accept;
>         reject;
>     };
> }
>
> protocol bgp ibgp_Y from ibgp_A { neighbor 1.1.2.70 as 12345; };
> protocol bgp ibgp_X from ibgp_A { neighbor 3.8.1.106 as 12345; };
>
> template bgp B {
>     # Set our local AS.
>     local as 12345;
>
>     # Export exactly what prefixes we want advertised. No surprises.
>     export filter {
>         if proto = "static_bgp" then accept;
>         if proto = "standby_bgp" then accept;
>         if proto = "portable_bgp" && net.len <= 24 then accept;
>         reject;
>     };
>     # Import filtered routes from upstream.
>     import filter bgp_in_B;
> }
>
> protocol bgp bgp_B from B { neighbor 7.4.2.130 as 1212; };
>
>
>


-- 
Tom Daly - VP, Infrastructure
tjd at fastly.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20140829/7eeba814/attachment-0001.html>


More information about the Bird-users mailing list