Subnet Mask: Basics, Network Types, and Complete Table

What is a Network?

network is a group of connected computers or devices that communicate with each other. In IP addressing, a network is a range of IP addresses that belong to the same group and can communicate directly without the need for routing.


What is a Subnetwork (Subnet)?

subnet is a logical subdivision of a network. It divides a larger network into smaller segments to improve management, increase security, and optimize routing.


Types of Networks

  • Classful Networks:
    • Class A: 1.0.0.0 to 126.255.255.255 (mask 255.0.0.0)
    • Class B: 128.0.0.0 to 191.255.255.255 (mask 255.255.0.0)
    • Class C: 192.0.0.0 to 223.255.255.255 (mask 255.255.255.0)
    • Class D: 224.0.0.0 to 239.255.255.255 (multicast)
    • Class E: 240.0.0.0 to 255.255.255.255 (experimental)
  • CIDR (Classless Inter-Domain Routing): A modern, flexible subnetting method.

What is a Subnet Mask?

A subnet mask is a 32-bit number that separates the IP address into the network and host parts. The bits where the mask has a 1 correspond to the network portion; bits with 0 correspond to the host portion.


How Does a Subnet Mask Work?

The network address is calculated by performing a bitwise AND between the IP address and the subnet mask. For example:

  • IP Address: 192.168.1.10
  • Subnet Mask: 255.255.255.0
  • Network Address: 192.168.1.0
  • Host Addresses: from 192.168.1.1 to 192.168.1.254

Complete Subnet Mask Table

Subnet MaskCIDRNumber of HostsDescription
255.0.0.0/816,777,214Class A (largest network)
255.128.0.0/98,388,574
255.192.0.0/104,194,302
255.224.0.0/112,097,150
255.240.0.0/121,048,574
255.248.0.0/13524,286
255.252.0.0/14262,142
255.254.0.0/15131,070
255.255.0.0/1665,534Class B (medium network)
255.255.128.0/1732,766
255.255.192.0/1816,382
255.255.224.0/198,190
255.255.240.0/204,094
255.255.248.0/212,046
255.255.252.0/221,022
255.255.254.0/23510
255.255.255.0/24254Class C (smallest network)
255.255.255.128/25126
255.255.255.192/2662
255.255.255.224/2730
255.255.255.240/2814
255.255.255.248/296
255.255.255.252/302Point-to-Point links
255.255.255.254/312Point-to-point (RFC 3021)
255.255.255.255/321Single host address

[amazon_auto_links id=”8218″]

Subnetting Example

Suppose you have a network with a /24 mask (255.255.255.0) and want to create 4 subnets. You borrow 2 bits from the host part:

  • New mask: /26 (255.255.255.192)
  • Number of subnets: 4 (2^2)
  • Number of hosts per subnet: 62

Conclusion

Subnet masks are essential for managing IP addressing, dividing networks into smaller parts, improving data routing and security. Understanding subnet masks and network types is key for designing efficient and secure modern networks.

0 0 votes
Rating
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Scroll to Top