All of lore.kernel.org
 help / color / mirror / Atom feed
* Why are IPv6 host and anycast routes referencing lo device?
@ 2016-11-08  1:08 David Ahern
  2016-11-08  2:26 ` YOSHIFUJI Hideaki
  2016-11-08 17:08 ` Hannes Frederic Sowa
  0 siblings, 2 replies; 5+ messages in thread
From: David Ahern @ 2016-11-08  1:08 UTC (permalink / raw)
  To: Hannes Frederic Sowa, YOSHIFUJI Hideaki, netdev


Can anyone explain why host routes and anycast routes for IPv6 are added with the device set to loopback versus the device with the address:

local ::1 dev lo  proto none  metric 0  pref medium
local 2000:1:: dev lo  proto none  metric 0  pref medium
local 2000:1::3 dev lo  proto none  metric 0  pref medium
local 2100:2:: dev lo  proto none  metric 0  pref medium
local 2100:2::3 dev lo  proto none  metric 0  pref medium


This behavior differs from IPv4 where host routes use the device with the address:

broadcast 10.1.1.0 dev eth0  proto kernel  scope link  src 10.1.1.3
local 10.1.1.3 dev eth0  proto kernel  scope host  src 10.1.1.3
broadcast 10.1.1.255 dev eth0  proto kernel  scope link  src 10.1.1.3
broadcast 10.100.2.0 dev eth2  proto kernel  scope link  src 10.100.2.3
local 10.100.2.3 dev eth2  proto kernel  scope host  src 10.100.2.3
broadcast 10.100.2.255 dev eth2  proto kernel  scope link  src 10.100.2.3

The use of loopback pre-dates the git history, so wondering if someone recalls the reason why. We would like to change that to make it consistent with IPv4 - with a sysctl to maintain backwards compatibility.

Thanks,
David

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why are IPv6 host and anycast routes referencing lo device?
  2016-11-08  1:08 Why are IPv6 host and anycast routes referencing lo device? David Ahern
@ 2016-11-08  2:26 ` YOSHIFUJI Hideaki
  2016-11-08  3:00   ` David Ahern
  2016-11-08 17:08 ` Hannes Frederic Sowa
  1 sibling, 1 reply; 5+ messages in thread
From: YOSHIFUJI Hideaki @ 2016-11-08  2:26 UTC (permalink / raw)
  To: David Ahern, Hannes Frederic Sowa, netdev; +Cc: hideaki.yoshifuji

Hi,

David Ahern wrote:
> 
> Can anyone explain why host routes and anycast routes for IPv6 are added with the device set to loopback versus the device with the address:
> 
> local ::1 dev lo  proto none  metric 0  pref medium
> local 2000:1:: dev lo  proto none  metric 0  pref medium
> local 2000:1::3 dev lo  proto none  metric 0  pref medium
> local 2100:2:: dev lo  proto none  metric 0  pref medium
> local 2100:2::3 dev lo  proto none  metric 0  pref medium
> 
> 
> This behavior differs from IPv4 where host routes use the device with the address:
> 
> broadcast 10.1.1.0 dev eth0  proto kernel  scope link  src 10.1.1.3
> local 10.1.1.3 dev eth0  proto kernel  scope host  src 10.1.1.3
> broadcast 10.1.1.255 dev eth0  proto kernel  scope link  src 10.1.1.3
> broadcast 10.100.2.0 dev eth2  proto kernel  scope link  src 10.100.2.3
> local 10.100.2.3 dev eth2  proto kernel  scope host  src 10.100.2.3
> broadcast 10.100.2.255 dev eth2  proto kernel  scope link  src 10.100.2.3
> 
> The use of loopback pre-dates the git history, so wondering if someone recalls the reason why. We would like to change that to make it consistent with IPv4 - with a sysctl to maintain backwards compatibility.

Once I tried I did not work.
You could try again to see what happens.

--yoshfuji

> 
> Thanks,
> David
> 

-- 
Hideaki Yoshifuji <hideaki.yoshifuji@miraclelinux.com>
Technical Division, MIRACLE LINUX CORPORATION

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why are IPv6 host and anycast routes referencing lo device?
  2016-11-08  2:26 ` YOSHIFUJI Hideaki
@ 2016-11-08  3:00   ` David Ahern
  0 siblings, 0 replies; 5+ messages in thread
From: David Ahern @ 2016-11-08  3:00 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki, Hannes Frederic Sowa, netdev

On 11/7/16 7:26 PM, YOSHIFUJI Hideaki wrote:
> Once I tried I did not work.
> You could try again to see what happens.

I did and both worked fine in quick POC testing. I'll do more in-depth testing and send a patch. Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why are IPv6 host and anycast routes referencing lo device?
  2016-11-08  1:08 Why are IPv6 host and anycast routes referencing lo device? David Ahern
  2016-11-08  2:26 ` YOSHIFUJI Hideaki
@ 2016-11-08 17:08 ` Hannes Frederic Sowa
  2016-11-09 20:30   ` David Ahern
  1 sibling, 1 reply; 5+ messages in thread
