Quibank app: now on the App Store — free, works offline. Get the app ↗

Chapters0/30 ▾
  1. 1.Models, Media & Topologies0/5
    1. The OSI and TCP/IP models: layers, data units and devices
    2. Copper and fiber: categories, distances and connectors
    3. Installing cable: plenum ratings and Power over Ethernet
    4. Wireless basics: channels, bonding, antennas and identifiers
    5. Topologies and network types: domains, mesh, spine and leaf, SAN
  2. 2.IP Addressing, Subnetting & Routing0/5
    1. IPv4 subnetting with the block-size method
    2. Private, loopback and APIPA ranges, and traffic types
    3. How routers choose a path: prefix, distance, metric and summaries
    4. IPv6: shortening, address types, SLAAC and NAT64
    5. VLANs, inter-VLAN routing and NAT
  3. 3.Ports, Protocols & Services0/5
    1. Well-known ports: secure and cleartext pairs
    2. TCP and UDP: handshake, flow control and real-time traffic
    3. DNS and DHCP: transports, records, relays and reservations
    4. Time and monitoring protocols: NTP and SNMP
    5. Tunnels, IPsec and QoS markings
  4. 4.Network Operations0/5
    1. Network documentation and the device lifecycle
    2. Monitoring with baselines, SNMP and syslog
    3. Seeing traffic: flow data, TAPs, mirror ports and availability checks
    4. Disaster recovery and high availability
    5. Change management and configuration baselines
  5. 5.Network Security0/5
    1. Core security terms: CIA, risk vocabulary and zero trust
    2. Identity and access: AAA, 802.1X, RADIUS, TACACS+, MFA and RBAC
    3. Filtering and segmentation: ACLs, screened subnets and IDS
    4. Recognizing network attacks from their symptoms
    5. Hardening, wireless authentication and physical security
  6. 6.Network Troubleshooting0/5
    1. The troubleshooting methodology, step by step
    2. Cable faults, distance limits, PoE budgets and the right tester
    3. Reading interface counters and port states
    4. Addressing and service failures: masks, DHCP, duplicates, loops, ACLs, DNS
    5. Wireless and voice quality problems
Saved in this browser. Move it to another device →
← IP Addressing, Subnetting & Routing

Chapter 2 · Lesson 1 of 5

IPv4 subnetting with the block-size method

1 min read

Every subnetting question can be solved with one routine. First find the interesting octet, the one where the mask is neither 255 nor 0. Subtract that mask value from 256 to get the block size.

Subnets start at multiples of the block size. The host's subnet is the multiple at or below its value, and the broadcast is one less than the next multiple.

Example: 172.16.40.150/27. A /27 mask is 255.255.255.224, so the block is 256 − 224 = 32 and subnets start at 0, 32, 64, 96, 128, 160. The value 150 sits in the 128 block, so the network is 172.16.40.128, the broadcast is 172.16.40.159, and the usable hosts run from .129 to .158, which is 30 addresses.

The same routine works on any octet: for 10.30.0.0/23 the mask is 255.255.254.0, the block is 2 in the third octet, and the broadcast is 10.30.1.255.

To size a subnet, use 2^h − 2 usable hosts, where h is the number of host bits, because the network and broadcast addresses cannot be assigned.

For 50 hosts, a /27 gives only 30, so the smallest fit is a /26 with 62. Two hosts are on the same subnet only if they fall in the same block, never just because their first three octets match.

Check yourself

1. A host is configured with the IPv4 address 192.168.20.77 and a /26 prefix. What is the network address of the subnet this host belongs to?

2. A network designer must place 100 devices on a single subnet and wants to waste as few addresses as possible. Which subnet mask is the smallest one that still fits the requirement?

Facts checked 2026-11-16 · Sources: CompTIA Network+ certification overview, RFC 1918: Address Allocation for Private Internets, RFC 4291: IP Version 6 Addressing Architecture

CompTIA Network+ cheat sheet: every key fact on one page →