Skip to main content

help me how to subnet class A, B & C

More
18 years 3 months ago #14036 by Tyrannosaur
Replied by Tyrannosaur on topic Easy Subnetting
For subnetting, I recommend the Sybex CCNA study guide by Todd Lammle. There is an excellent section that explains how to subnet class A, B, & C networks via the binary method, the method that you will find in most study material. There is also another method that is presented where you can subnet each network class in your head that will really save you time (on a test or real world applications).

Take the class C network node address 193.19.9.88 with a subnet mask of 255.255.255.192 for example. We want to know the subnet and broadcast address the node resides. If you take the subnet and break it down into binary bits it would look like:

255.255.255.192 = 11111111.11111111.11111111.11000000
Or
255.255.255.192 = SSSSSSSS.SSSSSSSS.SSSSSSSS.SSHHHHHH

This is also known as a /26 or 192 mask (using CIDR)

In the binary number system, a 1 is on and a 0 is off. So the subnet address has 26 bits on with 6 bits off (26 + 6 = 32 bit subnet mask). The first two bits in the fourth octet will determine the number of subnets we have. In this case, there are 2 bits that are on and that will give us 4 subnets (22 = 4). We also that the first two bits with 1’s equals 192 (128 + 64 = 192) and this will give you the networks the subnet mask will create. Here we will have networks 193.19.9.0, 193.19.9.64, 193.19.9.128, & 193.19.9.192; the fourth octet in binary they will look like:

.00000000 = 0
.01000000 = 64
.10000000 = 128
.11000000 = 192

There are 6 bits that are off which gives us our network block size of 64 (26 = 64) for all possible hosts in each subnet. Keep in mind that you must have a network address (already listed above) and a broadcast address for each subnet so you will have to subtract 2 addresses from the network block size and that will give you 62 hosts that you can have for each subnet (64 – 2 = 62). You will use this to determine subnet, first valid host address, last valid host address, and broadcast address.

Tying it all together, you compare the given node address against the networks you get from the subnet mask using the block size to determine what network you host address resides. Looking at the last octet in host address 193.19.9.88 and comparing it to subnets created by the subnet mask, 88 is greater than 64 and less than 128. So the host address of 193.19.9.88 resides in the 193.19.9.64 subnet with a broadcast address of 193.19.9.127. Remember that 2 addresses had to be subtracted from the network block size because you always have to have 1 subnet and broadcast address. This is what the subnet will look like:

Subnet 193.19.9.64
First Valid Host 193.19.9.65
Last Valid Host 193.19.9.126
Broadcast Address 193.19.9.127


Here is another way of looking at it and this is a great memory tool.

/26 mask
- 192 mask
- 2 bits on and 6 bits off (11000000)
- Block size 64
- 4 subnets, each with 62 hosts (remember network and broadcast address)

Even though I tried to keep this explanation brief, I hope that I explained this intelligently enough so you were able to understand. If not, I highly recommend that you purchase the Sybex CCNA study guide by Todd Lammle. Although I am not CCNA certified yet, I have been able to use the subnetting from the guide successfully in my current position which has been a great contribution to my success.

May it be just as useful to you!
8)
More
17 years 11 months ago #15827 by ajathsatru
I have a basic doubt regarding the IP subnetting. I have gone through the IP subnetting pages available in Firewall.cx.

I understand the purpose of subnetting is to split a Network into smaller networks using the subnet masks. My question is whether we can increase the number of hosts if we change the default subnet mask.

I found the following line from the page "IP Subnetting - The Basic Concepts"

"... see how we can achieve a Class C network with more than 254 hosts."

This is what which is confusing me. Can we increase the number of hosts for a Class C network from 254 ?

Please help me understand this !!
More
17 years 4 months ago #20259 by ashok_nitc
Replied by ashok_nitc on topic thanx Arani
thanx Arani for teaching by assuming the reader as a child..good style.thanx once again..
one question::
is there any limit of making subnets?? i guess we can devide in to subnet until
11111111.11111111.11111111.11111110
if it is correct then i have one more doubt....
here in this case no of host will be 2^1 - 2=0...its not possible right?? because subnet with out host :roll: ??


and one more query: if a network has 8 subnet then the no of availabe host in the network should be:: 2^x - 8*2. am i correct??
More
17 years 3 months ago #20605 by Sezza
Im confused

Tyrannosaur

with your example is it that there are 4 usable subnets or onyl 2 ? because i though that the 2^(bits borrowed) - 2 will give us the usable amount of subnets but where does this come in here??? what are the unusable subnets??

I understand the unusable hosts obviously where the host is either 00000 indicating the network address or all 1's indicating the broadcast.....
More
17 years 3 months ago #20610 by Smurf
Sezza, you are correct however so is Tyrannosaur.

It all depends on the TCP/IP Stack and Software implementations on this one. Some vendors do allow you to use the upper and lower Networks although it is all dependant on what hardware/software you are using.

I think if you were doing something like the CCNA exam, then it would want you to do the -2 on the network and hosts.

Cheers

Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
More
17 years 3 months ago #20620 by ashok_nitc
yup, i had the same confusion but while goingthrough cisco intro book i understood that no of n/w could be both true means x or (x-2).
Time to create page: 0.140 seconds