2

In RFC 5952 - section 5 it is stated that for some IPv6 addresses it is recommended to give the mixed notation, if it has a certain prefix. However, it is unclear which prefixes are used for this, because it is stated that a prefix may be used if it is commonly used as a prefix for a IPv4-mapped address. Thus meaning basically any prefix could be used for this.

Now my question is:
May every IPv6 address be written as an IPv4-mapped IPv6-address?
If not, what are the exact rules for correctly writing an IPv4-mapped IPv6-address?

Community
  • 1
  • 1
Dennis
  • 323
  • 7
  • 17
  • 1
    sure, every IPv6 can be mapped to an IPv4, but since there's `2**128` IPv6 addresses and only `2**32` IPv4 addresses, you're going to end up with a LOT of collisions. – Marc B Feb 02 '15 at 21:25
  • 1
    I'm voting to close this question as off-topic because it's not a programming question. It belongs on [networkengineering.se], but see the comment.by @MarcB –  Feb 02 '15 at 21:28
  • @MarcB IPv4-mapped IPv6-addresses are still 128-bit addresses. It is just a different way of writing down the lower 32-bit part. My question has to do with the fact that it might not be "allowed" to write the lower 32-bit part as a IPv4-address for every IPv6-address. – Dennis Feb 02 '15 at 21:59

1 Answers1

0

You may use the IPv4 notation for the last 32 bits in any IPv6 address. The RFC you mention is about the recommended notation. It doesn't specify all correct notations. The RFC that defines that is https://www.rfc-editor.org/rfc/rfc4291#section-2.2 and it allows the IPv4 style notation (Note that it isn't called "IPv4-mapped IPv6-address", that is actually a special range of addresses that commonly used this notation style) for any address.

Community
  • 1
  • 1
Sander Steffann
  • 9,509
  • 35
  • 40