Network Portion vs Host Portion
Learn how an address splits into a network and a host part.
Network Portion vs Host Portion is a free Network+ Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Network+ Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
An Address Has Two Parts
Every IPv4 address is logically split into a network portion and a host portion. The network portion identifies which network a device belongs to; the host portion identifies the specific device on that network.
This is like a postal address: the city and street name locate the neighborhood, while the house number picks one home within it.
The Subnet Mask Marks the Split
How do we know where the network part ends and the host part begins? A subnet mask tells us. The mask is also 32 bits: the bits set to 1 mark the network portion and the bits set to 0 mark the host portion.
A common mask is 255.255.255.0, where the first three octets (all 1s) are network and the last octet (all 0s) is host.
IP: 192.168.1.10
Mask: 255.255.255.0
Net: 192.168.1 Host: .10Why the Split Matters
Devices use the split to decide whether a destination is local or remote. If two devices share the same network portion, they can talk directly. If the network portions differ, traffic must go through a router via the default gateway.
This decision happens constantly and is fundamental to how routing works across the internet.
Same Network Example
Consider 192.168.1.10 and 192.168.1.50, both using mask 255.255.255.0. The network portion of each is 192.168.1. Because those match, the two hosts are on the same network and can communicate directly without a router.
Only the last octet differs (10 vs 50), which is the host portion identifying each individual device.
Different Network Example
Now compare 192.168.1.10 and 192.168.2.10 with the same mask. The third octet differs, so the network portions (192.168.1 vs 192.168.2) do not match.
These hosts are on different networks. To exchange data, their traffic must pass through a router that connects the two networks.
The Network Address
The network address is the address where all host bits are 0. For 192.168.1.0/24, the network address is 192.168.1.0. It names the network itself and is never assigned to a device.
Routers use the network address in their routing tables to represent an entire group of hosts with a single entry.
The Broadcast Address
The broadcast address is the address where all host bits are 1. For 192.168.1.0/24, it is 192.168.1.255. A packet sent here reaches every host on the network at once.
Like the network address, the broadcast address cannot be assigned to a single device, so two addresses per network are reserved.
Usable Host Range
Between the network address and the broadcast address lie the usable host addresses. For 192.168.1.0/24, hosts can use 192.168.1.1 through 192.168.1.254.
That is 256 total addresses minus the network and broadcast, leaving 254 usable. The first and last addresses of any subnet are always off-limits for hosts.
How Masks Vary the Split
Changing the mask moves the boundary. A larger network portion (more 1 bits) means fewer hosts; a larger host portion (more 0 bits) means more hosts.
- Mask 255.0.0.0: first octet network, last three host — huge networks.
- Mask 255.255.255.0: first three octets network — modest networks.
You will calculate exact host counts in the subnetting course.
Logical AND Finds the Network
A device finds its own network address by performing a bitwise AND between its IP and its mask. Wherever the mask bit is 1, the IP bit passes through; wherever it is 0, the result is 0.
This quietly happens inside every host and router and is the mechanism behind the local-or-remote decision.
Putting It Together
The address plus the mask together define a network. Two devices communicate directly only when their masked network portions match. Otherwise a router is required.
Understanding this split is the gateway to subnetting, where you deliberately resize networks by adjusting the mask. Master it now and subnetting becomes far less intimidating.
Quick Check
Apply the network and host concept.
Recap
You separated the address into its two roles.
- An IPv4 address has a network portion and a host portion.
- The subnet mask (1s = network, 0s = host) marks the boundary.
- Matching network portions = direct communication; otherwise a router is needed.
- Each network reserves a network address (all host bits 0) and a broadcast address (all host bits 1).
- A bitwise AND of IP and mask reveals the network address.
Frequently asked questions
Is the “Network Portion vs Host Portion” lesson free?
Yes — the full text of “Network Portion vs Host Portion” is free to read here on the web, and the Network+ Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Network+ Academy course, upgrade to CoddyKit PRO.
What will I learn in “Network Portion vs Host Portion”?
Learn how an address splits into a network and a host part. You practise Network+ Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Network+ Academy?
No prior experience is required. Network+ Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Network Portion vs Host Portion” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Network+ Academy lesson?
Yes. Every Network+ Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Reading a Dotted-Decimal Address
- Network Portion vs Host Portion
- Address Classes and Their Ranges
- Public, Private, and Loopback Addresses