<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_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>