Checking IP address format to see if it is legitimate