Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with CIDR

Status
Not open for further replies.

Dan87951

Technical User
Nov 5, 2002
27
0
0
US
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
 
Ok

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)!
 
You're really just summarizing an address range. CIDR is a notation, but this is really just plain old subnetting. For your second example (the first was corrected answered above, /29):

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
 
Thanks guys. Both of your explanations really helped me out. Looks like /18 nets me 16384 IP addresses.

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
 
I just tried to CIDR 41.220.236.8 to 41.220.239.11 but I'm getting a subnet mask of 255.255.252.252 is this correct?
 
You're effectively correct on that last question, though in CIDR notation it would be 41.220.236.8/30. Also CIDR is not a verb. :)

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
 
Dan

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.
 
Maybe I don't understand it fully? It's been over 5 years since I have done any of this so I'm taking a class to refresh my skills. We had a "CIDR Quiz" and these problems were on it. Naturally, I bombed it so I'm reviewing the questions to get the correct answers. He is asking us to put it into CIDR notation. For Example he is just giving us the IP range and asking us to put it into "CIDR notation".

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

 
This is not an exact science! The question is too vague because we don't have the network and broadcast addresses! So the addresses given could be part of a larger subnet!

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!
 
actually, Dan is correct in his last calculation 58.137.115.208/28 means we are incrementing by 16 (11110000); this gives us the following:
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)
 
Yep

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!
 
If the goal is summarization, "summarize 10.0.0.8-10.0.0.11" is a fair-game question, and the range is correctly summarized as 10.0.0.8/30 in CIDR notation. I don't think the question is too vague, but it's important to note that the notation is not only used for subnet assignment, but for aggregate summaries as well.

CCNP, CCDP, CCIP
Core Network Planner, ISP
 
Thanks unclerico!

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?
 
One more. Summarize 61.56.80.0-61.56.95.255

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!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top