Why IPv6 use colon as delimiter instead of dot? [closed]
The community reviewed whether to reopen this question 11 months ago and left it closed:
Not suitable for this site This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain whe开发者_JS百科re the question may be able to be answered.
I cannot find the reason why IPv6 use colon as delimiter instead of dot.
When address is described with port number, it seems clumsy to me.[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443
What justify using colon?
I looked through the older IPv6 RFCs in order to find a clue about the history, but I think the answer lies in RFC 4291 section 2.2.3:
3. An alternative form that is sometimes more convenient when dealing
with a mixed environment of IPv4 and IPv6 nodes is
x:x:x:x:x:x:d.d.d.d, where the 'x's are the hexadecimal values of
the six high-order 16-bit pieces of the address, and the 'd's are
the decimal values of the four low-order 8-bit pieces of the
address (standard IPv4 representation). Examples:
0:0:0:0:0:0:13.1.68.3
0:0:0:0:0:FFFF:129.144.52.38
or in compressed form:
::13.1.68.3
That is, you wouldn't be able "embed" an IPv4-compatible address if IPv6 addresses were dot-delimited.
To address your implication about the colon clashing with a port number in a URL, I think the answer is that at the time that IPv6 was being designed in the early 1990s, hypertext and the URL were being designed at the same time. Since port numbers are separate from IP addresses, there was no standard for specifying a (port, address) tuple. (The command-line telnet
client, for example, uses a space to separate the IP address from the port.)
精彩评论