← Lessons
🖧 Computer Networks for Beginners
Routers and gateways
## Gateway — the "exit door"
When a computer wants to send to an address on another network, it hands its packet to the **default gateway**. The gateway is the address of the router's interface that faces that network.
```
192.168.1.0/24 192.168.2.0/24
PC1 192.168.1.10 ─┐ ┌─ PC3 192.168.2.10
SW1 ── R1 ── SW2
PC2 192.168.1.11 ─┘ .1 .1 └─ PC4 192.168.2.11
```
- One interface of R1 is `192.168.1.1/24`, the other is `192.168.2.1/24`.
- Gateway for PC1 and PC2: `192.168.1.1`
- Gateway for PC3 and PC4: `192.168.2.1`
## Common mistakes
| Symptom | Cause |
|---|---|
| Ping to classmates works, but no internet | Gateway wrong / not set |
| "IP conflict" | Two devices have the same IP |
| Port light doesn't turn on | Cable or plug badly crimped |
| On the same switch but ping fails | Given an address from a different network |
> 🎮 **Network lab → Tasks 7, 8**
>
> 🧮 Problems: **Networks → Level 9**
💡 Want to track which lessons you've read and solve problems for points? Sign up for free or log in.