Use it to check whether an address is valid for a host or interface, and how many hosts a subnet holds.
Host address
A 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).
1. Find network and broadcast for the prefix.
2. Is the address strictly between them? Then it is a host address.
3. Hosts per subnet: 2^host bits − 2 (/26 → 62).
4. Gateway and hosts in the same range?
5. Duplicates: show logging | include DUPADDR, arp -a.
prefix → network and broadcast → usable range in between → address inside the range → unique on the subnet
Context & applicabilityCommon mistakes · platform/version boundaries
- Gateway outside the host's subnet.
- Overlapping DHCP scope and static addresses (duplicates).
- Forgetting that /31 uses both addresses and /32 is a single host.
- Mask mismatch between hosts on the same VLAN (some can talk, some cannot).
Operational reference
Fast context before you go deeper.
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.
Block size = 256 − the interesting mask octet; subnets start at multiples of it. Network address = all host bits 0, broadcast = all host bits 1, hosts in between. Hosts per subnet = 2^host bits − 2 (a /31 has two usable addresses for point-to-point links, a /32 is one host).
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.
ReferenceWhat it is1 section · depth on demand
Usable range
Usable hosts = 2^(host bits) − 2. The first usable is network + 1, the last is broadcast − 1.
| Subnet | First host | Last host | Hosts |
|---|---|---|---|
| 192.168.1.0/24 | .1 | .254 | 254 |
| 10.0.0.64/27 | .65 | .94 | 30 |
| 172.16.8.0/22 | 172.16.8.1 | 172.16.11.254 | 1022 |
By convention the gateway is the first or last usable address; document the choice and keep it consistent.
ReferenceWhy it matters1 section · depth on demand
How it works
Host addresses are the addresses between the network and broadcast address of a subnet: usable hosts = 2^(32 − prefix) − 2. A /26 has 64 addresses and 62 usable hosts (.65–.126 in 10.1.1.64/26). /31 is the exception: both addresses are usable on point-to-point links (RFC 3021), and /32 identifies a single host route.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
/31 on point-to-point links
RFC 3021 allows a /31 on point-to-point links: both addresses are usable hosts, which halves the address use of a /30.
interface GigabitEthernet0/0/1
ip address 10.20.15.0 255.255.255.254
% Warning: use /31 mask on non point-to-point interface cautiously
IOS accepts it on Ethernet with this warning. It works when exactly two devices share the link; with a third device or a broadcast-dependent protocol it does not.
| Prefix | Usable hosts | Typical use |
|---|---|---|
| /32 | 1 (the address itself) | Loopbacks, host routes |
| /31 | 2 | Router-to-router links (RFC 3021) |
| /30 | 2 (of 4) | Older point-to-point convention |
| /29 | 6 | Small transit segments with an FHRP |
Gateway convention
Choose one convention per network and document it — for example first usable address = default gateway (HSRP/VRRP virtual IP), next two = physical router addresses. Predictable gateways make troubleshooting and automation easier; a gateway at the "last usable" address in one site and "first usable" in another causes avoidable mistakes.
Host address checks on an end system
| Check | Why |
|---|---|
| Address inside the subnet and not network/broadcast | Otherwise the OS refuses it or traffic fails |
| Gateway inside the same subnet | A gateway outside the subnet is unreachable via ARP |
| Same mask as the gateway | Mismatched masks create asymmetric paths |
| Address not inside a DHCP scope (static hosts) | Avoids duplicates |
Detecting duplicates
IOS logs %IP-4-DUPADDR when it sees another device using one of its addresses; hosts detect duplicates with gratuitous ARP (IPv4) or DAD (IPv6). Before assigning a static address, ping it and check show ip arp for an existing entry — a missing reply does not prove the address is free (host firewalls drop ping), but an ARP entry proves it is in use.
Examples
| Network | Usable host range | Hosts |
|---|---|---|
| 192.168.10.0/24 | .1 – .254 | 254 |
| 10.0.0.0/26 | .1 – .62 | 62 |
| 172.16.4.0/30 | .1 – .2 | 2 |
| 10.1.1.0/31 | .0 – .1 (point-to-point, RFC 3021) | 2 |
| 10.1.1.5/32 | Single host (loopback) | 1 |
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 → Host address. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc791.html · confidence 94%