Public and Private IP Addresses
Priya's router settings page lists two very different addresses: 192.168.1.1 and 203.0.113.45. One is how devices in the shop find the router; the other is how the whole internet sees the shop. Knowing which is which tells you what the outside world can reach directly.
The rule
Private addresses stay inside; one public address faces the world.
An IP address identifies a device on a network. Some ranges are reserved as private: they are used inside homes and offices and are never routed across the public internet.
10.0.0.0to10.255.255.255172.16.0.0to172.31.255.255192.168.0.0to192.168.255.255
Everything else that is routable is public. The router uses NAT (network address translation) to let many private devices share one public address when they go online.
A few more terms you will meet on every settings page:
- Subnet mask or CIDR: says which part of the address is the network.
192.168.1.0/24, or mask255.255.255.0, means the first three numbers are fixed, leaving 256 addresses, of which 254 can be given to devices. - Default gateway: the router address a device sends traffic to when the destination is outside its own network.
- Loopback:
127.0.0.1, also called localhost, always means "this same machine". Traffic to it never leaves the device.
The shortcut
Look at the first numbers. 10, 172.16 to 172.31, or 192.168 means private. 127 means this machine. Anything else is public and potentially reachable from anywhere.
The network
Shop devices live in
192.168.1.0/24. That starts with 192.168, so it is private.
The trap is thinking "private" means "secure". Private addresses are only hidden from direct outside connections. A device inside can still be tricked into reaching out, so the other defences still matter.
Drills
Answer fast — trust the rule.
Which address is private?
What does 127.0.0.1 refer to?
A device wants to reach a website outside the shop network. Where does it send the traffic first?
How many addresses does a /24 network contain in total?
Which statement about private addresses is true?
Remember
- Private addresses stay inside; one public address faces the world through NAT.
- 10, 172.16 to 172.31, 192.168: private. 127: this machine. The router is the default gateway.
- Trap: treating "private" as "secure".
