Amazon VPC (Virtual Private Cloud, AWS가 제공하는 AWS 계정 전용 가상 네트워크)를 사용하려면 서브넷 지식이 있어야 한다. AWS의 서브넷은 물리적인 위치와 관계가 있기 때문에 구조를 잘 이해해야 한다. 서브넷은 CIDR 표기를 사용한다.
서브넷이란 커다란 네트워크를 작게 나눈 네트워크를 말한다.
네트워크를 분할해 직접 통신할 수 있는 범위를 좁히고, 방화벽을 설정해 보안을 강화하는 것을 목적으로 한다. AWS의 경우에는 어떤 가용 영역에 서브넷을 둘지 설정한다. 즉, 서브넷은 물리적인 장소를 특정한다.
또한, VPC는 사용자가 사용할 수 있는 네트워크 범위를 생성하고 그 아래에 용도에 따라서 서브넷(작은 네트워크)을 생성한다. 서브넷을 나누어 서브넷 A는 공개하고, 서브넷 B는 비공개하는 식으로 서브넷별로 역할을 다르게 부여할 수도 있다.
출처: 그림으로 이해하는 AWS 구조와 기술
What's the difference between a subnet and a subnet mask? What is subnetting and how can it help you?
A subnet mask is a number that distinguishes the network address and the host address within an IP address. A subnet is a smaller network within a network that requires a subnet mask.
Subnetting is the process of dividing a network into two or more subnets. Its primary function is to make the routing of data within a network more efficient and secure. Subnetting also helps make better use of IPv4 addresses.
When you connect a device to a network, the network assigns an IP address to the device. That IP address consists of two parts: the network portion and the host portion. The network portion of the IP address identifies the overall network while the host portion identifies the device.
The network address and host address contained in an IP address are indistinguishable from each other without a subnet mask. The subnet mask allows network traffic to understand IP addresses by splitting them into the network and host addresses.
Are subnets and subnet masks the same thing?
No, while subnet masks are an essential part of subnets, they are not the same thing.
A subnet (short of subnetwork) describes the specific part of a network that shares the network’s IP address but has a unique subnet address.
A subnet mask, however, differentiates between the portion of an IP address that refers to the subnet and the portion which refers to the host.
https://www.ipxo.com/blog/what-is-subnet-mask/