1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| # pod上执行 bash-4.2$ ping -c 1 www.baidu.com ping: www.baidu.com: Name or service not known
# node上执行 tcpdump -i cni0 -p udp port 53 and host 10.244.2.55 -vv -a 21:30:57.993070 IP (tos 0x0, ttl 64, id 14287, offset 0, flags [DF], proto UDP (17), length 85) 10.244.2.55.51209 > 10.96.0.10.domain: [bad udp cksum 0x17e7 -> 0x89b4!] 606+ A? www.baidu.com.default.svc.cluster.local. (57) 21:30:57.993102 IP (tos 0x0, ttl 63, id 14287, offset 0, flags [DF], proto UDP (17), length 85) 10.244.2.55.51209 > 10.244.2.2.domain: [bad udp cksum 0x1a73 -> 0x8728!] 606+ A? www.baidu.com.default.svc.cluster.local. (57) ###### 这里停顿了5s ###### 21:31:02.998159 IP (tos 0x0, ttl 64, id 18413, offset 0, flags [DF], proto UDP (17), length 85) 10.244.2.55.51209 > 10.96.0.10.domain: [bad udp cksum 0x17e7 -> 0x89b4!] 606+ A? www.baidu.com.default.svc.cluster.local. (57) 21:31:02.998189 IP (tos 0x0, ttl 63, id 18413, offset 0, flags [DF], proto UDP (17), length 85) 10.244.2.55.51209 > 10.244.2.2.domain: [bad udp cksum 0x1a73 -> 0x8728!] 606+ A? www.baidu.com.default.svc.cluster.local. (57) ###### 这里停顿了5s ###### 21:31:08.002208 IP (tos 0x0, ttl 64, id 22190, offset 0, flags [DF], proto UDP (17), length 59) 10.244.2.55.48623 > 10.96.0.10.domain: [bad udp cksum 0x17cd -> 0xcdb6!] 41007+ A? www.baidu.com. (31) 21:31:08.005166 IP (tos 0x0, ttl 62, id 57825, offset 0, flags [DF], proto UDP (17), length 166) 10.96.0.10.domain > 10.244.2.55.48623: [udp sum ok] 41007 q: A? www.baidu.com. 3/0/0 www.baidu.com. CNAME www.a.shifen.com., www.a.shifen.com. A 220.181.38.150, www.a.shifen.com. A 220.181.38.149 (138) 21:31:08.012680 IP (tos 0x0, ttl 64, id 22196, offset 0, flags [DF], proto UDP (17), length 73) 10.244.2.55.35870 > 10.96.0.10.domain: [bad udp cksum 0x17db -> 0xa4f7!] 12939+ PTR? 150.38.181.220.in-addr.arpa. (45) 21:31:08.015056 IP (tos 0x0, ttl 62, id 57832, offset 0, flags [DF], proto UDP (17), length 171) 10.96.0.10.domain > 10.244.2.55.35870: [udp sum ok] 12939 NXDomain q: PTR? 150.38.181.220.in-addr.arpa. 0/1/0 ns: 38.181.220.IN-ADDR.ARPA. SOA idc-ns1.bjtelecom.net. wang_ye.bjxywh.com. 1201938454 10800 3600 604800 38400 (143) # 正常pod里返回的应该是像下面这样 23:21:04.525768 IP (tos 0x0, ttl 64, id 10315, offset 0, flags [DF], proto UDP (17), length 85) 10.244.0.2.58318 > 10.96.0.10.domain: [bad udp cksum 0x15b2 -> 0x4c30!] 9810+ A? www.baidu.com.default.svc.cluster.local. (57) 23:21:04.526224 IP (tos 0x0, ttl 62, id 16446, offset 0, flags [DF], proto UDP (17), length 178) 10.96.0.10.domain > 10.244.0.2.58318: [udp sum ok] 9810 NXDomain*- q: A? www.baidu.com.default.svc.cluster.local. 0/1/0 ns: cluster.local. [30s] SOA ns.dns.cluster.local. hostmaster.cluster.local. 1577200182 7200 1800 86400 30 (150) 23:21:04.526312 IP (tos 0x0, ttl 64, id 10316, offset 0, flags [DF], proto UDP (17), length 77) 10.244.0.2.52627 > 10.96.0.10.domain: [bad udp cksum 0x15aa -> 0xb683!] 3326+ A? www.baidu.com.svc.cluster.local. (49) 23:21:04.526617 IP (tos 0x0, ttl 62, id 16447, offset 0, flags [DF], proto UDP (17), length 170) 10.96.0.10.domain > 10.244.0.2.52627: [udp sum ok] 3326 NXDomain*- q: A? www.baidu.com.svc.cluster.local. 0/1/0 ns: cluster.local. [30s] SOA ns.dns.cluster.local. hostmaster.cluster.local. 1577200182 7200 1800 86400 30 (142) 23:21:04.526665 IP (tos 0x0, ttl 64, id 10317, offset 0, flags [DF], proto UDP (17), length 73) 10.244.0.2.35606 > 10.96.0.10.domain: [bad udp cksum 0x15a6 -> 0xe2fb!] 40161+ A? www.baidu.com.cluster.local. (45) 23:21:04.527091 IP (tos 0x0, ttl 62, id 12183, offset 0, flags [DF], proto UDP (17), length 166) 10.96.0.10.domain > 10.244.0.2.35606: [udp sum ok] 40161 NXDomain*- q: A? www.baidu.com.cluster.local. 0/1/0 ns: cluster.local. [30s] SOA ns.dns.cluster.local. hostmaster.cluster.local. 1577200182 7200 1800 86400 30 (138) 23:21:04.527127 IP (tos 0x0, ttl 64, id 10318, offset 0, flags [DF], proto UDP (17), length 59) 10.244.0.2.47739 > 10.96.0.10.domain: [bad udp cksum 0x1598 -> 0x2b05!] 18570+ A? www.baidu.com. (31) 23:21:04.529487 IP (tos 0x0, ttl 62, id 16448, offset 0, flags [DF], proto UDP (17), length 166) 10.96.0.10.domain > 10.244.0.2.47739: [udp sum ok] 18570 q: A? www.baidu.com. 3/0/0 www.baidu.com. [30s] CNAME www.a.shifen.com., www.a.shifen.com. [30s] A 220.181.38.150, www.a.shifen.com. [30s] A 220.181.38.149 (138) 23:21:04.537253 IP (tos 0x0, ttl 64, id 10325, offset 0, flags [DF], proto UDP (17), length 73) 10.244.0.2.35284 > 10.96.0.10.domain: [bad udp cksum 0x15a6 -> 0x7998!] 25193+ PTR? 150.38.181.220.in-addr.arpa. (45) 23:21:04.539122 IP (tos 0x0, ttl 62, id 12187, offset 0, flags [DF], proto UDP (17), length 171) 10.96.0.10.domain > 10.244.0.2.35284: [udp sum ok] 25193 NXDomain q: PTR? 150.38.181.220.in-addr.arpa. 0/1/0 ns: 38.181.220.IN-ADDR.ARPA. [30s] SOA idc-ns1.bjtelecom.net. wang_ye.bjxywh.com. 1201938454 10800 3600 604800 38400 (143)
|