06-09-2013 06:39 AM - edited 03-04-2019 08:09 PM
can somebody expalin me why 255 taken as mask instead of 128 in the first example.and why 192 has been taken as mask in 2nd example. i got this confusion while doing subnetting of class B network. please help me.
This is one of the hardest subnet masks you can play with. And worse, it actually is a really good subnet to use in production because it creates over 500 subnets with 126 hosts for each subnet—a nice mixture. So, don't skip over it!
The following table shows how you can create subnets, valid hosts, and broadcast addresses using the Class B 255.255.255.128 subnet mask (the first eight subnets are shown, and then the last two subnets):
Subnet | 0.0 | 0.128 | 1.0 | 1.128 | 2.0 | 2.128 | 3.0 | 3.128 | … | 255.0 | 255.128 |
First host | 0.1 | 0.129 | 1.1 | 1.129 | 2.1 | 2.129 | 3.1 | 3.129 | … | 255.1 | 255.129 |
Last host | 0.126 | 0.254 | 1.126 | 1.254 | 2.126 | 2.254 | 3.126 | 3.254 | … | 255.126 | 255.254 |
Broadcast | 0.127 | 0.255 | 1.127 | 1.255 | 2.127 | 2.255 | 3.127 | 3.255 | … | 255.127 | 255.255 |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Now, this is where Class B subnetting gets easy. Since the third octet has a 255 in the mask section, whatever number is listed in the third octet is a subnet number. However, now that we have a subnet number in the fourth octet, we can subnet this octet just as we did with Class C subnetting. Let's try it out:
The following table shows the first eight subnet ranges, valid hosts, and broadcast addresses:
Subnet | 0.0 | 0.64 | 0.128 | 0.192 | 1.0 | 1.64 | 1.128 | 1.192 |
First host | 0.1 | 0.65 | 0.129 | 0.193 | 1.1 | 1.65 | 1.129 | 1.193 |
Last host | 0.62 | 0.126 | 0.190 | 0.254 | 1.62 | 1.126 | 1.190 | 1.254 |
Broadcast | 0.63 | 0.127 | 0.191 | 0.255 | 1.63 | 1.127 | 1.191 | 1.255 |
Notice that for each subnet value in the third octet, you get subnets 0, 64, 128, and 192 in the fourth octet.
06-09-2013 06:48 AM
I do not understand your question. The first example is dealing with subnetting using /25. The number of network/subnet bits in each octet is + 8 + 8 + 8 + 1. The mask for /25 has 255 in the first three octets and 128 in the fourth octet.
The second example is dealing with subnetting using a /26. The number of network/subnet bits in each octet is 8 + 8 + 8 + 2. The mask for /26 has 255 in the first three octets and 192 in the fourth octet.
If this explanation does not address your confusion then please clarify your question.
HTH
Rick
06-10-2013 06:46 AM
Hi ,
i will clarify the question first.In the above examples while calculating "Valid subnets" i got the confusion.
In the first example it was (255.255.255.128 (/25))
it was perfect in second example and i have doubt in first one . please reply.
06-10-2013 07:38 AM
hi,
base network = 172.16.0.0
mask or prefix = 255.255.0.0 or /16
1. there can be 512 /25 subnets in /16 base network as we will have 9 bits for subnetting......subsequently we will have 126 hosts in each subnet as we will have 7 bits for each subnet.
mask for each subnet = 255.255.255.128
2. there can be 1024 /26 subnets in /16 base network as there will be 10 bits for subnetting.....and each subnet will have 62 hosts as there will be 6 bits for each subnet......
mask for each subnet = 255.255.255.192
thanks
06-10-2013 07:47 AM
OK. Now I have a better understanding of the confusion. He starts the explanation as if the subnetting is being done only in the third octet. The mask in the third octet is 255. He has previously introduced a method of calculating the increment of subnet numbers by subtracting the subnet mask from 256. So if you consider only the third octet with mask 255 you would come to the conclusion that the valid subnets are 0, 1, 2, 3, etc. He then makes the point that you must also consider that subnetting is happening in the fourth octet also. This leads to the correct conclusion that the valid subnets are 0.0, 0.128, 1.0, 1.128, 2.0, 2.128, 3.0, 3.128, etc
HTH
Rick
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: