Sign in with
Sign up | Sign in
Your question

Need help with Subnetting for Network+ exam

Last response: in Networking
Share
August 10, 2012 2:08:39 AM

Hi,
I have been studying to take the Network+ test, and I am having a little difficulty understanding subnetting. I am using Todd Lammle's book, and I understand how to subnet using Class C subnets, but for some reason I am just h aving a problem with Class B, and Class A subnetting. I really need to take the test by August 31, and I am wondering if there are any additional online resources that anyone might be able to recommend that would help me. I really like Todd Lammle's method, but I just need a little bit of extra help.

Thanks in advance to anyone that might be able to help.

August 10, 2012 2:48:22 AM

It's eaiser to think of subnets in terms of binary than decimal.

Subnets are shown like 255.255.255.0, but in binary, they look like 11111111.111111111.111111111.00000000

Say you have an IP address of 192.168.0.1 and you want to send a packet to 192.168.1.1. How can you tell if they're on your subnet?
192.168.0.1 looks like this in binary: 11000000.10101000.00000000.00000001
Using your subnet mask of 11111111.111111111.111111111.00000000, you bitwise AND the mask to your IP address and you get
11000000.10101000.00000000.00000000 for your subnet

Same thing against the 192.168.1.1: 11000000.10101000.00000001.00000001
AND against 11111111.111111111.111111111.00000000
Result: 11000000.10101000.00000001.00000000

When you compare:
11000000.10101000.00000000.00000000
to
11000000.10101000.00000001.00000000

You can see the subnets are different. This means your packet needs to be sent to the gateway/router.

Lets use a slightly different subnet mask.
Lets say you have a subnet mask of 255.255.254.0 This gives you 11111111.111111111.111111110.00000000

192.168.0.1: 11000000.10101000.00000000.00000001
Apply Mask of 11111111.111111111.111111110.00000000
Result: 11000000.10101000.00000000.00000000

192.168.1.1: 11000000.10101000.00000001.00000001
Apply Mask of 11111111.111111111.111111110.00000000
Result: 11000000.10101000.00000000.00000000

As you can tell, in this case, they are in the same subnet, so no routing is required.
m
0
l
August 14, 2012 3:40:56 AM

Kewlx25 said:
It's eaiser to think of subnets in terms of binary than decimal.

Subnets are shown like 255.255.255.0, but in binary, they look like 11111111.111111111.111111111.00000000

Say you have an IP address of 192.168.0.1 and you want to send a packet to 192.168.1.1. How can you tell if they're on your subnet?
192.168.0.1 looks like this in binary: 11000000.10101000.00000000.00000001
Using your subnet mask of 11111111.111111111.111111111.00000000, you bitwise AND the mask to your IP address and you get
11000000.10101000.00000000.00000000 for your subnet

Same thing against the 192.168.1.1: 11000000.10101000.00000001.00000001
AND against 11111111.111111111.111111111.00000000
Result: 11000000.10101000.00000001.00000000

When you compare:
11000000.10101000.00000000.00000000
to
11000000.10101000.00000001.00000000

You can see the subnets are different. This means your packet needs to be sent to the gateway/router.

Lets use a slightly different subnet mask.
Lets say you have a subnet mask of 255.255.254.0 This gives you 11111111.111111111.111111110.00000000

192.168.0.1: 11000000.10101000.00000000.00000001
Apply Mask of 11111111.111111111.111111110.00000000
Result: 11000000.10101000.00000000.00000000

192.168.1.1: 11000000.10101000.00000001.00000001
Apply Mask of 11111111.111111111.111111110.00000000
Result: 11000000.10101000.00000000.00000000

As you can tell, in this case, they are in the same subnet, so no routing is required.


I appreciate the subnetting advice, but I understand how to convert subnet masks from decimal to binary. I just don't understand how to find out how many hosts I will get when I subnet Class A and Class B addresses.
m
0
l
August 15, 2012 6:23:00 PM

Quote:
I appreciate the subnetting advice, but I understand how to convert subnet masks from decimal to binary. I just don't understand how to find out how many hosts I will get when I subnet Class A and Class B addresses.


The formula that you are looking for is: ((2^32) - (2^(number of subnet bits)))-2 = Number of available host. For example, let try each of the default classes so that you can get a feel for it.

Class C:
192.168.0.0/255.255.255.0

Convert to binary to get number of bits in subnet:
255.255.255.0 = 11111111.11111111.11111111.00000000 (The 1's represents the subnet and the 0's represents the host but you already knew that so let's continue)

Count the number of 1's in the subnet: There twenty-four(24) 1's in this subnet. Ok so now we go back to our formula. Remember what it was? Sure you do because its right above you. But before we do let's break down our formula.

Why 2^32? ...... Well, binary digits consist of ONLY 1's and 0's hence the phase base 2 when dealing with binary digits. Now here is another question for you. Why is it to the power of 32? ... Let me give you a hint: It has something to do with IPv4. If you answer somewhere along the lines that an IPv4 address is 32-bits then you are correct. 32-bits is the maximum that you can have in a IPv4 address so if you want to subnet your network you would have subtract from that number.

So why "-2"? Every subnet/network has a Network address and a Broadcast address so you have to minus 2 because two of the IPv4 address are reserved and can't be used.

That was long. So here we go. Let's just plug into the formula and go from there.

So we had a class C address of 192.168.0.0 and a subnet of 255.255.255.0 or 24-bits. The formula says to do:

2^32 - 2^24 = 2^8 = 256 (Number of Host) - 2 = 254 (Number of available Host)

If you are wondering how I got 2^8 I used basic math that says whenever the base are the same in this case, 2, you just add or subtract the exponent. Since the base are the same I just subtract 24 from 32 which gives me 8 then just do 2 to that power which gives me 256.

Let's try another one.

172.16.0.0/ 255.255.0.0

255.255.0.0 = 16 bits

2^32 - 2^16 = 2^16 = 65536 (Number of Host) - 2 = 65534 (Number of available Host)

Another one:

175.24.206.0/ 29 (This is easier since the subnet is already converted into bits for us)

2^32 - 2^29 = 2^3 = 8 (Number of Host) - 2 = 6 (Number of available Host)


Note:
When I took my exam in 2010 I actually used Professor Messer's online tutorial found at: http://www.professormesser.com/n10-005/free-network-plu.... Also you can visit my website at: http://www.alleykatsupport.com/.
m
0
l
!