<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cloudiquity &#187; IP</title>
	<atom:link href="http://www.cloudiquity.com/tag/ip/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cloudiquity.com</link>
	<description>A blog about Cloud, Grid and HPC technologies</description>
	<lastBuildDate>Wed, 01 Feb 2012 12:56:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Using Amazon EC2 public IP address inside EC2 network</title>
		<link>http://www.cloudiquity.com/2009/02/using-amazon-ec2-public-ip-address-inside-ec2-network/</link>
		<comments>http://www.cloudiquity.com/2009/02/using-amazon-ec2-public-ip-address-inside-ec2-network/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 14:31:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[Network performance]]></category>
		<category><![CDATA[Private]]></category>
		<category><![CDATA[Public]]></category>

		<guid isPermaLink="false">http://www.cloudiquity.com/?p=137</guid>
		<description><![CDATA[Each AMI instance on EC2 is assigned two IP addresses and corresponding DNS names. A public IP address that is accessable over the internet and an internal IP address only accessable inside internal EC2 regional network. You don&#8217;t have any control over the internal IP address and it is assigned randomly when you start the [...]]]></description>
			<content:encoded><![CDATA[<p>Each AMI instance  on EC2 is assigned two IP addresses and corresponding DNS names. A public IP address that is accessable over the internet and an internal IP address only accessable inside internal  EC2 regional network. You don&#8217;t have any control over the internal IP address and it is assigned randomly when you start the instance. For a public IP address you can assign an Elastic IP address to a running instance, elastic IP address is reserved and associated with your account and you pay for it when not in use. If you communicate between instances using public or elastic IP address even in the same region you pay regional data transfer rates(0.01$ per GB in/out).</p>
<p>There might be some scenarios where you might be tempted to use elastic IP address to communicate  inside the same region e.g when your distributed system needs fixed ip addresses but  you should carefully weigh the cons/pros. Not only are you paying for the traffic that would be free if you use internal IP address but also the performance will be lower. I ran some simple tests to find out more about this.</p>
<p>For the test I started two  large instances in the same region using the same security group. And the results were quite interesting:</p>
<p>1)   public or private dns name resolve to internal IP address inside EC2<br />
2)   There is a big hit in network latency between using internal and public IP address<br />
3)   Using traceroute shows that with public IP address network traffic goes through a lot more routers/hops</p>
<p>Here at <a href="http://www.janats.com" target="_blank">Jana</a>, we hope that Amazon will soon provide:</p>
<p>1) Internal static IP address so we don&#8217;t go through configuration hell and enjoy fast network communication<br />
2) Machines without public IP/DNS address e.g for machines that will be used behind firewalls and will never be accessed outside EC2 network directly e.g Database or Application Servers</p>
<p><em><span style="text-decoration: underline;">Test Details</span></em></p>
<p><em></em><br />
- Machine A used to run ping and traceroute internal IP address: 10.250.79.223<br />
- Machine B Machine associated to an elastic IP address:<br />
- Internal dns name: ip-10-250-78-208.ec2.internal<br />
- Public dns name: ec2-174-129-227-190.compute-1.amazonaws.com<br />
- Internal ip: 10.250.78.208<br />
- Elastic ip: 174.129.227.190</p>
<p><strong><span style="text-decoration: underline;"><span style="color: #808080;">DNS Ping Tests</span></span></strong></p>
<p><strong><em><span style="color: #808080;">ip-10-250-79-223:~# ping ip-10-250-78-208.ec2.internal</span></em></strong></p>
<p><span style="color: #808080;">PING ip-10-250-78-208.ec2.internal (10.250.78.208) 56(84) bytes of data.</span></p>
<p><span style="color: #808080;">64 bytes from ip-10-250-78-208.ec2.internal (10.250.78.208): icmp_seq=1 ttl=62 time=0.346 ms</span></p>
<p><span style="color: #808080;">64 bytes from ip-10-250-78-208.ec2.internal (10.250.78.208): icmp_seq=2 ttl=62 time=0.226 ms</span></p>
<p><span style="color: #808080;">64 bytes from ip-10-250-78-208.ec2.internal (10.250.78.208): icmp_seq=3 ttl=62 time=0.384 ms</span></p>
<p><span style="color: #808080;">64 bytes from ip-10-250-78-208.ec2.internal (10.250.78.208): icmp_seq=4 ttl=62 time=0.257 ms</span></p>
<p><span style="color: #808080;">64 bytes from ip-10-250-78-208.ec2.internal (10.250.78.208): icmp_seq=5 ttl=62 time=0.252 ms</span></p>
<p><span style="color: #808080;">&#8212; ip-10-250-78-208.ec2.internal ping statistics &#8212;</span></p>
<p><span style="color: #808080;">5 packets transmitted, 5 received, 0% packet loss, time 3999ms</span></p>
<p><span style="color: #808080;">rtt min/avg/max/mdev = 0.226/0.293/0.384/0.060 ms</span></p>
<p><strong><em><span style="color: #808080;">ip-10-250-79-223:~# ping ec2-174-129-227-190.compute-1.amazonaws.com</span></em></strong></p>
<p><span style="color: #808080;">PING ec2-174-129-227-190.compute-1.amazonaws.com (10.250.78.208) 56(84) bytes of data.</span></p>
<p><span style="color: #808080;">64 bytes from ip-10-250-78-208.ec2.internal (10.250.78.208): icmp_seq=1 ttl=62 time=6.52 ms<br />
64 bytes from ip-10-250-78-208.ec2.internal (10.250.78.208): icmp_seq=2 ttl=62 time=0.262 ms<br />
64 bytes from ip-10-250-78-208.ec2.internal (10.250.78.208): icmp_seq=3 ttl=62 time=0.329 ms<br />
64 bytes from ip-10-250-78-208.ec2.internal (10.250.78.208): icmp_seq=4 ttl=62 time=0.359 ms<br />
64 bytes from ip-10-250-78-208.ec2.internal (10.250.78.208): icmp_seq=5 ttl=62 time=0.327 ms<br />
64 bytes from ip-10-250-78-208.ec2.internal (10.250.78.208): icmp_seq=6 ttl=62 time=0.367 ms<br />
64 bytes from ip-10-250-78-208.ec2.internal (10.250.78.208): icmp_seq=7 ttl=62 time=1.63 ms</span></p>
<p><span style="color: #808080;">&#8212; ec2-174-129-227-190.compute-1.amazonaws.com ping statistics &#8212;</span></p>
<p><span style="color: #808080;">7 packets transmitted, 7 received, 0% packet loss, time 5999ms</span></p>
<p><span style="color: #808080;">rtt min/avg/max/mdev = 0.262/1.400/6.520/2.138 ms</span></p>
<p>The above two commands show the public and private dns resolve to internal ip address when pinging from another EC2 machine</p>
<p><span style="font-weight: bold; text-decoration: underline;"><span style="color: #808080;">Public/Private network Ping tests</span></span></p>
<p><strong><em><span style="color: #808080;">ip-10-250-79-223:~# ping 10.250.78.208</span></em></strong></p>
<p><span style="color: #808080;">PING 10.250.78.208 (10.250.78.208) 56(84) bytes of data.</span></p>
<p><span style="color: #808080;">64 bytes from 10.250.78.208: icmp_seq=1 ttl=62 time=7.93 ms</span></p>
<p><span style="color: #808080;">64 bytes from 10.250.78.208: icmp_seq=2 ttl=62 time=0.250 ms</span></p>
<p><span style="color: #808080;">64 bytes from 10.250.78.208: icmp_seq=3 ttl=62 time=0.244 ms</span></p>
<p><span style="color: #808080;">64 bytes from 10.250.78.208: icmp_seq=4 ttl=62 time=0.360 ms</span></p>
<p><span style="color: #808080;">64 bytes from 10.250.78.208: icmp_seq=5 ttl=62 time=0.311 ms<br />
&#8212; 10.250.78.208 ping statistics &#8212;</span></p>
<p><span style="color: #808080;">5 packets transmitted, 5 received, 0% packet loss, time 4000ms</span></p>
<p><span style="color: #808080;">rtt min/avg/max/mdev = 0.244/1.820/7.938/3.059 ms</span></p>
<p><strong><em><span style="color: #808080;">ip-10-250-79-223:~# ping 174.129.227.190</span></em></strong></p>
<p><span style="color: #808080;">PING 174.129.227.190 (174.129.227.190) 56(84) bytes of data.</span></p>
<p><span style="color: #808080;">64 bytes from 174.129.227.190: icmp_seq=1 ttl=52 time=1.62 ms</span></p>
<p><span style="color: #808080;">64 bytes from 174.129.227.190: icmp_seq=2 ttl=52 time=1.50 ms</span></p>
<p><span style="color: #808080;">64 bytes from 174.129.227.190: icmp_seq=3 ttl=52 time=1.46 ms</span></p>
<p><span style="color: #808080;">64 bytes from 174.129.227.190: icmp_seq=4 ttl=52 time=1.52 ms</span></p>
<p><span style="color: #808080;">64 bytes from 174.129.227.190: icmp_seq=5 ttl=52 time=1.49 ms</span></p>
<p><span style="color: #808080;">64 bytes from 174.129.227.190: icmp_seq=6 ttl=52 time=1.37 ms</span></p>
<p><span style="color: #808080;">64 bytes from 174.129.227.190: icmp_seq=7 ttl=52 time=1.38 ms</span></p>
<p><span style="color: #808080;">&#8212; 174.129.227.190 ping statistics &#8212;</span></p>
<p><span style="color: #808080;">7 packets transmitted, 7 received, 0% packet loss, time 5997ms</span></p>
<p><span style="color: #808080;">rtt min/avg/max/mdev = 1.375/1.482/1.621/0.092 ms</span><br />
  <br />
