In: Computer Science
Exercise 2: Identifying Invalid IP Addresses with the default Subnetmask, explain your answer a. 131.107.256.80 b. 222.222.255.222 c. 231.200.1.1 d. 126.1.0.0 e. 0.127.4.100 f. 190.7.2.0 g. 127.1.1.1 h. 198.121.254.255 i 255.255.255.255
Solution:
(2)
The answer will be "(a) 131.107.256.80"
(a)
Given,
=>IP address = 131.107.256.80
Explanation:
=>IP address is of 32 bits, each octet contains 8 bits.
=>8 bits values can be from 00000000(0) to 11111111(255).
=>So range of each octet = [0, 255]
=>In the given IP address third octet value is 256 hence it is not a valid IP address.
(b)
Given,
=>IP address = 222.222.255.222
Explanation:
=>In the given IP address all the octet's value come in the range [0, 255] hence the given IP address is a valid IP address.
(c)
Given,
=>IP address = 231.200.1.1
Explanation:
=>In the given IP address all the octet's value come in the range [0, 255] hence the given IP address is a valid IP address.
(d)
Given,
=>IP address = 126.1.0.0
Explanation:
=>In the given IP address all the octet's value come in the range [0, 255] hence the given IP address is a valid IP address.
(e)
Given,
=>IP address = 0.127.4.100
Explanation:
=>In the given IP address all the octet's value come in the range [0, 255] hence the given IP address is a valid IP address.
(f)
Given,
=>IP address = 190.7.2.0
Explanation:
=>In the given IP address all the octet's value come in the range [0, 255] hence the given IP address is a valid IP address.
(g)
Given,
=>IP address = 127.1.1.1
Explanation:
=>In the given IP address all the octet's value come in the range [0, 255] hence the given IP address is a valid IP address
(h)
Given,
=>IP address = 198.121.254.255
Explanation:
=>In the given IP address all the octet's value come in the range [0, 255] hence the given IP address is a valid IP address
(i)
Given,
=>IP address = 255.255.255.255
Explanation:
=>In the given IP address all the octet's value come in the range [0, 255] hence the given IP address is a valid IP address
I have explained each and every part with the help of statements attached to it.