On 22 Aug 2022, at 20:16, Gert Doering wrote:
> On Mon, Aug 22, 2022 at 02:55:09PM +0200, Kristof Provost wrote:
>>> Now, back to FreeBSD.
>>>
>>>   - our code does not try to set metrics on FreeBSD
>>>   - my reading of route(8) does not show me anything in that direction
>>>     (metric, preference, administrative distance, ...)
>>>   - I do not understand FreeBSD internals well enough to know whether
>>>     it can be done at all, or not.
>>>
>> It???s rather poorly (i.e. not) documented, but it is possible to set a
>> route metric. It???s called a ???weight???, and not actually mentioned
>> in the man page. Or shown in netstat output.
>>
>> But:
>>
>>      $ sudo route add 172.16.2.0/24 10.0.2.1
>>      add net 172.16.2.0: gateway 10.0.2.1
>>      $ sudo route add 172.16.2.0/24 -weight 2 10.0.2.254
>>      add net 172.16.2.0: gateway 10.0.2.254
>
> Oh, this is interesting, and good to know.
>
> What is the default weight?  "1"?
Yes, the default is RT_DEFAULT_WEIGHT:

        /usr/include/net/route.h
        105:#define     RT_DEFAULT_WEIGHT       1

Best regards,
Kristof
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to