Skip to content

Instantly share code, notes, and snippets.

@timmow
Created November 10, 2014 12:49
Show Gist options
  • Select an option

  • Save timmow/880a83d51a74516b8a0d to your computer and use it in GitHub Desktop.

Select an option

Save timmow/880a83d51a74516b8a0d to your computer and use it in GitHub Desktop.
node AAAA lookups
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
12:48:09.785378 IP (tos 0x0, ttl 64, id 31267, offset 0, flags [DF], proto UDP (17), length 60)
172.27.1.11.59292 > 8.8.8.8.53: [bad udp cksum 0xbd6f -> 0x9911!] 12994+ AAAA? www.google.com. (32)
12:48:09.798648 IP (tos 0x0, ttl 44, id 10954, offset 0, flags [none], proto UDP (17), length 88)
8.8.8.8.53 > 172.27.1.11.59292: [udp sum ok] 12994 q: AAAA? www.google.com. 1/0/0 www.google.com. [4m59s] AAAA 2a00:1450:400c:c0a::93 (60)
12:48:09.798932 IP (tos 0x0, ttl 64, id 53453, offset 0, flags [DF], proto UDP (17), length 60)
172.27.1.11.45605 > 8.8.8.8.53: [bad udp cksum 0xbd6f -> 0x661b!] 39754+ A? www.google.com. (32)
12:48:09.819764 IP (tos 0x0, ttl 44, id 10955, offset 0, flags [none], proto UDP (17), length 156)
8.8.8.8.53 > 172.27.1.11.45605: [udp sum ok] 39754 q: A? www.google.com. 6/0/0 www.google.com. [3m13s] A 64.233.167.105, www.google.com. [3m13s] A 64.233.167.147, www.google.com. [3m13s] A 64.233.167.106, www.google.com. [3m13s] A 64.233.167.103, www.google.com. [3m13s] A 64.233.167.104, www.google.com. [3m13s] A 64.233.167.99 (128)
# sudo tcpdump -vvv -s 0 -l -n port 53
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
12:48:09.785378 IP (tos 0x0, ttl 64, id 31267, offset 0, flags [DF], proto UDP (17), length 60)
172.27.1.11.59292 > 8.8.8.8.53: [bad udp cksum 0xbd6f -> 0x9911!] 12994+ AAAA? www.google.com. (32)
12:48:09.798648 IP (tos 0x0, ttl 44, id 10954, offset 0, flags [none], proto UDP (17), length 88)
8.8.8.8.53 > 172.27.1.11.59292: [udp sum ok] 12994 q: AAAA? www.google.com. 1/0/0 www.google.com. [4m59s] AAAA 2a00:1450:400c:c0a::93 (60)
12:48:09.798932 IP (tos 0x0, ttl 64, id 53453, offset 0, flags [DF], proto UDP (17), length 60)
172.27.1.11.45605 > 8.8.8.8.53: [bad udp cksum 0xbd6f -> 0x661b!] 39754+ A? www.google.com. (32)
12:48:09.819764 IP (tos 0x0, ttl 44, id 10955, offset 0, flags [none], proto UDP (17), length 156)
8.8.8.8.53 > 172.27.1.11.45605: [udp sum ok] 39754 q: A? www.google.com. 6/0/0 www.google.com. [3m13s] A 64.233.167.105, www.google.com. [3m13s] A 64.233.167.147, www.google.com. [3m13s] A 64.233.167.106, www.google.com. [3m13s] A 64.233.167.103, www.google.com. [3m13s] A 64.233.167.104, www.google.com. [3m13s] A 64.233.167.99 (128)
var dns = require('dns');
dns.lookup('www.google.com', function (err, address) {
console.log(address);
});
// run with node test.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment