Boundaries of IPV4

I received a daily test concerning Ipv4 which makes the IPv4 incomprehensible for me. I actually tested
"https://350.400.260.400 " with the aim that it returns null because 350,400,260 and 400 are all greater than 255 which is according to the grammar the maximum. But I received this :
image
and now I don’t understand the Ipv4 address anymore.
Can someone help, please.

According to the grammar 350.400.260.400 is an invalid IPv4 address, but a valid reg-name, as all numbers and “.” are valid reg-name characters. If you want to check if 350.400.260.400 is a valid IPv4 adress, I would recommend using the isIPv4Adress(‘insert host here’) function from the SimpleTests.java file instead.

1 Like

Thanks for the response.
Does it mean that we can’t have an Invalid IPv4? Since when the numbers are greater than 255 they become reg-name characters.

1 Like

A host ist per grammar either an IPv4Addressor areg-name. An IPv4Addressis of the form[0-255].[0-255].[0-255].[0-255]`:

 * host          = IPv4address / reg-name
 *
 * IPv4address   = dec-octet "." dec-octet "." dec-octet "." dec-octet

Therefore, it is no IPv4address when too large numbers occur.