Added support for subnets and ip ranges.