Menu
Coddy logo textTech

The Default Gateway

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

A router in the right place is not enough: each host must be told where to send traffic for other networks. That address is its default gateway, normally the router's interface in the host's own network.

netlab gateway HOST ADDR sets it. Without it, a host with a foreign destination simply gives up: unreachable (different subnet, pc1 has no gateway).

Setting the gateway on the sender is only half the job. Watch what the lab says once pc1 can send but pc3 cannot answer.

challenge icon

Challenge

Easy

r1 is addressed in both networks. Ping pc3 from pc1, set pc1's gateway to 192.168.1.1, and ping again.

Expected output:

pc1 -> pc3: unreachable (different subnet, pc1 has no gateway)
pc1: gateway 192.168.1.1
pc1 -> pc3: no reply (pc3 thinks 192.168.1.10 is on a different subnet and has no gateway)

Try it yourself

Terminal

All lessons in LAN Labs

Practice on your own: Terminal playground