为什么IPv6使用冒号作为分隔符而不是点?
问题描述:
我无法找到IPv6使用冒号作为分隔符而不是点的原因。
当地址用端口号描述时,对我来说似乎很笨拙。为什么IPv6使用冒号作为分隔符而不是点?
[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443
使用冒号的理由是什么?
答
我通过older IPv6 RFCs看着,以便找到一个关于历史的线索,但我认为,答案在于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
也就是说,你将不能够“嵌入”的IPv4的如果IPv6地址是由点分隔的,则为兼容地址。
解决对结肠的URL端口号冲突的含义,我认为答案是,在时间IPv6 was being designed in the early 1990s,hypertext和URL were being designed在同一时间。由于端口号与IP地址分开,因此没有指定(端口,地址)元组的标准。 (例如,命令行telnet
客户端使用空格将IP地址与端口分开。)
我不明白为什么此问题已关闭 - 对我来说这似乎是一个完全合理的问题。了解决策的历史原因通常是有建设性的,尤其是有助于避免将来做出同样的错误决定。 – LordScree 2012-02-09 15:17:11
难道你不知道你不能在ModeratorOverflow上提问吗? – 2017-09-13 15:21:58