What IP addressing is for
Every device on a network needs a unique address so traffic knows where to go. Network+ tests both IPv4 and IPv6, plus the subnetting maths that splits one big network into smaller, manageable pieces.
IPv4 basics
An IPv4 address is 32 bits, written as four decimal octets (0-255) separated by dots, eg 192.168.1.10. The subnet mask marks which bits are network and which are host - eg 255.255.255.0 (/24) means the first 24 bits are network, leaving 8 bits (256 addresses, 254 usable) for hosts.
CIDR notation
CIDR (Classless Inter-Domain Routing) writes the mask as a slash and a bit count, like /24 or /26. Usable hosts = 2^(host bits) - 2, because the first address is the network ID and the last is the broadcast address. A /30 gives 4 addresses, 2 usable - perfect for a point-to-point link.
Private address ranges (RFC 1918)
- Class A: 10.0.0.0 - 10.255.255.255 (/8)
- Class B: 172.16.0.0 - 172.31.255.255 (/12)
- Class C: 192.168.0.0 - 192.168.255.255 (/16)
These never route on the public internet - NAT translates them at the edge.
Special addresses to know
- 127.0.0.1 is loopback (localhost).
- 169.254.x.x is APIPA - a device gives itself this when DHCP fails.
- 255.255.255.255 is the limited broadcast address.
- 0.0.0.0/0 in routing means 'any network' (default route).
Subnetting method
Work out the block size by subtracting the interesting octet's mask value from 256. Eg mask 255.255.255.192 (/26): 256-192=64, so subnets run 0, 64, 128, 192. Each subnet's broadcast is the next subnet's start minus 1. Practise this both ways - given a mask, find the subnets; given a required host count, find the smallest mask that fits.
IPv6 essentials
128-bit address written in 8 groups of hex, eg 2001:0db8::1. Leading zeros in a group can be dropped, and one run of consecutive all-zero groups can be shortened to '::' (only once per address). fe80::/10 is link-local, and there's no broadcast in IPv6 - multicast replaces it.
Common exam traps
- Forgetting to subtract 2 for network and broadcast addresses.
- Confusing the network ID with a usable host address.
- Mixing up /24 (256 addresses) with 255.255.255.0 - they're the same thing written differently, so be fluent converting between them.
- Applying '::' shortcut twice in one IPv6 address (not allowed).
How many bits make up an IPv4 address?
32 bits, shown as four decimal octets 0-255.
tap to reveal
How many bits make up an IPv6 address?
128 bits, shown as 8 groups of hex digits.
tap to reveal
Formula for usable hosts in a subnet?
2^(host bits) minus 2 (subtract network ID and broadcast).
tap to reveal
How many usable hosts on a /30 subnet?
2 usable hosts (4 total addresses) - used for point-to-point links.
tap to reveal
How many usable hosts on a /24 subnet?
254 usable hosts (256 total addresses).
tap to reveal
What are the three RFC 1918 private IPv4 ranges?
10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.
tap to reveal
What does an APIPA address look like and when does it appear?
169.254.x.x - assigned automatically when a device fails to get a DHCP address.
tap to reveal
What is 127.0.0.1 used for?
Loopback - refers to the device itself (localhost).
tap to reveal
What does 0.0.0.0/0 mean in a routing table?
The default route, matching any destination network.
tap to reveal
What prefix identifies an IPv6 link-local address?
fe80::/10.
tap to reveal
How many times can '::' be used in one IPv6 address?
Only once, to compress a single run of consecutive all-zero groups.
tap to reveal
Does IPv6 use broadcast addresses?
No - IPv6 removes broadcast and uses multicast/anycast instead.
tap to reveal
How do you find subnet block size from a mask like 255.255.255.192?
256 minus the interesting octet value: 256-192=64, so subnets start at 0, 64, 128, 192.
tap to reveal
What does CIDR notation like /26 mean?
The first 26 bits of the address are the network portion; the rest are host bits.
tap to reveal