Re: IP range to CIDR list VB6 utility?
From: Jim Carlock (anonymous_at_127.0.0.1)
Date: 09/20/04
- Next message: Larry Serflaten: "Re: which to learn? C, C#, VB6, VB.Net?"
- Previous message: WinGuy: "Re: IP range to CIDR list VB6 utility?"
- In reply to: WinGuy: "Re: IP range to CIDR list VB6 utility?"
- Next in thread: WinGuy: "Re: IP range to CIDR list VB6 utility?"
- Reply: WinGuy: "Re: IP range to CIDR list VB6 utility?"
- Messages sorted by: [ date ] [ thread ]
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!
- Next message: Larry Serflaten: "Re: which to learn? C, C#, VB6, VB.Net?"
- Previous message: WinGuy: "Re: IP range to CIDR list VB6 utility?"
- In reply to: WinGuy: "Re: IP range to CIDR list VB6 utility?"
- Next in thread: WinGuy: "Re: IP range to CIDR list VB6 utility?"
- Reply: WinGuy: "Re: IP range to CIDR list VB6 utility?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|