Networking has two sorts if IPs:
IPv4: 192.168.1.1
IPv6: 1900:4545:1:101:f8fa:f2op:12ef
Let talk about Public IP, there are different type of IP like,
If we have a web server that is public IP 79.216.59.75 and we have another server with have another IP 211.139.37.43, these server is accessible on www using this IP and using these public IPs these server can talk with each other.
Lets consider we have an company A who have an private network like 192.168.0.1/22. Private network have some private IP ranges and all the computers inside that private network can talk to each other using the private IP. But these IPs are not accessible on WWW, to make it accessible on WWW we use Internet Gateway (public). Internet Gateway enable private network to talk to other server.
Private / Public / Elastic IP Difference :
Private IP (IPv4):
- Public IP means the machine can be identified on internet (WWW).
- Must be unique across the whole web (not two machine can have the same public IP).
- Can be geo-location easily.
Public IP (IPv4):
- Private IP means the machine can be only be identified on a private network only.
- The IP must be unique across the private network.
- But two different private networks (two companies) can have the same IPs.
- Machines connect to WWW using an internet gateway (a proxy).
- Only a specified range of IPs can be used as a private IP.
Elastic IP:
- With the Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account.
- You can only have 5 elastic ip in you account (you can ask AWS to increase that).
-
Overall, try to avoid using elastic IP:
1) They often reflect poor architectural decision.2) Instead use a random public IP and register a DNS name to it.
3) Or as we’ll see later, use a Load Balancer and don’t use a public IP.
Private and Public IP (IPv4) In AWS EC2 — Hands On
By default, you EC2 machine comes with
- A private IP for the internal AWS Network.
- A public IP for the WWW When we are doing SSH into our EC2 machines:
We can’t use a private IP, because we are not in the same network.
- We can only use the public IP.
- If your machine is stopped and then started the public IP can change

Top comments (1)
An AWS Private IP is an internal, non-routable address assigned to instances within a Virtual Private Cloud (VPC), facilitating secure communication between resources. In contrast, an AWS Elastic IP is a public, static IP address designed for dynamic cloud computing, ensuring private compute a consistent endpoint for instances even if they are stopped and restarted.