开启 Teredo 通道, 提前感受 IPv6 (for 非教育网用户)

Felix Yan | 2010-04-10 | 23,079 views

当初Win7刚要出来时,Felix对其“DirectAccess”功能感到十分向往,从网上找到资料,发现这只是 Teredo 的一个应用。在其他平台上,也一样可以轻易开启 Teredo 从而访问 IPv6 资源。

×××希望各位公网用户不要再使用高校的isatap通道打开ipv6了,教育网的ipv6带宽很有限,而教育网的ipv4却不能出国,因此教育网ipv6是高校学生们获取我朝以外资源最实惠的途径了!×××

Windows XP(SP1+):

netsh interface ipv6 install
netsh interface ipv6 set teredo client

Windows Vista/7:

netsh int ter set state client

Debian/Ubuntu Linux:

sudo apt-get install miredo

Redhat/Fedora Linux:

su -c 'yum install miredo'
su -c 'service miredo-client start'

如果经过上面的设置还无法连接,请继续往下看:

Windows XP:

netsh interface ipv6 set teredo client <服务器地址>.

(注意有个句点)

Windows Vista/7:

netsh int teredo set state client <服务器地址>.

(注意有个句点)
Linux用户需要修改配置文件并重启服务:

Debian/Ubuntu:

sudo gedit /etc/miredo.conf

Redhat/Fedora:

su -c 'dbus-launch gedit miredo.conf'

