Subnetting class C networks
Benefits of Subnetting:
- Reduced Network Traffic
- Optimised Network Performance – as a result of reduced traffic
- Simplified management
- Facilitated spanning of large geographical distances
How to create subnets:
- Determine the number of required network ID’s
- one for each subnet
- one for each WAN connection
- Determine the number of required host ID’s
- one for each TCP/IP host
- one for each router interface
- Based on the above requirement, create the following
- one subnet mask for your entire network
- a unique subnet ID for each physical segment
- a range of host ID’s for each subnet
VLSM: Variable Length Subnet Masks
Class | Format | Default Subnet Mask |
Class A | Network.Node.Node.Node | 255.0.0.0 |
Class B | Network.Network.Node.Node | 255.255.0.0 |
Class C | Network.Network.Network.Node | 255.255.255.0 |
CIDR: Classless Inter-Domain Routing
CIDR Value | Default Subnet Mask |
/8 | 255.0.0.0 |
CIDR Value | Default Subnet Mask |
/9 | 255.128.0.0 |
/10 | 255.192.0.0 |
/11 | 255.224.0.0 |
/12 | 255.240.0.0 |
/13 | 255.248.0.0 |
/14 | 255.252.0.0 |
/15 | 255.254.0.0 |
/16 | 255.255.0.0 |
CIDR Value | Default Subnet Mask |
/17 | 255.255.128.0 |
/18 | 255.255.192.0 |
/19 | 255.255.224.0 |
/20 | 255.255.240.0 |
/21 | 255.255.248.0 |
/22 | 255.255.252.0 |
/23 | 255.255.254.0 |
/24 | 255.255.255.0 |
CIDR Value | Default Subnet Mask |
/25 | 255.255.255.128 |
/26 | 255.255.255.192 |
/27 | 255.255.255.224 |
/28 | 255.255.255.240 |
/29 | 255.255.255.248 |
/30 | 255.255.255.252 |
In a Class C address, only 8 bits are available for defining the hosts:
Binary | Decimal | Shorthand |
1000 0000 | 128 | /25 |
1100 0000 | 192 | /26 |
1110 0000 | 224 | /27 |
1111 0000 | 240 | /28 |
1111 1000 | 248 | /29 |
1111 1100 | 252 | /30 |
/31 is beyond the scope of this post, please see RFC 3021
The RFC’s say that you can’t only have 1 bit for subnetting, since that would mean that the subnet bit would either be on or off, which is illegal. So the first subnet mask that you can legally use is 192 and the last is 252 because you need at least 2 bits for defining hosts
example to calculate Class C subnet:
eg: network 210.93.45.0 asked to create 5 subnets
we have 8 bits available to split between networks and hosts
firstly calculate the number of bits you need for the networks using the formula
(2^x)-2 >= #subnets
eg: (2^3)-2 =6 (which is >= the 5 requested networks)
we need to ‘borrow’ 3 bits for the networks (we then have 5 bits available for networks)
the number of hosts per subnet is then 32-2 = 30 hosts per subnet
(one host address required for the subnet itself, and one for the router interface ) [the fourth binary bit is 16, the fifth binary bit is 32, the sixth is 64, etc]
whats the subnet mask?
we used 3 bits => 128+64+32 = 224.
so, for our example above:
Class C network 210.93.45.0 requires 5 subnets
we can provide 6 subnets with 30 hosts per subnet
1 id for the subnet itself
1 id for the router interface
the subnet mask is 255.255.255.224