July 14, 2018 at 11:57 pm
Hi,
I have table of IPv6 range such as:
2001:254::/32 or 2001:420:4490::/44
Does anybody have function to check if given IPv6 address is between a range?
For example:
b36a:7501:7451:3b1:e6ff:5f12:62d4:7a51 |
Thanks,
Ran.
July 15, 2018 at 12:35 am
ran.ovadia - Saturday, July 14, 2018 11:57 PMHi,I have table of IPv6 range such as:
2001:254::/32 or 2001:420:4490::/44
Does anybody have function to check if given IPv6 address is between a range?
For example:
b36a:7501:7451:3b1:e6ff:5f12:62d4:7a51 Thanks,
Ran.
As this can be done in few ways, but one would have to know more about how / why to determine which method to use.
😎
The IPv6 is in simple terms, just a 128 bit number and address blocks are normally presented using CIDR (Classless Inter-Domain Routing) notation where the block prefix size in bits is the number after the slash. This means that for the range 2001:254::/32, there are 2^(128-32) = 2^96 = 79,228,162,514,264,337,593,543,950,336 addresses, all starting with the same 32 bit prefix.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply