8 Replies Latest reply: Apr 27, 2012 8:27 AM by Scott Morris - CCDE/4xCCIE/2xJNCIE

# A need help with understanding Subnetting a ip address

The scenario what I've gotten from instuctor is like below with keys but mine is different from her results so that's why I'm asking here..

From Instructor

203.102.88.0 / 8 subnets needed

Class C

default mask : 255.255.255.0

number of bits borrowed : 4

Number Of Subnets : 14

Number Of hosts per subnet : 14

Subnet Mask : 255.255.255.240

Prefix length : 28

Range of usable hosts in 4th usable subnet : 65-78

From my calculation

203.102.88.0 / 8 subnets needed

Class C

default mask : 255.255.255.0

number of bits borrowed : 3

Number Of Subnets : 6

Number Of hosts per subnet :  ?

Subnet Mask : 255.255.255.224

Prefix length : 26

Range of usable hosts in 4th usable subnet : ?

? marks mean I don't know how to do it.

If someone knows how to do subnetting with this given data, please let me know how to do it..

• ###### 1. Re: A need help with understanding Subnetting a ip address

Well..  I'd agree with your calculations on bits.  because subnet-zero is perfectly fine to use.  If we assumed it wasn't, then your instructor is correct.

So I'll assume you get the idea of how to determine the number of bits needed (2^3 = 8 all are usable, 2^4 = 16, but in her world 14 are usable meaning no subnet-zero)

After that it's just a matter of calculating what my network IDs are!

203.102.88.0 --> subnet mast in your example of 255.255.255.224 means my networks are every 32nd number.

.0, .32, .64, .96, .128, .160, .192, .224

So the fourth one is the .96 subnet.  All numbers are .96 - .127 based on the list there.  Network IP is .96, broadcast is .127 therefore usable range is .97-.126 in that network.

HTH,

Scott

• ###### 2. Re: A need help with understanding Subnetting a ip address

Thank You Scott! your explanations clear up my curiocities

But I have few more things to clarify about subnetting.

Let's say I have another secenario which has

200.4.5.0

20 subnet needed

then How to find subnet mask and what is a number of subnet relation to the subnet mask

I have figured out once I found subnet mask then rest of things such as number of bits borrowed, number of subnets and prefix length

but I have no idea how to find the exact subnet mask with a given secnario...

So confusing and what if subnet mask has difficult numbers? just like number has such binary code combinations :11110101

so Would that be 128+64+32+164+1 # then How do we know the number has such that binary code instead of solid number one : 11111000 ??

Thanks again!

• ###### 3. Re: A need help with understanding Subnetting a ip address

Hi Cool

The subnet mask indicates which upper bit postions are used for the sub-network and which lower bits for the hosts

so 255.255.255.0   means 24 bits for the network an 8 bits for the hosts

so it will always be 11111....         1000000000......

So 30 bits for the network leaves 2 bits for the hosts  255.255.255.252     252 = 11111100

For x hosts for host+2 <= 2 ^ n

So 5 hosts  5+2  < 8

255.255.255.(256-8)      = 255.255.255.248

As the value n (of host bits) increases the number of ones decrease so you will alway have 11111...0000000  where total bits =32

Regards Conwyn

• ###### 4. Re: A need help with understanding Subnetting a ip address

A mask will always be consecutive 1's and 0's  It cannot be a combo like 11101010 They have to be consecutive, as Conwyn states

• ###### 5. Re: A need help with understanding Subnetting a ip address

Hi Kerry

I will let you into a secret RFC 950 states

However, we recommend that the subnet bits be contiguous and located as the most significant bits of the local address.

It was only a recommenation but lost in the mists of time.

Regards Conwyn

• ###### 6. Re: A need help with understanding Subnetting a ip address

My fingers are in my ears; la-la-la-la, I can't hear you. Trying to shatter my organized world with this chaos.  aiieeeee!!

• ###### 7. Re: A need help with understanding Subnetting a ip address

We have been assigned network 203.102.88.0/16 and need 8 subnets.

Network Bits_24

Subnet Bits_3

Host Bits_5

2^3 = 8 subnets

2^5 = 32 -2 = 30 hosts

Add the three subnet bits to the network bits to get the new mask which is /27.

Convert the /27 prefix to a decimal. 255.255.255.224

Subtract 224 from 256 to get the block size which is 32.

Name the subnets for the network using the block size.

203.102.88.0

203.102.88.32

203.102.88.64

203.102.88.96

...until you get to the number in the mask, which will be your broadcast address.

203.102.88.224

Jonathan

• ###### 8. Re: A need help with understanding Subnetting a ip address

I had you until you said:

...until you get to the number in the mask, which will be your broadcast address.

203.102.88.224

The 203.102.88.224 is still a subnet.  You'll have a broadcast address inside EACH of the 8 subnets.

203.102.88.31

203.102.88.63

203.102.88.95

203.102.88.127

203.102.88.159

203.102.88.191

203.102.88.223

203.102.88.255

Are ALL broadcast addresses for each of those individual subnets.

HTH,

Scott