OpenWrt Forum Archive

Topic: Troubles with IPv6 tutorial

The content of this topic has been archived on 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

The tutorial mentions the following:

echo 1 > /proc/sys/net/ipv6/conf/all/forwarding

unfortunately that file is read-only and I seem to be unable to write 1 into that file (also trying to chmod it doesn't work, vi also won't write the changes)

I'm at the point where I can ping6 localhost on the router, but pinging e.g. www.kame.net only resolves the ipv6 address, the icmp packets never get through it seems.

Does anyone know how to fix this?
Thanks in advance, Thomas

I also have another problem, the tutorial has a sample file /etc/init.d/S42tun6to4 that contains the following:

# retrieve the public IPv4 address
ipv4=`ip -4 addr | awk '/^[0-9]+[:] vlan1[:]/ {l=NR+1} /inet (([0-9]{1,3}\.){3}[0-9]{1,3})\// {if (NR == l) split($2,a,"/")} END {print a[1]}'`

Unfortunately this doesn't work at all. I tried using ppp0 instead of vlan1 (ip -4 addr lists my public IP in ppp0), but that also doesn't work. Only setting ipv4=xxx.xxx.xxx.xxx worked, but I only have a dynamic IP.

Ok, i managed to fix the regular expressions to find my public ip xxx.xxx.xxx.xxx in this pattern:

root@OpenWrt:~# ip -4 addr
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    inet 127.0.0.1/8 scope host lo
5: br0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
    inet 192.168.0.1/24 brd 192.168.0.255 scope global br0
9: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP> mtu 1492 qdisc pfifo_fast qlen 3
    inet xxx.xxx.xxx.xxx peer xyz.xyz.xyz.xyz/32 scope global ppp0

The expression should be like this:
ipv4=`ip -4 addr | awk '/^[0-9]+[:] ppp0[:]/ {l=NR+1} /inet (([0-9]{1,3}\.){3}[0-9]{1,3})/ {if (NR == l) split($2,a,"/")} END {print a[1]}'`

IPv6 works fine in the LAN, but i can't ping e.g. kame.net - it resolves to an ipv6 address but it can't find a route to the host sad Does anyone know how to fix this?

(Last edited by thomasw on 12 Nov 2005, 21:06)

You have to add the default IPv6 routes for your openwrt router, so that it can pings www.kame.net in IPv6, and propagate the good routes to autoconfigured LAN machines :

ip route add ::/0 dev ppp0                                        
ip route add 2000::/3 dev ppp0

According ppp0 is your 6to4 interface. Is your radvd daemon well configured ?

I configured radvd as described in the howto.

I added the two lines to my ip-up script, but that doesn't look like it helped. Btw, it for some reason doesn't find any routes in my LAN anymore, except to localhost (lo). But not because of these changes though.

The discussion might have continued from here.