Calculate IP v4 ranges