ipaddr (rubygems): IPAddr provides a set of methods to manipulate an IP address. Both IPv4 and IPv6 are supported. 
Keywords: ruby