Sunday, October 24, 2010

Discipline

Mental discipline is much harder to adhere than physical discipline. However, it's the essential drive to a higher altitude in the cruise of life.

Monday, October 11, 2010

Setup isatap router on debian

The ifupdown package on Debian does not support isatap as a mode for v4tunnel. Therefore, one can not simply create a single entry in /etc/network/interfaces to make it work. Anyhow, following are the steps I took to set it up.
  1. Install iproute and radvd
  2. Add "net.ipv6.conf.all.forwarding=1" to /etc/sysctl.conf
  3. Add /etc/radvd.conf containing:
    interface is0
    {
        AdvSendAdvert on;
        UnicastOnly on;
        AdvHomeAgentFlag off;
        prefix 2002:aaaa:bbbb:1::/64
        {
            AdvOnLink on;
            AdvAutonomous on;
            AdvRouterAddr off;
        };
    };
    (replace "2002:aaaa:bbbb:1" with the prefix of your ipv6 subnet)
  4. Since I have my default address connected to a 6to4 tunnel on my eth0 already, I need to add an additional ip4 address to eth0. In /etc/network/interfaces I add the following post-up, and pre-down scripts to eth0:
    post-up ip tunnel add is0 mode isatap local 192.168.1.12 ttl 64
    post-up ip link set is0 up
    post-up ip addr add 2002:aaaa:bbbb:1::5efe:192.168.1.12/64 dev is0
    post-up ip addr add 192.168.1.12/32 dev eth0
    pre-down ip addr del 192.168.1.12/32 dev eth0
    pre-down ip link set is0 down
    pre-down ip tunnel del is0
    (again replace "2002:aaaa:bbbb:1")
  5. Restart the computer or do the following:
    $ sysctl -p
    $ ifdown eth0
    $ ifup eth0
    $ invoke-rc.d radvd start
On the client side, I just installed isatapd, added
ISATAP_ROUTERS="192.168.1.12"
to /etc/default/isatapd, and restarted with "invoke-rc.d isatapd restart". Then, everything works!