<div dir="ltr">Hi Julien, <div><br></div><div>It probably comes down to one of the standard BGP rules. Community adding and filtering seem to be ok but you only advertise the routes that are "best" or for which you've got an entry in your routing table. </div><div>If you have multiple upstreams connected the routes are probably spread over your upstreams because they all have different flavours of policy and peering agreements. </div><div><br></div><div>Kind regards</div><div>Kurt</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 4, 2019 at 8:46 AM Julien Sansonnens <<a href="mailto:julien@jsansonnens.ch">julien@jsansonnens.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi, <div><br></div><div>Using BIRD 1.6.4 I want to do something very basic: export routes to a peer to allow transit.<br clear="all"><div><div dir="ltr" class="gmail-m_-8806219674998638809gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr">for that, I start by adding communities to my received routes, so I can distinguish the upstream.<br></div><div dir="ltr"><br></div><div dir="ltr">import filter { <br>if !is_martian() && !is_self_net() && from = bgp_next_hop then { <br>bgp_large_community.add((myas, 100, XX)); #XX for each upstream<br>accept; <br>} <br>else reject; <br>};<br></div><div dir="ltr"><br></div><div dir="ltr">A community is (apparently?) added to each route. I get about 61'000 ipv6 routes from my upstream.<br></div><div dir="ltr"><br></div><div>Now I want to export them to "peer1". Here is my export function: </div><div><br></div><div><div>function bgp_export_peer (){</div><div>if (myas,100,20) ~ bgp_large_community then return true;</div><div>}</div></div><div><br></div><div>here is the problem: it looks like only 123 routes are exported !</div><div><div>bird> show route export peer count</div><div>123 of 362489 routes for 61724 networks</div></div><div><br></div><div>Here is an example of an exported route: </div><div><br></div><div><div>2001:9d8:200b::/48 via 2a06:1287:3308:c0c0::1 on peer-mmnetworks [mmnet 22:24:20] * (100) [AS25577i]</div><div> Type: BGP unicast univ</div><div> BGP.origin: IGP</div><div> BGP.as_path: 207149 206499 204893 206313 6724 8560 25577</div><div> BGP.next_hop: 2a0c:b640:fffe:10:192:220:4:2</div><div> BGP.local_pref: 100</div><div> BGP.community: (666,666) (997,6499) (6724,900) (6724,960) (8560,4) (8560,10000) (57555,0) (57555,4100) (57555,4101) (65010,10000)</div><div> BGP.large_community: (206313, 206313, 206313) (207149, 100, 20)</div></div><div><br></div><div>and an example of a non-exported route: </div><div><br></div><div><div>2406:3003:2032::/48 via 2a06:1287:3308:c0c0::1 on peer-mmnetworks [mmnet 20:48:51] (100) [AS55430i]</div><div> Type: BGP unicast univ</div><div> BGP.origin: IGP</div><div> BGP.as_path: 206499 6939 38861 55430</div><div> BGP.next_hop: 2a06:1287:3308:c0c0::1 fe80::b9d7:d605</div><div> BGP.med: 0</div><div> BGP.local_pref: 100</div><div> BGP.community: (0,2906) (0,6939) (0,12876) (0,12989) (0,13335) (0,15133) (0,15169) (0,16265) (0,16276) (0,16509) (0,20940) (0,22822) (0,32934)</div><div> BGP.large_community: (207149, 100, 20)</div></div><div><br></div><div><div>as you see, my lare community are added on both routes.</div><div>The exported route has my AS as the first value on the left (AS_PATH), which is not the case for the non-exported route.</div><div><br></div><div>Logically, all exported routes should have my AS on the left. Am I missing something? It's probably logical, but I do not understand what's going on here.</div></div><div>In the same way, I can not export any route that comes from my peers (direct connection), since they have only their AS in the path.<br></div><div dir="ltr"><br></div><div dir="ltr">help would be highly appreciated.<br></div><div>cheers, Julien Sansonnens</div><div dir="ltr"><br></div><div dir="ltr"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>