From your (single) IPv4 address, you get a whole IPv6 /48 network, which allows you to split your network in 2^16 subnets, with 2^64 hosts each. You need to setup routing for your internal network properly, help is provided for setting up the border router here.
This script takes the burden to calculate your IPv6 address from existing IPv4 address and runs the commands to setup (and tear down) automatic 6to4 IPv6 tunnelling. In a seperate step, router advertisement for the inside network can be started and stopped.
Possible options are:
Possible commands are:
stf(4)
interface is configured, and a default route to a remote 6to4
gateway is established. In addition, the internal
network interface is assigned an address.
stf(4)
device, and the default route is removed.
rtadvd(8)
is invoked with a custom config file created under
/var/run
.
Clients just need to be told to accept router advertizements, i.e.
the
`net.inet6.ip6.accept_rtadv'
sysctl needs to be set to
`1'.
You can arrange that by setting
``ip6mode=autohost''
in
/etc/rc.conf
.
rtadvd(8)
is stopped, and the
rtadvd.conf(5)
config file is removed from
/var/run
.
stf(4)
device in your kernel. While the GENERIC NetBSD 1.5 kernel does
support IPv6, it does not contain support for the
stf(4)
device.
Make sure you have the following options in your kernel config file:
options INET # IP + ICMP + TCP + UDP
options INET6 # IPV6
pseudo-device stf 1 # 6to4 IPv6 over IPv4 encapsulation
In systems that run past-1.5 NetBSD-current, you will have to
explicitly create an
stf(4)
device after compiling it in the kernel. You do this by running
the following command before calling the
6to4
script:
ifconfig stf0 create
No special values are needed in
/etc/rc.conf
to run this script, but see comment on setting up IPv6-clients
`behind'
your 6to4 router for the
rtadvd-start
command!
6to4.conf.
The
6to4.conf
file is in
perl(1)
syntax, and contains several
variables that can be tuned to adjust your setup. Default values
should work for use on a modem dialup.
pppd(8)
when a connection is made. For this, put the following into
/etc/ppp/ip-up
:
( /usr/pkg/sbin/6to4 stop
/usr/pkg/sbin/6to4 start ) &
To shut down properly, put this into
/etc/ppp/ip-down
:
/usr/pkg/sbin/6to4 stop
stf(4)
,
``6to4 IPv6 Explained''
at
http://www.feyrer.de/NetBSD/6to4.html
,
NetBSD IPv6 Documentation at
http://www.netbsd.org/Documentation/network/ipv6/
.