为什么IPv6使用冒号作为分隔符而不是点?

Tak*_*umi 28 ipv6

我找不到IPv6使用冒号作为分隔符而不是点的原因.
当地址用端口号描述时,对我来说似乎很笨拙.

[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443
Run Code Online (Sandbox Code Playgroud)

使用结肠的理由是什么?

mpo*_*llo 36

我查看了较旧的IPv6 RFC以找到有关历史的线索,但我认为答案在于RFC 4291第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
Run Code Online (Sandbox Code Playgroud)

也就是说,如果IPv6地址以点分隔,则无法"嵌入"与IPv4兼容的地址.

为了解释你对冒号与URL中的端口号冲突的影响,我认为答案是,在20世纪90年代初设计IPv6时,超文本URL同时被设计.由于端口号与IP地址是分开的,因此没有用于指定(端口,地址)元组的标准.(telnet例如,命令行客户端使用空格将IP地址与端口分开.)

  • @Thomas,我没有确切的时间表,但您可以从文档的日期推断出使用IPv6的人不一定考虑超文本用例.直到1993年之后很多年,网络才开始流行.相反,我认为很明显URL中的IPv6地址格式是事后的想法.我认为这两个小组正在单独制定这些标准,如果他们协调一致,结果可能会有所不同. (2认同)