BuildTheNet

Opening your workspace

Your learning content and tools are loading.

Learning paths › CCNA › 1. Network Fundamentals

IPv4 Addressing

Written reference: Understand 32-bit IPv4 structure, octets, slash notation, decimal/binary conversion, classful IP ranges (A, B, C, D, E), and network vs broadcast addresses.

About 10 minutes

Why it matters

Addresses and masks decide which hosts can talk to each other directly. A wrong mask can make a healthy gateway look broken.

IPv4 Addressing & Classes Explained

An IPv4 address is 32 bits (4 bytes) long, divided into 4 octets separated by dots.

The prefix length (/24, /16, /8) dictates how many bits represent the network portion vs the host portion.

Class A starts with 0 (0-127, /8), Class B starts with 10 (128-191, /16), Class C starts with 110 (192-223, /24).

A host portion with all 0s is the Network Address; a host portion with all 1s is the Broadcast Address.

IPv4 Address Structure and Dotted-Decimal

An IPv4 address is a 32-bit binary number divided into 4 groups of 8 bits called octets:

Example: 192.168.1.254 192 = 11000000 168 = 10101000 1 = 00000001 254 = 11111110

Network vs Host Portion: • In 192.168.1.0/24: The first 24 bits (/24) represent the Network Portion. The remaining 8 bits represent the Host Portion. • In 154.78.111.32/16: The first 16 bits represent the Network Portion. The remaining 16 bits represent the Host Portion.

Network and Broadcast Addresses

For any IPv4 subnet: • Network Address: The host portion is set to ALL 0s. This represents the subnet itself in routing tables. • Broadcast Address: The host portion is set to ALL 1s. In binary, all ones in an 8-bit octet equals 255 (e.g. 192.168.68.255).

Why do routers drop broadcast packets? Routers do not forward broadcast frames across interfaces because forwarding broadcasts would cause broadcast storms and congest WAN connections. Switches flood broadcasts out every interface, using the destination MAC FF:FF:FF:FF:FF:FF.

Classful IPv4 Address Ranges

Class: Class A · First Octet Bits: 0xxxxxxx · First Octet Range: 0 - 127 (1-126 usable) · Default Prefix: /8 · Default Netmask: 255.0.0.0 · Purpose: Very large networks (millions of hosts)

Class: Class B · First Octet Bits: 10xxxxxx · First Octet Range: 128 - 191 · Default Prefix: /16 · Default Netmask: 255.255.0.0 · Purpose: Medium-to-large corporate networks

Class: Class C · First Octet Bits: 110xxxxx · First Octet Range: 192 - 223 · Default Prefix: /24 · Default Netmask: 255.255.255.0 · Purpose: Small local networks (up to 254 hosts)

Class: Class D · First Octet Bits: 1110xxxx · First Octet Range: 224 - 239 · Default Prefix: N/A · Default Netmask: N/A · Purpose: Multicast traffic groups

Class: Class E · First Octet Bits: 1111xxxx · First Octet Range: 240 - 255 · Default Prefix: N/A · Default Netmask: N/A · Purpose: Experimental / Reserved

The words you need

IPv4 Address — A 32-bit numerical label assigned to each device connected to a computer network that uses the Internet Protocol.

Octet — A group of 8 bits (1 byte). An IPv4 address contains 4 octets (e.g. 192 . 168 . 1 . 1).

Prefix Length — The slash notation (e.g. /24) indicating the number of contiguous 1 bits in the subnet mask representing the network portion.

Network Address — The identifier for a subnet where all host bits are set to 0. Cannot be assigned to a host.

Broadcast Address — The address used to send data to all hosts on a subnet, formed by setting all host bits to 1. Cannot be assigned to a host.

Loopback Address — The reserved IPv4 block 127.0.0.0/8 used by a host to send network traffic to itself for internal protocol testing.

Addressing: calculate the boundary, then test it — Understand the mechanism

An IPv4 prefix describes which bits identify the network. For an ordinary /27, blocks contain32 addresses; a block beginning 192.0.2.64 ends at 192.0.2.95. In a conventional broadcast subnet the endpoints are network/broadcast addresses, leaving.65–.94 as host addresses. /31 point-to-point and /32 host-route uses need their own interpretation.

IPv6 uses prefixes too, but it has no IPv4-style broadcast address. Link-local scope matters when identifying a next hop; the same link-local address text can be meaningful on different interfaces. Do not infer IPv6 reachability from an IPv4 test.

Addressing: calculate the boundary, then test it — Worked example: reason from the evidence

HostA is 192.0.2.70/27 and HostB is 192.0.2.100/27. A regards its local block as.64–.95 and must send B's traffic through a router. If A incorrectly uses/24, it may try local neighbor resolution for B instead. This is a mask/next-hop decision, not initially a routing-protocol problem.

For IPv6, record the address type, prefix, interface scope and default route separately. A successful link-local ping to a neighbor establishes a narrower result than successful communication with a routed global destination.

Addressing: calculate the boundary, then test it — Verify the result and avoid the trap

Calculate a host’s network, intended peer relationship and next hop before testing. Verify both endpoints' masks/prefixes. Use explicit interface scope for link-local destinations when required by the operating system or tool.

Takeaways

Next: IPv4 Configuration

More free lessons in 1. Network Fundamentals