Re: IP range to CIDR list VB6 utility?

From: Jim Carlock (anonymous_at_127.0.0.1)
Date: 09/20/04


Date: Sun, 19 Sep 2004 22:08:33 -0400

Where did you get your list of IP numbers from ?

Usually folks get a block, something like a class B set of
IP numbers or a class C set if they're providing webhosting.

If it's for an internal LAN, you don't need to buy such blocks,
you'll only need one IP number and then configure the internal
network on a 192.168.... or 10..... subnet.

Class A:
217.224.0.0/8 -> 217.0.0.0 to 217.255.255.255, or
Class B:
217.224.0.0/16 -> 217.224.0.0 to 217.224.255.255, or
Class C:
217.224.0.0/24 -> 217.224.0.0 to 217.224.0.255

I see the following:

route: 217.224.0.0/11
descr: Deutsche Telekom AG, Internet service provider
origin: AS3320
member-of: AS3320:RS-PA-TELEKOM

You buy a block of numbers from these guys?

-- 
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.
"WinGuy" wrote:
<snip>...</snip>
The value range of an example 217.224.0.0 through 217.237.161.47 address
range can be represented by a LIST of netmasks that together define only
that address range and nothing else. But I have to use CIDR (/slash)
notation because my firewall rules require it, and it too requires building
a LIST in that notation format. Doing it any other way in that example would
result in exclusion of (or the addition of) addresses to the range.   It's
not the conversion of addresses to binary that is causing me grief, it's the
building of the CIDR *list* that's driving me bonkers.  :(
For the example range of 217.224.0.0 through 217.237.161.47 that network
range list would look like this:
217.224.154.0/13    'through 217.231.255.255
217.232.0.0/14        'through 217.235.255.255
217.236.0.0/16        'through 217.236.255.255
217.237.0.0/17        'through 217.237.127.255
217.237.128.0/19    'through 217.237.159.255
217.237.160.0/24    'through 217.237.160.255
217.237.161.0/27    'through 217.237.161.31
217.237.161.32/28  'through 217.237.161.47
or, using netmask to generate that exact same network range list:
217.224.154.0    'netmask 255.248.0.0
217.232.0.0        'netmask 255.252.0.0
217.236.0.0        'netmask 255.255.0.0
217.237.0.0        'netmask 255.255.128.0
217.237.128.0    'netmask 255.255.224.0
217.237.160.0    'netmask 255.255.255.0
217.237.161.0    'netmask 255.255.255.224
217.237.161.32  'netmask 255.255.255.240
Either way, only that exact 217.224.0.0 through 217.237.161.47 address range
would be acted upon, and nothing else. Using just 1 netmask would result in
either limiting or expanding the network address range - this case requires
8 iterations (this number of iterations varies depending on the address
range), and so I must calculate a list (and I must use CIDR notation for the
firewall). That's the part I need help with -- how to do the iteration to
produce the list. The logic is not as easy and as straight forward for me as
it seems that it should be!


Relevant Pages

  • Re: CIDR Explanation
    ... slash notation that's becoming more common. ... CIDR or Classless Internet Domain Routing is VERY similar to subnetting and is ... This two part address is built of a network address and a host address. ... TCP/IP Classes allow for a 'default' subnet mask to identify the network from ...
    (Security-Basics)
  • Re: multiple interfaces on same subnet?
    ... netmask with ifconfig rather than the CIDR / notation: ... other hosts on the network will. ... configure this kind of invalid subnet. ...
    (freebsd-questions)
  • Re: RADIUS for MAC authentication in WLAN, how doing it?
    ... And some just had them grandfathered from before CIDR. ... But if you're running a public network, ... 15 APs, with, say, 150 users concurrent, evenly spread. ... Then again, if the NetBSD box is NOT to route all traffic, just to ...
    (comp.unix.bsd.netbsd.misc)
  • RE: CIDR Explanation
    ... When you specify a subnet mask to an IP address, ... and the remaining 8 bits as host address. ... In CIDR, it's no harder to ... > segregate parts of the network. ...
    (Security-Basics)
  • Re: RADIUS for MAC authentication in WLAN, how doing it?
    ... indoubtely that makes CIDR really ... > up into multiple pools. ... those issues as soon as the network is fully functional. ... Each wireless device is logged and, ...
    (comp.unix.bsd.netbsd.misc)

Quantcast