Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

IPv4 · IP Fundamentals

Direct answer

IPv4 uses 32-bit addresses written as four decimal octets (192.0.2.10) with a prefix length (/24) that separates network and host bits; hosts reach other networks through a default gateway.

When to use this

Use IPv4 when checking an address, mask, subnet boundary or interface assignment, or when an IPv4 host cannot reach its gateway or a neighbor on the same subnet.

First 30 seconds

1. Host address and prefix — is the destination in the same subnet or not?

2. Same subnet → arp -a / show ip arp for the destination.

3. Different → gateway in the same subnet as the host? Gateway ARP entry present?

4. 169.254.x.x → DHCP failed; go to DHCP.

5. show ip route <dest> on the gateway and traceroute <dest>.

Operational verification

address and mask valid → same-subnet check → ARP for destination or gateway → frame delivered → gateway routes onward → return path exists

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · Cisco IOS XE
Key commandshow ip interface brief
Scope / prerequisiteUse IPv4 when checking an address, mask, subnet boundary or interface assignment, or when an IPv4 host cannot reach its…
What next?3 suggested next steps
Child topics (this level)4
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Commands Verify boundary
show ip interface brief
ipconfig /all            # Windows
ip -4 addr               # Linux
Step 2 What it is Narrow the fault

IPv4 uses 32-bit addresses written as four decimal octets. Each address has a network part (the prefix) and a host part. Special ranges: private 10/8, 172.16/12, 192.168/16 (RFC 1918); loopback 127/8; link-local 169.254/16 (APIPA); multicast 224/4; CGNAT 100.64/10.

Evidence references

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.

observation · 1
Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Key points

Same subnet → the host ARPs for the destination directly; different subnet → it ARPs for the default gateway. Network and broadcast addresses are not usable for hosts (except /31 point-to-point links). 127.0.0.0/8 is loopback and 169.254.0.0/16 means the host got no DHCP address.

Key checks
  • show ip interface brief — interface addresses and status.
  • show ip route <dest> — the route and next hop used.
  • show ip arp <next-hop> — next hop resolved to a MAC address.
  • ping <dest> source <if> — reachability from a chosen source.
  • traceroute <dest> — where the path stops.
  • Host: ipconfig /all (Windows) or ip -br addr and ip route (Linux).
ReferenceWhy it matters1 section · depth on demand

IPv4 in practice

An IPv4 address is 32 bits, written as four octets. The prefix length decides how many bits identify the network:

PrefixMaskAddressesUsable hosts
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422 (point-to-point, RFC 3021)

Private ranges (RFC 1918): 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. A host sends to its own subnet directly (ARP for the destination) and everything else to its default gateway.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

IPv4

IPv4 is the original Internet Protocol, defined in RFC 791. Its header carries version and header length, type of service, total length (up to 65 535 bytes), identification, flags and fragment offset, time to live, protocol, a header checksum, 32-bit source and destination addresses and optional options.

Header fields (RFC 791)

FieldBitsPurpose
Version44
IHL4Header length in 32-bit words (minimum 5 = 20 bytes)
Type of Service8Now the DS field (DSCP and ECN)
Total Length16Packet length including header
Identification16Groups fragments of one datagram
Flags3DF (don't fragment), MF (more fragments)
Fragment Offset13Position in 8-byte units
TTL8Hop limit; discarded at zero
Protocol8Upper-layer protocol
Header Checksum16Header only; recalculated per hop
Source / Destination32 eachAddresses

Fragmentation (RFC 791)

A datagram larger than the next link's MTU is fragmented, unless DF is set, in which case it's discarded (and an ICMP "fragmentation needed" message lets the sender learn the path MTU). Every IP module must forward 68-byte datagrams without further fragmentation, and every host must accept 576-byte datagrams.

host$ ping -M do -s 1472 -c 2 10.30.0.15
PING 10.30.0.15 (10.30.0.15) 1472(1500) bytes of data.
1480 bytes from 10.30.0.15: icmp_seq=1 ttl=62 time=1.12 ms
host$ ping -M do -s 1473 -c 1 10.30.0.15
ping: local error: message too long, mtu=1500
host$ sudo tcpdump -ni eth0 -v icmp -c 1 | grep -o "ttl [0-9]*"
ttl 62

TTL 62 from a host that starts at 64 shows two routed hops.

Address classes (RFC 791)

RFC 791 defined classes A, B and C by leading bits. Classless addressing (CIDR, with prefix lengths) replaced them, but the class boundaries still appear in older documentation and in behaviour such as classful summarisation.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

An IPv4 address is 32 bits, written as four decimal octets, and the prefix length says how many of those bits identify the network; the remaining bits number the hosts inside it. A device compares a destination with its own prefix to decide whether to deliver directly (same subnet, using ARP) or send the packet to its default gateway. Choosing the prefix is therefore a capacity decision: every bit moved from host to network halves the number of usable addresses and doubles the number of subnets. Two addresses per subnet are reserved (network and broadcast), except on /31 point-to-point links and /32 host routes. The special ranges below should be recognised on sight, because seeing one in a fault (for example 169.254.x.x) already tells you what went wrong.

IPv4 essentials: 32-bit addresses, subnet masks/prefix lengths, private ranges (RFC 1918: 10/8, 172.16/12, 192.168/16), CGNAT range 100.64/10 (RFC 6598), link-local 169.254/16, loopback 127/8, multicast 224/4.

PrefixHostsMask
/24254255.255.255.0
/25126255.255.255.128
/2662255.255.255.192
/2730255.255.255.224
/2814255.255.255.240
/302255.255.255.252
/312 (point-to-point, RFC 3021)255.255.255.254
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 791

Authoritative/upstream documentation reviewed for bounded claims in IP Fundamentals → IPv4. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc791.html · confidence 94%
Confirmation

Confirm action

Continue?