Re: Setting up IPv6

2016-11-18 Thread Robert Elz
Date:Fri, 18 Nov 2016 20:47:05 +0100
From:Rhialto 
Message-ID:  <20161118194704.gi21...@falu.nl>

  | Looking at /etc/rc.d/rtadv, I think it was this line that causes the
  | issue:
  | 
  | cp "$conf" "$chdir$conf"

Ah.  OK, never thought of looking there ...  that's a bug, will fix.

kre




Re: Setting up IPv6

2016-11-18 Thread Rhialto
On Fri 18 Nov 2016 at 12:11:38 +0700, Robert Elz wrote:
> If something is failing to work when the file is not there, I'd call that
> a bug (especially if an empty file works - requiring file to exist, but
> allowing it to be empty, to supply config info, would be simply perverse.)

Looking at /etc/rc.d/rtadv, I think it was this line that causes the
issue:

cp "$conf" "$chdir$conf"

where $conf is the missing file to copy into a chroot directory. I can't
try that out on my server atm though.

So strictly speaking the manual is correct in that the file is
optional, but some support stuff around it isn't careful enough.

> kre
-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/xs4all.nl-- are condemned to reinvent it. Poorly.


signature.asc
Description: PGP signature


Re: Setting up IPv6

2016-11-17 Thread Robert Elz
Date:Thu, 17 Nov 2016 23:40:02 +0100
From:Rhialto 
Message-ID:  <20161117224002.gh21...@falu.nl>

  | At first I had no rtadvd.conf file, but in december 2015 (was that for
  | 7.0?) I found I had to have that file, but it could be empty.

I am not running rtadvd on anything at the minute (v6 routing is all
getting done by commercial routers) so I guess I should set up a test
net and try it out, but I see nothing in the current rtadvd source that
would require that, and the man page still says it is optional.

If something is failing to work when the file is not there, I'd call that
a bug (especially if an empty file works - requiring file to exist, but
allowing it to be empty, to supply config info, would be simply perverse.)

If there was some data that had to be supplied, and could not be inferred
from either a default value or from the existing network, that would be
different, but an empty file cannot contribute any such info...

kre



Re: Setting up IPv6

2016-11-17 Thread Rhialto
On Wed 16 Nov 2016 at 01:26:58 +0700, Robert Elz wrote:
> Greg Troxel     said:
>   | I am unclear on if you need a rtadvd.conf.  
> 
> That should only be required if some of the default parameters need to be 
> altered.   If the default values are OK, then rtadvd will supply them without
> the config file.

At first I had no rtadvd.conf file, but in december 2015 (was that for
7.0?) I found I had to have that file, but it could be empty.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/xs4all.nl-- are condemned to reinvent it. Poorly.


signature.asc
Description: PGP signature


Re: Setting up IPv6

2016-11-15 Thread Robert Elz
Date:Tue, 15 Nov 2016 07:14:34 -0700
From:Andy Ruhl 
Message-ID:  

Re: Setting up IPv6

2016-11-15 Thread Greg Troxel

Andy Ruhl  writes:

> On Tue, Nov 15, 2016 at 4:36 AM, Robert Elz  wrote:
>> If you have a static IPv6 addr from the ISP, you can just configure
>> another subnet for the other interface, and all should be fine.
>
> What subnet? I don't think I have enough information from the original
> message to decide if this is possible. He's only getting a single IPv6
> address from the ISP right?
>
> If I understand this right - if he's doing "autohost" on the hosts,
> those should be getting a /64 advertisement, but it's not clear to me
> where this prefix comes from if it's a global, routable one.

I think this is it.

My setup has one address on my upstream interface (a tunnel), within a
/64 that is shared between me and the tunnel endpoint, and another /64
for my local LAN with an address from that on my router.

I am unclear on if you need a rtadvd.conf.  But you definitely need a
globally routed /64 prefix and address configured on the LAN-facing
interface.

You can also use tcpdump to look for icmp6 and see the RAs.


signature.asc
Description: PGP signature


Re: Setting up IPv6

2016-11-15 Thread Andy Ruhl
On Tue, Nov 15, 2016 at 4:36 AM, Robert Elz  wrote:
> If you have a static IPv6 addr from the ISP, you can just configure
> another subnet for the other interface, and all should be fine.

