3-1-2 Subnets Explained
Key Concepts
- Subnets
- CIDR Notation
- Subnet Mask
- Private vs. Public Subnets
- Subnet Ranges
Subnets
Subnets are subdivisions of a larger network, allowing for more efficient traffic management and enhanced security. By dividing a network into smaller subnets, administrators can control and isolate traffic, making it easier to manage and secure resources.
Example: A large corporate network might be divided into subnets for different departments, such as HR, IT, and Sales. Each department's subnet can have its own security policies and access controls.
CIDR Notation
CIDR (Classless Inter-Domain Routing) Notation is a method used to represent IP addresses and their subnet masks. It combines the IP address with a slash (/) followed by the number of bits in the subnet mask. This notation simplifies the representation of subnets.
Example: The CIDR notation for a subnet with the IP address 192.168.1.0 and a subnet mask of 255.255.255.0 is written as 192.168.1.0/24. The "/24" indicates that the first 24 bits are used for the network portion, leaving 8 bits for host addresses.
Subnet Mask
A subnet mask is a 32-bit number that separates the network portion of an IP address from the host portion. It helps in determining which part of the IP address identifies the network and which part identifies the specific device (host) within that network.
Example: For the IP address 192.168.1.10 with a subnet mask of 255.255.255.0, the first three octets (192.168.1) identify the network, and the last octet (10) identifies the specific host within that network.
Private vs. Public Subnets
Private subnets are used within an organization and are not routable over the internet, providing enhanced security. Public subnets, on the other hand, are accessible from the internet and are used for resources that need to be publicly available.
Example: In a corporate environment, internal servers and databases might be placed in private subnets, while web servers accessible to the public might be placed in public subnets.
Subnet Ranges
Subnet ranges define the IP address range within a subnet. The range is determined by the subnet mask and the network address. The first address in the range is the network address, and the last address is the broadcast address, with the remaining addresses available for hosts.
Example: For a subnet with the CIDR notation 192.168.1.0/24, the subnet range is from 192.168.1.1 to 192.168.1.254. The network address is 192.168.1.0, and the broadcast address is 192.168.1.255.