ubuntu配置ipv6
2013-05-30 19:33
369 查看
环境:ubuntu 12.04 & ubuntukylin(ubuntu 13.04), 互联网。
方法:使用isatapd。
步骤:
1. ifconfig 查看当前网络状态,eth0可能有多个inet6地址(Scope:Site,Scope:Link, Scope:Global),Link(fe80开头)一般都有,site和global地址一般没有。我们只给主机配置global地址,全球唯一ipv6地址。我的主机:
eth0 Link encap:以太网 硬件地址 <忽略>
inet 地址:<忽略> 广播:<忽略> 掩码:<忽略>
inet6 地址: <忽略>/64 Scope:Site
inet6 地址: 2002:<忽略>/64 Scope:Global
inet6 地址: fe80::<忽略>/64 Scope:Link
inet6 地址: fec0::c:<忽略>/64 Scope:Site
inet6 地址: 2002:<忽略>/64 Scope:Global
2. inet6地址太多,需要清理一下。sudo vim /etc/NetworkManager/NetworkManager.conf 将managed的值赋为ture;即managed=true。
3. 重启eth0。由于在ubuntukylin使用sudo /etc/init.d/networking restart死机(尚未解决),所以,本人都用sudo ifconfig eth0 down 然后sudo ifconfig eth0 up重启eth0。
4. 再次ifconfig查看一下,只有eth0与lo,其中eth0只有一个inet6 link地址。
5. 接下来使用isatapd。sudo isatapd –d isatap.hust.edu.cn (后台运行isatapd),若没有,则sudo apt-get install isatapd.
6. 再次ifconfig查看,会多了一个is0接口,其中有inet6 link和global地址。
7. 测试:ping6 ipv6.google.com没问题则可以,则没问题,可以ping6外网。可以多测试几个地址:科技网DNS服务器:2001:cc0:2fff:2::6 ,CNNIC DNS服务器:2001:dc7:1000::1,上海交大DNS服务器:2001:da8:8000:1:202:120:2:101,北京邮电大学DNS服务器:2001:da8:202:10::36或2001:da8:202:10::37。
8. 如果系统重启,又要重新输入 sudo isatapd –d isatap.hust.edu.cn。
开机启动isatapd,运行脚本:
1.编写脚本,命名为start_isatapd.sh
2.开机加载shell脚本,在/etc/init.d中的rc.local文件最后行添加脚本路径(已经拷到/etc/init.d下):
/etc/init.d/start_isatapd.sh
方法:使用isatapd。
步骤:
1. ifconfig 查看当前网络状态,eth0可能有多个inet6地址(Scope:Site,Scope:Link, Scope:Global),Link(fe80开头)一般都有,site和global地址一般没有。我们只给主机配置global地址,全球唯一ipv6地址。我的主机:
eth0 Link encap:以太网 硬件地址 <忽略>
inet 地址:<忽略> 广播:<忽略> 掩码:<忽略>
inet6 地址: <忽略>/64 Scope:Site
inet6 地址: 2002:<忽略>/64 Scope:Global
inet6 地址: fe80::<忽略>/64 Scope:Link
inet6 地址: fec0::c:<忽略>/64 Scope:Site
inet6 地址: 2002:<忽略>/64 Scope:Global
2. inet6地址太多,需要清理一下。sudo vim /etc/NetworkManager/NetworkManager.conf 将managed的值赋为ture;即managed=true。
3. 重启eth0。由于在ubuntukylin使用sudo /etc/init.d/networking restart死机(尚未解决),所以,本人都用sudo ifconfig eth0 down 然后sudo ifconfig eth0 up重启eth0。
4. 再次ifconfig查看一下,只有eth0与lo,其中eth0只有一个inet6 link地址。
5. 接下来使用isatapd。sudo isatapd –d isatap.hust.edu.cn (后台运行isatapd),若没有,则sudo apt-get install isatapd.
6. 再次ifconfig查看,会多了一个is0接口,其中有inet6 link和global地址。
7. 测试:ping6 ipv6.google.com没问题则可以,则没问题,可以ping6外网。可以多测试几个地址:科技网DNS服务器:2001:cc0:2fff:2::6 ,CNNIC DNS服务器:2001:dc7:1000::1,上海交大DNS服务器:2001:da8:8000:1:202:120:2:101,北京邮电大学DNS服务器:2001:da8:202:10::36或2001:da8:202:10::37。
8. 如果系统重启,又要重新输入 sudo isatapd –d isatap.hust.edu.cn。
开机启动isatapd,运行脚本:
1.编写脚本,命名为start_isatapd.sh
#/bin/sh isatapd -d isatap.hust.edu.cn添加文件运行属性:chmod +x start_isatapd.sh
2.开机加载shell脚本,在/etc/init.d中的rc.local文件最后行添加脚本路径(已经拷到/etc/init.d下):
/etc/init.d/start_isatapd.sh
相关文章推荐
- 【转】Ubuntu下IPV6配置
- 阿里云ECS Ubuntu配置IpV6适应苹果APP Store OnlyIPv6 审核
- Ubuntu下配置IPV6
- ubuntu配置IPV6
- ubuntu下ipv6的配置(isatap隧道模式)问题?
- ubuntu 下安装配置 transmission 支持 ipv6
- Ubuntu系统基本配置
- 【Python】Note1:Ubuntu14.04环境下,配置PythonIDLE的背景
- Ubuntu下Vim配置
- ubuntu下配置tftp服务器
- Ubuntu16.04系统中配置可远程连接的MySQL+PHP7.0
- ubuntu ftp server配置
- Ubuntu 下配置安卓开发环境
- 如何配置Ubuntu 16.04 GRUB 2引导加载程序
- Ubuntu下安装配置JDK
- ubuntu配置JDK
- 阿里云 Server (Ubuntu 12.04) 配置 FTP
- Ubuntu之Gitlab、Gerrit、Jenkins协调工作配置之部分一:邮箱配置