- Posts: 4
- Thank you received: 0
help me how to subnet class A, B & C
18 years 8 months ago #13813
by Arani
Picking pebbles on the shore of the networking ocean
ok, now lets look at a Class A address. i will be using the usual notations.
Class A address has a default subnet mask of:
255.0.0.0 which in binary looks like:
11111111 . 00000000 . 00000000 . 00000000
you also remember that the network ID and host ID division for Class A is:
xxxxxxxx . 00000000 . 00000000 . 00000000
Now we keep on adding one bit at a time to the network ID portion, taking away one bit from the host ID. first lets take one bit.
Now it looks like:
xxxxxxxx . x0000000 . 00000000 . 00000000
Now when you have taken that one bit, you should be able to tell how many subnets you can create. for every bit included into the network ID, the number of subnets generated is that number raised to the power of two. hence in this case it is 2 raised to the power of 1 which is 2. we have two subnets. but how is this happening? that bit we borrowed can either have a value 1 or 0, hence the first subnet is formed by:
xxxxxxxx . (0)0000000 . 00000000 . 00000000
second subnet is generated by:
xxxxxxxx . (1)0000000 . 00000000 . 00000000
the rest portions can take any values. so how many computers can you have for each subnet? just raise remaining number of zeros to the power of 2 again!!! no. of computers becomes 8388608!!! i.e. 2 raised to the power of 23.
now imagine what happens if we borrow 2 bits.
xxxxxxxx . (xx)000000 . 00000000 . 00000000
now you can have 4 subnets. how? heres how:
xxxxxxxx. (00)000000 . 00000000 . 00000000 subnet 1
xxxxxxxx. (01)000000 . 00000000 . 00000000 subnet 2
xxxxxxxx. (10)000000 . 00000000 . 00000000 subnet 3
xxxxxxxx. (11)000000 . 00000000 . 00000000 subnet 4
and how many computers per subnet? its 4194304 computers!!! i.e. 2 raised to the power of 22 remaining zeros!!!
now try to visualize as we keep on borrowing one bit after the other, one by one, and the number of subnets keep on increasing, but also at the same time, the number of computers per subnet keeps on decreasing.
Let me know when you have gone through this
Class A address has a default subnet mask of:
255.0.0.0 which in binary looks like:
11111111 . 00000000 . 00000000 . 00000000
you also remember that the network ID and host ID division for Class A is:
xxxxxxxx . 00000000 . 00000000 . 00000000
Now we keep on adding one bit at a time to the network ID portion, taking away one bit from the host ID. first lets take one bit.
Now it looks like:
xxxxxxxx . x0000000 . 00000000 . 00000000
Now when you have taken that one bit, you should be able to tell how many subnets you can create. for every bit included into the network ID, the number of subnets generated is that number raised to the power of two. hence in this case it is 2 raised to the power of 1 which is 2. we have two subnets. but how is this happening? that bit we borrowed can either have a value 1 or 0, hence the first subnet is formed by:
xxxxxxxx . (0)0000000 . 00000000 . 00000000
second subnet is generated by:
xxxxxxxx . (1)0000000 . 00000000 . 00000000
the rest portions can take any values. so how many computers can you have for each subnet? just raise remaining number of zeros to the power of 2 again!!! no. of computers becomes 8388608!!! i.e. 2 raised to the power of 23.
now imagine what happens if we borrow 2 bits.
xxxxxxxx . (xx)000000 . 00000000 . 00000000
now you can have 4 subnets. how? heres how:
xxxxxxxx. (00)000000 . 00000000 . 00000000 subnet 1
xxxxxxxx. (01)000000 . 00000000 . 00000000 subnet 2
xxxxxxxx. (10)000000 . 00000000 . 00000000 subnet 3
xxxxxxxx. (11)000000 . 00000000 . 00000000 subnet 4
and how many computers per subnet? its 4194304 computers!!! i.e. 2 raised to the power of 22 remaining zeros!!!
now try to visualize as we keep on borrowing one bit after the other, one by one, and the number of subnets keep on increasing, but also at the same time, the number of computers per subnet keeps on decreasing.
Let me know when you have gone through this
Picking pebbles on the shore of the networking ocean
18 years 8 months ago #13847
by gino_bwoi
Replied by gino_bwoi on topic Re: help me how to subnet class A, B & C
nice mate, i gone thru that whats next
18 years 8 months ago #13848
by Arani
Picking pebbles on the shore of the networking ocean
you are really catching up now!!! :lol:
right, this time it will be a Class B address: let me tell you nothing is different here. everything remains the same. the network ID host ID division of a Class B address is:
xxxxxxxx . xxxxxxxx . 00000000 . 00000000
and the default subnet mask of a Class B address is :
255.255.0.0
now all you have to do is to keep on adding one bit from the host ID into the network ID, just the way you did for a Class A address. now everything again should be falling into place for you. all you have to see here is that the number of hosts per subnet is further decreased as you have less bits left for the host ID, and they are being further depleted as you keep on borrowing from the host ID and put them into the network ID.
I guess you must have guessed by now what happens for a Class C address. the network ID and host ID division is:
xxxxxxxx . xxxxxxxx . xxxxxxxx . 00000000
and the default subnet mask for a Class C address is:
255.255.255.0
Again its the same ritual. keep on adding one bit at a time from the host ID to the network ID. no brownie points for guessing that the number of subnets per network formed is further decreased!!! :lol:
crucial things to remember:
every class of IP address namely A, B, and C, when you divide them into subnets, always, and i repeat always remember, the total number of hosts you can have in a subnet is less by 2 in real life. this is as the first address of the subnet is used as a network address, and the last address of the subnet is used for network broadcast. so always remember, if anyone asks you how many hosts can you accomodate for a subnet, once you have calculated the figure by raising the number of host ID bits available to the power of two, substract the value by 2. As for example:
xxxxxxxx . xxxxxxxx . xxxxxxxx . xxx00000
lets think this is a Class C IP address with a subnet mask of /27. this means the network ID is made up of 27 bits, and only 5 bits are left for assigning hosts. now total number of hosts available in such a subnet would be 2 raised to the power of 5 = 32, and you would say 32 hosts....but you would be wrong!!! the first IP address which would be:
xxxxxxxx . xxxxxxxx . xxxxxxxx . xxx00000 is used for network address
and the last is used for broadcast, which is:
xxxxxxxx . xxxxxxxx . xxxxxxxx . xxx11111
you cannot assign these two addresses to a host.
So this is the real trick behind subnetting. any confusions, just let me know, and i will be more than happy to help you out
right, this time it will be a Class B address: let me tell you nothing is different here. everything remains the same. the network ID host ID division of a Class B address is:
xxxxxxxx . xxxxxxxx . 00000000 . 00000000
and the default subnet mask of a Class B address is :
255.255.0.0
now all you have to do is to keep on adding one bit from the host ID into the network ID, just the way you did for a Class A address. now everything again should be falling into place for you. all you have to see here is that the number of hosts per subnet is further decreased as you have less bits left for the host ID, and they are being further depleted as you keep on borrowing from the host ID and put them into the network ID.
I guess you must have guessed by now what happens for a Class C address. the network ID and host ID division is:
xxxxxxxx . xxxxxxxx . xxxxxxxx . 00000000
and the default subnet mask for a Class C address is:
255.255.255.0
Again its the same ritual. keep on adding one bit at a time from the host ID to the network ID. no brownie points for guessing that the number of subnets per network formed is further decreased!!! :lol:
crucial things to remember:
every class of IP address namely A, B, and C, when you divide them into subnets, always, and i repeat always remember, the total number of hosts you can have in a subnet is less by 2 in real life. this is as the first address of the subnet is used as a network address, and the last address of the subnet is used for network broadcast. so always remember, if anyone asks you how many hosts can you accomodate for a subnet, once you have calculated the figure by raising the number of host ID bits available to the power of two, substract the value by 2. As for example:
xxxxxxxx . xxxxxxxx . xxxxxxxx . xxx00000
lets think this is a Class C IP address with a subnet mask of /27. this means the network ID is made up of 27 bits, and only 5 bits are left for assigning hosts. now total number of hosts available in such a subnet would be 2 raised to the power of 5 = 32, and you would say 32 hosts....but you would be wrong!!! the first IP address which would be:
xxxxxxxx . xxxxxxxx . xxxxxxxx . xxx00000 is used for network address
and the last is used for broadcast, which is:
xxxxxxxx . xxxxxxxx . xxxxxxxx . xxx11111
you cannot assign these two addresses to a host.
So this is the real trick behind subnetting. any confusions, just let me know, and i will be more than happy to help you out
Picking pebbles on the shore of the networking ocean
18 years 7 months ago #13976
by gino_bwoi
Replied by gino_bwoi on topic Re: help me how to subnet class A, B & C
thanks m8 for all ur time ive only jus looked at it i been on holiday n that. ill give it a look ova n try understand it a bit more n ill get back to you thanks
Time to create page: 0.144 seconds