I also think that if you can't upgrade your database you're going to have other problems as well.
Be careful with this, a 32 bit hash can see collisions with remarkably low numbers. A 50% chance of a collision is seen with ~75k entries: http://preshing.com/20110504/hash-collision-probabilities/
Depends on your application as to whether this is a problem or not.
Estimating population sizes? "Unrecognised IP addresses?" Probably fine.
Interning the hash and using the real IP address in a database someplace? Probably not.
Thanks!
I also think that if you can't upgrade your database you're going to have other problems as well.