# how to find out CIDR

• 10-02-2007, 09:52 PM
unix
how to find out CIDR
I am doing a class in telecommunications, and there is a concept which
i cannot grasp. the books isnt too clear about it.
how can i find out the CIDR when the subnet mask and a host IP is
provided?
for example, if the subnet mask is 255.255.240.0, what is the CIDR for
the subnet with a host IP address 210.240.10.0?
I would really appreciate the help!
Thanks

• 10-02-2007, 09:52 PM
unix
Re: how to find out CIDR
<ruchie.sharma@gmail.com> wrote:[color=blue]
>I am doing a class in telecommunications, and there is a concept which
>i cannot grasp. the books isnt too clear about it.
>how can i find out the CIDR when the subnet mask and a host IP is
>provided?
>for example, if the subnet mask is 255.255.240.0, what is the CIDR for
>the subnet with a host IP address 210.240.10.0?
>I would really appreciate the help![/color]

Count the number of leading 1's in the binary representation
of the mask. Or start from the end and a count of 32 and subtract
off the count of the trailing binary 0's.

For example, 255.255.240.0 ends with four 0 bits for the 240, then
eight 0 bits for the .0, so that's 32-4-8 = 20. That makes the CIDR
a /20.

After that, it's just a matter of making sure that the base address
and the mask align. In the case of 210.240.10.0, they are consistant.
you'd have to look and realize that that trailing .1 has a binary
1 in a place that should be all binary 0's. Use a binary "and" to
bring the two into alignment; e.g.,
210.240.10.1 AND 255.255.240.0 is 210.240.10.0
• 10-02-2007, 09:52 PM
unix
Re: how to find out CIDR
that helps a lot walter! thanks!

• 10-02-2007, 09:52 PM
unix
Re: how to find out CIDR
>I am doing a class in telecommunications, and there is a concept which
>i cannot grasp. the books isnt too clear about it.
>how can i find out the CIDR when the subnet mask and a host IP is
>provided?
>for example, if the subnet mask is 255.255.240.0, what is the CIDR for
>the subnet with a host IP address 210.240.10.0?
>I would really appreciate the help![/color]

Try looking over:
[url]http://www.interall.co.il/cidr.html[/url]

Regards,
Hank Nussbacher
[url]www.interall.co.il[/url]
• 10-02-2007, 09:52 PM
unix
Re: how to find out CIDR
Hello,

[email]ruchie.sharma@gmail.com[/email] a écrit :[color=blue]
> I am doing a class in telecommunications, and there is a concept which
> i cannot grasp. the books isnt too clear about it.
> how can i find out the CIDR when the subnet mask and a host IP is
> provided?[/color]

Your question makes no sense. CIDR (Classless Inter Domain Routing) is a
concept, a method to organize IP network addressing. Don't you mean the
prefix ?
• 10-02-2007, 09:52 PM
unix
Re: how to find out CIDR
In article <et1a8i\$4fo\$1@biggoron.nerim.net>,
Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> wrote:
[color=blue]
> Hello,
>
> [email]ruchie.sharma@gmail.com[/email] a écrit :[color=green]
> > I am doing a class in telecommunications, and there is a concept which
> > i cannot grasp. the books isnt too clear about it.
> > how can i find out the CIDR when the subnet mask and a host IP is
> > provided?[/color]
>
> Your question makes no sense. CIDR (Classless Inter Domain Routing) is a
> concept, a method to organize IP network addressing. Don't you mean the
> prefix ?[/color]

It's also a notation. The notation 192.168.100.0/24 is the CIDR
notation for 192.168.100.0 with network mask 255.255.255.0.

--
Barry Margolin, [email]barmar@alum.mit.edu[/email]
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
• 05-23-2009, 03:25 PM
skoalie
Re: how to find out CIDR
It's also a notation. The notation 192.168.100.0/24 is the CIDR
notation for 192.168.100.0 with network mask 255.255.255.0.

How do you figure the mask from the notation?