Where to start First steps track · 15 stages
Linux Labs

IPv4 subnet calculator

Network, broadcast, host range and subnetting for an address with a mask.

192.168.1.10/24 or 10.0.0.0 255.255.255.0
Mask Prefix length: /24 is 255.255.255.0
Enter an address with a mask or pick a network below.
In binary network bits

—

Split into

#SubnetHost rangebroadcast

Network
—
Mask
—
Host addresses
—
Details

The details appear when the address is set.

Calculated in your browser — nothing is sent to the server

Practice on a machine

Lab “Repair a persistent address”

easy ~25 min stage 3 of the “Networking” track

Open the lab

In a Linux terminal

bash
ip -br addr # addresses and masks on interfaces ip route # which network via which interface sudo ip addr add 192.168.1.10/24 dev eth0 # add an address until reboot ipcalc 192.168.1.10/24 # the same calculation (ipcalc package)

Keep in mindThe gateway must be in the same subnet as the machine's address, or the default route via it won't be added.

FAQ

How many hosts are in a /24 subnet?

254: of 256 addresses, the first is the network address and the last is the broadcast. The formula is 2^(32 − prefix) − 2.

What is a wildcard mask?

An inverted mask: 0.0.0.255 matches /24. Cisco ACLs and OSPF settings use it.

Why can't two computers on one network see each other?

Often their masks differ, so they disagree on where the network ends. Compare ip -br addr on both: the network and broadcast must match.

Loading…