<div dir="ltr">Hi,<div>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 <a href="http://bird.network.cz/?get_doc&f=bird-6.html#ss6.2">http://bird.network.cz/?get_doc&f=bird-6.html#ss6.2</a>. This will allow you to import prefixes with your own ASN in the aspath.</div>
<div><br></div><div>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.</div>
<div><br></div><div>Overall, this should let you run everything over eBGP and run two simple island networks.</div><div><br></div><div>Cheers,<br>Tom</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 29, 2014 at 5:52 PM, Thomas Johnson <span dir="ltr"><<a href="mailto:tommyj27@gmail.com" target="_blank">tommyj27@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>I am trying to sort out a chicken-and-egg problem is probably more of a network design question than bird-specific.<br>
<br></div>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.<br>

<br></div>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.<br><br>

</div>At location B, there is a single router (Z), connected to one ISP. It announces its own prefixes upstream.<br><br></div>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.<br>

<br></div>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.<br>

<br></div><div>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.<br><br></div><div>Is there some bit of configuration I am missing? Am I going about this the wrong way? Any thoughts are appreciated.<br>

 <br></div>#<br># router Y<br># site A<br>#<br><br>protocol bgp bgp_he {<br>    local as 12345;<br>    neighbor 1.1.2.69 as 6939;<br><br>    # Export exactly what prefixes we want advertised. No surprises.<br>    export filter {<br>

        if proto = "static_bgp" then accept;<br>        if proto = "portable_bgp" then accept;<br>        reject;<br>    };<br>    # Import filtered routes from upstream.<br>    import filter bgp_in_he;<br>

}<br><br>protocol bgp ibgp_border {<br>    local 6.9.5.212 as 12345;<br>    neighbor 6.9.5.213 as 12345;<br>    multihop 2;<br>    import filter { accept; };<br>    export filter {<br>        if source != RTS_BGP then { reject; }<br>

        if proto = "ibgp_border" then { reject; }<br>        accept;<br>    };<br>}<br><br>protocol bgp ibgp_1b {<br>    local 1.1.2.70 as 12345;<br>    neighbor 7.4.2.132 as 12345;<br>    multihop 10;<br>    import filter { accept; };<br>

    export filter {<br>        if proto = "static_bgp" then accept;<br>        if proto = "portable_bgp" then accept;<br>        reject;<br>    };<br>}<br><br><br>protocol ospf {<br>    # *snip*<br>}<br>

<br>#<br># router X<br># site A<br>#<br><br>protocol bgp bgp_cogent {<br>    local as 12345;<br>    neighbor 3.8.1.105 as 174;<br><br>    # Export exactly what prefixes we want advertised. No surprises.<br>    export filter {<br>

        if proto = "static_bgp" then accept;<br>        if proto = "portable_bgp" && net.len <= 24 then accept;<br>        reject;<br>    };<br>    # Import filtered routes from upstream.<br>

    import filter bgp_in_cogent;<br>}<br><br>protocol bgp ibgp_border {<br>    local 6.9.5.213 as 12345;<br>    neighbor 6.9.5.212 as 12345;<br>    multihop 2;<br><br>    # Send all routes learnt via BGP<br>    import filter { accept; };<br>

    export filter {<br>        if source != RTS_BGP then { reject; }<br>        if proto = "ibgp_border" then { reject; }<br>        accept;<br>    };<br>}<br><br>protocol bgp ibgp_1b {<br>    local 3.8.1.106 as 12345;<br>

    neighbor 7.4.2.132 as 12345;<br>    multihop 10;<br>    import filter { accept; };<br>    export filter {<br>        if proto = "static_bgp" then accept;<br>        if proto = "portable_bgp" && net.len <= 24 then accept;<br>

        reject;<br>    };<br>}<br><br>protocol ospf {<br>    # *snip*<br>}<br><br>#<br># router Z<br># site B<br>#<br><br>template bgp ibgp_A {<br>    debug all;<br>    local 7.4.2.132 as 12345;<br>    multihop 10;<br>    import filter { accept; };<br>

    export filter {<br>        if proto = "static_bgp" then accept;<br>        if proto = "standby_bgp" then accept;<br>        if proto = "portable_bgp" then accept;<br>        reject;<br>    };<br>

}<br><br>protocol bgp ibgp_Y from ibgp_A { neighbor 1.1.2.70 as 12345; };<br>protocol bgp ibgp_X from ibgp_A { neighbor 3.8.1.106 as 12345; };<br><br>template bgp B {<br>    # Set our local AS.<br>    local as 12345;<br>
<br>
    # Export exactly what prefixes we want advertised. No surprises.<br>    export filter {<br>        if proto = "static_bgp" then accept;<br>        if proto = "standby_bgp" then accept;<br>        if proto = "portable_bgp" && net.len <= 24 then accept;<br>

        reject;<br>    };<br>    # Import filtered routes from upstream.<br>    import filter bgp_in_B;<br>}<br><br>protocol bgp bgp_B from B { neighbor 7.4.2.130 as 1212; };<br><div><div><br><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Tom Daly - VP, Infrastructure<br></div><div><a href="mailto:tjd@fastly.com" target="_blank">tjd@fastly.com</a> </div></div>
</div></div>