ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Difference between elastic IP and Public IP

2022-09-04 16:33:39  阅读:185  来源: 互联网

标签:elastic IP AWS public instance Difference Public


Learn what is elastic IP and public IP means in AWS. List out all differences between elastic IP and public IP in AWS.

I was having a conversation about AWS with one of my friends and he came up with the question what is the difference between elastic IP and public IP? So, I explained to him and thought why not draft a post about it! So in this article, we will see the difference between elastic IP and public IP in AWS. This can be a cloud interview question so without much delay lets get into elastic IP vs public IP battle.

What is elastic IP in AWS?

First thing first, let’s get basics clear. What is the elastic IP? It is IPv4 IP address designed and exists for dynamic cloud computing and reachable over the internet. By name, you can imagine it’s a flexible IP that can be used or mapped rapidly from one EC2 instance to another when a currently associated instance fails. This way end-user or application continues to talk to the same IP even if the instance behind it fails. They are like static public IPs allocated for your AWS account.

What is Public IP in AWS?

Public IP is IPv4 IP address which is reachable over the internet. Remember switching flexibility of Elastic IP is not available for this IP. Amazon also assigns external/Public DNS name (shown in the screenshot) to instances who receives public IP. The public IP of the instance is mapped to the primary private IP of that instance via NAT (Network Address Translation) by default.

Refer below screenshot from the EC2 console of AWS and observe where you can check your elastic IP, public IP, and public DNS name.

Check elastic IP, public IP and public DNS in EC2 AWS console

Difference between elastic IP and Public IP

Now let’s look at the difference between these two IP types.

  1. Whenever a new EC2 instance spins up, it’s assigned with public IP by default. Elastic IP is not assigned by default.
  2. Elastic IPs are assigned to AWS accounts which you can attach to instances. Public IPs assigned to instances directly.
  3. When an instance is stopped and started again, public IP gets changed. But if the instance is assigned with elastic IP, it will remain the same even if the instance is stopped and started again.
  4. If elastic IP is allocated to your account and not in use then you will be charged for it on an hourly basis.
  5. Public IP released once your instance is stopped so no question of getting charged for not using it.
  6. You won’t be able to re-use the same public IP since its allocated from the free IP pool. You can always re-use, re-attach elastic IP to other instances when it is released from the current instance.
  7. You can not manually attach or detach public IP from the instance. It’s auto allocated from the pool. Elastic IP can be manually attached and detach from the instance.
  8. You can have a maximum of 5 elastic IP to your account per region. But, you can have as many public IPs as EC2 instances you spin up.
  9. You can have either of them for an instance. If you assign elastic IP to instance then its currently assigned public IP will be released to the free pool.

 

Quote from: https://kerneltalks.com/cloud-services/difference-between-elastic-ip-and-public-ip/

标签:elastic,IP,AWS,public,instance,Difference,Public
来源: https://www.cnblogs.com/sycosmos/p/16655330.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有