注释原来所有的 ServerAddress 段(在前面加上#号),然后增加下面的语句:

ServerAddress <服务器地址>

然后重启miredo服务

su -c 'service miredo-client restart'  #Redhat/Fedora
sudo service miredo restart            #Debian/Ubuntu

公共Teredo服务器地址列表

* teredo.remlab.net / teredo-debian.remlab.net (法国) (Miredo 默认设置)
* teredo.autotrans.consulintel.com (西班牙)
* teredo.ipv6.microsoft.com (美国 雷蒙德) (Windows XP/2003/Vista/7/2008 系统默认设置)
* teredo.ngix.ne.kr (韩国)
* teredo.managemydedi.com (美国 芝加哥)

如果windows用户经过上面的设置还无法连接,请继续往下看:

Windows XP:

netsh interface ipv6 set teredo enterpriseclient

Windows Vista/7:

netsh int ter set state enterpriseclient

更新: 如果 Windows XP 用户设置了hosts之后仍然无法访问非纯 IPv6 站点, 可以尝试下面的步骤(来自:http://www.5184zikao.com/archives/10693.html)

netsh int ipv6 set prefix ::1/128 50 0
netsh int ipv6 set prefix ::/0 40 1
netsh int ipv6 set prefix 2002::/16 30 1
netsh int ipv6 set prefix ::/96 20 3
netsh int ipv6 set prefix ::ffff:0:0/96 10 4
netsh int ipv6 set prefix 2001::/32 5 1

打开浏览器,输入网址: ipv6.google.com 并回车,你看到了什么?

参考资料:
1、http://en.wikipedia.org/wiki/Teredo_tunneling#Teredo_servers
2、http://ineolee.com/web/tedero-ipv6-internet-through-home-router/

  1. blambin China Mozilla Firefox Linux says:

    我想知道,通过这个miredo能不能给我分配一个固定的ipv6
    地址?

  2. Blank China Google Chrome Windows says:

    设置错了带上了端口怎么办?- -怎么才能去掉 自定的端口 恢复成 默认端口.reset 不行…

  3. po China Mozilla Firefox Windows says:

    上海電信,win7,一直執行到最後一步,效果是這樣

    C:\Windows\system32>netsh int ter set state enterpriseclient
    Ok.

    C:\Windows\system32>netsh int ter show state
    Teredo Parameters
    ———————————————
    Type : enterpriseclient
    Server Name : teredo.managemydedi.com.
    Client Refresh Interval : 30 seconds
    Client Port : unspecified
    State : dormant

    至此還是無法打開ipv6.google.com……應該如何處理?

  4. siaoyi Reserved Google Chrome Windows says:

    請問一下小弟下午設置成功後晚上回來又不行了,照樓主的方法做後還是不行,show teredo後其他的參數都一樣,只有nat變成了cone,下午的nat是restricted.請問是這個原因麼,如果是怎麼改到restricted呢?ping http://www.google.com和www.youtube.com是通過hosts裡的ipv6地址,有時成功,有時丟包嚴重。在瀏覽器裡面可以打開ipv6.google.com,這是為什麼呢?

  5. Xing Fang United States Google Chrome Windows says:

    hi, 我想问问, 两边都在NAT之后,能利用teredo,互相访问么?比如其中一个假设Web服务

  6. jocob United States Google Chrome Windows says:

    请问我是通过公司的内网 上网的,是不是要公司的路由支持才能用上述方法?

  7. Sa United States Opera Mini says:

    回去试试这个

  8. Anonymous United States Mozilla Firefox Windows says:

    无法通过UDP访问teredo通道这是什么意思?

  9. United States says:

    本人小白一个,请问文章里这样所谓的设置:
    Windows XP(SP1+):1
    2 netsh interface ipv6 install
    netsh interface ipv6 set teredo client

    是怎么设置啊,是保存在哪个配置文件里还是怎么着啊,电脑小白很无力啊!

  10. dnsproxycn China Internet Explorer Windows says:

    一个可以强制返回ipv6地址的dns代理工具:dnsproxycn

  11. lizzzy China Mozilla Firefox Windows says:

    Felix,前些月用你的方法加上proxy.pac是可行的,但自从.pac失效后,ipv6也随之不行了。我看了下,show teredo返回的值都是正确的,network : unmanaged; NAT : restricted; state : qualified, etc., 但ipconfig返回的6to4的地址却总是以2002开头而非2001,我搜了一下,试图用netsh interface ipv6 set prefixpolicy 2001::/16 1 1 persistent 命令强制返回2001,但好像仍旧不行。我用的是电信的网络。希望可以提些宝贵的建议,不甚感谢!

  12. feng China Mozilla Firefox Windows says:

    我基本上都设置过了,但是状态还是dormant,神马睡眠状态,能够ping通youtube.com,但是打不开网页,ping ipv6.google.com的时候,出现无法连接到端口,是端口设置错误了么?好揪心啊,搞了一天了,没弄出来。╮(╯▽╰)╭

  13. 未寒 China Google Chrome Windows says:

    求指导。。。之前在寝室用的都是6TO4,现在在学校办公室,不管用啥都失败。。。

  14. 四夕天 China Google Chrome Windows says:

    (教育网 win7)
    请问设置了之后 teredo参数中,
    客户端端口始终是 unspecified,
    网络参数始终是 unmanaged
    NAT参数 symmetric
    NAT行为 两个都是否

    请问应该怎么办啊…

    • Felix Yan Reserved Google Chrome Ubuntu Linux says:

      教育网基本不能用这个吧…(看文章标题XD)

      • 四夕天 China Google Chrome Windows says:

        可是就是上不了ipv6啊…(改过hosts的能上,别的不能)
        之前修改过一次DNS,然后出现了问题,去处首选DNS之后问题仍然存在…

      • 四夕天 Reserved Google Chrome Windows says:

        搞定了:) 找到了学校网络中心的帮助
        重新设置了ISATAP隧道 嘿嘿嘿

  15. Gyteng China Google Chrome Windows says:

    我想知道本身有ipv6的校园网,用了路由器之后没了,该怎么做呢?

  16. redrum君&reredrum君 China Mozilla Firefox Windows says:

    唔 詢問>
    netsh interface ipv6 isatap set router isatap.sjtu.edu.cn
    netsh interface ipv6 isatap set state enabled
    sc config iphlpsvc start= auto
    net start iphlpsvc
    似乎是不行兒 hosts文件改過那種google docs裡有的=[
    於是亦然試過這個->
    netsh int ter set state client
    netsh int teredo set state client teredo-debian.remlab.net. 15 34567
    netsh int ter set state enterpriseclient
    唔 感覺還是未有打開ipv6的樣子
    輸入netsh interface ipv6 show teredo的話 -> 網絡: unmanaged
    輸入ipconfig的話 -> teredo tunneling那邊貌似有2001:0:53aa…一串的地址 但默認網関是::? 咱不明白哪邊不對=3= 咱不很懂網路程序之類的> <
    還有isatap的命令與teredo的命令一樣麼 前者無法用在有路由器的網路里麼還是怎樣? 貌似咱試了試ipv6.google.com 2001:470:20::2 還有比若kenengba.com這類的可以ping出來的 但瀏覽器打不開他們的頁面orz kenengba.com的ipv6地址在那個google docs中的貌似無法用? 求儘量詳細指導下咱該如何做 =] 感謝兒 莫非是瀏覽器的問題麼還是?orz

    唔對 是上海的中國電信 非教育網 還有希望布教咱下目前比較妥當的翻牆方式=]

  17. zjk China Mozilla Firefox Windows says:

    第一步没成功,第二步 netsh int teredo set state client . 服务器地址我填的,之后说系统找不到指定的文件,是什么问题呀?请教一下。 ping ipv6.google.com 不通,ping 2001那个,有时返回2个,有时全部超时。

    • Felix Yan Germany Google Chrome Linux says:

      这说明配置应该没问题…可能是网络不稳定…
      那条系统找不到指定文件, 可能是系统文件缺失. 你用的是精简版吗?

  18. 虫子fred China Google Chrome Windows says:

    前几天用了你这方法ok了,因为能看到自己的ip是v6的了。
    现在死活不行,一直是ipv4的地址。中间我也没什么变动,除了更新了hosts,还有就是一直用的chrome canary崩溃了我卸载之后安装了chromium。郁闷

    • Felix Yan Reserved Google Chrome Ubuntu Linux says:

      分步排除问题.
      如果能ping通ipv6.google.com,则IPv6通道没有问题
      如果不能ping通ipv6.google.com,却可以ping通2001:470:20::2,是DNS问题
      如果都不通,才是IPv6通道完全有问题.

      • lizzzy Reserved Mozilla Firefox Windows says:

        我和fred一般,前些天ipv6 okay的,昨晚起down了,ipv6.google.com ping不通;2001:470:20::2也ping不通。有何解决方法请问?谢谢Felix。

        PS:用的是联通的网络。

  19. iuse China Internet Explorer Windows says:

    teredo不能穿透普通路由器吧?有什么方法可以使普通路由器接通的局域网络用得上ipv6?谢谢!

    • Felix Yan Reserved Google Chrome Ubuntu Linux says:

      其实, teredo可以穿透普通的路由器的…

    • iuse China Internet Explorer Windows says:

      可能是我命令打错了,在另外的一台成功了。但是国内的ipv6站点没法访问。
      另外,普通路由器可以通过vpn或者其他设置连接到学校局域网的ipv6(学校ipv6并未覆盖所有的校园网接入区)吗?(远程桌面不算)

  20. fac China Internet Explorer Windows says:

    请问如何撤销以上步骤

  21. Jacbo China Mozilla Firefox Windows says:

    Teredo参数

    状态:Offline
    错误:客户端在对称NAT之后

    ===
    不用路由器可以 用了之后就这样了 请教博主

  22. Alfred China Google Chrome Windows says:

    不过windows在只有teredo隧道的情况下,只有type A的dns请求,所以dns不会返回ipv6地址
    http://technet.microsoft.com/en-us/library/bb727035.aspx
    我还是没法在xp下搞定hosts…不管如何返回的都是ipv4地址

    好吧,其实我是来看看我的来源的…

  23. STaY China Google Chrome Windows says:

    我用teredo ipv6.google.com等ipv6网址 从来没能成功上过,但是该过host的各项google服务 包括 youtube却可以直接上
    网络是福州长宽 路由器是TPlink TL-R402

  24. iq527 China Internet Explorer Windows says:

    汗… 开了这个,eclipse debug的时候竟然死都不行….

  25. 神牛出没 China Mozilla Firefox Ubuntu Linux says:

    是不是给分IPV6的HOSTS呢?

  26. Sing Liu China Opera Windows says:

    学习了,我家里用的是移动3G上网的,夜班中。下班回去试试

Post a comment

QR Code Business Card