Re: netbsd-9 ip6 kernel log messages

2019-08-30 Thread Martin Husemann
On Fri, Aug 30, 2019 at 05:02:40PM +, Martin Husemann wrote:
> FWIW: I started seeing this messages too.
> So far only twice after boot (likely when ND was done for the first time).

This is on a diskless machine, so static IPv4 config, and dhcpcd for IPv6:

ip6mode=autohost
dhcpcd=YES dhcpcd_flags="-6"

It has full IPv6 connectivity (and it works fine).

Martin


Re: netbsd-9 ip6 kernel log messages

2019-08-30 Thread Martin Husemann
FWIW: I started seeing this messages too.
So far only twice after boot (likely when ND was done for the first time).

Martin


Re: netbsd-9 ip6 kernel log messages

2019-08-30 Thread Hauke Fath

On 2019-08-30 03:22, Robert Elz wrote:

Thanks for the detailed analysis!


Since you have v4 statically configured, I will guess that you're
not starting dhcpcd


Correct.


- if that's not running, the kernel is managing
v6 autoconfig for you.

Your initial message said "/var/log/messages gets spammed with..."
from which I have been assuming not just one message, but many.


From dmesg(8):

[...]
[ 97324.649076] in6_setscope: can't set scope for not loopback interface 
vioif0 and loopback address ::1
[ 97324.649076] in6_setscope: can't set scope for not loopback interface 
vioif0 and loopback address ::1
[ 97326.651757] in6_setscope: can't set scope for not loopback interface 
vioif0 and loopback address ::1
[ 97326.651757] in6_setscope: can't set scope for not loopback interface 
vioif0 and loopback address ::1
[ 97330.657141] in6_setscope: can't set scope for not loopback interface 
vioif0 and loopback address ::1
[ 97330.657141] in6_setscope: can't set scope for not loopback interface 
vioif0 and loopback address ::1

[...]

Assuming the time is in seconds, the messages come in pairs, in 
consistent distances of 2, 4 and 4 seconds.



Can you deduce from the timestamps the appoximate frequency, and
perhape correlate that with the frequency of RA messages from whatever
v6 enabled router is on the same (bridged, I am guessing from voif0)
network link?


I tcpdump(8)ed ~1000 icmp6 packets, and there wasn't a single router 
advertisement; they were all "neighbor solicitation"s.


Cheerio,
hauke

--
 The ASCII Ribbon CampaignHauke Fath
() No HTML/RTF in email Institut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
 Respect for open standards  Ruf +49-6151-16-21344


Re: netbsd-9 ip6 kernel log messages

2019-08-29 Thread Robert Elz
Date:Thu, 29 Aug 2019 11:15:47 +0200
From:Hauke Fath 
Message-ID:  

  | I understand. But in terms of network configuration, this is a very 
  | plain  setup, just a static ip4 address. Which is why I am left puzzled...

v6 is designed to autoconfigure, manually configuring something is
not supposed to be needed, so if you're in an environment where v6
is available, that should be happening, unless you take steps to
specifically prevent it.

Since you have v4 statically configured, I will guess that you're
not starting dhcpcd - if that's not running, the kernel is managing
v6 autoconfig for you.

Your initial message said "/var/log/messages gets spammed with..."
from which I have been assuming not just one message, but many.
Can you deduce from the timestamps the appoximate frequency, and
perhape correlate that with the frequency of RA messages from whatever
v6 enabled router is on the same (bridged, I am guessing from voif0)
network link?

That is, I would assume that what you're seeing is the kernel's attempt
to handle the RA messages it is seeing, and if that seems plausible,
it would seem like a good idea to dump one of those, something like

tcpdump -vv -i voif0 -s1600 icmp6

which should result in something like:

 08:16:50.680157 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 24) 
fe80::c0ea:b0ff:fe55:6190 > ff02::1: [icmp6 sum ok] ICMP6, router 
advertisement, length 24
hop limit 64, Flags [managed], pref low, router lifetime 30s, reachable 
time 0s, retrans time 0s
  source link-address option (1), length 8 (1): c4:6e:1f:46:e5:cc
0x:  c46e 1f46 e5cc

(perhaps other icmpv6 messages as well, which will not be relevant for
this, so wait for a RA to fly past - the frequency of the log messages
should give you an idea how long that might be - but allow for these
messages not being synchronised, they are sent at an average interval
but with randomness included in the actual gaps between messages).

My current guess is that perhaps the RA is including loopback the loopback
prefix as an "on link" prefix, and the kernel is actually attempting to
use that, rather than rejecting it.

kre



Re: netbsd-9 ip6 kernel log messages

2019-08-29 Thread Hauke Fath

On 2019-08-29 10:43, Robert Elz wrote:

 Date:Thu, 29 Aug 2019 09:59:01 +0200
 From:Hauke Fath 
 Message-ID:  


   | What gives you the impression that I did?

I misread your ifconfig output.  Sorry.

But that is what the error message you reported mean, when a loopback
address is being added to a non-loopback interface, that message is
logged.   Something is making that happen.


I understand. But in terms of network configuration, this is a very 
plain  setup, just a static ip4 address. Which is why I am left puzzled...



   | ip6 isn't even configured on the machine.

In terms of addresses, no, but it is enabled, as shown in your
ifconfig output.


Well, that is what NetBSD does out of the box.


What is the system's hostname set to?
And what is in either /etc/ifconfig.voif0 or ifconfig_voif0 (whichever
you use) [you can drop any v4 addressees, this is a v6 issue.]


# hostname
oak
# cat ifconfig.vioif0
 netmask 255.255.255.0
#

Cheerio,
hauke

--
 The ASCII Ribbon CampaignHauke Fath
() No HTML/RTF in email Institut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
 Respect for open standards  Ruf +49-6151-16-21344


Re: netbsd-9 ip6 kernel log messages

2019-08-29 Thread Robert Elz
Date:Thu, 29 Aug 2019 09:59:01 +0200
From:Hauke Fath 
Message-ID:  


  | What gives you the impression that I did?

I misread your ifconfig output.  Sorry.

But that is what the error message you reported mean, when a loopback
address is being added to a non-loopback interface, that message is
logged.   Something is making that happen.

  | ip6 isn't even configured on the machine.

In terms of addresses, no, but it is enabled, as shown in your
ifconfig output.

What is the system's hostname set to?
And what is in either /etc/ifconfig.voif0 or ifconfig_voif0 (whichever
you use) [you can drop any v4 addressees, this is a v6 issue.]

kre



Re: netbsd-9 ip6 kernel log messages

2019-08-29 Thread Hauke Fath

On 2019-08-29 00:46, Robert Elz wrote:

Thanks for looking at this.


 Date:Wed, 28 Aug 2019 17:43:04 +0200
 From:Hauke Fath 
 Message-ID:  

   | /netbsd: [ 22431.3702756] in6_setscope: can't set scope for not loopback
   | interface vioif0 and loopback address ::1

::1 should only be configureds as an address on lo0 - why are you
trying to assign it to vioif0 ?


What gives you the impression that I did?

ip6 isn't even configured on the machine. While it has a public ip6 
address, I didn't get to that yet.


# fgrep ::1 /etc/*
/etc/hosts:::1  localhost localhost.
/etc/hosts.allow:ALL :  [::1] 127.
/etc/ntp.conf:restrict ::1
#

is all there is.

Cheerio,
hauke

--
 The ASCII Ribbon CampaignHauke Fath
() No HTML/RTF in email Institut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
 Respect for open standards  Ruf +49-6151-16-21344