Hi everyone ,I'm using bird2.I wanna export 2602:feda:ab2::/48 from LL_IX to TOHU_IX. LL_IX BGP --- up 12:24:16.896 Established TOHU_IX BGP --- up 12:14:34.736 Established bird> show route protocol LL_IX where bgp_path.len = 0 Table master6: 2602:feda:ab2::/48 unicast [LL_IX 12:26:32.410] * (100) [i] via 2602:feda:ab2::1 on ll-ix So it returns True. bird> show route noexport TOHU_IX for 2602:feda:ab2::/48 all bird> show route export TOHU_IX for 2602:feda:ab2::/48 all But the prefix is not in export or noexport The configuration of the export filter is,So i think that must be exported. export filter { if bgp_export_all() then accept; # if (roa_check(r6, net, bgp_path.last_nonaggregated) ~ [ROA_INVALID, ROA_UNKNOWN]) then reject; # if is_bogon_asn() then reject; # if is_bogon_prefix() then reject; # accept; }; bird> show route for 2602:feda:ab2::/48 all where bgp_export_all() Table master6: 2602:feda:ab2::/48 unicast [LL_IX 12:26:32.410] * (100) [i] via 2602:feda:ab2::1 on ll-ix Type: BGP univ BGP.origin: IGP BGP.as_path: BGP.next_hop: 2602:feda:ab2::1 BGP.local_pref: 100 bird> Why? On Sun, Jun 6, 2021 at 5:58 PM Maria Matějka <maria.matejka@nic.cz> wrote:
Hello!
I'd try: * "show route noexport all" to see what may be the reason to drop the route * add some logging to the filter to see why it is dropped
BTW, what version are you using? As far as I remember, the BGP attributes are behaving differently on export in 1.6 and 2.0
Maria
On June 6, 2021 5:24:38 AM GMT+02:00, "智慧雨泽" <zhihuiyuze@gmail.com> wrote:
Hi,The function i wrote correctly returns net.
bird> show route 2602:feda:ab2::/48 where bgp_export_all() Table master6: 2602:feda:ab2::/48 unicast [LL_IX 02:19:31.236] * (100) [i] via 2602:feda:ab2::1 on ll-ix
But it could be export. bird> show route export TOHU_IX for 2602:feda:ab2::/48 bird>
I think that should be accept export filter { if bgp_export_all() then accept; # if (roa_check(r6, net, bgp_path.last_nonaggregated) ~ [ROA_INVALID, ROA_UNKNOWN]) then reject; # if is_bogon_asn() then reject; # if is_bogon_prefix() then reject; # accept; }; }; } Why is it not exported? The full configuration is.
protocol bgp TOHU_IX { local as LOCAL_ASN; description "tohu ix IX-VPS BGP"; direct; source address 2602:feda:ab5::1; neighbor 2602:feda:ab6::1%'tuhu-ix' as 141011; ipv6 { next hop self; import filter { if is_bogon_asn() then reject; if is_bogon_prefix() then reject; if (roa_check(r6, net, bgp_path.last_nonaggregated) = ROA_VALID) then reject; accept; }; export filter { if bgp_export_all() then accept; # if (roa_check(r6, net, bgp_path.last_nonaggregated) ~ [ROA_INVALID, ROA_UNKNOWN]) then reject; # if is_bogon_asn() then reject; # if is_bogon_prefix() then reject; # accept; }; }; }
function bgp_export() { if net !~ OUR_PREFIXES then return false; if is_bogon_asn() then return false; if is_bogon_prefix() then return false; if net_len_too_long() then { # print "net ", net, " prefix too long"; return false; } if proto = "BGP_Prefix" then return true; if proto = "LL_IX" then{ if bgp_path.len = 0 then{ return true; } } if proto = "TOHU_IX" then{ if bgp_path.len = 0 then{ return true; } } return false; }
function bgp_export_all() { if bgp_export() then { return true; }
if source != RTS_BGP then{ return false; } if is_bogon_asn() then return false; if is_bogon_prefix() then return false; return true; }