OS X: access IPv6 in THU with ISATAP

Tsinghua University has IPv6 network access if you use cable, sometimes Wi-Fi is also IPv6-ready but it’s never reliable. What’s more, you have to use ISATAP to get an stable IPv6 access in THU, while ISATAP is not officially supported by OS X. So you will find out that IPv6 in THU is sometimes on and down when you are using OS X.

Thank goodness somebody have find out how to fix this without any plugin installing, but some basic command line steps: http://blog.ucare.me/2012/12/15/mac下用isatap上ipv6/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
#清除IPV6路由表
sudo route delete -inet6 default
EN0_IP=`/sbin/ifconfig en0 | grep inet | grep -v inet6 | awk ‘{print $2}’`
EN1_IP=`/sbin/ifconfig en1 | grep inet | grep -v inet6 | awk ‘{print $2}’`
if [ -n “$EN0_IP” ]; then
LOCAL_IP=$EN0_IP
else
LOCAL_IP=$EN1_IP
fi
if [ -n “$LOCAL_IP” ]; then
/sbin/ifconfig gif0 tunnel $LOCAL_IP isatap.tsinghua.edu.cn
/sbin/ifconfig gif0 inet6 2402:f000:1:1501:200:5efe:$LOCAL_IP prefixlen 64
/sbin/route add -inet6 default 2402:f000:1:1501::1
fi

I tried it, it works. But it is not known why the IP address shown in System Preferences panel is different from the gif0 interface specified in ifconfig command.

ipv6-spipv6-cli

Here are some more links talking about this issue, but they are either too old an post to giving a working workaround or using a very complex way to fix it.

http://www.yunaitong.cn/blog/2012/09/08/mac-os-xxia-tong-guo-isataplian-jie-qing-hua-de-ipv6de-fang-fa/

http://blog.fangjian.me/posts/2011/03/10/connect-tsinghua-ipv6-via-isatap-on-osx/

Advertisements