IPv6的压缩规则

发布于 2025-02-08 11:45:02 字数 202 浏览 2 评论 0 原文

我在压缩IPv6地址时遇到困难: 8 BFA:9 9 F 0:D 4 C 5:0 B 8 C:0 F 6 F:0 4 DF:2 8 0 4:2 8 3 D D d

我认为是: 8BFA:99F:D4C5:B8C:F6F:4DF:284:283D

不幸的是,这是不正确的。

I'm having trouble compressing the IPv6 address: 8​b​f​a​:​9​9​f​0​:​d​4​c​5​:​0​b​8​c​:​0​f​6​f​:​0​4​d​f​:​2​8​0​4​:​2​8​3​d​

I think it would be: 8bfa:99f:d4c5:b8c:f6f:4df:284:283d

Unfortunately, this is not correct.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

放血 2025-02-15 11:45:02

就像您每天使用的常规小数号一样,只能删除领先的零。中间的尾零和零必须留下来。

如果可以删除其他是 0284 2084 2804 ,还是 2840

Just like regular decimal numbers you work with every day, only leading zeros can be removed. Trailing zeros and zeros in the middle must stay.

If the other ones could be removed you wouldn't know whether 284 means 0284, 2084, 2804, or 2840.

不寐倦长更 2025-02-15 11:45:02

Hexa 99f0拐杖被压缩到Hexa 99f,因为它们的值不同。

HEXA 0B8C可以压缩到HEXA B8C,因为左零不会更改两个最终值。

IPv6地址由8组4组组成。如果它们的两个(或更多)范围是0000,则可以替代他们。例如:

0111:0022:0003:0000:0000:0006:0070:0800 = 111:22:3::6:70:800 

Hexa 99f0 canot be compressed to hexa 99f because they are not the same value.

Hexa 0b8c can be compressed to hexa b8c because left zeroes dont change both final value.

IPv6 address are composed of 8 groups of 4 hexa-digits. If two (or more) consecutives of them are 0000 you can supress they. E.G:

0111:0022:0003:0000:0000:0006:0070:0800 = 111:22:3::6:70:800 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文