Usable hosts in a subnet with prefix /n: \(2^{32-n} - 2\) (all host bits 0 is the network address, all host bits 1 is the broadcast).
LAN 1 — Switch 1 (192.168.10.0/24)
- Subnet mask: 255.255.255.0
- Network address: 192.168.10.0, broadcast: 192.168.10.255
- Usable range: 192.168.10.1 – 192.168.10.254
- Usable hosts: \(2^{8} - 2 = 254\)
LAN 2 — Switch 2 (192.168.20.0/24)
- Subnet mask: 255.255.255.0
- Network address: 192.168.20.0, broadcast: 192.168.20.255
- Usable range: 192.168.20.1 – 192.168.20.254
- Usable hosts: \(2^{8} - 2 = 254\)
WAN link — G0/0 (10.0.0.0/30)
- Subnet mask: 255.255.255.252
- Network address: 10.0.0.0, broadcast: 10.0.0.3
- Usable range: 10.0.0.1 – 10.0.0.2
- Usable hosts: \(2^{2} - 2 = 2\) — one for the router (10.0.0.1), one for the other end of the link
Check against the figure: every address shown fits. The gateways 192.168.10.1 and 192.168.20.1, the switch management IPs .254 and the PCs .11 and .12 are all inside their LAN ranges, and 10.0.0.1 is one of the only two usable addresses on the /30. A /30 is the usual choice for a point-to-point link because it wastes no addresses.
— rhs