What subnet? I don't think I have enough information from the original
message to decide if this is possible. He's only getting a single IPv6
address from the ISP right?

If I understand this right - if he's doing "autohost" on the hosts,
those should be getting a /64 advertisement, but it's not clear to me
where this prefix comes from if it's a global, routable one.

I just started using IPv6 and I have to use a tunnel to get it. My
tunnel ISP gives me 2 /64 networks, one for outside and one for
inside. I don't see an "inside" network here...

Andy


Re: Setting up IPv6

2016-11-15 Thread Robert Elz
You need to make sure your router is getting an IPv6 address on its
wm0 interface, not just re0.

If you have a static IPv6 addr from the ISP, you can just configure
another subnet for the other interface, and all should be fine.

If you don't, you'll need to arrange for a prefix delegation from
them, rather than just a single address (or more correctly, in
addition to the address for re0) and then get that assigned to re0.

This is likely to be a common config for IPv6 routers, but I don't
believe that we currently have anything to automate it - when the
current IPv6 and NetBSD config for it was created, it was accepted
wisdom that routers were always configured by humans, and auto-config
of a router was heresy.   That's nonsense, of course, but I don't recall
seeing anyone add the necessary support to NetBSD to make all of this
be seemless - you may need to resort to some smoke and mirrors to
get things working initially.

kre



Re: Setting up IPv6

2016-11-15 Thread Martin Husemann
On Tue, Nov 15, 2016 at 11:52:55AM +0100, Jan Danielsson wrote:
> ip6mode="router"
> rtadvd=yes
> rtadvd_flags="wm0"
> rtsold=no

Did you create an /etc/rtadvd.conf?

I have on like:

re0:\
:addr="2001:XXX::XX::":prefixlen#64:


>The host isn't assigned an IPv6 address; first issue I encountered
> was that, on the host, net.inet6.ip6.accept_rtadv wasn't set to 1.
> (rtsol explicitly said RA's aren't supported by the kernel, so that was
> easily fixed).

You can either have dhcpcd handle the RAs (net.inet6.ip6.accept_rtadv=0,
this is the default) or leave it to the kernel and use dhcpcd for IPv4
only (net.inet6.ip6.accept_rtadv=1).

You can run something like:

dhcpcd -T re0

on the NetBSD host to see what your route publishes.

Martin


Setting up IPv6

2016-11-15 Thread Jan Danielsson
Hello,

   I'm setting up some systems with IPv6 and have some beginner's
questions.  I've mostly been following
http://www.netbsd.org/docs/network/ipv6/

   The specific problem I'm having is that hosts aren't being assigned
an IPv6 address.  (Using RA's).

   The router has a re0 interface which is connected to the ISP, and
four wm[0-3] interfaces.  wm0 is the interface I'm using for the "LAN".
I.e.

  +- host1
router|
   ISP <-> (re0) (wm0) <--+- host2
  |
  +- host3

   The router setup was very easy; in rc.conf:

ip6mode="router"
rtadvd=yes
rtadvd_flags="wm0"
rtsold=no

dhcpcd=YES
dhcpcd_flags="--ipv6only -qM re0"


   Booting this causes system to come up with a public IPv6 address
along side the link-local IPv6 address.  "ping6 netbsd.org" works fine
on the router.

   The host isn't assigned an IPv6 address; first issue I encountered
was that, on the host, net.inet6.ip6.accept_rtadv wasn't set to 1.
(rtsol explicitly said RA's aren't supported by the kernel, so that was
easily fixed).

   Running "ndp -a" on the host shows that it's aware of the router's
wm0 interface (and its fe80:: address), and the router is aware of the host.

   The relevant part of the hosts /etc/rc.conf:

ip6mode="autohost"
dhcpcd=YES

   (There's a dhcpd running on the router for IPv4).

   The FAQ seems to indicate that in autohost mode, the host will
automagically be assigned an address and default router, but that
doesn't appear to happen -- the host only has its link-local address.
(IPv4 works though, so there's no issue with the physical layer).

   I have several hosts on the network; NetBSD, Windows 10, Linux
(Ubuntu 16.04) and even an IPv6 capable printer -- none of which are
assigned a global IPv6 address; so I'm pretty sure the issue is on the
router.

   The wm0 interface only has a link-local IPv6 address -- do I need to
manually assign it a static address?

-- 
Kind Regards,
Jan