I'm relatively new to the IP Address concept and trying to build a range checker.
USE CASE: The user gives one IP Address(can be IPv4/IPv6) and a range(can be 2 IPv4 addresses /2 IPv6 addresses/ 1 IPv4 and 1 IPv6 address).
I need to test if the given IP exists between the specified range.
I just wanted to know if the below cases are possible
Note: When talking about IPv6 addresses, I mean all IPv6 addresses and not just those that can be mapped to IPv4.
IPV6 and IPV4 is two different protocols, that don't intersect at all
Just check what pattern IPV4 matches and what pattern IPV6 matches
IPV4 consist of four parts, each part has value from 0-255 and separated with dot.
IPV6 consist of 8 octets, separated with colon sign.
And main reason, why it's unreal to find out, is that IPV4 use netmask for dividing IP address on network part and host part
At the same time IPV6 address is strictly divided on Routing prefix and interface id