From: Hannes Frederic Sowa @ 2016-11-08 17:08 UTC (permalink / raw)
  To: David Ahern, YOSHIFUJI Hideaki, netdev

On 08.11.2016 02:08, David Ahern wrote:
> 
> Can anyone explain why host routes and anycast routes for IPv6 are added with the device set to loopback versus the device with the address:
> 
> local ::1 dev lo  proto none  metric 0  pref medium
> local 2000:1:: dev lo  proto none  metric 0  pref medium
> local 2000:1::3 dev lo  proto none  metric 0  pref medium
> local 2100:2:: dev lo  proto none  metric 0  pref medium
> local 2100:2::3 dev lo  proto none  metric 0  pref medium

Does it really matter? For global valid unicast addresses we still
implement the weak model. Thus the interface does not matter at all.

> This behavior differs from IPv4 where host routes use the device with the address:
> 
> broadcast 10.1.1.0 dev eth0  proto kernel  scope link  src 10.1.1.3
> local 10.1.1.3 dev eth0  proto kernel  scope host  src 10.1.1.3
> broadcast 10.1.1.255 dev eth0  proto kernel  scope link  src 10.1.1.3
> broadcast 10.100.2.0 dev eth2  proto kernel  scope link  src 10.100.2.3
> local 10.100.2.3 dev eth2  proto kernel  scope host  src 10.100.2.3
> broadcast 10.100.2.255 dev eth2  proto kernel  scope link  src 10.100.2.3
> 
> The use of loopback pre-dates the git history, so wondering if someone recalls the reason why. We would like to change that to make it consistent with IPv4 - with a sysctl to maintain backwards compatibility.

A sysctl for that sounds like a really bad idea.

Internally the sysctl will change the reference counting of interfaces
and routes towards each other, have small but difficult to find
semantically changes inside the kernel, just for switchting the
interface in iproute/netlink dumps?

If there a good reasons (which can very well be) to switch to have the
interface with the address in the routes, we should switch without
providing the backwards compatibility sysctl.

Bye,
Hannes

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why are IPv6 host and anycast routes referencing lo device?
  2016-11-08 17:08 ` Hannes Frederic Sowa
@ 2016-11-09 20:30   ` David Ahern
  0 siblings, 0 replies; 5+ messages in thread
From: David Ahern @ 2016-11-09 20:30 UTC (permalink / raw)
  To: Hannes Frederic Sowa, YOSHIFUJI Hideaki, netdev

On 11/8/16 10:08 AM, Hannes Frederic Sowa wrote:
> On 08.11.2016 02:08, David Ahern wrote:
>>
>> Can anyone explain why host routes and anycast routes for IPv6 are added with the device set to loopback versus the device with the address:
>>
>> local ::1 dev lo  proto none  metric 0  pref medium
>> local 2000:1:: dev lo  proto none  metric 0  pref medium
>> local 2000:1::3 dev lo  proto none  metric 0  pref medium
>> local 2100:2:: dev lo  proto none  metric 0  pref medium
>> local 2100:2::3 dev lo  proto none  metric 0  pref medium
> 
> Does it really matter? For global valid unicast addresses we still
> implement the weak model. Thus the interface does not matter at all.

Consistency. Why does IPv6 need to have all of these little differences from IPv4? Raises questions from customers, customer support and often requires special handling in s/w. 

> 
>> This behavior differs from IPv4 where host routes use the device with the address:
>>
>> broadcast 10.1.1.0 dev eth0  proto kernel  scope link  src 10.1.1.3
>> local 10.1.1.3 dev eth0  proto kernel  scope host  src 10.1.1.3
>> broadcast 10.1.1.255 dev eth0  proto kernel  scope link  src 10.1.1.3
>> broadcast 10.100.2.0 dev eth2  proto kernel  scope link  src 10.100.2.3
>> local 10.100.2.3 dev eth2  proto kernel  scope host  src 10.100.2.3
>> broadcast 10.100.2.255 dev eth2  proto kernel  scope link  src 10.100.2.3
>>
>> The use of loopback pre-dates the git history, so wondering if someone recalls the reason why. We would like to change that to make it consistent with IPv4 - with a sysctl to maintain backwards compatibility.
> 
> A sysctl for that sounds like a really bad idea.
> 
> Internally the sysctl will change the reference counting of interfaces
> and routes towards each other, have small but difficult to find
> semantically changes inside the kernel, just for switchting the
> interface in iproute/netlink dumps?
> 
> If there a good reasons (which can very well be) to switch to have the
> interface with the address in the routes, we should switch without
> providing the backwards compatibility sysctl.

Works for me. I'd prefer not to add yet another sysctl but that seems to be standard for cases like this.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-11-09 20:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-08  1:08 Why are IPv6 host and anycast routes referencing lo device? David Ahern
2016-11-08  2:26 ` YOSHIFUJI Hideaki
2016-11-08  3:00   ` David Ahern
2016-11-08 17:08 ` Hannes Frederic Sowa
2016-11-09 20:30   ` David Ahern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.