SamatsWiki

6to4

Debian configuration

For dynamic IP:

auto 6to4
iface 6to4 inet6 v4tunnel
        address $(ipv6calc --quiet --action conv6to4 $(wget -O - 'http://ifconfig.me/ip' --quiet))
        netmask 16
        gateway ::192.88.99.1
        endpoint 192.88.99.1
        local $(wget -O - 'http://ifconfig.me/ip' --quiet)
        post-up service radvd restart
        post-up service shorewall6 restart
        post-up echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
        post-up ip -6 addr add $(ipv6calc --quiet --action conv6to4 $(wget -O - 'http://ifconfig.me/ip' --quiet))1/64 dev eth0

Traceroute to nearest IPv6 6to4 router

traceroute 192.88.99.1

(!) Need to discuss 6to4 and link to references

6rd

For Qwest, from OpenWrt's forums:

   1 #!/bin/sh
   2 
   3 MYIPADDRESS=N.N.N.N
   4 
   5 CLINKPREFIX="2602"
   6 CLINKLENGTH=24
   7 CLINK6RDNODE=205.171.2.64
   8 
   9 LANINTF=br-lan
  10 WANINTF=pppoe-wan
  11 
  12 V6IPADDR=$(printf "$CLINKPREFIX:%02x:%02x%02x:%02x00::1\n" $(echo $MYIPADDRESS | tr . ' '))
  13 
  14 if [ -n "$V6IPADDR" ]; then
  15         ip tunnel del 6rd
  16     ip addr add $V6IPADDR/64 dev br-lan
  17     ip tunnel add 6rd mode sit local $MYIPADDRESS ttl 64
  18     ip tunnel 6rd dev 6rd 6rd-prefix $CLINKPREFIX::/$CLINKLENGTH
  19     ip addr add $V6IPADDR/$CLINKLENGTH dev 6rd
  20     ip link set 6rd up
  21     ip route add ::/0 via ::$CLINK6RDNODE dev $WANINTF
  22 fi

there's also

ipv6calc

Uncompressed IPv6 address

Print fully uncompressed IPv6 address, w/ colons removed (useful for djbdns):

ipv6calc 2001:db8::1 --out ipv6addr --printfulluncompressed | sed 's/://g'


CategoryCheatSheet

SamatsWiki: CheatSheet/IPv6 (last edited 2012-09-11 19:40:56 by SamatJain)