Validating IPv6 netmask

别说谁变了你拦得住时间么 提交于 2019-12-06 11:28:41

What is your use case? Normally in IPv6 your addresses will be auto-generated from a /64 prefix your router provides.

You don't usually see a netmask written out in IPv6. Usually you will see a prefix length. For example:

2001:db8:0:160::/64

would have a netmask of

ffff:ffff:ffff:ffff::

But you would only ever see the former.

Technically the better answer may be that with IPv6 you no longer have a netmask. With IPv6 you have a "prefix length" which you can interpret as the number of 1 bits in an equivalent netmask.

Taking the concept of "prefix length" you no longer have to have "netmask rules", although there pretty much is only one: the netmask should consist of only left aligned contiguous 1 bits.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!