IP addresses, ranges & CIDR — make the notation mean something
An Internet Protocol (IP) address is a logical address assigned to a network interface. It helps devices identify where network traffic is coming from and where it needs to go. A device can have more than one IP address—for example, one on Wi-Fi and another on Ethernet.
IPv4 vs IPv6
Internet Protocol version 4 (IPv4) is 32 bits and is normally written as four decimal numbers (octets), each from 0–255.
Example: 192.168.1.25
Internet Protocol version 6 (IPv6) is 128 bits and is written with hexadecimal digits separated by colons.
Example: 2001:db8::25
Memory trick: Dots = IPv4. Colons = IPv6. IPv4 looks like 4 dotted numbers; IPv6 is the longer hexadecimal address that uses colons.
Public vs private
Private IPv4 addresses are used inside homes, schools, and organizations. They are not routed directly across the public Internet. A router commonly uses Network Address Translation (NAT) so many private devices can communicate outward using public addressing.
Public IP addresses are globally routable addresses used to communicate across the Internet. Your router's Internet-facing connection may receive a public address from the Internet Service Provider (ISP).
Think location: private = inside the local network; public = Internet-facing. Do not assume every address outside the three private IPv4 ranges is usable as an ordinary public host address—other special/reserved ranges also exist.
The three private IPv4 ranges
| Private range | What the prefix means | Student-friendly memory |
10.0.0.0/8 10.0.0.0–10.255.255.255 | /8 means the first 8 bits—the first octet—are the network prefix for this range. Every address here starts with 10. | “Starts with 10? Private 10 range.” |
172.16.0.0/12 172.16.0.0–172.31.255.255 | /12 fixes the first 12 bits. For recognition, remember that only 172.16 through 172.31 are in this private block. | “172 private lives from 16 through 31.” 172.15.x.x and 172.32.x.x are not in this private range. |
192.168.0.0/16 192.168.0.0–192.168.255.255 | /16 means the first 16 bits—the first two octets—are the network prefix for this range. These addresses start with 192.168. | “192.168 = private.” This pattern is common on home/local networks. |
Why do homes, schools, and companies use different private ranges?
10.x.x.x, 172.16–31.x.x, and 192.168.x.x are not different “types” of private network. They are three address blocks reserved for private use. A network administrator or router manufacturer chooses a block and then divides it into subnets that fit the network.
Think of them as three sizes of private address space
- 10.0.0.0/8 is the largest private block: 16,777,216 total addresses before subnetting. Large organizations often have room to create many internal subnets from it.
- 172.16.0.0/12 is a middle-sized private block: 1,048,576 total addresses. Only 172.16 through 172.31 are private.
- 192.168.0.0/16 contains 65,536 total addresses. Home and small-office routers commonly choose a smaller subnet from this block, such as 192.168.1.0/24.
Why your devices may show different numbers
Your device normally receives its local/private IP address from the network it joins. The address is not permanently tied to the laptop or phone.
At home you might receive 192.168.1.25. At school the same laptop might receive 10.42.7.25. On another organization's network it could receive 172.20.8.25. All three can be valid private addresses.
The network's addressing plan determines the range. Dynamic Host Configuration Protocol (DHCP) commonly assigns an available address from the subnet configured by the administrator/router.
Important: a company does not have to use 10.x.x.x, and a home does not have to use 192.168.x.x. Those are common design choices, not rules. A home can use part of 10.0.0.0/8, and an enterprise can use part of 192.168.0.0/16. The address only has to fit the private network's configured subnet and addressing plan.
Private address on the inside; public address on the Internet
Suppose a home router uses 192.168.1.0/24. A laptop might be 192.168.1.25, a phone 192.168.1.40, and a printer 192.168.1.60. Those addresses work inside that local network. The router's Internet/Wide Area Network (WAN) side has a separate upstream address. Network Address Translation (NAT) lets many inside private addresses share the router's Internet-facing connectivity.
Do not confuse “same private number” with “same device.” Millions of unrelated homes can each have a device named 192.168.1.25 because private addresses are reused on separate local networks and are not routed globally as unique Internet addresses.
Why might your home PC be 192.168.1.20 but a school PC be 10.20.30.40?
They are on different private networks with different addressing plans. Both ranges are valid for private IPv4 use.
Does 172.x.x.x automatically mean private?
No. Only 172.16.0.0 through 172.31.255.255 is the private 172 block.
Can two different homes both use 192.168.1.25?
Yes. Private addresses can be reused on separate local networks because they are not globally routed as unique public Internet addresses.
Who usually gives your phone or laptop its private address?
On many networks, DHCP on the router or a network server assigns an address from that network's configured subnet.
What does CIDR notation mean?
Classless Inter-Domain Routing (CIDR) uses /1 through /32 to tell you how many of IPv4's 32 bits belong to the network prefix. The slash number is a bit count—not a separate part of the IP address.
Start with all 32 bits
IPv4 has four octets. Each octet has 8 bits, so 8 + 8 + 8 + 8 = 32 bits.
Octet 1 | Octet 2 | Octet 3 | Octet 4
00000000 . 00000000 . 00000000 . 00000000
As the CIDR number increases from /1 → /32, the network/host boundary moves one bit to the right. Each step turns one more mask bit from 0 into 1.
Read CIDR out loud:
192.168.10.34/24
“IPv4 address 192.168.10.34 with a 24-bit network prefix.”
/24 is not part of the host address. It tells you where the network bits stop and the host bits begin.
See the boundary move across all four octets
| CIDR range | Changing octet | What is happening |
| /1–/8 | Octet 1 | The boundary moves through the first 8 bits. |
| /9–/16 | Octet 2 | Octet 1 is all network; the boundary moves through Octet 2. |
| /17–/24 | Octet 3 | Octets 1–2 are all network; the boundary moves through Octet 3. |
| /25–/32 | Octet 4 | Octets 1–3 are all network; the boundary moves through Octet 4. |
Memory: every group of 8 finishes an octet: /8 → /16 → /24 → /32. Between those landmarks, count how many network bits are turned on in the changing octet.
One 8-bit pattern repeats in every octet
| Bits ON | Binary in changing octet | Mask value | Magic number / jump |
| 1 | 10000000 | 128 | 128 |
| 2 | 11000000 | 192 | 64 |
| 3 | 11100000 | 224 | 32 |
| 4 | 11110000 | 240 | 16 |
| 5 | 11111000 | 248 | 8 |
| 6 | 11111100 | 252 | 4 |
| 7 | 11111110 | 254 | 2 |
| 8 | 11111111 | 255 | 1 |
This is the same pattern for /1–/8, /9–/16, /17–/24, and /25–/32. Only the changing octet is different.
Example: why /14 and /30 use the same row
/14 is in Octet 2. It uses 6 network bits in the changing octet: 11111100 = 252. Its mask is 255.252.0.0 and the magic number in Octet 2 is 256 − 252 = 4.
/30 is in Octet 4. It also uses 6 network bits in the changing octet: 11111100 = 252. Its mask is 255.255.255.252 and the magic number in Octet 4 is also 4.
Connection: the 8-bit pattern repeats; CIDR tells you which octet contains that pattern.
Host-bit connection: 32 − CIDR = host bits. Example: /26 leaves 6 host bits, so 26 = 64 total addresses. /20 leaves 12 host bits, so 212 = 4,096 total addresses.
Where do I actually find an IP address?
Windows PC
Settings: Settings → Network & internet → Wi-Fi or Ethernet → select the connected network / Properties and look for IPv4 address, IPv6 address, DNS, and related network properties.
Command line: open Command Prompt and run ipconfig. Use ipconfig /all for more detail such as DHCP and DNS information.
macOS
Settings: System Settings → Network → select Wi-Fi or Ethernet → Details. Look at the TCP/IP information.
Terminal: tools such as ifconfig can display interface addressing.
iPhone / iPad
Settings → Wi-Fi → tap the ⓘ information button beside the connected network. Look for the IP Address section, including IPv4 details such as IP address, subnet mask, and router.
Android phone / tablet
Open Settings → Network/Internet or Connections → Wi-Fi → select the connected network. The exact labels vary by manufacturer and Android version; look under network details/advanced information for the IP address, gateway, and related settings.
Linux / Raspberry Pi
Open a terminal and use ip addr (often shortened to ip a) to see addresses on network interfaces. ip route helps identify routes/default gateway information.
Router
In the router's administration interface, the WAN/Internet status area may show the address used toward the ISP, while the LAN/DHCP/client area shows local addressing and connected devices. Interface names vary by router.
Important: A device may show several addresses. Make sure you are looking at the active network interface (for example, the Wi-Fi adapter you are actually using), not a disconnected adapter, virtual adapter, Bluetooth interface, or another connection.
Check: What does the “24” in 192.168.1.25/24 tell you?
It says the network prefix uses 24 bits. IPv4 has 32 bits total, leaving 8 host bits.
Check: Is 10.42.7.9 private or public?
Private. Every IPv4 address beginning with 10 is inside 10.0.0.0/8.
Check: Is 172.40.2.5 in the private 172 range?
No. The private 172 block is only 172.16.0.0 through 172.31.255.255.
Check: Which looks like IPv6 — 192.168.4.20 or 2001:db8::20?
2001:db8::20. The hexadecimal digits and colons are the quick visual clue.
Check: Why might your laptop show both IPv4 and IPv6?
Modern networks can use both protocol versions at the same time. This is commonly called dual stack.
Check: Where would you look for your Windows PC's current address?
Network properties in Windows Settings or run ipconfig in Command Prompt.