[FROG] Any way to force a local route weight to 0 ?

Thomas Martin tmartincpp at gmail.com
Wed Sep 22 07:51:01 UTC 2021


Interesting, I didn't thinked about that.

I will try it out and do some tests, thanks!

Regards,
Thomas

Le mar. 21 sept. 2021 à 13:43, Donald Sharp <donaldsharp72 at gmail.com> a écrit :
>
> Install the local routes into the kernel with a very high metric.
>
> http://docs.frrouting.org/en/latest/zebra.html#administrative-distance
>
> `Zebra does treat Kernel routes as special case for the purposes of Admin Distance. Upon learning about a route that is not originated by FRR we read the metric value as a uint32_t. The top byte of the value is interpreted as the Administrative Distance and the low three bytes are read in as the metric. This special case is to facilitate VRF default routes.`
>
> So create the local routes with a high value of say 4278198272. would cause FRR to read the local route with a admin distance of 255 and a metric of 8192.  This allows FRR to treat the local routes as something that can be overridden.
>
> donald
>
> On Tue, Sep 21, 2021 at 5:09 AM Thomas Martin <tmartincpp at gmail.com> wrote:
>>
>> Hello,
>>
>> I'm looking for a way to be able to force local routes to a weight of
>> 0 (apart from modifying the source code).
>> To be honest I don't think there is but maybe I missed something.
>>
>> My goal is to use a local route as a backup solution (if BGP is down
>> for example), but to use it only if not sent through BGP.
>>
>> Thanks.
>>
>> Regards,
>> Thomas
>>
>> _______________________________________________
>> frog mailing list
>> frog at lists.frrouting.org
>> https://lists.frrouting.org/listinfo/frog



More information about the frog mailing list