The internal BGP route was successfully exported but could not be imported
Hello everyone,I use a pure BGP network to form internal routes (because I want to keep the as-path), and the ASN of each router is the same. The vserver of LL_IX successfully export the route bird> show route for 2602:feda:ab2::/48 export HOME_1_ARCH Table master6: 2602:feda:ab2::/48 unreachable [BGP_Prefix 11:52:02.569] (200) But the server at my home could not import it,even i change to import all; bird> show route for 2602:feda:ab2::/48 protocol LL_IX bird> show route for 2602:feda:ab2:: protocol LL_IX bird> This is the code on home server template bgp tpl_ibgp { local as LOCAL_ASN; rr client; direct; ipv6 { next hop self; import all; # import filter { # if is_bogon_asn() then { # print "is bogon asn", net, " for ASN ", bgp_path.last; # reject; # } # if is_bogon_prefix() then { # print "is bogon prefix", net, " for ASN ", bgp_path.last; # reject; # } # if my_opt_prefix() then bgp_path.prepend(LOCAL_ASN); # accept; # }; export filter { if my_opt_prefix() then bgp_path.prepend(LOCAL_ASN); if bgp_export_all() then accept; reject; }; }; } And the log Jul 28 12:16:38 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:38 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:38 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:38 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:40 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:40 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:43 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:43 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:43 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:44 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:45 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:45 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:45 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:47 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:47 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:47 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:47 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:48 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. Jul 28 12:16:48 archlinux bird[71587]: Kernel dropped some netlink messages, will resync on next scan. And the vserver at ll_ix.and log on this server is just about rpki. template bgp tpl_ibgp { local as LOCAL_ASN; rr client; direct; ipv6 { next hop self; # import all; import filter { if is_bogon_asn() then { print "is bogon asn", net, " for ASN ", bgp_path.last; reject; } if is_bogon_prefix() then { print "is bogon prefix", net, " for ASN ", bgp_path.last; reject; } if my_opt_prefix() then bgp_path.prepend(LOCAL_ASN); accept; }; export filter { if my_opt_prefix() then bgp_path.prepend(LOCAL_ASN); if bgp_export_all() then accept; reject; }; }; } Under what circumstances BGP import will only be "ignored? "I think this is the problem. Could soamone help me ? thanks.
On Wed, Jul 28, 2021 at 08:18:44PM +0800, 智慧雨泽 wrote:
Hello everyone,I use a pure BGP network to form internal routes (because I want to keep the as-path), and the ASN of each router is the same.
The vserver of LL_IX successfully export the route bird> show route for 2602:feda:ab2::/48 export HOME_1_ARCH
Table master6: 2602:feda:ab2::/48 unreachable [BGP_Prefix 11:52:02.569] (200)
But the server at my home could not import it,even i change to import all;
bird> show route for 2602:feda:ab2::/48 protocol LL_IX bird> show route for 2602:feda:ab2:: protocol LL_IX bird>
...
Under what circumstances BGP import will only be "ignored? "I think this is the problem.
Hello Generally, BIRD silently ignores route updates that trigger loop detection code (either based on bgp_path, and for route reflectors also based on bgp_cluser_list and bgp_originator_id. I see that you have 'bgp_path.prepend(LOCAL_ASN)' in your export filter, that should not be used in IBGP sessions, as that adds local ASN to bgp_path and triggers loop detection in receiver. Local ASN should be prepended only when prefix is propagated outside of ASN (on EBGP session). Also, it seems that both your sides are route reflectors, that may work if everything is configured properly (every router uses different cluster id, which is router id by default), but it is a fringe setup. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (2)
-
Ondrej Zajicek -
智慧雨泽