How can we determine if an IPv6 address is within a private CIDR?
On IPv4 it's straightforward, the subnet and the DNS mask are simple enough to understand.
With IPv6 every resource I find looks like the table below - but my own local IPv6 address starts with fe80
, which doesn't seem to conform to the fd00
pattern indicated.
Can anyone help me understand private IPv6 ranges and why my own private IPv6 address would seem not to be in that range?
IPv6 does not have Private addresses the way IPv4 does. IPv6 used to have Site-Local addresses that were analogous to IPv4 Private addresses, but those were deprecated in favor of ULA (Unique Local Addressing), fc00::/7
, of which the second half of the addressing, fd00::/8
is available for local assignment, but requires the next 40 bits to be randomly chosen. IPv4 Private addresses and the (deprecated) IPv6 Site-Local addressing were expected to have the same addresses used in multiple sites, but IPv6 ULA is expected to be unique with little chance for duplicate addresses.
What you are looking at is a Link-Local address (in the fe80::/10
range). Packets using Link-Local addresses are confined to a single link, unlike IPv6 Global and ULA addresses. You cannot route packets with Link-Local addresses as all links use the same Link-Local network. You can route ULA addresses, but not on the public Internet. Global addresses are globally routable.