Saturday, October 23, 2010

MacOSX and IPv6

MacOSX supports IPv6 natively of course but what good is that if your ^.*$ network administrator won't allow that. Now my dorm is part of a larger network run by an organization which really goes out of its way to provide IPv6 and they offer static tunnels (unpractical in my case), Teredo (not stable/performant enough by their own judgement) and ISATAP.
Now Snow Leopards ISATAP support is virtually inexistent. In fact it was only offered by ancient miredo versions and support was dropped in version 1.1.6. I could have lived with an old version since i don't suscribe to the idea of software magically turning stale over time although this meant compiling by hand in this case. The only problem is miredo is just such a bitch to configure that i couldn't get it to work for the life of me.

Anyway I then used the linux instructions for doing it by hand and converted them to the mac equivalents:
#!/bin/sh 
ISATAP_RELAY="10.156.33.6" # isatap-relay.lrz-muenchen.de
IPV6_PREFIX="2001:4CA0:0:FE00::" # LRZ ISATAP-Prefix 
IPV4=$(ifconfig $(route get ${ISATAP_RELAY} | grep interface | sed -e 's/ interface: //') | egrep '\' | awk '{print $2;}')
ifconfig gif0 tunnel ${IPV4} ${ISATAP_RELAY} 
ifconfig gif0 inet6 ${IPV6_PREFIX}5EFE:${IPV4} prefixlen /128
route -n add -inet6 default ${IPV6_PREFIX}5EFE:${IPV4}

Test with: 
ping6 www.lrz.de 

No comments:

Post a Comment