使用非常规子网掩码

发布于 2024-10-22 05:07:18 字数 335 浏览 1 评论 0原文

以普通面膜为例; 255.255.255.0 这给了我们 1111 1111.1111 1111.1111 1111.0000 0000 二进制,其中 1 代表网络 id,0 代表主机 id。 是否可以使用左侧全为 右侧全为 0 的布局? 示例:170.170.170.170 或二进制形式的 10101010.10101010.10101010.10101010。

也许最后只是多了一点? 11111111.11111111.11111111.00000001 或 255.255.255.1

也许反转整个掩码? 0.255.255.255

当然,您必须在(通过掩码)指定的位置使用指定的 id-type。

A normal mask for example; 255.255.255.0
this gives us 1111 1111.1111 1111.1111 1111.0000 0000 binary where ones represent network id, and zeroes represent host id.
Would it be possible to use a layout which doesn't have all ones to the left and zeroes to the right?
example: 170.170.170.170
or 10101010.10101010.10101010.10101010 in binary.

Maybe just one additional bit at the end?
11111111.11111111.11111111.00000001 or 255.255.255.1

Maybe reverse the whole mask?
0.255.255.255

Of course you would have to use the specified id-type for the (by the mask) specified place.

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

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

发布评论

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

评论(1

乞讨 2024-10-29 05:07:18

据我所知,子网划分是在 RFC 950 中定义的,其中内容如下:

由于标识子网的位是由位掩码指定的,因此它们在地址中不必相邻。但是,我们建议子网位是连续的,并且位于本地地址的最高有效位。

使用最高有效位来识别子网主要是简化日常操作(例如计算网络或主机地址)的实用选择,而无需进行复杂的计算。

也就是说,仅仅因为 RFC 说您可以使用非连续掩码,并不一定意味着有支持它的设备。

As far as I know, subnetting is defined in RFC 950, which says the following:

Since the bits that identify the subnet are specified by a bitmask, they need not be adjacent in the address. However, we recommend that the subnet bits be contiguous and located as the most significant bits of the local address.

Using the most significant bits to identify the subnet is mostly a practical choice to simplify everyday operations—such as figuring out a network or host address—without having to make complex calculations.

That said, just because the RFC says that you could use non-contiguous masks, that doesn't necessarily mean that there are devices out there that support it.

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