added validation for ip not in subnet range