Use it to calculate network, broadcast, usable range, host capacity, summarization boundaries and overlap before configuring a path.
Addressing
IPv4 addressing divides a 32-bit value into a prefix and host portion; subnetting and VLSM allocate differently sized routed segments from an address block.
1. Write the address and prefix: e.g. 10.1.2.77/26.
2. Block size = 256 − mask octet (256 − 192 = 64) → subnets at .0, .64, .128, .192.
3. Network 10.1.2.64, broadcast 10.1.2.127, hosts .65–.126.
4. Do both ends of the link / host and gateway fall in the same range?
5. show ip route connected — no overlapping subnets on two interfaces.
address and prefix → network, broadcast and host range calculated → hosts and gateway inside the same range → no overlap with other subnets → connected route installed
1. Convert prefix to mask and block size.
2. AND the address with the mask for network.
3. Set host bits for broadcast.
4. Verify usable range/capacity.
5. Check overlap, gateway and route aggregation.
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show ip interface <interface>Show Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checking an address Verify boundary
show ip interface brief
show ip interface GigabitEthernet0/0
show ip route connected
show ipv6 interface brief
ping 10.20.30.1 source GigabitEthernet0/0
The brief views list each interface's address and state. The interface detail shows address and mask. Connected routes show the subnets the router considers directly attached — compare the prefix lengths with the design. A ping to the gateway from the interface's own address tests the subnet itself.
On a host: ip addr and ip route (Linux), or ipconfig /all (Windows), show address, mask, gateway and DNS servers.
Check, for the device in question: is the address inside the intended subnet, does the mask equal the gateway's, is the gateway inside that subnet, and does anything else answer for the same address.
Known-good: address, mask and gateway agree with the subnet's design on both the host and the router, and the gateway answers.
Step 2 Verification and output interpretation Verify boundary
For a given endpoint, verify address, prefix length and default gateway together. Calculate whether the target is local according to that exact prefix, then check ARP behavior for local targets or routing/CEF for remote targets. On routers, confirm the connected route created by the interface and the longest-prefix match selected for representative destinations. Compare both endpoints when symptoms are asymmetric because each host makes the local/remote decision independently.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
The network address is the first address of a subnet (all host bits 0, for example 192.168.1.0/24); it identifies the subnet in routing tables and is not assigned to a host.
Subtopic Host addressA host address is any address in a subnet between the network and broadcast addresses that can be assigned to an interface; a /24 has 254 of them (/31 point-to-point links use both).
Subtopic Broadcast addressThe broadcast address is the last address of an IPv4 subnet (all host bits 1, for example 192.168.1.255/24); a packet sent to it reaches every host in that subnet.
Subtopic PrefixThe prefix (prefix length) is the number of leading bits that identify the network, written /n; a /26 has 26 network bits and 64 addresses.
Subtopic Subnet maskA subnet mask is the 32-bit dotted form of the prefix length — 1s for network bits, 0s for host bits — for example 255.255.255.192 for /26.
Subtopic CIDRClassless Inter-Domain Routing (CIDR) writes the network part as a prefix length (/24 instead of 255.255.255.0) and allows any prefix size, which enables subnetting and route summarisation.
Subtopic SubnettingSubnetting divides one network into smaller subnets by borrowing host bits for the network part; each borrowed bit doubles the number of subnets and halves the hosts per subnet.
Subtopic VLSMVariable-Length Subnet Masking (VLSM) gives each subnet the size it needs (a /30 or /31 for links, a /24 for a user VLAN) instead of one fixed size, wasting fewer addresses.
- Prefix length and mask describe the same boundary
- Network and directed-broadcast addresses are not ordinary host addresses
- Hosts per traditional subnet are 2^(host bits)-2, with point-to-point exceptions
- VLSM allocates largest requirements first and must avoid overlap.
show ip interface brief— addresses on each interface.show ip interface <if> | include Internet address— address with prefix length.show ip route connected— the subnets the router derives from its addresses.show ip route <prefix> longer-prefixes— overlapping or more specific routes.- Subnet calculator (e.g.
ipcalc <ip>/<len>on Linux) — network, broadcast and host range.
ReferenceHow it works1 section · depth on demand
How IP addressing works
IPv4. An address is 32 bits, written as four decimal numbers. The prefix length (or the equivalent mask) splits it: 10.20.30.40/24 is host 40 on network 10.20.30.0, mask 255.255.255.0.
In every subnet the first address names the network and the last is the broadcast address; the ones between are usable.
| Prefix | Mask | Addresses | Usable hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 (point-to-point links only) |
| /32 | 255.255.255.255 | 1 | A single host; loopbacks |
Subnets start at multiples of their size: /26 networks begin at .0, .64, .128 and .192.
How a host uses the mask. For each packet it compares the destination with its own network. If the destination is inside, it delivers directly and resolves the destination's MAC address. If outside, it sends the packet to its default gateway. A wrong mask makes a host take the wrong one of those two paths for some destinations — so it reaches part of the network and not the rest.
Special ranges. Private: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. Link-local, self-assigned when DHCP fails: 169.254.0.0/16. Loopback: 127.0.0.0/8.
IPv6. Addresses are 128 bits, in hexadecimal groups; a run of zero groups may be written :: once. Subnets are almost always /64. Every interface has a link-local address in fe80::/10, valid only on its link; global addresses come from 2000::/3, and private ones (unique local) from fc00::/7. There is no broadcast address.
Rules that prevent most faults: every device on a subnet uses the same prefix length; the default gateway is an address inside the device's own subnet; no address is used twice; subnets do not overlap.
ReferenceImportant terms & boundaries3 sections · depth on demand
In depth
IPv4 addressing
An IPv4 address is 32 bits, written as four decimal octets. RFC 791 originally split addresses into network and host parts by class (A: 8-bit network, B: 16, C: 24); today the split is set by the prefix length, and the same rules apply to every network of that length.
Address and prefix
| Example | Meaning |
|---|---|
| 10.110.0.64/24 | Host address in network 10.110.0.0 |
| Network address | 10.110.0.0 (host bits all 0) |
| Broadcast address | 10.110.0.255 (host bits all 1) |
| Usable hosts | 10.110.0.1–10.110.0.254 (254) |
Common prefix lengths
| Prefix | Mask | Hosts | Use |
|---|---|---|---|
| /24 | 255.255.255.0 | 254 | User VLANs |
| /26 | 255.255.255.192 | 62 | Small VLANs |
| /29 | 255.255.255.248 | 6 | Small server or transit segments |
| /30 | 255.255.255.252 | 2 | Point-to-point links |
| /31 | 255.255.255.254 | 2 (RFC 3021) | Point-to-point, no broadcast |
| /32 | 255.255.255.255 | 1 | Loopbacks |
Subnetting example: 10.110.0.0/24 into four /26
| Subnet | Range | Broadcast |
|---|---|---|
| 10.110.0.0/26 | .1–.62 | .63 |
| 10.110.0.64/26 | .65–.126 | .127 |
| 10.110.0.128/26 | .129–.190 | .191 |
| 10.110.0.192/26 | .193–.254 | .255 |
Special ranges
| Range | Use |
|---|---|
| 10/8, 172.16/12, 192.168/16 | Private (RFC 1918) |
| 127.0.0.0/8 | Loopback |
| 169.254.0.0/16 | Link-local (no DHCP answer) |
| 100.64.0.0/10 | Carrier-grade NAT |
| 224.0.0.0/4 | Multicast |
host$ ipcalc 10.110.0.64/26
Network: 10.110.0.64/26
HostMin: 10.110.0.65
HostMax: 10.110.0.126
Broadcast: 10.110.0.127
R1# show ip interface GigabitEthernet0/0/1 | include Internet address|Broadcast
Internet address is 10.0.12.1/30
Broadcast address is 255.255.255.255
Planning
Allocate addresses hierarchically (per site, then per function) so routes summarise, and keep a written plan or IPAM system as the single source of truth.
Documented example, not captured output.
State model and technical mechanics
The prefix length divides an IPv4 address into network and host portions. Bitwise AND of address and mask yields the subnet identifier, while the all-ones host portion yields the directed broadcast for an ordinary subnet. Routers forward using the most-specific matching route, not by asking whether a destination “looks local” from human-readable octets. A host uses its own prefix to decide whether to resolve a destination directly with ARP or send the packet to a gateway. VLSM allows different prefix lengths throughout the address plan, so classful A/B/C assumptions are obsolete for modern routing. Duplicate addressing, overlapping prefixes or an incorrect local mask can produce asymmetric and host-specific behavior even when the router configuration itself appears correct.
Limits and common misconceptions
Being numerically inside the same subnet does not show two devices share the same VLAN or Layer-2 path. Conversely, devices in different IPv4 subnets can communicate perfectly through routing. Network and broadcast addresses are subnet properties, not arbitrary “first and last address” rules detached from prefix length. Do not infer application reachability from successful subnet calculation alone.
ReferenceConfiguration & state1 section · depth on demand
Design and configuration model
Choose prefixes from an intentional address plan with room for route summarization and operational growth. Configure the same subnet interpretation on devices that share a Layer-2 segment; a host using /24 while its peer uses /25 can disagree about which destinations are local. Keep infrastructure addresses, user segments, point-to-point links and service ranges distinguishable where practical. Avoid using a larger prefix merely to “make hosts reach each other”; fixing reachability by expanding the broadcast domain can hide a missing route or VLAN boundary and creates a different design.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in IP Fundamentals → IPv4 → Addressing. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc791.html · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
IPv4 Addressing, Subnetting and VLSM evidence chain
Configuration, operational state, counters and downstream proof remain separate.
| Boundary | Question | Evidence | Does not prove |
|---|---|---|---|
| Definition | What is configured or intended? | running configuration / controller policy | live operation |
| Local state | Is the feature active at the expected scope? | show ip interface <interface> | remote success |
| Counters | Did controlled traffic or an event reach this stage? | scoped counters/timestamps | complete return path |
| Next boundary | What consumes or transports this state? | requirement → prefix/mask → network/broadcast → usable hosts → non-overlap allocation → route/interface verification | application success |
Addressing · technical reference
Compact mechanics, configuration and evidence boundaries for fast lookup.
| Concept | Meaning |
|---|---|
| Prefix length | Number of network bits |
| Network address | Host bits all zero |
| Broadcast | Host bits all one |
| Forwarding | Longest matching route wins |