By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,586 Members | 2,445 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,586 IT Pros & Developers. It's quick & easy.

Matching IP Address to subnets.

P: n/a
Hi ya all.

I am creating a small solution to keep statistics about IP Address
accessing a certain system at my workplace. The idea is to be able to
group the IP address to a certain subnet so we can see which class of
users is accessing the system the most.

During development of the collection process I've been using Postgres,
Postgres has this a special datatype called CIDR. I can insert an IP
Address into a table using this field and then with a simple where
clause I can match the IP address against up with my reference table
(containing a list of roughly 40 subnets) to group the connections.

this would be very easy if I only had to group by C-Class net's but
...... life isn't so easy ;)

I can only hope that someone has already done this or can give me ideas
on how to solve this using DB2. Currently my best idea is to use
Postgres for the collection process and subnet maching and then export
the data into DB2. I don't like that idea as it gives more complicity
to the system and I have to run and manage two database systems.

I haven't given finalized the table design because of this. So I am
open to any ideas even if I have to redesign the table design.

Hope to see some juicy ideas!

thanks and best regards,
Arni Snorri Eggertsson
arnie - at - gormur.com

Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.