IPv4 Address Structure: Network and Host Portions

SA
StudyAI Editorial
Reviewed by StudyAI tutors
· Published Updated

From the networking curriculum

IPv4 Address Structure: Network and Host Portions

TL;DR

IPv4 addresses are 32-bit hierarchical addresses split into a network portion and a host portion. A subnet mask helps you distinguish these two portions within an IP address. This split helps routers efficiently direct traffic across networks.

1. The Mental Model

Think of an IPv4 address like a street address. The "street name" identifies the network, and the "house number" identifies a specific device on that network. All devices on the same network share the same "street name."

2. The Core Material

An IPv4 address is a 32-bit hierarchical address that uniquely identifies a device on a network. These addresses are divided into four "blocks" (octets) ranging from 0-255 each.

Network and Host Portions

Every IPv4 address has two main parts:
1. Network portion: This part identifies the specific network the device belongs to.
2. Host portion: This part identifies the specific device (host) within that network.

To figure out which bits belong to the network and which belong to the host, you use a subnet mask. A subnet mask is also a 32-bit number. Where there's a '1' in the subnet mask, the corresponding bit in the IP address is part of the network portion. Where there's a '0', it's part of the host portion.

For example, a common subnet mask is 255.255.255.0. In binary, this is 11111111.11111111.11111111.00000000.
- The '1's show that the first three octets of the IP address are the network portion.
- The '0's show that the last octet of the IP address is the host portion.

Networks are most easily subnetted at octet boundaries like /8, /16, and /24. These correspond to subnet masks of 255.0.0.0, 255.255.0.0, and 255.255.255.0, respectively. These are called prefixes and clearly show the network's size.

Within any given network, there are three types of IP addresses:
- Network address: This is the first address in the range and represents the entire network. All host bits are 0.
- Host addresses: These are the addresses assigned to individual devices like desktops, laptops, smartphones, and printers. These must be unique within that network.
- Broadcast address: This is the last address in the range and is used to send data to all devices on that specific network. All host bits are 1.

graph TD
    A["IPv4 Address (32-bit)"] --> B["Network Portion"]
    A --> C["Host Portion"]
    B --> D["Identifies the Network"]
    C --> E["Identifies the Device (Host)"]
    F["Subnet Mask"] --> G["Determines Split (1s = Network, 0s = Host)"]
    G --> B
    G --> C
    B --> H["Network Address (All Host Bits 0)"]
    C --> I["Host Addresses (Unique for Devices)"]
    C --> J["Broadcast Address (All Host Bits 1)"]

Private vs. Public IPv4 Addresses

  • Private IP addresses: These are address ranges (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) that are not routable on the internet. They are used for internal networks (intranets) within organizations. Many organizations use these, so they are not unique globally.
  • Public IP addresses: These are globally unique and routable on the internet.
  • Network Address Translation (NAT) is used to translate private IPv4 addresses to public IPv4 addresses when devices on a private network need to communicate with the internet.

3. Worked Example

Let's say you have an IPv4 address 192.168.1.10 and a subnet mask 255.255.255.0.

  1. Write the IP address in binary:
    11000000.10101000.00000001.00001010 (192.168.1.10)

  2. Write the subnet mask in binary:
    11111111.11111111.11111111.00000000 (255.255.255.0)

  3. Determine the Network Portion (where the subnet mask has 1s):
    The first three octets (192.168.1) are the network portion.

  4. Determine the Host Portion (where the subnet mask has 0s):
    The last octet (10) is the host portion.

Therefore, for the address 192.168.1.10 with a subnet mask of 255.255.255.0:
- The network address is 192.168.1.0 (all host bits 0).
- The broadcast address is 192.168.1.255 (all host bits 1).
- Host addresses range from 192.168.1.1 to 192.168.1.254.

4. Key Takeaways

  • An IPv4 address is a 32-bit number made of four blocks, each from 0-255.
  • Every IPv4 address is divided into a network portion and a host portion.
  • The subnet mask tells you exactly where the network portion ends and the host portion begins.
  • Within any network, there's a unique network address, host addresses for devices, and a broadcast address.
  • Private IP addresses are specified ranges used for internal networks and aren't routable on the internet.
  • Public IP addresses are globally unique and can be routed across the internet.
  • NAT is used to allow devices with private IPs to communicate with the public internet.

Common Mistakes to Avoid:
- Confusing the network address with a host address; the network address identifies the network itself, not a device.
- Trying to assign the network or broadcast address to an end device.
- Forgetting that the subnet mask dictates the network and host split, not just the IP address itself.
- Assuming a private IP address within your network is unique globally.

5. Now Try It

Take the IPv4 address 172.16.50.7 and subnet mask 255.255.0.0. Identify the network portion, the host portion, the network address, and the broadcast address for this specific network.

What success looks like: You should be able to clearly state which part of the IP address is the network and which is the host, and then correctly derive the network and broadcast addresses for that combination.

Frequently asked about IPv4 Address Structure: Network and Host Portions

# IPv4 Address Structure: Network and Host Portions ## TL;DR IPv4 addresses are 32-bit hierarchical addresses split into a network portion and a host portion. A subnet mask helps you distinguish these two portions within an IP address. This split helps routers efficiently direct Read the full notes above.

IPv4 Address Structure: Network and Host Portions is a core topic in networking. Most exam papers test it via a mix of definitions, worked examples, and applied problems. The notes above cover the high-yield sub-topics, common pitfalls, and the kind of questions examiners typically set.

Yes. Every note in the StudyAI Campus Hub is free to read. Create a free account if you want to clone the full plan, generate your own notes from your textbook, or get AI-powered practice quizzes and flashcards.

More from networking


Get the full networking curriculum

Clone the complete plan to your dashboard for unlimited AI-generated notes, practice quizzes, and a personalised revision schedule.

Create Free Account