[FROG] Change default zebra routing table
Tito Sacchi
tito+mailinglists at tilde.team
Sat Aug 20 14:42:55 UTC 2022
Hi, it looks like the problem is a /32 route directed to the gateway installed by the DHCP client (systemd-networkd). `show ip route` from vtysh shows:
[…]
C>* 10.8.10.0/24 [0/1024] is directly connected, public, 02:27:44
K>* 10.8.10.1/32 [0/1024] is directly connected, public, 02:27:44
[…]
O 192.168.65.0/24 [110/200] via 10.8.10.1, public inactive, weight 1, 02:27:29
[…]
If I manually remove that /32 route from the routing table and restart FRR, the buggy route (192.168.65.0/24) get installed correctly
and 'nexthop_active: Route Type ospf has not turned on recursion’ does not show up in the logs.
I could manually remove that route (which is completely useful AFAICT) manually before starting FRR with a script, but I still wonder
why FRR fails to use 10.8.10.1 as a valid nexthop, considering that from the above output it sees 10.8.10.1 as `directly connected` just
like the route above. Why does one get a ‘C’ and the other gets a ‘K’? I think that’s the only difference and therefore the only thing that
could be causing the problem.
Thanks,
Tito
> On 19 Aug 2022, at 23:33, Tito Sacchi via frog <frog at lists.frrouting.org> wrote:
>
>
> From: Tito Sacchi <tito+mailinglists at tilde.team>
> Subject: Re: [FROG] Change default zebra routing table
> Date: 19 August 2022 at 23:33:08 CEST
> To: Donald Sharp <donaldsharp72 at gmail.com>
> Cc: FRRouting Operator Group - Users List <frog at lists.frrouting.org>
>
>
> Hi Donald, thanks for your reply.
>
> I made Zebra dump diagnostics information and it produced a *lot* of debugging information in the logs. A relevant extract of the detailed log can be found at
> https://bhh.sh/6gm (pastebin).
>
> I think the lines responsible for the 192.168.65.0/24 route not being installed are the following:
>
> 2022/08/19 15:49:55 ZEBRA: [ZJVZ4-XEGPF] default(0:254):192.168.65.0/24: Examine re 0x557c9e4eb100 (ospf) status: Changed flags: None dist 110 metric 200
> 2022/08/19 15:49:55 ZEBRA: [GG8QH-195KE] nexthop_active_update: re 0x557c9e4eb100 nhe 0x557c9e4eb240 (547), curr_nhe 0x557c9e4eb7d0
> 2022/08/19 15:49:55 ZEBRA: [T9JWA-N8HM5] nexthop_active_check: re 0x557c9e4eb100, nexthop 10.8.10.1, via public
> 2022/08/19 15:49:55 ZEBRA: [M7EN1-55BTH] nexthop_active: Route Type ospf has not turned on recursion
> 2022/08/19 15:49:55 ZEBRA: [HJ48M-MB610] nexthop_active_check: Unable to find active nexthop
> 2022/08/19 15:49:55 ZEBRA: [ZG85Y-SBJH3] nexthop_active_update: re 0x557c9e4eb100 curr_active 0
> 2022/08/19 15:49:55 ZEBRA: [G6MN6-TB7HQ] zebra_nhg_free: nhe 0x557c9e4eb7d0 (0), refcnt 0, NH 10.8.10.1, via public
>
> However, 10.8.10.1 is a perfectly valid nexthop directly connected to the host via the ‘public’ interface.
> `ip -4 neigh` yields:
>
> […]
> id 541 via 10.8.10.1 dev public scope link proto zebra
> […]
>
> `show nexthop-groups rip` from vtysh:
>
> [...]
> ID: 597 (zebra)
> RefCnt: 1
> Uptime: 00:14:31
> VRF: default
> Interface Index: 9
> via 10.8.10.1, public (vrf default) inactive, weight 1
> [...]
> ID: 541 (zebra)
> RefCnt: 1
> Uptime: 00:14:40
> VRF: default
> Valid, Installed
> Interface Index: 9
> via 10.8.10.1, public (vrf default), src 10.8.10.198
> [...]
>
> So apparently Zebra keeps two differentt nexthops directed to 10.8.10.1 on interface ‘public’. Why is one of them kept inactive? I think the issue lies there.
> The thing that I can’t really understand is why (as you can see from the above pastebin) other routes to other nexthops (such as 10.8.10.135) directly attached to the ‘public’ interface are correctly installed. Why doesn’t Zebra consider 10.8.10.1 a nexthop just like 10.8.10.135?
>
> Thanks for your time,
> Tito
>
>> On 19 Aug 2022, at 13:37, Donald Sharp <donaldsharp72 at gmail.com> wrote:
>>
>> table was removed from FRR because it was a broken command and as such no-one could be using it:
>>
>> commit c447ad08b2c880d5f3ef35af2e4055fcbc970961 (origin/pr/4256)
>> Author: Donald Sharp <sharpd at cumulusnetworks.com>
>> Date: Fri May 3 20:54:20 2019 -0400
>>
>> doc, zebra: Remove "table X" command
>>
>> This command is broken and has been broken since the introduction
>> of vrf's. Since no-one has complained it is safe to assume that
>> there is no call for this specialized linux command. Remove
>> from the system with extreme prejudice.
>>
>>
>>
>> An `inactive` route has failed to be installed for a different reason. Not for the reason you have stated. Can we see the output of `show ip route 10.8.10.1` ? Also turn on `debug zebra rib detail` and `debug zebra nexthop detail` and cause the ospf route to be reinstalled. Let's see what the logs spit out.
>>
>> Finally have you looked at FRR's version of PBR? Why wouldn't that work for you?
>>
>> donald
>>
>>
>> On Fri, Aug 19, 2022 at 3:35 AM Tito Sacchi via frog <frog at lists.frrouting.org> wrote:
>>
>>
>>
>> ---------- Forwarded message ----------
>> From: Tito Sacchi <tito+mailinglists at tilde.team>
>> To: frog at lists.frrouting.org
>> Cc:
>> Bcc:
>> Date: Fri, 19 Aug 2022 08:25:49 +0200
>> Subject: Change default zebra routing table
>> Hi everyone,
>>
>> Quagga has a command called ’table’ that can be used to specify which table Zebra should install dynamic routes in.
>> Is there anything similar in FRR?
>> By default, routes are installed in table 254 (‘main’). But I have a complex PBR setup and Zebra fails to install some routes
>> because they are covered by a default route already present in table 254. But because of PBR, packets do not follow that default route and the subnet that comes
>> from OSPF and that I expect Zebra to install is not reachable:
>>
>> K>* 0.0.0.0/0 [0/1024] via 10.8.10.1, eth0, src 10.8.10.135, 06:50:14
>> [...]
>> O 192.168.65.0/24 [110/110] via 10.8.10.1, eth0 inactive, weight 1, 06:50:09
>>
>> I think the last route is not installed (kept ‘inactive’) because it is covered by the default route at the top.
>>
>> How can I tell zebra to consider another routing table? I would like to avoid enslaving all my interfaces to a VRF device.
>> If it cannot be done with a simple ’table’ command, should I use route maps? They support the `set table` action but according to the manual it has to do with BGP and it does not do what I want.
>>
>> Thanks,
>> Tito
>>
>> — — —
>> https://tilde.team/~tito/
>>
>> PGP key: 0x6BED3002CF25C4D2 (4096R)
>> (https://keys.openpgp.org/search?q=0x6BED3002CF25C4D2)
>>
>> Keybase: @tauroh
>> (https://keybase.io/tauroh)
>>
>>
>>
>>
>>
>> ---------- Forwarded message ----------
>> From: Tito Sacchi via frog <frog at lists.frrouting.org>
>> To: frog at lists.frrouting.org
>> Cc:
>> Bcc:
>> Date: Fri, 19 Aug 2022 08:25:49 +0200
>> Subject: [FROG] Change default zebra routing table
>> _______________________________________________
>> frog mailing list
>> frog at lists.frrouting.org
>> https://lists.frrouting.org/listinfo/frog
>
>
>
>
> _______________________________________________
> frog mailing list
> frog at lists.frrouting.org
> https://lists.frrouting.org/listinfo/frog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.frrouting.org/pipermail/frog/attachments/20220820/49aafb15/attachment.htm>
More information about the frog
mailing list