{"id":399,"date":"2011-02-20T15:21:23","date_gmt":"2011-02-20T23:21:23","guid":{"rendered":"http:\/\/znark.com\/blog\/?p=399"},"modified":"2011-02-20T15:21:23","modified_gmt":"2011-02-20T23:21:23","slug":"ipv6-linksys-dd-wrt-comcast-6to4","status":"publish","type":"post","link":"https:\/\/znark.com\/blog\/2011\/02\/ipv6-linksys-dd-wrt-comcast-6to4\/","title":{"rendered":"IPv6: Linksys, DD-WRT, Comcast 6to4"},"content":{"rendered":"<p>I got IPv6 working with my home router, DD-WRT, and Comcast&#8217;s 6to4 service.<br \/>\n[6to4](http:\/\/en.wikipedia.org\/wiki\/6to4) works by setting up a tunnel for IPv6 over IPv4. It uses the anycast address 192.88.99.1 as the tunnel endpoint. The IPv6 address is constructed from the host&#8217;s IPv4 address with 2002: prefix. 6to4 only works for hosts with public IP address which is why it has to be run on the router. [Comcast has 6to4 proxies](http:\/\/www.comcast6.net\/6to4-config.php). [Comcast was testing 6RD](http:\/\/www.comcast6.net\/6rd-config.php) which is similar but the prefix and proxy address are configured.<\/p>\n<p>First, I had to flash [DD-WRT to my WRT400N](http:\/\/www.dd-wrt.com\/wiki\/index.php\/Linksys_WRT400N). Second, I had to [enable IPv6](http:\/\/www.dd-wrt.com\/wiki\/index.php\/IPv6). The [6to4 config for 2.6 kernels](http:\/\/www.dd-wrt.com\/wiki\/index.php\/IPv6#6to4_on_k2.6_builds) requires a radvd config and startup script to be entered. Also, the scripts had to be changed for the WRT400N since they don&#8217;t have vlan2 device but eth1 worked.<\/p>\n<p>radvd config:<\/p>\n<p>    interface br0 {<br \/>\n    MinRtrAdvInterval 3;<br \/>\n    MaxRtrAdvInterval 10;<br \/>\n    AdvLinkMTU 1480;<br \/>\n    AdvSendAdvert on;<br \/>\n    prefix 0:0:0:1::\/64 {<br \/>\n    AdvOnLink on;<br \/>\n    AdvAutonomous on;<br \/>\n    AdvValidLifetime 86400;<br \/>\n    AdvPreferredLifetime 86400;<br \/>\n    Base6to4Interface eth1;<br \/>\n    };<br \/>\n    }; <\/p>\n<p>Startup script:<\/p>\n<p>    insmod \/lib\/modules\/`uname -r`\/kernel\/net\/ipv6\/sit.ko<br \/>\n    sleep 5<br \/>\n    radvd -C \/tmp\/radvd.conf start<br \/>\n    sleep 5<br \/>\n    WANIP=$(ip -4 addr show dev eth1 | grep &#8216;inet &#8216; | awk &#8216;{print $2}&#8217; | cut -d\/ -f1)<br \/>\n    if [ -n &#8220;$WANIP&#8221; ]<br \/>\n    then<br \/>\n    V6PREFIX=$(printf &#8216;2002:%02x%02x:%02x%02x&#8217; $(echo $WANIP | tr . &#8216; &#8216;))<br \/>\n    ip tunnel add tun6to4 mode sit ttl 255 remote any local $WANIP<br \/>\n    ip link set tun6to4 mtu 1480<br \/>\n    ip link set tun6to4 up<br \/>\n    ip addr add $V6PREFIX:0::1\/16 dev tun6to4<br \/>\n    ip addr add $V6PREFIX:1::1\/64 dev br0<br \/>\n    ip -6 route add 2000::\/3 via ::192.88.99.1 dev tun6to4<br \/>\n    kill -HUP $(cat \/var\/run\/radvd.pid)<br \/>\n    fi<br \/>\n    sleep 10<br \/>\n    radvd -C \/tmp\/radvd.conf start <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got IPv6 working with my home router, DD-WRT, and Comcast&#8217;s 6to4 service. [6to4](http:\/\/en.wikipedia.org\/wiki\/6to4) works by setting up a tunnel for IPv6 over IPv4. It uses the anycast address 192.88.99.1 as the tunnel endpoint. The IPv6 address is constructed from the host&#8217;s IPv4 address with 2002: prefix. 6to4 only works for hosts with public IP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[84,85],"tags":[],"class_list":["post-399","post","type-post","status-publish","format-standard","hentry","category-ipv6","category-networking"],"_links":{"self":[{"href":"https:\/\/znark.com\/blog\/wp-json\/wp\/v2\/posts\/399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/znark.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/znark.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/znark.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/znark.com\/blog\/wp-json\/wp\/v2\/comments?post=399"}],"version-history":[{"count":4,"href":"https:\/\/znark.com\/blog\/wp-json\/wp\/v2\/posts\/399\/revisions"}],"predecessor-version":[{"id":404,"href":"https:\/\/znark.com\/blog\/wp-json\/wp\/v2\/posts\/399\/revisions\/404"}],"wp:attachment":[{"href":"https:\/\/znark.com\/blog\/wp-json\/wp\/v2\/media?parent=399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/znark.com\/blog\/wp-json\/wp\/v2\/categories?post=399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/znark.com\/blog\/wp-json\/wp\/v2\/tags?post=399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}