Re: bird not exporting OSPF route
Hey Ondrej, Ondrej Zajicek writes: > On Wed, Feb 28, 2024 at 04:15:32PM +0900, Nico Schottelius via Bird-users > wrote: > Also note you can write the condition using sets: > > if source ~ [ RTS_STATIC, RTS_BGP, RTS_OSPF, RTS_OSPF_IA, RTS_OSPF_EXT1, > RTS_OSPF_EXT2 ] then ... Thank you, twice! Changed it to set and to include all OSPF types and now everything internally looks good! Best regards, Nico -- Sustainable and modern Infrastructures by ungleich.ch
Re: bird not exporting OSPF route
On Wed, Feb 28, 2024 at 04:15:32PM +0900, Nico Schottelius via Bird-users wrote: > > Good morning, > > after switching over to the following filter, as mentioned in the last > mails: > > filter static_and_bgp_and_ospf { > if(source = RTS_STATIC || source = RTS_BGP || source = RTS_OSPF) then > accept; > reject; > } Hi OSPF generates routes with four source values: RTS_OSPF, RTS_OSPF_IA, RTS_OSPF_EXT1 and RTS_OSPF_EXT2. (for internal, inter-area, type 1 external and type 2 external routes). So in your case you just export internal OSPF routes, not the E2 route. Also note you can write the condition using sets: if source ~ [ RTS_STATIC, RTS_BGP, RTS_OSPF, RTS_OSPF_IA, RTS_OSPF_EXT1, RTS_OSPF_EXT2 ] then ... > > bird> show route all for 2a0a:e5c0:2:a::b > Table master6: > 2a0a:e5c0:2:a::b/128 unicast [ospf6 2024-02-26] * E2 (150/10/1) > [147.78.194.129] > via fe80::3eec:efff:fecb:d81a on eth0 > Type: OSPF-E2 univ > OSPF.metric1: 10 > OSPF.metric2: 1 > OSPF.tag: 0x > OSPF.router_id: 147.78.194.129 > > And is there actually a CLI syntax for > verifying that a route is accepted by a filter? show route export (for should be exported) or show route exported (for was exported) -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org) "To err is human -- to blame it on a computer is even more so."
bird not exporting OSPF route
Good morning, after switching over to the following filter, as mentioned in the last mails: filter static_and_bgp_and_ospf { if(source = RTS_STATIC || source = RTS_BGP || source = RTS_OSPF) then accept; reject; } I still see routes that are missing in the kernel, even though they are coming in via OSPF and BGP: bird> show route all for 2a0a:e5c0:2:a::b Table master6: 2a0a:e5c0:2:a::b/128 unicast [ospf6 2024-02-26] * E2 (150/10/1) [147.78.194.129] via fe80::3eec:efff:fecb:d81a on eth0 Type: OSPF-E2 univ OSPF.metric1: 10 OSPF.metric2: 1 OSPF.tag: 0x OSPF.router_id: 147.78.194.129 unicast [router1_place10_v6_v4 2024-02-26 from 2a0a:e5c0:1:8::50] (100/10) [i] via fe80::21b:21ff:febc:bf36 on eth1 Type: BGP univ BGP.origin: IGP BGP.as_path: BGP.next_hop: 2a0a:e5c0:1:8::50 fe80::21b:21ff:febc:bf36 BGP.local_pref: 500 bird> bird> show protocols all kernel_v6 Name Proto Table State Since Info kernel_v6 Kernel master6up 2024-02-05 Channel ipv6 State: UP Table: master6 Preference: 10 Input filter: ACCEPT Output filter: static_and_bgp_and_ospf Routes: 0 imported, 199204 exported, 0 preferred Route change stats: received rejected filteredignored accepted Import updates: 0 0 0 0 0 Import withdraws:0 0--- 0 0 Export updates: 11127835 0 7001--- 11120834 Export withdraws: 1131164---------1133092 bird> show route count filter static_and_bgp_and_ospf 2802064 of 2802068 routes for 937748 networks in table master4 583651 of 583679 routes for 199200 networks in table master6 Total: 3385715 of 3385747 routes for 1136948 networks in 2 tables bird> (BGP can be ignored, the OSPF route is relevant) Checking on the OS side, I see the local IPv6 address 2a0a:e5c0:2:a::a on lo, but not the remote IPv6 address 2a0a:e5c0:2:a::b that should be added: [08:08] server122.place10:~# ip -6 r | grep 2a0a:e5c0:2:a 2a0a:e5c0:2:a::a dev lo proto kernel metric 256 pref medium [08:08] server122.place10:~# ip route get 2a0a:e5c0:2:a::b RTNETLINK answers: Host is unreachable [08:17] server122.place10:~# What am I doing wrong here? And is there actually a CLI syntax for verifying that a route is accepted by a filter? In case of this particular filter there are a lot of matches, so displaying them and checking is not really feasible. Greetings from Seoul, Nico -- Sustainable and modern Infrastructures by ungleich.ch