IPv4.html


* created: 2026-04-25T17:28
* modified: 2026-04-25T18:37

title

Title

description

Description

related notes

IPv4

Header structure

Addresses

Consisting of 4 x 8 bit blocks for a total of 32 bit and is used to uniquely identify members of the network.

Networkmasks Networksuffix xxx.xxx.xxx.xxx/xx

Classes

These were used to distinguish network-id and host-id. This was somewhat superseded by propper subnetting.

A Class-B network can have up to 65534 hosts, which is the range from x.x.0.0 - x.x.255.255 minus the reserved x.x.0.0 unspecied network address and the reserved x.x.255.255 broadcast address.

Checksum

See: Network error correction#Cyclic redundency checks

If an error is detected by any node the packet is discarded. The sender is responsible for sending a new packet if they don't receive an ack. Any node that detects an error discards the packet. There is no negative ack, because the node can't be sure that the sender address was not corrupted. No forward error correction is applied.

TTL

The time to live is a 8 bit field that decreases by 1 every time the packet is received by a node. The default value is 64. When the ttl reaches 0 the packet is discarded to prevent infinite loops.

The checksum has to be recalculated on every hop because of the changing ttl.