Subject: Re: How to use properly ipv6 autoconf over a router interface?
To: None <>
From: Rui Paulo <>
List: tech-net
Date: 04/30/2006 19:24:51
"Konstantin KABASSANOV" <> writes:

> Hi,
> To enable ipv6 auto-configuration I put the following into /etc/rc.conf:
> ip6mode=autohost
> After that in /etc/rc.local I set:
> sysctl -w net.inet6.ip6.forwarding=1
> This way, my router obtains a valid ipv6 address on one of its network
> interfaces and is able to forward ipv6 traffic between the interfaces.
> But occasionally (probably due to some network losses), it deletes its
> default route (previously obtained by auto-conf). If I try to start a new
> router solicitation, I get the following error. 
> # rtsol ath1
> rtsol: kernel is configured as a router, not a host

This just means net.inet6.ip6.forwarding is 1.

> So my question is if auto-configuration is incompatible with ip6.forwarding
> or if there is a better way to set up this...

I think a clean router configuration would not involve IPv6
autoconfig, but, if you just need to get the address one, here's my
suggestion for ifconfig.ath1:

           !sysctl -w net.inet6.ip6.accept_rtadv=1
           !rtsol $int
           !sysctl -w net.inet6.ip6.accept_rtadv=0

and set ip6mode=router (that's what the machine is doing anyway).

If your address changes often and you really need to run rtsold in the
background I'm not really sure what you can do.

P.S.: the fact that your default route is being lost may be due to
accept_rtadvd=1, but that's just my guess ;-)
  Rui Paulo			<rpaulo@{NetBSD{,-PT}.org,}>