Home > ipv6, linux > semi-native ipv6 on telenet line for linux

semi-native ipv6 on telenet line for linux

Deze post is in het engels omdat dit toch internationaal mag gelezen worden.

So a friend of my send me a little howto how to setup semi-native ipv6 on my internet connection to my cable provider (Telenet).
Although Telenet has Docsis 3, they haven’t yet implemented the native ipv6 support.

So, the solution Thomas gave me was quick, dirty, but it works!

We’ll setup an 6to4 tunnel.
Wait would you think, isn’t this another tutorial to install an tunnel-broker like siXXs?


You’ll have to generate an ipv6 ip adress based on your ipv4 ipadress with the 2002: prefix
This prefix defines it’s an 6to4 semi-native ip.

So this is the script to enable ipv6 on your machine (connected to direct wan connection, so to the modem, not an router)

I got some commands from Thomas how to get 2002 ip, the rest i wrote myself.

Note: wan side needs to be on eth0 for this script, you should be able to change the script if your connection is different.


ipv4=$(ifconfig eth0 | grep inet | cut -d : -f 2 | cut -d \  -f 1)
ipv6=$(printf "2002:%02x%02x:%02x%02x::$id\n" `echo $ipv4 | tr "." " "`)
ip tunnel add tun6to4 mode sit remote any local $ipv4
ip link set dev tun6to4 up
ip -6 addr add $ipv6/16 dev tun6to4
ip -6 route add 2000::/3 via :: dev tun6to4 metric 1

So, why the ip?
This is the ip of 6TO4-RELAY-ANYCAST this means, any 6to4 provider in the neighborhood of the network of your provider can give you ipv6 connectivity.
So this ip is reserved by default for this functionality.

He also send me an config example for cisco routers + to have an subnet.
I did some tuning on it to make it work dynamically.

Note: Outside (WAN) is FastEthernet0/0, inside (LAN) is FastEthernet0/1 in this example.

ipv6 unicast-routing
ipv6 general-prefix 6TO4PREFIX 6to4 FastEthernet0/0
ipv6 cef

interface Tunnel6
 description 6TO4-TUNNEL
 no ip address
 no ip redirects
 ipv6 address 6TO4PREFIX ::0:0:0:0:1/128
 ipv6 enable
 ipv6 mtu 1472
 tunnel source FastEthernet0/0 tunnel mode ipv6ip 6to4

interface FastEthernet0/1
 ipv6 address 6TO4PREFIX ::1:0:0:0:1/64
 ipv6 nd ra-interval 10
 ipv6 nd ra-lifetime 180
 ipv6 nd prefix default 180 120
 ipv6 enable
ipv6 route 2002::/16 Tunnel6
ipv6 route ::/0 2002:C058:6301::

in this case 2002:C058:6301:: is the 6to4 relay anycast ip.

Some interesting links:

http://wiki.nil.com/IPv6_over_IPv4_tunneling (some help i found to optimize cisco script)
http://www.coris.org.uk/cgi-bin/ip6addr (ipv6 adress calculator)

UPDATE: I’ve seen a lot of video’s on youtube this week of conferences, google techtalks, etc and i’ve learned a lot.

http://www.youtube.com/watch?v=AmjlptEva4Y&feature=channel they state that this 6to4 tunneling method is not the best, cause of major latency issue’s non-correct routing etc.
With this in mind, i’ll recommend, if your provider doesn’t have native v6, the time is now to start bugging them, since ip’s will run out by february 2011 and they probably just have an reserve for about 6 month’s.

Extra note: i have router-advertised both sixxs and 6to4 on my lan, and since i added the 6to4, my mac refuses to prefer ipv6 to connect, so that is an other reason to get back to brockers or get native v6.

Categories: ipv6, linux Tags: , , , , , ,
  1. Laurent S.
    december 29th, 2010 at 09:52 | #1

    Thanks for contributing. Three questions if you allow me.

    1. For some time, there was an entry in Telenet FAQ related to IPv6 deployment. It was around the corner, as it sounded. Oddly though, this entry is now unavailable. Do you know more about their plans in that respect?

    2. The identification of the IPv4 address fails in Fedora 12 because a link-local IPv6 address FE80::/10 is assigned by default. This IPv6 address survives the “grep inet”. A slight change might help, though I am afraid it could be platform-dependent:

    ipv4=$(ifconfig eth0 | grep inet | grep “adr:” | cut -d : -f 2 | cut -d \ -f 1)

    3. Is it a trick you applied on desktops only, or on laptops as well? Mine is used to hop between Wi-Fi hotspots, at home (Telenet), at the office (not Telenet) and on the road. I am wondering whether this trick would not prevent me from connecting away from Telenet.

    Bedankt voor jouw antwoorden,

  2. januari 1st, 2011 at 00:03 | #2

    Hi Laurent,

    Good questions.

    1. I did work for telenet some time, but i wasn’t involved in any of their network roadmap, i did work on their e-services desk, which provided the telenet website, zita, garagetv, 9lives and some streaming events.
    Now Since they have DOCSIS 3 (protocol they use on the cable modems) i pretty sure they will provide IPV6 in 2011, cause they will have to, estimates state that IPV4 adresses will be gone, so they all will be allocated, around february 2011, the estimates are also that providers have around 6 months of spare ip’s. so the day Telenet get’s the message of RIPE (the europe ip organ) that they can’t get any ipv4 adresses, they have 2 choices, buy on the secondary market or implement ipv6.
    long term they will need to install ipv6, so i guess there is no way avoiding it. (and i’m not even willing to give the option of NAT their network, that’s pure evil)

    I’ve been youtubing a lot of ipv6 related video’s this week, geek conferences, google techtalks, etc
    and they give 2 main options
    -Dual stack: so ipv4 and ipv6, to have an timespan to let content providers migrate to ipv6
    -NAT64: end user only get’s ipv6 address, and their ipv4 connections will be gated through a gateway, not that secure, but it will work.
    i’ll update my post later and add a interesting comment about my post, i’ve learned a lot of a certain video

    2. just add “|grep -v inet6” just after the “|grep inet”
    dirty, but it works 🙂
    NOTE: if your internet interface is not eth0, change it in the script 🙂

    3. the trick should work on desktops (linux in this example)
    BUT you need an external internet adress, so not an BOGON ip for example, this is an local adress, that can’t be tunneled this way.
    I recommend to use a tunnelbrocker like sixxs.net for a hopping notebook, i have a fix for the aiccu for mac in my previous post.

    I hope i answered your questions correctly 🙂

  1. No trackbacks yet.