Menu
Coddy logo textTech

The Typo in the Mask

Lesson 21 of 35 in Coddy's LAN Labs course.

A single wrong digit in a prefix length changes which network a host thinks it is in. /25 instead of /24 splits the /24 in half: a host at .130/25 believes anything below .128 is a different network.

The tell-tale sign is in show ip: one host whose MASK column differs from its neighbors. Start there, and the no reply from the ping will suddenly make sense.

challenge icon

Challenge

Easy

Show the addressing view and find the odd mask. Ping pc2 from pc1, fix pc2 (keep 192.168.1.130, correct the prefix to /24), and ping again.

Expected output:

NODE  IFACE  ADDRESS           MASK             GATEWAY
pc1   eth0   192.168.1.10/24   255.255.255.0    192.168.1.1
pc2   eth0   192.168.1.130/25  255.255.255.128  -
pc3   eth0   10.0.0.20/24      255.255.255.0    10.0.0.1
r1    eth0   192.168.1.1/24    255.255.255.0    -
r1    eth1   10.0.0.1/24       255.255.255.0    -
pc1 -> pc2: no reply (pc2 thinks 192.168.1.10 is on a different subnet and has no gateway)
pc2 eth0: 192.168.1.130/24 (mask 255.255.255.0, network 192.168.1.0/24)
pc1 -> pc2: reply from 192.168.1.130 (ttl=64)

Try it yourself

Terminal

All lessons in LAN Labs

Practice on your own: Terminal playground