如何诊断这个 DNS 解析的问题?过三层 proxyDNS 之后个别域名无法解析了 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
phpfpm
V2EX    宽带症候群

如何诊断这个 DNS 解析的问题?过三层 proxyDNS 之后个别域名无法解析了

  •  
  •   phpfpm 2023-12-05 22:23:17 +08:00 1528 次点击
    这是一个创建于 725 天前的主题,其中的信息可能已经有所发展或是发生改变。

    一句话描述问题

    H3C 的三层作为 DNS 的 proxy ,无法解析一些特定的域名,比如 home.console.aliyun.com

    在三层上无法 ping 这个 ip ,但是直接向上查询解析是 ok 的。

    网络拓扑

    PC:

    192.168.0.100/24,gatway=192.168.0.50,vlan=20,access

    H3C 三层:

    1. vlan20 ip=192.168.0.50/24
    2. vlan600 ip=10.0.0.50/24
    3. 静态路由下一跳=10.0.0.60
    4. dns 代理开启
    dns proxy enable dns server 10.0.0.60 
    1. dhcp server 开启

    iKuai:

    1. lan1=10.0.0.20/24
    2. 静态路由:192.168.0.0/16 via 10.0.0.50 回程配置
    3. dns 配置阿里云的 DoH(223.5.5.5)
    4. 配置双击热备,VIP=10.0.0.60

    在 pc 上的测试

    正常域名:百度

    dig baidu.com 正常

    dig @192.168.0.50 baidu.com 正常 via 三层

    dig @10.0.0.50 baidu.com 正常 via 三层

    dig @10.0.0.20 baidu.com 正常 via 爱快

    dig @10.0.0.60 baidu.com 正常 via 爱快 VIP

    异常域名:home.console.aliyun.com

    dig home.console.aliyun.com 不正常

    dig @192.168.0.50 home.console.aliyun.com 不正常 via 三层

    dig @10.0.0.50 home.console.aliyun.com 不正常 via 三层

    dig @10.0.0.20 home.console.aliyun.com 正常 via 爱快

    dig @10.0.0.60 home.console.aliyun.com 正常 via 爱快 VIP

    在三层上 telnet 的测试

    <H3C>ping baidu.com Ping baidu.com (39.156.66.10): 56 data bytes, press CTRL_C to break 56 bytes from 39.156.66.10: icmp_seq=0 ttl=55 time=7.154 ms 56 bytes from 39.156.66.10: icmp_seq=1 ttl=55 time=6.585 ms 56 bytes from 39.156.66.10: icmp_seq=2 ttl=55 time=6.816 ms 56 bytes from 39.156.66.10: icmp_seq=3 ttl=55 time=6.693 ms 56 bytes from 39.156.66.10: icmp_seq=4 ttl=55 time=6.885 ms --- Ping statistics for baidu.com --- 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss round-trip min/avg/max/std-dev = 6.585/6.827/7.154/0.193 ms <H3C>ping home.console.aliyun.com ping: Unknown host. <H3C>ping www.aliyun.com Ping www.aliyun.com (111.62.160.100): 56 data bytes, press CTRL_C to break 56 bytes from 111.62.160.100: icmp_seq=0 ttl=55 time=16.770 ms 56 bytes from 111.62.160.100: icmp_seq=1 ttl=55 time=16.701 ms 56 bytes from 111.62.160.100: icmp_seq=2 ttl=55 time=17.034 ms 56 bytes from 111.62.160.100: icmp_seq=3 ttl=55 time=16.447 ms 56 bytes from 111.62.160.100: icmp_seq=4 ttl=55 time=17.285 ms --- Ping statistics for www.aliyun.com --- 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss round-trip min/avg/max/std-dev = 16.447/16.847/17.285/0.288 ms 

    www.aliyun.com 的 dns 解析和 home.console.aliyun.com 的解析的区别

    root@port:/etc/nginx/sites-enabled# dig @10.0.0.60 home.console.aliyun.com ;; Warning: Client COOKIE mismatch ; <<>> DiG 9.18.12-0ubuntu0.22.04.3-Ubuntu <<>> @10.0.0.60 home.console.aliyun.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3431 ;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ; COOKIE: 83b36405866ca8bc (bad) ;; QUESTION SECTION: ;home.console.aliyun.com. IN A ;; ANSWER SECTION: home.console.aliyun.com. 37 IN CNAME one-console-adns.console.aliyun.com. one-console-adns.console.aliyun.com. 37 IN CNAME one-console-adns.console.aliyun.com.gds.alibabadns.com. one-console-adns.console.aliyun.com.gds.alibabadns.com. 37 IN CNAME sh.wagbridge.aliyun.aliyun.com. sh.wagbridge.aliyun.aliyun.com. 37 IN CNAME aliyun-adns.aliyun.com. aliyun-adns.aliyun.com. 37 IN CNAME aliyun-adns.aliyun.com.gds.alibabadns.com. aliyun-adns.aliyun.com.gds.alibabadns.com. 37 IN A 140.205.135.3 ;; Query time: 0 msec ;; SERVER: 10.0.0.60#53(10.0.0.60) (UDP) ;; WHEN: Tue Dec 05 22:20:59 CST 2023 ;; MSG SIZE rcvd: 537 root@port:/etc/nginx/sites-enabled# dig @10.0.0.60 www.aliyun.com ; <<>> DiG 9.18.12-0ubuntu0.22.04.3-Ubuntu <<>> @10.0.0.60 www.aliyun.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50166 ;; flags: qr rd ra; QUERY: 1, ANSWER: 19, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;www.aliyun.com. IN A ;; ANSWER SECTION: www.aliyun.com. 245 IN CNAME www-jp-de-intl-adns.aliyun.com. www-jp-de-intl-adns.aliyun.com. 245 IN CNAME www-jp-de-intl-adns.aliyun.com.gds.alibabadns.com. www-jp-de-intl-adns.aliyun.com.gds.alibabadns.com. 245 IN CNAME www.aliyun.com.w.cdngslb.com. www.aliyun.com.w.cdngslb.com. 245 IN A 111.32.210.193 www.aliyun.com.w.cdngslb.com. 245 IN A 111.32.209.196 www.aliyun.com.w.cdngslb.com. 245 IN A 111.32.209.192 www.aliyun.com.w.cdngslb.com. 245 IN A 111.32.209.194 www.aliyun.com.w.cdngslb.com. 245 IN A 111.32.209.197 www.aliyun.com.w.cdngslb.com. 245 IN A 111.32.210.189 www.aliyun.com.w.cdngslb.com. 245 IN A 111.32.210.188 www.aliyun.com.w.cdngslb.com. 245 IN A 111.32.210.192 www.aliyun.com.w.cdngslb.com. 245 IN A 111.62.160.96 www.aliyun.com.w.cdngslb.com. 245 IN A 111.62.160.94 www.aliyun.com.w.cdngslb.com. 245 IN A 111.62.160.98 www.aliyun.com.w.cdngslb.com. 245 IN A 111.62.160.97 www.aliyun.com.w.cdngslb.com. 245 IN A 111.62.160.95 www.aliyun.com.w.cdngslb.com. 245 IN A 111.62.160.99 www.aliyun.com.w.cdngslb.com. 245 IN A 111.62.160.93 www.aliyun.com.w.cdngslb.com. 245 IN A 111.62.160.100 ;; Query time: 0 msec ;; SERVER: 10.0.0.60#53(10.0.0.60) (UDP) ;; WHEN: Tue Dec 05 22:21:05 CST 2023 ;; MSG SIZE rcvd: 989 

    一些分析和猜测

    1. 和爱快的 vip 无关,我试着把三层的 proxy ip 改为 10.0.0.20 ,问题依旧
    2. 既然三层负责 dhcp ,理论上下发的 dns 地址也是三层的 vlanip 为好,虽然 dns 写爱快的 vip 能解决问题
    3. 怀疑和 dns 解析结果有关系?比如包长什么的?
    第 1 条附言    2023-12-05 23:17:29 +08:00

    这个版本有什么升级建议吗?

    <H3C>dis version H3C Comware Software, Version 7.1.070, Release 1312 Copyright (c) 2004-2019 New H3C Technologies Co., Ltd. All rights reserved. H3C S5560-54QS-EI uptime is 14 weeks, 1 day, 13 hours, 10 minutes Last reboot reason : Cold reboot Boot image: flash:/s5560ei-cmw710-boot-r1312.bin Boot image version: 7.1.070, Release 1312 Compiled Nov 19 2019 11:00:00 System image: flash:/s5560ei-cmw710-system-r1312.bin System image version: 7.1.070, Release 1312 Compiled Nov 19 2019 11:00:00 Slot 1: Uptime is 14 weeks,1 day,13 hours,10 minutes S5560-54QS-EI with 2 Processor BOARD TYPE: S5560-54QS-EI DRAM: 1984M bytes FLASH: 512M bytes PCB 1 Version: VER.B Bootrom Version: 128 CPLD 1 Version: 003 Release Version: H3C S5560-54QS-EI-1312 Patch Version : None Reboot Cause : ColdReboot [SubSlot 0] 48GE+4SFP Plus+2QSFP Plus 

    在官网看了下:

    H3C S5560-EI系列以太网交换机 H3C S5560EI-CMW710-R3507P10 版本软件及说明书 40 | 加密软件与手册等级下载 H3C S5560EI-CMW710-R3507P08 版本软件及说明书 40 | 加密软件与手册等级下载 H3C S5560EI-CWM710-R3507P06版本软件及说明书 40 | 加密软件与手册等级下载 H3C S5560EI-CMW710-R3507P02 版本软件及说明书 40 | 加密软件与手册等级下载 H3C S5560EI-CMW710-R3507 版本软件及说明书 40 | 加密软件与手册等级下载 H3C S5560EI-CMW70-R3506P12 版本软件及说明书 40 | 加密软件与手册等级下载 H3C S5560EI-CMW710-R3506P10 版本软件及说明书 40 | 加密软件与手册等级下载 H3C S5560EI-CMW710-R3506P07 版本软件及说明书 40 | 加密软件与手册等级下载 H3C S5560EI-CMW710-R3506P02 版本软件及说明书 40 | 加密软件与手册等级下载 H3C S5560EI-CMW710-R3506 版本软件及说明书 40 | 加密软件与手册等级下载 

    感觉高我好多

    4 条回复    2023-12-06 15:47:48 +08:00
    mohumohu
        1
    mohumohu  
       2023-12-05 22:33:53 +08:00
    1 、直接找 h3c 技术支持
    2 、“既然三层负责 dhcp ,理论上下发的 dns 地址也是三层的 vlanip 为好” 似乎也没什么特别的好处
    phpfpm
        2
    phpfpm  
    OP
       2023-12-05 22:44:32 +08:00
    @mohumohu
    1 捡来的设备找不到技术支持,当然厚点脸皮也不是不行
    2 主要是将来换路由的时候直接改三层的下一跳就行,别的不用改。。。
    datocp
        3
    datocp  
       2023-12-06 03:23:39 +08:00 via Android
    用的华为的 s5720s li ,dhcp 是由 openwrt 分配的,那才叫真爽。。。
    a8Fy37XzWf70G0yW
        4
    a8Fy37XzWf70G0yW  
       2023-12-06 15:47:48 +08:00
    就是 H3C 的老 bug 了,我曾接的一 H3C S10500 系列的交也,所以是升固件吧。
    是的如你所是 DNS PACKET 法解析文致的。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2597 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 22ms UTC 09:44 PVG 17:44 LAX 01:44 JFK 04:44
    Do have faith in what you're doing.
    script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-11940834-2', 'v2ex.com'); ga('send', 'pageview'); ga('send', 'event', 'Node', 'topic', 'bb'); ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86