大网数据广告活动
服务器运维问答

Does 0.0.0.0/7 represent the same range as 1.0.0.0/8?

· 52CE 我爱测

The range of 0.0.0.0/7 is 0.0.0.0 - 1.255.255.255 . The range of 1.0.0.0/8 is 1.0.0.0 - 1.255.255.255 . AFAIK , 0.0.0.0/8 ( 0.0.0.0 - 0.255.255.255 ) is not usable. So, do these represent the same range practically ? ip route add…

问题原文

原帖链接 · Szymon Marczak · CC BY-SA 4.0

The range of 0.0.0.0/7 is 0.0.0.0 - 1.255.255.255.
The range of 1.0.0.0/8 is 1.0.0.0 - 1.255.255.255.

AFAIK, 0.0.0.0/8 (0.0.0.0 - 0.255.255.255) is not usable. So, do these represent the same range practically?

ip route add 0.0.0.0/7 dev eth1 # 1
ip route add 1.0.0.0/8 dev eth1 # 2

Is the effect the same?

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 4.0

Clearly these are not the same.

However, nothing in 0.0.0.0/8 is a valid destination address, so the effect of each route would be the same. Attempts to connect to anything in 0.0.0.0/8 would just fail as always with an Invalid argument error, while attempts to connect to 1.0.0.0/8 would be routed as specified.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-11-05)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。