Back to course

IPv4 Address Structure and Classes

Networking Fundamentals: The 0 to Hero Guide

Lesson 32: IPv4 Address Structure and Classes

The current dominant version of the Internet Protocol is IPv4 (version 4). We will focus heavily on IPv4 addressing before moving to IPv6.

IPv4 Address Format

An IPv4 address is a 32-bit binary number. For ease of use, it is represented in dotted-decimal notation.

  • The 32 bits are divided into four groups of 8 bits (called octets).
  • Each octet is converted from binary to a decimal number, separated by dots (e.g., 192.168.1.1).
  • The decimal value of an octet can range from 0 to 255 (since 8 bits can represent 2^8 = 256 values).

Historical IP Addressing Classes (Classful)

Historically, IP addresses were categorized into five classes based on the value of the first octet. This system defined the split between the Network portion and the Host portion of the address.

ClassRange of First OctetNetwork/Host SplitPurpose
Class A1 to 126N.H.H.HHuge networks (large organizations)
Class B128 to 191N.N.H.HMid-sized networks (universities)
Class C192 to 223N.N.N.HSmall networks (standard LANs)
Class D224 to 239ReservedMulticasting
Class E240 to 255ReservedExperimental

Note: We no longer use this rigid class system (we use CIDR, Lesson 37), but understanding these classes is vital for historical context and recognizing default ranges.