IPv4 is 32 bits, but the prefix determines how those bits are interpreted
An IPv4 address is not complete network information by itself. The 32-bit address identifies a value, while the prefix length tells the host which bits define the local network and which bits identify a host within that network. That one distinction drives network-address calculation, broadcast boundaries, host capacity, ARP behavior, gateway use, connected routes, and many troubleshooting decisions.
Matching octets can conceal different subnet membership. The AP Networking IP Addressing and Subnetting Practice Test tests that distinction with explicit prefixes, then moves to capacity planning and mask errors that change whether a host uses ARP or a gateway.
Four decimal octets are just a human-readable view of 32 binary bits
IPv4 displays 32 bits as four groups of 8 bits. Each 8-bit group is called an octet. Because eight binary bits can represent values from 0 through 255, every displayed octet stays inside that range.
Subnetting becomes easier when you remember that dotted decimal is only a readable representation of the underlying binary structure.
One octet uses eight place values: 128 through 1
You do not need to convert every IPv4 question fully into binary, but understanding these place values explains why masks such as 192, 224, 240, and 248 create familiar subnet block sizes.
The prefix marks the network portion from left to right
/24
24 network bits, 8 host bits. Mask: 255.255.255.0.
/26
26 network bits, 6 host bits. Mask: 255.255.255.192.
/28
28 network bits, 4 host bits. Mask: 255.255.255.240.
A longer prefix means more network bits and fewer host bits. That creates smaller subnets.
The same IPv4 address can belong to different networks
Consider 192.168.25.70. Under /24, its network is 192.168.25.0/24. Under /26, 70 falls in the 64–127 block, so the network becomes 192.168.25.64/26. Under /27, 70 falls in the 64–95 block, so the network is 192.168.25.64/27.
The decimal address did not change. The interpretation changed because the prefix changed.
Network, host, and broadcast addresses have different jobs
In conventional IPv4 subnetting, the network address is the first address in the subnet and has all host bits set to zero. The broadcast address is the last address and has all host bits set to one. Ordinary host assignments sit between those boundaries.
That /26 contains 64 total addresses and 62 traditional usable host addresses.
Host bits determine how many addresses exist in the subnet
If a prefix leaves h host bits, the subnet contains 2^h total addresses. In conventional subnetting, subtract two for the network and broadcast addresses.
| Prefix | Host bits | Total addresses | Traditional usable |
|---|---|---|---|
| /24 | 8 | 256 | 254 |
| /25 | 7 | 128 | 126 |
| /26 | 6 | 64 | 62 |
| /27 | 5 | 32 | 30 |
| /28 | 4 | 16 | 14 |
Swipe horizontally to see the host-capacity table.
The prefix tells the host whether to deliver locally or use the gateway
A host applies its prefix to its own address and the destination. If both produce the same network, the destination is local. If the networks differ, the destination is remote and normal communication goes through a router.
Local IPv4 delivery and remote IPv4 delivery use ARP differently
For a local destination, the host normally resolves the destination's IPv4 address to the destination's MAC address. For a remote destination, the host resolves the default gateway's IPv4 address to the gateway's MAC address and sends the Ethernet frame there.
This is why a wrong subnet mask can create very specific ARP behavior.
A mask that is too broad can make a remote destination look local
Suppose the intended client configuration is 10.10.10.50/24, but the client is mistakenly configured as /16. Destination 10.10.20.8 should be remote under /24, but under /16 the host treats it as local and ARPs directly for it.
The router can be perfectly healthy while the client makes the wrong forwarding decision before the packet ever reaches it.
The gateway is the first Layer 3 hop for remote destinations
A client normally needs a default gateway when it must reach other IP networks. The gateway itself should be reachable on the client's local subnet.
If same-subnet traffic works but remote networks fail, the gateway value and gateway reachability become high-value checks.
IPv4 configuration is a bundle of dependent values
DHCP can provide an IPv4 address, subnet mask or prefix, default gateway, DNS server addresses, lease timing, and other options. Receiving a lease does not guarantee that every value is correct.
Wrong scope
Client receives a valid address from the wrong logical network.
Wrong gateway
Local traffic may work while remote traffic fails.
Wrong DNS
Numeric IP traffic may work while names fail.
169.254.0.0/16 is a clue that expected DHCP configuration was not obtained
A client using an IPv4 link-local/APIPA address has local addressing, but it usually does not have the expected enterprise or home-network configuration. That should send troubleshooting toward DHCP reachability, scope state, VLAN placement, relay behavior, or endpoint configuration.
RFC 1918 space is reusable because it is not globally routed on the public Internet
| Private block | Common shorthand | Address span |
|---|---|---|
| 10.0.0.0/8 | 10/8 | 10.0.0.0 – 10.255.255.255 |
| 172.16.0.0/12 | 172.16/12 | 172.16.0.0 – 172.31.255.255 |
| 192.168.0.0/16 | 192.168/16 | 192.168.0.0 – 192.168.255.255 |
Swipe horizontally to see the private-address table.
Organizations can reuse these blocks internally because public Internet routers do not treat them as globally unique public destinations.
Private addressing and public Internet communication are separate design concerns
A client can use a private IPv4 address internally and still reach the Internet when an edge device translates the source address as intended. NAT does not define the client's local subnet; the prefix does. NAT operates later in the packet path.
Not every non-private address in an example should be treated as a real Internet endpoint
Networking examples often use documentation-only ranges so the examples do not imply ownership of a live public service. The important skill is recognizing the address role from the context instead of assuming every non-RFC-1918 address is an active Internet destination.
IPv4 subnet boundaries also limit ordinary Layer 2 broadcast reach
ARP requests and many other Layer 2 broadcasts remain inside the local broadcast domain. Routers do not normally forward ordinary Ethernet broadcasts between IP subnets. That is why dividing a network into VLANs and subnets changes both addressing and broadcast scope.
An interface prefix normally creates a directly connected route for its network
Configuring 192.168.25.70/26 normally creates an on-link route for 192.168.25.64/26. That connected route is more specific than a default route and controls traffic to addresses inside that subnet.
Addressing artifacts should be interpreted as limited evidence
| Observation | What it proves | What remains unproven |
|---|---|---|
| Gateway ping works | Useful local Layer 3 reachability | DNS, remote routing, application |
| Remote numeric IP works | Useful routed IP path | Name resolution, application port |
| DNS returns expected IP | Name resolution | TCP/TLS/application success |
| Valid DHCP lease | Address configuration obtained | Correct VLAN or policy |
Swipe horizontally to see the evidence table.
Same-subnet peer works, but remote traffic fails
The local peer works because no router is needed. Remote traffic fails because the configured gateway is not local to the client's /27 network.
Remote numeric IP works, but hostname access fails
The successful remote-IP test is important because it preserves useful routing evidence and prevents an unnecessary subnet-mask change.
A client receives a valid address from the wrong subnet
The lease itself becomes evidence of logical placement.
A wrong mask creates selective rather than total failure
Wrong masks often confuse students because the client may still reach some devices. That is expected: destinations classified correctly can still work while destinations on the other side of the mistaken boundary fail.
Longer prefixes create smaller address blocks
/24
256 total addresses.
/26
64 total addresses.
/28
16 total addresses.
Every additional network bit cuts the remaining address block in half. This gives you a useful mental check before doing exact math.
IPv4 questions become easier when you always derive the same five facts
- Network address
- Broadcast address
- Traditional valid host range
- Total/usable host capacity
- Whether a given destination is local or remote
Once those are known, gateway placement, DHCP scope design, and many troubleshooting questions become easier to reason about.
Turn every IPv4 fact into a forwarding prediction
Do not stop at “the mask is /26.” Ask what that /26 makes local, where the broadcast boundary falls, which addresses are assignable, whether the gateway is valid, and which MAC address the client should resolve for a destination.
24 IPv4 Addressing digital flashcards
Practice 32-bit structure, binary weights, CIDR prefixes, network/broadcast roles, host capacity, same-subnet logic, ARP, gateways, DHCP, private addressing, link-local behavior, NAT context, and troubleshooting evidence.