centos配置ipv6服务器具体操作步骤: 第一步:查看CentOS版本号: [root@host etc]# cat /etc/centos-release CentOS release 6.8 (Final) 是6.6及以上版本 第二步:设置centos系统服务器支持IPv6 vi /etc/sysctl.conf 配置上以下3条属性 net.ipv6.conf.all.disable_ipv6 = 0 net.ipv6.conf.default.disable_ipv6 = 0 net.ipv6.conf.lo.disable_ipv6 = 0 保存 第三步:运行 sysctl -p [root@host etc]# sysctl -p net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_syncookies = 1 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.shmmax = 68719476736 kernel.shmall = 4294967296 net.core.default_qdisc = fq net.ipv4.tcp_congestion_control = bbr net.ipv4.neigh.default.base_reachable_time_ms = 600000 net.ipv4.neigh.default.mcast_solicit = 20 net.ipv4.neigh.default.retrans_time_ms = 250 net.ipv6.conf.all.disable_ipv6 = 0 net.ipv6.conf.default.disable_ipv6 = 0 net.ipv6.conf.lo.disable_ipv6 = 0 第四步:查看服务器是否已支持ipv6 [root@host etc]# ifconfig | grep inet [root@host etc]# netstat -tuln [root@host etc]# lsmod 可以向服务器提供商申请一个IPv6地址。 注:申请网站用google浏览器打开为佳,本人之前用别的浏览器打开注册,会因为排版格式注册失败 第五步:测试是否可以访问IPv6网站 [root@host etc]# ping6 -c 5 ipv6.google.com PING ipv6.google.com(lax28s15-in-x0e.1e100.net) 56 data bytes 64 bytes from lax28s15-in-x0e.1e100.net: icmp_seq=1 ttl=57 time=1.73 ms 64 bytes from lax28s15-in-x0e.1e100.net: icmp_seq=2 ttl=57 time=1.44 ms 64 bytes from lax28s15-in-x0e.1e100.net: icmp_seq=3 ttl=57 time=0.913 ms 64 bytes from lax28s15-in-x0e.1e100.net: icmp_seq=4 ttl=57 time=1.25 ms 64 bytes from lax28s15-in-x0e.1e100.net: icmp_seq=5 ttl=57 time=1.09 ms --- ipv6.google.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4040ms rtt min/avg/max/mdev = 0.913/1.288/1.732/0.285 ms ------------------------------------------------------------------------ add:2020-03-23 最后一步: 如果你使用的是阿里云服务器。 阿里云服务器上配置ipv6时,tunnelbroker网站上的Example Configurations 选项选择Linux-net-tools,使用下面指令配置 成功 ifconfig sit0 up ifconfig sit0 inet6 tunnel ::74.82.46.6 ifconfig sit1 up ifconfig sit1 inet6 add 2001:470:23:60f::2/64 route -A inet6 add ::/0 dev sit1 [root@******** sysconfig]# ping6 -c 5 ipv6.google.cn PING ipv6.google.cn(tsa03s06-in-x0e.1e100.net (2404:6800:4012:1::200e)) 56 data bytes 64 bytes from tsa03s06-in-x0e.1e100.net (2404:6800:4012:1::200e): icmp_seq=1 ttl=57 time=401 ms 64 bytes from tsa03s06-in-x0e.1e100.net (2404:6800:4012:1::200e): icmp_seq=2 ttl=57 time=383 ms 64 bytes from tsa03s06-in-x0e.1e100.net (2404:6800:4012:1::200e): icmp_seq=3 ttl=57 time=403 ms 64 bytes from tsa03s06-in-x0e.1e100.net (2404:6800:4012:1::200e): icmp_seq=4 ttl=57 time=385 ms 64 bytes from tsa03s06-in-x0e.1e100.net (2404:6800:4012:1::200e): icmp_seq=5 ttl=57 time=392 ms --- ipv6.google.cn ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 496ms rtt min/avg/max/mdev = 383.001/392.847/402.759/8.032 ms |
|Archiver|手机版|小黑屋|IPv6.la(IPv6技术网)
GMT+8, 2021-1-26 09:34 , Processed in 0.170192 second(s), 23 queries .