Network vs. Host Portion of an IP Address
Understand the network and host portions of an IP address. Learn how the subnet mask divides an address into routing and device identification components.
192.168.1.0/24ConceptDetailed Explanation
Network vs. Host Portion
Every IP address consists of two parts: the network portion (identifying which network) and the host portion (identifying which device on that network). The subnet mask defines where this division occurs.
How the Division Works
Take the address 192.168.1.100/24:
IP Address: 192.168.1 .100
|network| |host|
Subnet Mask: 255.255.255.0
CIDR: /24 (24 network bits, 8 host bits)
The first 24 bits (192.168.1) are the network portion — shared by all devices on this subnet. The last 8 bits (100) are the host portion — unique to this specific device.
Binary Perspective
IP: 11000000.10101000.00000001.01100100
Mask: 11111111.11111111.11111111.00000000
|------- network ---------|--host--|
Where the mask has 1s, those bits are the network portion. Where it has 0s, those bits are the host portion.
Why It Matters
Routing decisions depend on the network portion. When a device sends a packet:
- It compares the destination's network portion with its own
- If they match — the destination is on the same local network (send directly via Layer 2)
- If they do not match — the destination is on a different network (send to the default gateway)
Extracting the Network Address
To find the network address, perform a bitwise AND between the IP address and the subnet mask:
IP: 192.168.1.100 = 11000000.10101000.00000001.01100100
Mask: 255.255.255.0 = 11111111.11111111.11111111.00000000
Network: 192.168.1.0 = 11000000.10101000.00000001.00000000
Special Addresses
- All host bits = 0: Network address (e.g., 192.168.1.0) — identifies the subnet itself
- All host bits = 1: Broadcast address (e.g., 192.168.1.255) — reaches all hosts on the subnet
- Neither all 0s nor all 1s: Usable host addresses (e.g., 192.168.1.1 through 192.168.1.254)
Use Case
A computer checks whether a destination IP shares its network portion to decide if it should send the packet directly or via the default gateway.
Try It — Subnet Calculator
Related Topics
CIDR Notation Explained: How IP Addressing Works
10.0.0.0/16 · Concept
Subnet Mask to CIDR Conversion Table
255.255.255.0/24 · Calculation
How to Calculate a Broadcast Address
192.168.1.0/24 · Calculation
/24 Subnet (255.255.255.0)
192.168.1.0/24 · IPv4
Wildcard Masks in Networking Explained
0.0.0.255 · Calculation
The /0 Default Route (0.0.0.0/0)
0.0.0.0/0 · IPv4