"6to4" is a script designed to quickly create or delete 6to4 tunnels. It is a lightweight software that simplifies this process for users.
To use 6to4, Linux 2.6 and an appropriate version of iproute are required, and radvd is recommended. Assuming a local end PPP connection IP address of 1.2.3.4, the tunnel is created from 2002:0102:0304::1 to ::192.88.99.1. The local network is assigned the address 2002:0102:0304::/48, and the IPv6 default route is set into the tunnel.
The kernel routing handles the 2002::/16 prefix per the specifications of RFC 3056. The remote address is a globally assigned anycast address for tunneling purposes, and routers around the world handle this transparently. If a dedicated IPv6 tunnel router is available, REMOTE addresses can be changed.
To call this script from /etc/ppp/ip-up, use the command 6to4 up "$4" eth0. Similarly, from /etc/ppp/ip-down, use the command 6to4 down "$4" eth0. As needed, substitute the local ethernet interface for eth0.
To announce the 6to4 network prefix and default route into the local network, use the radvd.conf configuration file. Within this file, the local IPv4 address is redundantly assigned to the tunnel interface. This ensures that radvd picks the address from the tunnel and not the PPP device, which announces the tunnel only when it is truly up.