<?xml version="1.0" encoding="utf-8"?>
<!-- name="generator" content="pyblosxom/1.4.3 01/10/2008" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
<channel>
<title>Mikaels blog 26 Feb 2006</title>
<link>http://mikael.frykholm.com/blog</link>
<description>blosxom with a touch of python</description>
<language>sv</language>
<item>
  <title>6to4 tunnel that works with dhcp</title>
  <link>http://mikael.frykholm.com/blog/6to4_that_works_with_dhcp.html</link>
  <description><![CDATA[
<p>My broadband provider stopped delivering my static ips so I had to make some modifications on my network. This is what I did to make my linksys continue serve 6to4 addresses for the correct ip.</p>
<pre>
~ # cat /jffs/radvd.conf
interface br0
{
        AdvSendAdvert on;
        MinRtrAdvInterval 3;
        MaxRtrAdvInterval 10;

        prefix 0:0:0:1::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr on;
                Base6to4Interface vlan1;
                AdvPreferredLifetime 120;
                AdvValidLifetime 300;
        };
};
interface vlan1
{
        AdvSendAdvert on;
        MinRtrAdvInterval 3;
        MaxRtrAdvInterval 10;

        prefix 0:0:0:2::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr on;
                Base6to4Interface vlan1;
                AdvPreferredLifetime 120;
                AdvValidLifetime 300;
        };
};
</pre>
<p>cat this text to the file apa ( to make my script survice the shell )</p>
<pre>
ip tunnel change sit0 ttl 64
ipv4_addr=`ip -4 addr |grep inet |grep vlan1 |cut -d ' ' -f6 | cut -d'/' -f1`
ipv6_addr=`printf '2002:%02x%02x:%02x%02x' \`echo $ipv4_addr | tr '.' ' '\``
ip -6 addr add $ipv6_addr::1/48 dev sit0         #Change to 6to4 prefix
ip -6 ro add 2000::/3 via ::192.88.99.1
ip -6 addr add $ipv6_addr:1::/64 dev br0        #Change to 6to4 prefix
ip -6 route add $ipv6_addr:2::/64 dev vlan1
/sbin/radvd -C /jffs/radvd.conf
</pre>
<pre>
cat > apa
nvram set rc_startup="`cat apa`"
nvram commit
</pre>


]]></description>
</item>

</channel>
</rss>
