Unit 11
First, you’ll need at least a basic understanding of how net masks work, and how you can lengthen the net mask to sub-network (subnet) an existing IP network.
Second, you’re likely to encounter questions that require a deeper understanding of how large a subnet will be, how many hosts it can support, and so on.
So let’s start with an example of a common network configuration, a Class C Non-routable network. Follow this logic:
My IP is 192.168.1.13
My CIDR is /24 (in other words, my network number is the first 3 octets).
Therefore my network number is 192.168.1.0 (the first 3 octets, with zeroes filling in the Host ID area, which in this case is 8 bits).
And this network’s broadcast address is 192.168.1.255 (the network number plus all 1s filling in the Host ID area).
Because we have 8 bits in the Host ID area, there are a total of 256 numbers available (0-255).
WE LOSE 1 to the network number: 192.168.1.0
WE LOSE 1 to the broadcast address: 192.168.1.255
Thus we always lose 2 numbers for any subnet.
Therefore you can have up to 254 hosts on this network (subnet).
That wasn’t bad at all, was it? Now let’s think about dividing this network into smaller subnets. Why? Primarily to keep things separated, for instance keeping Payroll’s network separate from the Sales network, and keeping both of those separate from the Disciplinary Committee’s network. Gotta stay clear of the Disciplinary Committee.
So let’s start with our existing configuration:
Network number:
192.168.1.0
Net mask:
11111111.11111111.11111111.00000000
Currently 1 network and 254 hosts.
Next, let’s move our network mask over 2 bits:
11111111.11111111.11111111.11000000
We’ve “stolen” 2 bits from the last octet. Call these 2 new bits the net mask extension. We can easily calculate how many networks we’ll get by raising 2 to the power of the number of bits in the net mask extension. In our case,
22 = 4 networks
Next we can calculate how many hosts there can be in each network. We need to raise 2 to the power of the number of bits in the Host ID area, in our case 6:
26 = 64
But remember: we always lose 2 addresses (network number and broadcast), resulting in:
64 – 2 = 62 hosts per new network (subnet)
We also need to know the network numbers of our 4 new networks. We can do this a couple of ways. The first way is manually, using the calculator from above:
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
Since we’re taking the left-most 2 bits, there are 4 values available to us.
00000000 = 0
01000000 = 64
10000000 = 128
11000000 = 192
Don’t forget that these numbers go in the fourth octet. So our network numbers are:
192.168.1.0/26
192.168.1.64/26
192.168.1.128/26
192.168.1.192/26
And the broadcast address of each of these networks is the odd number just before the even number that starts the next network. So our broadcast addresses are:
192.168.1.63/26
192.168.1.127/26
192.168.1.192/26
192.168.1.255/26
Or think of the network numbers another way. We know we’re carving up the last octet, which is of course 8 bits, or 256 possible values. We’re creating 4 subnets. So divide:
256 / 4 = 64
Which means the first network is 0, and each subsequent network is 64 larger. Again:
192.168.1.0/26
192.168.1.64/26
192.168.1.128/26
192.168.1.192/26
Here are the details of our 4 new subnets:
192.168.1.0/26 – network number
192.168.1.1 – “netmin” usually for the router
192.168.1.62 – highest possible Host ID
192.168.1.63 – broadcast
How many hosts? 62
192.168.1.64/26 – network number
192.168.1.65 – netmin for router
192.168.1.126 – last host
192.168.1.127 – BC
192.168.1.128/26 – nw number
192.168.1.129 – netmin for router
192.168.1.190 – last host
192.168.1.191/26 – BC
192.168.1.192/26 – nw number
192.168.1.193 – netmin for router
192.168.1.254 – last host
192.168.1.255 – BC
Beautiful, isn’t it? Master this one example and you can figure out most situations. But because I always like to offer other people’s perspectives, take a look at Professor Messer’s 21-minute-long video, “Seven Second Subnetting” (seems like there’s a joke here):
This is also a great time to get familiar with StackExchange, if you haven’t already used it. Check out “How do you calculate the prefix, network, subnet, and host numbers?”
https://networkengineering.stackexchange.com/questions/7106/how-do-you-calculate-the-prefix-network-subnet-and-host-numbers
Non-Routable (LAN) Special Addresses (IEEE RFC 1918)
Class
|
||
A
|
10.0.0.0
|
10.255.255.255
|
B
|
172.16.0.0
|
172.31.255.255
|
C
|
192.168.0.0
|
192.168.255.255
|