Re: [PATCH v2 net-next 1/1] Allow user to set metric on default route learned via Router Advertisement.

From: praveen chaudhary
Date: Wed Jan 20 2021 - 01:53:54 EST

> On Jan 19, 2021, at 8:22 PM, David Ahern <dsahern@xxxxxxxxx> wrote:
> On 1/19/21 3:17 PM, praveen chaudhary wrote:
>>>> ----------------------------------------------------------------
>>>> For IPv4:
>>>> ----------------------------------------------------------------
>>>> Config in etc/network/interfaces
>>>> ----------------------------------------------------------------
>>>> ```
>>>> auto eth0
>>>> iface eth0 inet dhcp
>>>> metric 4261413864
>>> how does that work for IPv4? Is the metric passed to the dhclient and it
>>> inserts the route with the given metric or is a dhclient script used to
>>> replace the route after insert?
>> Yes, DHCP client picks config under “iface eth0 inet dhcp” line and if metric is configured, then it adds the metric for all added routes.
> As I recall ifupdown{2} forks dhclient as a process to handle dhcp
> config, and I believe there is a script that handles adding the default
> route with metric. Meaning ... it is not comparable to an RA.

I hope, we both will agree that a fixed metric value on default route learned via RA
restricts Network Administrators today. And such issues hinder the deployment
of IPv6 only networks. So if we agree that in future we may need to allow a
configurable value for metric then this fix makes good sense.
BTW, kindly let me know if there is a better way to configure this metric. I think,
sysctl is the only way.

>> Thanks a lot again for spending time for this Review,
>> This feature will help SONiC OS [and others Linux flavors] for better IPv6 support, so thanks again.
> I think SONiC is an abomination, so that is definitely not the
> motivation for my reviews. :-)

Trying to make things better day by day. That is the only solace for Software Engineers :-).

I really appreciate for your time to review this patch. Cheers.