appzasGamesToolsDevLearnCheat sheetsQuick calcsConvertersReferenceNetworkTimeCalculatorsCompareLLM prices

IP addresses

Lesson 1 of 38 minBeginner

IPv4, IPv6 and the private ranges your home and office use.

An IP address identifies a device on a network. IPv4 uses four numbers from 0 to 255 (192.168.1.10), which allows about 4.3 billion addresses. IPv6 uses eight groups of hexadecimal digits (2001:db8::1) and has room for practically unlimited devices.

Private ranges

Three IPv4 blocks are reserved for private networks (RFC 1918). They are not routed on the public internet:

RangeCIDRTypical use
10.0.0.0 to 10.255.255.25510.0.0.0/8Large companies, cloud networks
172.16.0.0 to 172.31.255.255172.16.0.0/12Medium networks, Docker
192.168.0.0 to 192.168.255.255192.168.0.0/16Home routers

Other special addresses: 127.0.0.1 is localhost (your own machine) and 169.254.x.x is a self-assigned address used when no DHCP server answers.

NAT

Your router uses NAT (network address translation) to let many private devices share one public IP address. This is why the address your computer shows is different from the one a website sees.

See your addresses

ip addr           # Linux
ipconfig          # Windows
ifconfig          # macOS

Test yourself

Answer all the questions, then check them. Finish with every answer right to mark the lesson as done.

1. Which of these is a private IPv4 address?
2. What is 127.0.0.1?
3. What does NAT allow?
HintThe ip command, address object.

Key terms