Skills / Networking fundamentals / IP addresses and subnets
IP addresses and subnets
Every device on a network, whether a laptop, phone, printer or server, needs an IP address so data can reach it, just as a letter needs a postal address.
IPv4 addresses look like 192.168.1.25: four numbers from 0 to 255, separated by dots. There are only about 4.3 billion of them, not enough for every device on Earth, which led to two solutions:
- IPv6, a newer, much larger address system, written like
2001:db8::1 - Private addresses used inside homes and offices, shared behind one public address
Private vs public. These ranges are reserved for private networks and never appear directly on the internet: 10.x.x.x, 172.16.x.x to 172.31.x.x, and 192.168.x.x. Your router gives devices private addresses, and uses NAT (network address translation) to let them all share the single public address your internet provider gives you.
Subnets. A network is defined by an address range. 192.168.1.0/24 means the first 24 bits (the first three numbers) identify the network, so devices from 192.168.1.1 to 192.168.1.254 are on the same local network and can talk directly. The /24 is the prefix length; the older way of writing it is a subnet mask of 255.255.255.0.
How devices get addresses. Usually automatically, from a DHCP server (often built into the router), which also tells them the default gateway: the router that leads to other networks and the internet.
On your computer, run ipconfig (Windows) or ip addr / ifconfig (Mac and Linux) to see your own address.
The tutor gives hints, not finished answers. Log in to use it.