Date: Wed, 13 Mar 2024 13:40:54 +0000 From: Benoit Chesneau <benoitc@enki-multimedia.eu> To: Zhenlei Huang <zlei@FreeBSD.org> Cc: "freebsd-net@FreeBSD.org" <freebsd-net@freebsd.org>, Alexander Chernikov <melifaro@freebsd.org> Subject: Re: ipv4 route with ipv6 local link nexthop ? Message-ID: <-FgPlJYuzDmWOAQb0LNtOn8Ac77pBNwN6ZEJUYGtOLPpc5uNI8Y5Q6Um_Dc__CKTl4TO73AxAgSVaOKtUosKgJM9slRZZQKvcPYQtRu1Iv8=@enki-multimedia.eu> In-Reply-To: <764E12BF-5D31-4905-98AE-6D745BFD1DC2@FreeBSD.org> References: <Kj1GA9KKe3wVoeEJr0g-4BAiin5cEjGj4ICYDH9LHBT_vpmctoN-2HNS7AjTwNimOVkn5nBoJw50fbLgNdCleBD0p_TZImOet1gFGIfr4-E=@enki-multimedia.eu> <367504DC-48DA-4DFD-9DB6-CC571F0D26B8@FreeBSD.org> <764E12BF-5D31-4905-98AE-6D745BFD1DC2@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi Zhenlei,
Thanks for testing;, I was about to start a vm for it. The workaround works as well. I
It seems the same issue when you want to set a route on a n interface that doesn't have any IPs.
eg.` route add -net 10.200.1.1/32 -iface vlan200` will not work without adding an IPv4 to the interface.
Benoît
On Wednesday, March 13th, 2024 at 14:09, Zhenlei Huang <zlei@FreeBSD.org> wrote:
>> On Mar 13, 2024, at 12:19 PM, Zhenlei Huang <zlei@FreeBSD.org> wrote:
>>
>>> On Mar 13, 2024, at 4:36 AM, Benoit Chesneau <benoitc@enki-multimedia.eu> wrote:
>>>
>>> On latest freebsd 14.0 release , I am trying to join an ipv4 address over an IPV6 local link using the following command :
>>>
>>> `route add -net 10.200.1.1/32 -inet6 fe80::9439:36ff:fef0:7cbd%vlan200`
>>>
>>> But I get the following error:
>>>
>>> ```
>>> route add -net 10.200.1.1/32 -inet6 fe80::9439:36ff:fef0:7cbd%vlan200
>>> add net 10.200.1.1: gateway fe80::9439:36ff:fef0:7cbd%vlan200 fib 0: Invalid argument
>>
>> I guess that is regression by transition of route(8) to NETLINK.
>
>> Can you please build sbin/route from source without NETLINK and give it another try ?
>>
>> ```
>> # cd /usr/src/sbin/route
>> # setenv MK_NETLINK_SUPPORT no
>> # make
>> ```
>
> Hi Benoit,
>
> I managed to repeat this bug.
>
> As a workaround, add an IPv4 address to the outgoing interface (vlan200 in your case),
> ```
> # ifconfig vlan200 inet x.x.x.x/y
> ```
>
> then retry adding the route
> ```
> # route add -net 10.200.1.1/32 -inet6 fe80::9439:36ff:fef0:7cbd%vlan200
> ```
>
>>> ```
>>>
>>> ping6 to `fe80::9439:36ff:fef0:7cbd%vlan200` works. What I am doing wrong? Configuration of the interface is the following:
>>>
>>> ```
>>> vlan200: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
>>> options=4600703<RXCSUM,TXCSUM,TSO4,TSO6,LRO,RXCSUM_IPV6,TXCSUM_IPV6,MEXTPG>
>>> ether fe:d9:dd:2d:35:c5
>>> inet6 fe80::fcd9:ddff:fe2d:35c5%vlan200 prefixlen 64 scopeid 0x5
>>> groups: vlan
>>> vlan: 200 vlanproto: 802.1q vlanpcp: 0 parent interface: iavf0
>>> media: Ethernet autoselect (10Gbase-SR <full-duplex>)
>>> status: active nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL
>>>
>>> ```
>>>
>>> Benoît
>>
>> Best regards,
>> Zhenlei
[-- Attachment #2 --]
<div style="font-family: Arial, sans-serif; font-size: 14px;">Hi Zhenlei, </div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">Thanks for testing;, I was about to start a vm for it. The workaround works as well. I</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">It seems the same issue when you want to set a route on a n interface that doesn't have any IPs. </div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">eg.` <span>route add -net 10.200.1.1/32 -iface vlan200` will not work without adding an IPv4 to the interface.</span></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div>
<div style="font-family: Arial, sans-serif; font-size: 14px;" class="protonmail_signature_block">
<div class="protonmail_signature_block-user">
<div style="font-style: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; color: rgb(0, 0, 0);">Benoît </div></div>
</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div class="protonmail_quote">
On Wednesday, March 13th, 2024 at 14:09, Zhenlei Huang <zlei@FreeBSD.org> wrote:<br>
<blockquote type="cite" class="protonmail_quote">
<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 13, 2024, at 12:19 PM, Zhenlei Huang <<a target="_blank" rel="noreferrer nofollow noopener" href="mailto:zlei@FreeBSD.org" class="">zlei@FreeBSD.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class="Apple-interchange-newline"><br class=""><blockquote type="cite" class=""><div class="">On Mar 13, 2024, at 4:36 AM, Benoit Chesneau <<a target="_blank" rel="noreferrer nofollow noopener" href="mailto:benoitc@enki-multimedia.eu" class="">benoitc@enki-multimedia.eu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="font-family: Arial, sans-serif; font-size: 14px;">On latest freebsd 14.0 release , I am trying to join an ipv4 address over an IPV6 local link using the following command :</div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;"><br class=""></div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;"><span class="">`route add -net 10.200.1.1/32 -inet6 fe80::9439:36ff:fef0:7cbd%vlan200`</span><br class=""></div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;"><span class=""><br class=""></span></div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;"><span class="">But I get the following error:</span></div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;"><span class=""><br class=""></span></div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;">```</div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;"><span class="">route add -net 10.200.1.1/32 -inet6 fe80::9439:36ff:fef0:7cbd%vlan200</span><br class=""><span class="">add net 10.200.1.1: gateway fe80::9439:36ff:fef0:7cbd%vlan200 fib 0: Invalid argument</span><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">I guess that is regression by transition of route(8) to NETLINK.</div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div class=""><br class=""></div><div class="">Can you please build sbin/route from source without NETLINK and give it another try ?</div><div class=""><br class=""></div><div class="">```</div><div class=""># cd /usr/src/sbin/route</div><div class=""># setenv MK_NETLINK_SUPPORT no</div><div class=""># make</div><div class="">```</div></div></div></blockquote><div><br class=""></div><div>Hi Benoit,</div><div><br class=""></div><div>I managed to repeat this bug.</div><div><br class=""></div><div><div>As a workaround, add an IPv4 address to the outgoing interface (vlan200 in your case),</div><div>```</div><div># ifconfig vlan200 inet x.x.x.x/y</div><div>```</div><div><br class=""></div><div>then retry adding the route</div><div>```</div><div># route add -net 10.200.1.1/32 -inet6 fe80::9439:36ff:fef0:7cbd%vlan200</div><div>```</div><div class=""><br class=""></div></div><blockquote type="cite" class=""><div class=""><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""><blockquote type="cite" class=""><div class=""><div class="" style="font-family: Arial, sans-serif; font-size: 14px;">```</div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;"><br class=""></div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;">ping6 to `<span class="" style="text-decoration: none; background-color: rgb(255, 255, 255); display: inline !important;">fe80::9439:36ff:fef0:7cbd%vlan200` works. What I am doing wrong? Configuration of the interface is the following:</span></div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;"><span class="" style="text-decoration: none; background-color: rgb(255, 255, 255); display: inline !important;"><br class=""></span></div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;">```</div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;"><span class="">vlan200: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500</span><div class=""><span class=""> options=4600703<RXCSUM,TXCSUM,TSO4,TSO6,LRO,RXCSUM_IPV6,TXCSUM_IPV6,MEXTPG></span></div><div class=""><span class=""> ether fe:d9:dd:2d:35:c5</span></div><div class=""><span class=""> inet6 fe80::fcd9:ddff:fe2d:35c5%vlan200 prefixlen 64 scopeid 0x5</span></div><div class=""><span class=""> groups: vlan</span></div><div class=""><span class=""> vlan: 200 vlanproto: 802.1q vlanpcp: 0 parent interface: iavf0</span></div><div class=""><span class=""> media: Ethernet autoselect (10Gbase-SR <full-duplex>)</span></div><div class=""><span class=""> status: active</span></div><span class=""> nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL</span><br class=""></div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;">```</div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;"><span class=""><br class=""></span></div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;"><span class=""><br class=""></span></div><div class="" style="font-family: Arial, sans-serif; font-size: 14px;"><br class=""></div><div class="protonmail_signature_block" style="font-family: Arial, sans-serif; font-size: 14px;"><div class="protonmail_signature_block-user"><div class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px;">Benoît </div></div></div></div></blockquote></div><br class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div class="">Best regards,</div><div class="">Zhenlei</div></div></div></blockquote></div><br class=""><div class="">
<div><br class=""></div>
</div>
<br class="">
</blockquote><br>
</div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?-FgPlJYuzDmWOAQb0LNtOn8Ac77pBNwN6ZEJUYGtOLPpc5uNI8Y5Q6Um_Dc__CKTl4TO73AxAgSVaOKtUosKgJM9slRZZQKvcPYQtRu1Iv8=>
