ipv6 dns名称未解析从ipv4网络 [英] ipv6 dns name unresolved from ipv4 network

查看:330
本文介绍了ipv6 dns名称未解析从ipv4网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题,似乎是一个ipv6 vs ipv4 dns名称的问题。



我有一个实时刮板运行在我的服务器上运行在ipv6网络。刮刮后,此刮刀通过ajax调用在网页上的图像上返回一些URL,然后图像通过刮刀返回的链接显示在本地计算机上的浏览器中。但这些网址在我的本地网络上没有解决。我的本地机器不能在ipv6网络上运行。此外,正在被刮取的网页通过CDN托管图像,因此刮刀将根据运行的机器/位置将结果/链接返回到图像。



作为示例: / p>

服务器scrapes http://www.flipkart.com/it-s-not-bike-0224060872/p/itmczyx5zzktubhy?pid=9780224060875 ,并返回以下链接:



http://img-ipv6.flixcart.com/image/book/8/7/5/it-s-not-about-the-自行车 - 我的旅程 - 生活 - 275x275-imadarucmnec3hds.jpeg



当我从另一个地理位置的本地机器访问此图像时那么我的服务器(刮刀),那么它无法解决上面的链接。在本地机器上使用卷曲报告:



curl:(7)无法连接到2001:df0:23e:9002 :: 17:网络无法访问>

同时在服务器上完成下载图像。



我不知道为什么要连接到图像的工作在一个网络中,但不在另一个网络中?

解决方案

显然 img-ipv6.flixcart.com 应该仅解析为IPv6地址,而不是v4地址,它只有IPv6地址 2001:df0:23e:9002 :: 17 您显然无法从您的电脑访问。



通过IPv4连接,该映像的地址为 http://img7.flixcart。 com / image / book / 8/7/5 / it-s-not-about-the-bike-my-journey-back-to-life-275x275-imadarucmnec3hds.jpeg


I am having a strange problem which seems to be a problem of ipv6 vs ipv4 dns names.

I have a real time scraper which runs on my server which runs on ipv6 network. After scraping, this scraper returns some urls to images on a web page via ajax calls and then the images are shown in the browser on my local machine via the links returned by the scraper. But these urls are not resolved on my local network. My local machine does not run on ipv6 network. Also the web page being scraped hosts the images via CDNs so the scraper would return results / links to images based on which machine / location it runs.

As an example:

server scrapes http://www.flipkart.com/it-s-not-bike-0224060872/p/itmczyx5zzktubhy?pid=9780224060875 and returns the following link:

http://img-ipv6.flixcart.com/image/book/8/7/5/it-s-not-about-the-bike-my-journey-back-to-life-275x275-imadarucmnec3hds.jpeg

When I access this image from my local machine which is in another geography then my server (scraper), then it is unable to resolve the link above. Using curl on my local machine it reports:

curl: (7) Failed to connect to 2001:df0:23e:9002::17: Network is unreachable

while doing the same on server downloads the image perfectly.

I'm not sure why should the link to image work in one network but not in another?

解决方案

Obviously img-ipv6.flixcart.com is supposed to resolve only to an IPv6 address, not to a v4 one: it just has the IPv6 address 2001:df0:23e:9002::17 which you clearly cannot access from your PC.

Over a IPv4 connection, the image has the address http://img7.flixcart.com/image/book/8/7/5/it-s-not-about-the-bike-my-journey-back-to-life-275x275-imadarucmnec3hds.jpeg.

这篇关于ipv6 dns名称未解析从ipv4网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