Nexnet AcademyV1 · alpha
← CourseSubnets and Default Gateway~5 min read

Subnets, masks, and the default gateway

A subnet is a group of local addresses

The mask (/24 = 255.255.255.0) says how many addresses share a network. A /24 holds 256 addresses (254 usable). Devices in the same subnet reach each other directly over the LAN; anything outside must be routed.

The default gateway is the way out

When a device wants to reach an address outside its subnet, it sends the packet to its default gateway - normally the router's address on that subnet. No gateway (or a wrong one) means local traffic works but the internet doesn't: the classic 'I can print but can't browse' symptom.

Sizing subnets (CIDR)

Smaller prefix = bigger block: /25 = 126 hosts, /26 = 62, /27 = 30, /28 = 14. To split one network for several groups, give each the smallest block that fits its host count, largest first, without overlapping or overflowing the base network.

Concept cards

Subnet mask / CIDR

Defines the network vs host split; /24 means the first 24 bits are the network.

A zip code boundary: it decides which addresses are 'in your area'.

Default gateway

The router address a host sends off-subnet (e.g. internet) traffic to.

The exit door of your building - everything not local goes through it.

Now try it
M3-03Missing Gateway
Start the mission →