- by x32x01 ||
Every computer on a network needs an IP address to communicate. IPv4 addresses are divided into classes to help organize networks based on size and purpose.
Along with this, subnet masks determine which part of the IP represents the network and which part represents the host.
This guide breaks it all down simply for beginners and IT enthusiasts.
What is a Subnet Mask?
A subnet mask is a 32-bit number that separates the network ID from the host ID in an IP address.
Visual Example:
IPv4 Address Classes
IPv4 addresses are divided into five classes (A, B, C, D, E), but for most IT and networking purposes, we focus on A, B, and C.
Class A: Huge Networks
Class B: Medium Networks
Class C: Small Networks
Loopback: Test Your Own Computer
Quick Class Comparison Table
Why Understanding IP Classes & Subnets is Important
Practical Examples
Example 1: Small Office Network
Example 2: University Campus Network
Example 3: ISP or Global Network
Key Takeaways


Along with this, subnet masks determine which part of the IP represents the network and which part represents the host.
This guide breaks it all down simply for beginners and IT enthusiasts.
What is a Subnet Mask? 
A subnet mask is a 32-bit number that separates the network ID from the host ID in an IP address.- Network Portion: Identifies the network your device is part of.
- Host Portion: Identifies the specific device within that network.
Visual Example:
- Black Part: Network
- Yellow Part: Host
IPv4 Address Classes
IPv4 addresses are divided into five classes (A, B, C, D, E), but for most IT and networking purposes, we focus on A, B, and C.Class A: Huge Networks
- Subnet Mask: 255.0.0.0
- Network ID: 8 bits
- Host ID: 24 bits
- Number of Hosts: ~16 million per network
- Best Use: Very large organizations, ISPs, and global networks
Class B: Medium Networks
- Subnet Mask: 255.255.0.0
- Network ID: 16 bits
- Host ID: 16 bits
- Number of Hosts: ~65,000 per network
- Best Use: Medium-sized organizations, universities, and regional networks
Class C: Small Networks
- Subnet Mask: 255.255.255.0
- Network ID: 24 bits
- Host ID: 8 bits
- Number of Hosts: Up to 254 per network
- Best Use: Small businesses, home networks, and offices
Loopback: Test Your Own Computer
- IP Address: 127.0.0.1
- Subnet Mask: 255.255.255.255
- Purpose: Testing your own computer’s network stack
Quick Class Comparison Table
| Class | Subnet Mask | Network Bits | Host Bits | Max Hosts | Use Case |
|---|---|---|---|---|---|
| Class A | 255.0.0.0 | 8 | 24 | 16M+ | Huge networks |
| Class B | 255.255.0.0 | 16 | 16 | 65K | Medium networks |
| Class C | 255.255.255.0 | 24 | 8 | 254 | Small networks |
| Loopback | 255.255.255.255 | 32 | 0 | 1 | Self-testing |
Why Understanding IP Classes & Subnets is Important
- Efficient Network Design: Helps IT admins plan IP allocation properly.
- Troubleshooting: Quickly identify network vs host issues.
- Security: Proper subnetting can isolate segments and reduce attack surfaces.
- Routing: Routers rely on network IDs to forward packets correctly.
Practical Examples 
Example 1: Small Office Network
- Office has 100 computers.
- Use Class C: 192.168.1.0/24
- Network = 192.168.1 → Host = 1 to 254
Example 2: University Campus Network
- Thousands of devices across multiple buildings.
- Use Class B: 172.16.0.0/16
- Network = 172.16 → Host = 0.1 to 255.255
Example 3: ISP or Global Network
- Millions of devices globally.
- Use Class A: 10.0.0.0/8
- Network = 10 → Host = 0.0.1 to 255.255.255
Key Takeaways
- Class A: Big networks (millions of hosts)
- Class B: Medium networks (~65k hosts)
- Class C: Small networks (<254 hosts)
- Loopback: Test your own machine
- Subnet masks split IPs into network + host, critical for network planning
Last edited: