我正在阅读关于IPv6的RFC 2460,它说“如果跳数限制递减到零,则丢弃数据包”,这就是说,如果路由器将数据包的跳数限制递减到0,另一个路由器不能接收跳数限制为0的数据包?
我问这个问题,因为我读过谷歌:“如果路由器收到跳数限制为0的数据包,或路由器递减数据包的跳数限制为0”丢弃数据包。 在我看来,第二种情况是不可能发生的。
我对吗 ? 谢谢 !
通常情况下,路由器永远不会收到一个跳数限制为零的数据包,但由于编码或恶意计算机或networking恶化,可能会在某个时刻发生。
问题是当你减less零的东西时会发生什么。 由于它是一个无符号的8位数字,它将环绕并且继续另外255跳。
你有没有在2460:
8.2 Maximum Packet Lifetime Unlike IPv4, IPv6 nodes are not required to enforce maximum packet lifetime. That is the reason the IPv4 "Time to Live" field was renamed "Hop Limit" in IPv6. In practice, very few, if any, IPv4 implementations conform to the requirement that they limit packet lifetime, so this is not a change in practice. Any upper-layer protocol that relies on the internet layer (whether IPv4 or IPv6) to limit packet lifetime ought to be upgraded to provide its own mechanisms for detecting and discarding obsolete packets.