Skip to content

Instantly share code, notes, and snippets.

@ianneub
Created June 26, 2013 15:51
Show Gist options
  • Save ianneub/5868604 to your computer and use it in GitHub Desktop.
Save ianneub/5868604 to your computer and use it in GitHub Desktop.
Comparing DNS checks when running `hostname -r` in both VPC and non-VPC EC2 instances.
Non - VPC
sudo tcpdump -nieth0 -s0 port 53
hostname -f
15:47:51.310998 IP 10.117.95.179.44198 > 172.16.0.23.53: 44142+ AAAA? ip-10-117-95-179.ec2.internal. (47)
15:47:51.311358 IP 172.16.0.23.53 > 10.117.95.179.44198: 44142 0/1/0 (108)
15:47:51.311785 IP 10.117.95.179.37773 > 172.16.0.23.53: 50187+ AAAA? ip-10-117-95-179. (34)
15:47:51.312091 IP 172.16.0.23.53 > 10.117.95.179.37773: 50187 NXDomain 0/1/0 (109)
15:47:51.312303 IP 10.117.95.179.57413 > 172.16.0.23.53: 3240+ A? ip-10-117-95-179.ec2.internal. (47)
15:47:51.312517 IP 172.16.0.23.53 > 10.117.95.179.57413: 3240 1/0/0 A 10.117.95.179 (63)
VPC
sudo tcpdump -nieth0 -s0 port 53
hostname -f
15:51:09.401079 IP 10.1.23.61.43437 > 10.1.0.2.53: 16749+ AAAA? ip-10-1-23-61. (31)
15:51:09.401306 IP 10.1.0.2.53 > 10.1.23.61.43437: 16749 NXDomain 0/1/0 (106)
15:51:09.401576 IP 10.1.23.61.36923 > 10.1.0.2.53: 22825+ A? ip-10-1-23-61. (31)
15:51:09.401895 IP 10.1.0.2.53 > 10.1.23.61.36923: 22825 NXDomain 0/1/0 (106)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment