Private versus a Public IP (IPv4)

2020. 2. 2. 15:45스터디/AWS Study

Networking has two sorts of IPs IPv4 and IPv6:

- IPv4: 1.160.10.240

- IPv6:3ffe: 1900:4545:3:200:f8ff:fe21:67cf

 

IPv4 is still the most common format used online.

IPv6 is newer and solves problems for the IoT

IPv4 allows for 3.7B different addresses in the public space

IPv4: [0-255].[0-255].[0-255].[0-255]

 

Public IP:

- Public IP means the machine can be identified on the internet(WWW)

- Must be unique across the whole web (not two machines can have the same public IP)

- Can be geo-locatd easily

 

Private iP:

- Private IP means the machine can only be identified on a private network only

- The IP must be unique across the private network

- But two different private network (two companies) can have the same IPs

 

Elastic IPs

- When you stop and then start an EC2 instance, it can change its public IP.

- If you need to have a fixed public IP for your instance, you need an Elastic IP

- An Elastic IP is a public IPv4 you own as long as you don't delete it

- You ccan attach it to one instance at a time

- With an 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 your account (you can ask AWS to increase that).

- Overall try to avoid using Elastic IP

a) They often reflect poor architectural decisions

b) Instead, use a random public IP and register a DNS name to it.

c) Or, as we'll see later, use a Load Balancer and don't use a public IP

 

Private vs Public IP (IPv4) In Aws EC2

- By default, your EC2 machine comes with:

a) A private IP for the internal AWS Network

b) A public IP for the WWW

 

- When we are doing SSH into our EC2 machines:

a) We can't use a private IP, because we are not in the same network

b) We can only use the public iP

 

- If your machine is stopped and then started, the public IP can change  

'스터디 > AWS Study' 카테고리의 다른 글

EC2 AMI  (0) 2020.02.02
EC2 Instance Launch Types  (0) 2020.02.02
Security Groups  (0) 2020.02.02
EC2  (0) 2020.02.02
AWS - IAM  (0) 2020.01.31