Visual lab

Learn subnetting visually

11 short lessons, from binary to IPv6. Change the inputs and watch every value update.

Lesson 6 of 11Intermediate

On-link vs gateway

Local or remote?

Before sending, a host checks whether the destination is on its own subnet. That decides ARP or gateway.

255.255.255.128
Packet pathOn-link
Host A
10.44.21.148/25
Network 10.44.21.128/25
Direct delivery (ARP)
Host B (local)
10.44.21.200
Network 10.44.21.128/25

How Host A decides

Host A only uses its own mask. It never knows Host B's mask.

  1. 1Host A's address AND /2510.44.21.128
  2. 2Host B's address AND /2510.44.21.128
  3. 3Compare the two networksMatch: send directly

Both addresses land in 10.44.21.128, so Host B is on-link. Host A uses ARP to learn Host B's MAC address and delivers the frame directly. No router is involved.

Good to know
/31 point-to-point links and /32 host routes follow different rules, and IPv6 subnets are usually /64 with no broadcast. Subnets separate broadcast domains; firewalls and ACLs decide what traffic is allowed.

Lock it in

Drill the “On-link vs gateway” skill until it is automatic.

Lesson 6 of 11
Next: Across octets