首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >环回接口子网

环回接口子网
EN

Network Engineering用户
提问于 2020-11-22 07:23:05
回答 1查看 185关注 0票数 0

假设loopback接口在其网络中始终是唯一的,那么对于这些接口使用IPv4子网前缀比/32更短的实际原因是什么?

此外,为什么根据各种标准,IPv4回环地址是来自127.0.0.0/8网络的地址?这不是浪费了大约1600万个IP地址吗?

https://www.rfc-editor.org/rfc/rfc3330

代码语言:javascript
复制
   127.0.0.0/8 - This block is assigned for use as the Internet host
   loopback address.  A datagram sent by a higher level protocol to an
   address anywhere within this block should loop back inside the host.
   This is ordinarily implemented using only 127.0.0.1/32 for loopback,
   but no addresses within this block should ever appear on any network
   anywhere

有趣的是,对于IPv6环回地址( ::1/128用作回送),没有这样的套路。

https://www.rfc-editor.org/rfc/rfc4291

代码语言:javascript
复制
   The unicast address 0:0:0:0:0:0:0:1 is called the loopback address.
   It may be used by a node to send an IPv6 packet to itself.  It must
   not be assigned to any physical interface.  It is treated as having
   Link-Local scope, and may be thought of as the Link-Local unicast
   address of a virtual interface (typically called the "loopback
   interface") to an imaginary link that goes nowhere.
EN

回答 1

Network Engineering用户

发布于 2020-11-22 07:38:47

当为127.0.0.0/8循环地址定义IPv4块时,IPv4地址是类的,因此如果没有块中的整个网络类,就无法定义单个地址。

一旦对软件进行了编码以防止在网络中使用该范围(这是所有IPv4实现都必须识别和处理的范围),就不可能进行更改,因为更改需要花费大量的金钱。此外,人们开始使用回环范围来测试应用程序,从块中的一个地址到块中的另一个目标地址,而一些错误的编程导致一些应用程序使用这个范围来进行进程间通信,而不是使用正式的操作系统版本的IPC。

票数 2
EN
页面原文内容由Network Engineering提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://networkengineering.stackexchange.com/questions/71129

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档