## Need help with CIDR

## Need help with CIDR

(OP)

Its been a while since I have done CIDR and completely forgot when I was going over review questions. How do you CIDR an address without the subnet mask? For example if the problem was CIDR 58.137.15.160-58.137.15.167 how would you go about doing this? Another example would be CIDR 66.240.192.0-66.240.255.255. I'm completely loss and all the youtube videos I find are using the subnet mask to subnet. Any help would be appreciated. thanks

## RE: Need help with CIDR

I don't know if I can explain this clearly but I will haave a go at it!

If you are given an address range for a network, it should be possible to work out the subnet mask that covers, yet restricts you to, that range.

for example your problem listed above 58.137.15.160-58.137.15.167 allows for only a 6 ip address range (8 including the network address and broadcast address) in the fourth octet. so it's got to be higher than 3 X 8 (the first three octets). Now 8 is effectively seven because 0 counts as a digit and 7 can be expressed using 3 digits in binary so that leaves 5 digits as the network bits. 5 + 24 =29 so the CIDR notation for your problem is /29!

God I hope that's right or I have forgotten everything I learned for my ccna! (wouldn't surprise me though)!

## RE: Need help with CIDR

66.240.192.0 - 66.240.255.255

You can see the first two octets are identical, so you know if you broke those into binary they'd be the same. Just to really drive it home, though, here's how the full addresses would compare in binary:

01000010.11110000.11000000.00000000 < first IP

01000010.11110000.11111111.11111111 < last IP

11111111.11111111.11000000.00000000 < subnet mask, if it was a subnet.

The first 18 bits are the same, and the last 14 are different. In CIDR notation, you're only concerned with how many bits are the same. In this case, 66.240.192.0/18 would summarize the entire range.

CCNP, CCDP, CCIP

Core Network Planner, ISP

## RE: Need help with CIDR

To take this one step further does that mean the networks are going on the order of 64? Or I guess how do I figure out the subnetworks now. So the CIDR is 66.240.192.0 does that mean the next would be at 66.240.192.64 than .128 than .192,?

THanks

## RE: Need help with CIDR

## RE: Need help with CIDR

I'm not sure what you mean by "order of 64". What you are doing is taking bits out of once side and into the other (between network address and host address). a /32 would have one address, a /31 would have 2 addresses, /30 has 4, etc. It is binary.

CCNP, CCDP, CCIP

Core Network Planner, ISP

## RE: Need help with CIDR

Where did you get the 41.220.236.8 to 41.220.239.11 to solve? I don't believe it is a valid subnet range!

Are you truly sure you understand subnetting? Address ranges are based on binary so with a start address of XXX.XXX.XXX.8 the only real next subnet can be XXX.XXX.XXX.16 (this is because a subnet starting at 8 implies there is a subnet 0 to 7 making a /29 subnet mask)

Also in your previous example you say "CIDR is 66.240.192.0" But that is just an IP address not a CIDR notation. It has to have the /x or /xx after it to be CIDR notation.

## RE: Need help with CIDR

Yes "41.220.236.8-41.220.239.11" was on there for us to put into CIDR notation.

Also "58.68.119.160-58.68.119.191" was also on there. can someone check my work below? I'm getting the above range would CIDR to 58.68.119.160/27

Here's another one I just did.

"58.137.15.160-58.137.15.167" CIDR 58.147.15.160 /29

Last One.

"58.137.115.208-58.137.115.223"

Im getting CIDR 58.137.15.208/28

## RE: Need help with CIDR

However in your last example I disagree with your answer! I'll work through how I got my answer so you can see if you agree (and others can also say whether I am right or wrong)

We can ignore the first three octets as they are the same. That leaves us with lower address of 208 and and a higher address of 223. Now we have to work out the valid range they come from!

So to find the lower limit we subtract the binary steps one at a time till the next one would take us into negative territory! 208 - 128 = 80 - 64 = 16 we can't go any further as the next would be 32

Adding the 128 + 64 together we find the low address 192

Similarly for the higher address we do the same but this time we want to equal or exceed our address!

223 - 128 = 95 - 64 = 31 - 32 takes just over.

Adding the three we get 128 + 64 + 32 = 224

Now subtracting the lower from the upper we get 32 and this is the number of ip addresses in our range!

As 0 is counted in this we need enough address bits to add up to 31 so 1 + 2 + 4 + 8 + 16 = 31 so that is five bits. That leaves three which can become network bits so 24 + 3 gives us a /27

Hope that makes sense and that I haven't made a mistake somewhere!

## RE: Need help with CIDR

Subnet address: 58.137.115.208

Broadcast: 58.137.115.223

Usable IPs: .209 - .222

Next network based on a /28 would be 58.137.115.224 then .240

I hate all Uppercase... I don't want my groups to seem angry at me all the time! =)- ColdFlame (vbscript forum)

## RE: Need help with CIDR

You are correct, I knew someone would correct me. I stopped too soon on the low address!

I suppose the best way of wording this is that you need to find the smallest valid range that encompasses the addresses you have been given. But I still think the question is too vague for the real world!

## RE: Need help with CIDR

CCNP, CCDP, CCIP

Core Network Planner, ISP

## RE: Need help with CIDR

Your explanation really helped me out.

Can you check my work on this one. Summarize 59.88.0.0-59.99.255.255

I'm getting 59.88.0.0/11 which doesn't seem right.. networks are incremented by 4?

## RE: Need help with CIDR

CIDR 61.56.80.0/20

usable IPs .1-.14

broadcast 61.56.80.15

Next network 61.56.80.16

Networks are going in increments of 16.

Thanks appreciate the help!