设为首页 收藏本站
查看: 1427|回复: 0

[经验分享] IPv6 Apache 域名DNS AAAA配置

[复制链接]

尚未签到

发表于 2015-8-1 08:02:15 | 显示全部楼层 |阅读模式
IPv6 长度:
  IPv6是128bit,和MD5一样,对每个IPv6进行MD5,会出现什么情况?MD5用完了?

IPv6 DNS:

未知国家
2001:470:20::2
加拿大
2001:478:6:0:230:48ff:fe22:6a29
英国
2001:7fd::1
日本
2001:dc4::1

Linux优先使用IPv6 DNS:

sudo vi /etc/resolv.conf

Linux命令 ping IPv6:
  Linux下ping IPv6需要使用ping6,如果使用ping,则会提示ping: unknown host。

ping6 ipv6.google.com
ping6 2001:470:20::2
PING 2001:470:20::2(2001:470:20::2) 56 data bytes
64 bytes from 2001:470:20::2: icmp_seq=11 ttl=60 time=714 ms
64 bytes from 2001:470:20::2: icmp_seq=12 ttl=60 time=4.65 ms
ping 2001:470:20::2
ping: unknown host 2001:470:20::2

Windows命令 ping IPv6:

ping -6 ipv6.google.com

Linux命令 wget IPv6:

wget -6 http://ipv6.google.com

Linux和Windows命令查询域名AAAA记录,是否支持IPv6:
  Linux和Windows都是使用nslookup程序查询dns。

$ nslookup
> set querytype=aaaa
> ipv6.google.com
Server:8.8.8.8
Address:8.8.8.8#53
Non-authoritative answer:
ipv6.google.comcanonical name = ipv6.l.google.com.
ipv6.l.google.comhas AAAA address 2404:6800:8005::6a

  由此可知,IPv4的DNS也能返回域名的IPv6记录,即AAAA记录。

$ nslookup
> set querytype=aaaa
> google.com
Server:2001:470:20::2
Address:2001:470:20::2#53
Non-authoritative answer:
google.comhas AAAA address 2001:4860:800b::69

配置域名同时支持IPv6和IPv4:
  领先的域名注册商同时支持IPv6和IPv4,比如godaddy、namesilo,在注册商这里购买了域名之后,登录到域名管理界面,可以设置A记录和AAAA记录。
  假设购买了example.com,希望example.com同时支持IPv6和IPv4,则添加一条A记录指向192.0.32.10,添加一条AAAA记录,指向2620:0:2d0:200::10,等待一段时间即可生效(等待时间与TTL有关)。结果如下:

$ nslookup
> example.com
Server:8.8.8.8
Address:8.8.8.8#53
Non-authoritative answer:
Name:example.com
Address: 192.0.32.10
> set querytype=aaaa
> example.com
Server:8.8.8.8
Address:8.8.8.8#53
Non-authoritative answer:
example.comhas AAAA address 2620:0:2d0:200::10

配置域名只支持IPv6:
  假设购买了google.com,希望ipv6.google.com只支持IPv6,不支持IPv4,则不添加A记录,只添加一条AAAA记录,指向2404:6800:8005::68。结果如下:

$ nslookup
> ipv6.google.com
Server:8.8.8.8
Address:8.8.8.8#53
Non-authoritative answer:
ipv6.google.comcanonical name = ipv6.l.google.com.
> ipv6.l.google.com
Server:8.8.8.8
Address:8.8.8.8#53
Non-authoritative answer:
*** Can't find ipv6.l.google.com: No answer
> set querytype=aaaa
> ipv6.google.com
Server:8.8.8.8
Address:8.8.8.8#53
Non-authoritative answer:
ipv6.google.comcanonical name = ipv6.l.google.com.
ipv6.l.google.comhas AAAA address 2404:6800:8005::68

Apache httpd配置IPv6:
  Apache httpd配置支持IPv6,需要给IP带上方括号,参考:http://lamp.linux.gov.cn/Apache/ApacheMenu/mod/core.html#virtualhost


ServerAdmin webmaster@ipv6.google.com
DocumentRoot /var/www/html/ipv6.google.com/
ServerName ipv6.google.com


IPv4内网用户如何使用IPv6:
  安装Teredo隧道即可。访问IPv6网站通过Teredo服务器转发,速度受影响。
  注意:
  Teredo隧道与PPPOE冲突,解决方法:使用路由拨号,本机只有一个本地连接即可。
  Teredo隧道与多网卡冲突,比如virtualbox的虚拟网卡,解决办法:禁用别的网卡,只留一个本地连接。
  参考:
  在IPv4网络下接入IPv6网络的方法:http://www.ipv6bbs.cn/thread-151-1-1.html
  资料(你懂的):http://felixcat.net/2010/04/install-teredo-ipv6/
  http://www.ipv6home.cn/html/63/t-17563.html
  Win 7下用Teredo隧道接入IPv6后,操作系统默认还是直接走IPv4:http://social.technet.microsoft.com/Forums/zh-CN/window7betacn/thread/ae1f7d47-aa19-493d-a10d-f8032441a147/
  teredo IPv6 配置hosts后无法使用gtalk客户端(解决办法:使用Pidgin):http://www.google.com/support/forum/p/other/thread?tid=4f65f26a7da1785f&hl=zh-CN

IPv4外网用户如何使用IPv6:
  安装isatap隧道即可。访问IPv6网站通过isatap网关转发,速度受影响。

如何设置浏览器默认使用IPv6:
  1、真实IPv4 + 真实IPv6
  操作系统会优先使用IPv6(未测试)。
  2、真实IPv4内网+ IPv6 Teredo隧道
  当域名同时有A和AAAA记录时,Windows 7、Ubuntu优先使用真实IPv4内网,所以需要修改hosts加入IPv6。
  当域名只有AAAA记录时,Ubuntu可直接访问(比如ipv6.google.com),不用配hosts。
  2、真实IPv4外网+ IPv6 isatap隧道
  XP可以直接访问ipv6.google.com,不能直接访问docs.google.com,需要配hosts。

IPv6路由器:
  D-Link一百元的家用路由器国外版本支持IPv6:http://www.dlink.com/ipv6,比如DIR-615,截图在最后。但国内版本不知是否支持IPv6,京东客服说不支持。
  TP-Link家用路由器不支持IPv6。
  是不是刷了dd-wrt完整版操作系统的路由器都支持IPv6,还待确认。

参考资料:
  测试浏览器是否支持IPv6:http://test-ipv6.com/
  测试浏览器是否默认使用IPv6:http://www.kame.net/
  火狐扩展,显示正在访问的网站IP,可以看出是否是IPv6:https://addons.mozilla.org/zh-CN/firefox/addon/worldip-flag-and-datacenter-pi/
  Windows 7 in NAT Lan teredo:
DSC0000.png
DSC0001.png
  Ubuntu 11.04 in NAT Lan teredo:
DSC0002.png
  D-Link DIR-615 ipv6:
DSC0003.jpg
DSC0004.png

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-92839-1-1.html 上篇帖子: Apache-SSL/Apache-ModSSL 下篇帖子: Apache 压力测试工具ab
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表