在距离矢量路由中计数到无穷大
count to infinity in distance vector routing
我很难理解如何计算到无穷大的关键点。
假设我们有一个网络
A-B-C-D-E
每个 link 的成本是 1。
根据 Tanenbaum 的说法,
when A
goes down, B
will update its cost towards A
as infinity. But B
receives an advertisement from C
which says "I can reach A
with a cost of 2". Now, B
can reach C
with a cost of 1, so it updates the distance to A
as 3.
下一部分我遇到了问题。
他说,
now C
notices that both its neighbors can reach A
with a cost of 3.
"So C
will update distance to A
as 4"
为什么会这样?因为已经 C
认为它可以达到 A
成本为 2.
根据 Bellman Ford 方程,此成本小于成本 3+1=4。为什么不应该简单地保持 2 作为距离而不是将其更改为 4?
因为之前从 C 到 A 的路线是 经 B(费用为 2)。由于现在 B 正在向 C 宣布一条成本为 3 的新路由,因此 C 必须将成本更新为 4。这可能发生在从 B 到 A 的路径发生变化且成本更高的情况下; C 必须使用新成本。
我很难理解如何计算到无穷大的关键点。
假设我们有一个网络
A-B-C-D-E
每个 link 的成本是 1。
根据 Tanenbaum 的说法,
when
A
goes down,B
will update its cost towardsA
as infinity. ButB
receives an advertisement fromC
which says "I can reachA
with a cost of 2". Now,B
can reachC
with a cost of 1, so it updates the distance toA
as 3.
下一部分我遇到了问题。
他说,
now
C
notices that both its neighbors can reachA
with a cost of 3. "SoC
will update distance toA
as 4"
为什么会这样?因为已经 C
认为它可以达到 A
成本为 2.
根据 Bellman Ford 方程,此成本小于成本 3+1=4。为什么不应该简单地保持 2 作为距离而不是将其更改为 4?
因为之前从 C 到 A 的路线是 经 B(费用为 2)。由于现在 B 正在向 C 宣布一条成本为 3 的新路由,因此 C 必须将成本更新为 4。这可能发生在从 B 到 A 的路径发生变化且成本更高的情况下; C 必须使用新成本。