Private addresses
There aren't enough IPv4 addresses for every device, so companies and homes use private addresses (RFC 1918) inside, and share a few public ones:
| Range | Prefix | Size |
|---|---|---|
| 10.0.0.0 to 10.255.255.255 | 10.0.0.0/8 | 16 million addresses |
| 172.16.0.0 to 172.31.255.255 | 172.16.0.0/12 | 1 million |
| 192.168.0.0 to 192.168.255.255 | 192.168.0.0/16 | 65,536 |
Internet routers don't route private addresses. Here the ISP has no route back to 192.168.1.0/24, so PC1's ping reaches the web server, but the reply has nowhere to go:
In NetLab
▶ PC1 NetLab Windows-style command prompt. Type help to see the commands. C:\Users\student>ping 198.51.100.10 Pinging 198.51.100.10 with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for 198.51.100.10: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), ▶ ISP ISP>enable ISP#show ip route | begin Gateway Gateway of last resort is not set 198.51.100.0/24 is variably subnetted, 2 subnets, 2 masks C 198.51.100.0/24 is directly connected, GigabitEthernet0/1 L 198.51.100.1/32 is directly connected, GigabitEthernet0/1 203.0.113.0/24 is variably subnetted, 2 subnets, 2 masks C 203.0.113.0/29 is directly connected, GigabitEthernet0/0 L 203.0.113.1/32 is directly connected, GigabitEthernet0/0
What NAT does
Network Address Translation on the edge router swaps the private source address of outgoing packets for a public one, and swaps it back in the replies. The internet only ever sees the public address.
Four names for addresses
| Name | Means | Here |
|---|---|---|
| Inside local | An inside host's real (private) address | 192.168.1.10 (PC1) |
| Inside global | The public address that stands for it outside | 203.0.113.2 (R1's outside address) |
| Outside local | The outside host's address as seen from inside | 198.51.100.10 |
| Outside global | The outside host's real address | 198.51.100.10 (the same, unless you translate outside hosts too) |
Remember: Inside/outside = which side the host is on. Local/global = which side of the router you look from. The CCNA only translates inside addresses, so outside local and outside global are always the same.