When I run nslookup google.com 192.168.190.81 it works.
tcpdump -n -vv output during above command is:
18:12:24.815483 IP (tos 0x0, ttl 64, id 8975, offset 0, flags [none], proto UDP (17), length 56)
192.168.190.85.50601 > 192.168.190.81.53: [bad udp cksum 0xfe2d -> 0xd17b!] 22170+ A? google.com. (28)
18:12:24.816513 IP (tos 0x0, ttl 128, id 42598, offset 0, flags [none], proto UDP (17), length 82)
192.168.190.81.53 > 192.168.190.85.50601: [udp sum ok] 22170- q: A? google.com. 1/0/0 google.com. A 172.217.18.46 (54)
18:12:24.816971 IP (tos 0x0, ttl 64, id 8976, offset 0, flags [none], proto UDP (17), length 56)
192.168.190.85.35152 > 192.168.190.81.53: [bad udp cksum 0xfe2d -> 0x81ff!] 57940+ AAAA? google.com. (28)
18:12:24.817741 IP (tos 0x0, ttl 128, id 42599, offset 0, flags [none], proto UDP (17), length 94)
192.168.190.81.53 > 192.168.190.85.35152: [udp sum ok] 57940- q: AAAA? google.com. 1/0/0 google.com. AAAA 2a00:1450:4006:805::200e (66)
When I run nslookup google.com it times out.
tcpdump -n -vv output during above command is:
18:12:38.205600 IP (tos 0x0, ttl 64, id 23707, offset 0, flags [DF], proto TCP (6), length 60)
192.168.190.85.39750 > 192.168.190.81.53: Flags [S], cksum 0xfe26 (incorrect -> 0x0fa0), seq 1276672993, win 64240, options [mss 1460,sackOK,TS val 273927086 ecr 0,nop,wscale 7], length 0
18:12:38.205948 IP (tos 0x0, ttl 128, id 42600, offset 0, flags [DF], proto TCP (6), length 40)
192.168.190.81.53 > 192.168.190.85.39750: Flags [R.], cksum 0x4e62 (correct), seq 0, ack 1276672994, win 0, length 0
18:12:38.206190 IP (tos 0x0, ttl 64, id 10801, offset 0, flags [DF], proto TCP (6), length 60)
192.168.190.85.39752 > 192.168.190.81.53: Flags [S], cksum 0xfe26 (incorrect -> 0x7d01), seq 456474464, win 64240, options [mss 1460,sackOK,TS val 273927087 ecr 0,nop,wscale 7], length 0
18:12:38.206488 IP (tos 0x0, ttl 128, id 42601, offset 0, flags [DF], proto TCP (6), length 40)
So my question is: Why, when not specifying the DNS server explicitly, it changes to TCP (which I guess the server doesn't support)?
Some info about the environment:
- It's an Ubuntu 18.04 machine on Hyper-V on Windows 10
- 192.168.190.85 is the IP of the machine
- 192.168.190.81 is the default gateway inside the Ubuntu machine