技术头条 - 一个快速在微博传播文章的方式     搜索本站
您现在的位置首页 --> 网络系统 --> IPv6和IPv4的掩码区别

IPv6和IPv4的掩码区别

浏览:2829次  出处信息

    我们知道host或router等设备IPv4的地址配置中,一般提供”IPAddress/PrefixLen”或者”IPAddress network-mask 255.255.255.0”这类的地址配置方式。也就是说可以采用指定子网掩码长度或者明确写出子网前缀这两种方式配置地址。而到了IPv6之中,只能使用”IPv6Address/PrefixLen”这种方式。

    看官可能会觉得这个无所谓啊,两者是等价的,其实不然。

    如果提供指定掩码配置的方式我们可以配置出如下的”255.0.255.0”这样的不连续掩码,而IPv6无法达成这样的效果。

    事实上,在IPv4发展处CIDR之后,并未要求掩码连续,在CIDR的早期标准RFC1519之中有如下描述:

   It is also worthwhile to mention that once inter-domain protocols
   which support classless network destinations are widely deployed, the
   rules described by this plan generalize to permit arbitrary
   super/subnetting of the remaining class A and class B address space
   (the assumption being that classless inter-domain protocols will
   either allow for non-contiguous subnets to exist in the system or
   that all components of a sub-allocated class A/B will be contained
   within a single routing domain).

    明确指出掩码可以不连续(non-contiguous ),这段描述在其更新标准RFC 4632中 被删掉了。

    在实际应用中确实听到过某用户要求支持这样不连续的掩码,具体需求没有详细了解。

    在IPv6中不连续掩码都无法配置,显然是不存在的。

建议继续学习:

  1. 子网计算工具    (阅读:2038)
  2. umask补习班    (阅读:1757)
QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习
© 2009 - 2024 by blogread.cn 微博:@IT技术博客大学习

京ICP备15002552号-1