DNS设置转发,无法解析 index.docker.io 域名
公司是域环境在DNS设置了转发,转发到114.114.114.114,但是无法解析 index.docker.io,其他国内域名都正常。客户端手动配置DNS为114是可以解析 index.docker.io的。
    我在测试环境也尝试设置转发到114.也可以正常解析 index.docker.io。现在基本判定是我的DNS问题,但是不知道出在哪里。
    下面是我的调试日志,这是个无法解析的。
    2015/10/29 11:19:25 0DC4 PACKET  00000000074F8D40 UDP Snd 172.16.2.75     d46d R Q [8081   DR  NOERROR] A      (5)index(6)docker(2)io(0)

UDP response info at 00000000074F8D40
Socket = 352
Remote addr 172.16.2.75, port 64564
Time Query=15122162, Queued=15122162, Expire=15122165
Buf length = 0x0200 (512)
Msg length = 0x0099 (153)
Message:
XID 0xd46d
Flags 0x8180
QR 1 (RESPONSE)
OPCODE 0 (QUERY)
AA 0
TC 0
RD 1
RA 1
Z 0
CD 0
AD 0
RCODE 0 (NOERROR)
QCOUNT 1
ACOUNT 2
NSCOUNT 0
ARCOUNT 0
QUESTION SECTION:
Offset = 0x000c, RR count = 0
Name "(5)index(6)docker(2)io(0)"
QTYPE A (1)
QCLASS 1
ANSWER SECTION:
Offset = 0x0021, RR count = 0
Name "C00Cindex(6)docker(2)io(0)"
TYPE CNAME (5)
CLASS 1
TTL 170
DLEN 28
DATA (6)elb-io(9)us-east-1(3)aws(4)dckrC019io(0)
Offset = 0x0049, RR count = 1
Name "C02Delb-io(9)us-east-1(3)aws(4)dckrC019io(0)"
TYPE CNAME (5)
CLASS 1
TTL 132
DLEN 68
DATA (38)us-east-1-elbio-rm5bon1qaeo4-623296237(9)us-east-1(3)elb(9)amazonaws(3)com(0)
AUTHORITY SECTION:
empty
ADDITIONAL SECTION:
empty
正常解析的日志是这样的
2015/10/29 14:02:29 0DC4 PACKET 00000000033528F0 UDP Snd 172.16.2.75 1713 R Q [8081 DR NOERROR] A (5)index(6)docker(2)io(0)
UDP response info at 00000000033528F0
Socket = 352
Remote addr 172.16.2.75, port 62417
Time Query=15131945, Queued=0, Expire=0
Buf length = 0x0fa0 (4000)
Msg length = 0x00c9 (201)
Message:
XID 0x1713
Flags 0x8180
QR 1 (RESPONSE)
OPCODE 0 (QUERY)
AA 0
TC 0
RD 1
RA 1
Z 0
CD 0
AD 0
RCODE 0 (NOERROR)
QCOUNT 1
ACOUNT 5
NSCOUNT 0
ARCOUNT 0
QUESTION SECTION:
Offset = 0x000c, RR count = 0
Name "(5)index(6)docker(2)io(0)"
QTYPE A (1)
QCLASS 1
ANSWER SECTION:
Offset = 0x0021, RR count = 0
Name "C00Cindex(6)docker(2)io(0)"
TYPE CNAME (5)
CLASS 1
TTL 15
DLEN 28
DATA (6)elb-io(9)us-east-1(3)aws(4)dckrC019io(0)
Offset = 0x0049, RR count = 1
Name "C02Delb-io(9)us-east-1(3)aws(4)dckrC019io(0)"
TYPE CNAME (5)
CLASS 1
TTL 15
DLEN 68
DATA (38)us-east-1-elbio-rm5bon1qaeo4-623296237(9)us-east-1(3)elb(9)amazonaws(3)com(0)
Offset = 0x0099, RR count = 2
Name "C055us-east-1-elbio-rm5bon1qaeo4-623296237(9)us-east-1(3)elb(9)amazonaws(3)com(0)"
TYPE A (1)
CLASS 1
TTL 15
DLEN 4
DATA 52.7.162.45
Offset = 0x00a9, RR count = 3
Name "C055us-east-1-elbio-rm5bon1qaeo4-623296237(9)us-east-1(3)elb(9)amazonaws(3)com(0)"
TYPE A (1)
CLASS 1
TTL 15
DLEN 4
DATA 54.84.122.145
Offset = 0x00b9, RR count = 4
Name "C055us-east-1-elbio-rm5bon1qaeo4-623296237(9)us-east-1(3)elb(9)amazonaws(3)com(0)"
TYPE A (1)
CLASS 1
TTL 15
DLEN 4
DATA 54.165.23.153
AUTHORITY SECTION:
empty
ADDITIONAL SECTION:
empty

2个回答

什么系统?linux ? 看看dns设置
编辑/etc/resolvconf/resolv.conf.d/base/
namespace 114.114.114.114
然后
ifdown eth0
ifup eth0
再ping试试
再不行,重启机器

114DNS存在劫持现象,你换个阿里、腾讯、百度的公共DNS就正常了,我在Openwrt上做114DNS转发也经常出现这样的问题,现在使用阿里的一切正常

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问