Skip to content

Subnet

Medium — good to knowNetworking

ELI5 — The Vibe Check

A subnet is a smaller chunk of a larger network, like dividing a city into neighborhoods. All devices in a subnet can talk to each other directly. To talk to devices in a different subnet, you need to go through a router. It helps organize large networks and improves security.

Real Talk

A subnet (subnetwork) is a logical subdivision of an IP network. Subnetting divides a network into smaller segments by borrowing bits from the host portion of the address. Defined by a network address and a subnet mask (e.g., 192.168.1.0/24). Reduces broadcast traffic and improves security.

Show Me The Code

# Common subnet examples
192.168.1.0/24
# /24 = 255.255.255.0 mask
# 256 addresses (254 usable hosts)
# Range: 192.168.1.1 - 192.168.1.254

10.0.0.0/16
# /16 = 255.255.0.0 mask
# 65,536 addresses (65,534 usable)

# Cloud VPC subnets:
# Public subnet:  10.0.1.0/24 (has internet gateway)
# Private subnet: 10.0.2.0/24 (no direct internet access)

When You'll Hear This

"Put the database servers in a private subnet with no internet access." / "How many hosts can fit in a /26 subnet?"

Made with passive-aggressive love by manoga.digital. Powered by Claude.