Decision Table for IP Address Validation:
Criteria | Valid IP Address | Invalid IP Address |
---|---|---|
All octets have valid values | Yes | One or more octets are missing One or more octets have an invalid value |
Correct number of dots | Yes | Incorrect number of dots |
Non-numeric characters absent | Yes | Non-numeric characters present |
Valid Input Partition:
Value | Description |
---|---|
192.168.1.1 | A valid IP address with four octets and correct values |
10.10.10.10 | A valid IP address with four octets and correct values |
172.16.0.0 | A valid IP address with four octets and correct values |
255.255.255.255 | A valid IP address with four octets and correct values |
Invalid Input Partition:
One or more octet is missing:
Value | Description |
---|---|
192..1.1 | One of the octet is missing |
10.10.10. | Last octet is missing |
172..0 | One of the octet is missing |
One or more octet has an invalid value:
Value | Description |
---|---|
256.1.1.1 | The first octet has a value outside the range of [0, 255] |
10.-1.10.10 | The second octet has a negative value |
172.3000..0 | The third octet has a value greater than 255 |
Incorrect number of dots:
192.168.1 | One dot is missing | |
192.168.1.1. | Extra dot at the end | |
192.168..1.1 | Two dots are missing | |
192.168.1.1.1 | An extra dot in the middle |
Non-numeric characters:
192.168.a.b | Non-numeric character ‘a’ and ‘b’ present in the address | |
10.b10.c | Non-numeric character ‘b’ and ‘c’ present in the address | |
123.abcd.e | Non-numeric character ‘a’, ‘b’, ‘c’, and ’d’ present in the address |
Boundary Value Analysis:
0.0.0.0 | All octets have a value of 0 | |
0.0.0.1 | One octet has a value of 0, others are non-zero | |
1.0.0.0 | One octet has a value of 1, others are zero | |
255.255.255 | Last octet is missing | |
255..255 | The first and last octet are filled with max values (i.e., 255) and others are missing | |
.255 | The first octet is missing | |
.256 | The first octet is missing and second contains an invalid value | |
.10 | The first octet is missing and second contains a valid value | |
.10..100 | First two octets are empty, third contains valid value and last one is empty | |
.100 | First three Octets are empty, fourth one contains valid number | |
300:200:100:50 Random invalid IP address |