The above two ping commands show the difference in ping performance to the same machine using public and private ip address.</p>
<p><strong><span style="text-decoration: underline;"><span style="color: #808080;">TraceRoute Tests</span></span></strong></p>
<p><strong><em><span style="color: #808080;">ip-10-250-79-223:~# traceroute 10.250.78.208</span></em></strong></p>
<p><span style="color: #808080;">traceroute to 10.250.78.208 (10.250.78.208), 30 hops max, 52 byte packets</span></p>
<p><span style="color: #808080;">1  ip-10-250-76-177 (10.250.76.177)  0.155 ms  0.070 ms  0.046 ms</span></p>
<p><span style="color: #808080;">2  ip-10-250-76-160 (10.250.76.160)  11.776 ms  0.092 ms  0.087 ms</span></p>
<p><span style="color: #808080;">3  ip-10-250-78-208 (10.250.78.208)  0.267 ms  0.160 ms  0.127 ms</span></p>
<p><strong><em><span style="color: #808080;">ip-10-250-79-223:~# traceroute -m 100 174.129.227.190</span></em></strong></p>
<p><span style="color: #808080;">traceroute to 174.129.227.190 (174.129.227.190), 100 hops max, 52 byte packets</span></p>
<p><span style="color: #808080;">1  ip-10-250-76-177 (10.250.76.177)  0.121 ms  0.208 ms  0.047 ms</span></p>
<p><span style="color: #808080;">2  ip-10-250-76-3 (10.250.76.3)  0.295 ms  0.208 ms  0.209 ms</span></p>
<p><span style="color: #808080;">3  ec2-75-101-160-114.compute-1.amazonaws.com (75.101.160.114)  0.243 ms  0.226 ms  0.221 ms</span></p>
<p><span style="color: #808080;">4  othr-216-182-224-19.usma1.compute.amazonaws.com (216.182.224.19)  0.677 ms  20.055 ms  0.631 ms</span></p>
<p><span style="color: #808080;">5  72.21.197.200 (72.21.197.200)  0.797 ms  0.673 ms  0.593 ms</span></p>
<p><span style="color: #808080;">6  othr-216-182-232-72.usma2.compute.amazonaws.com (216.182.232.72)  0.897 ms  0.860 ms  0.808 ms</span></p>
<p><span style="color: #808080;">7  72.21.197.201 (72.21.197.201)  0.679 ms  0.865 ms  0.850 ms</span></p>
<p><span style="color: #808080;">8  othr-216-182-232-102.usma2.compute.amazonaws.com (216.182.232.102)  1.084 ms  1.129 ms  0.988 ms</span></p>
<p><span style="color: #808080;">9  othr-216-182-224-18.usma1.compute.amazonaws.com (216.182.224.18)  1.353 ms  1.308 ms  1.472 ms</span></p>
<p><span style="color: #808080;">10  ec2-75-101-160-115.compute-1.amazonaws.com (75.101.160.115)  1.823 ms  1.455 ms  1.608 ms</span></p>
<p><span style="color: #808080;">11  198.19.63.211 (198.19.63.211)  1.299 ms  1.305 ms  1.241 ms</span></p>
<p><span style="color: #808080;">12  ec2-174-129-227-190.compute-1.amazonaws.com (174.129.227.190)  1.363 ms  1.519 ms  1.254 ms</span></p>
<p><span style="color: #808080;">ip-10-250-79-223:~#</span></p>
<p>Traceroute shows the traffic has to go through multiple hops when using public ip address, this also requires opening more ports.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cloudiquity.com/2009/02/using-amazon-ec2-public-ip-address-inside-ec2-network/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

