Start with distance-vector:
0 for self,
D for neighbor at distance D.
Every 30 seconds,
For each neighbor,
Send the current distance vector, with entries that pass trough
that neighbor set to 16.
When receiving a distance-vector from a neighbor,
Save the received distance vector.
If any estimated distance, trough this neighbor, has changed,
Update the current vector, but cap at 16.
When 180 seconds has passed since the last message from some neighbor,
Set it's distance to 16.
Send the updated distance vector as above.
180秒是标准的超时值。距离16被认为是无限的。
由于节点不会立即知道网络中的每个其他节点,因此无法立即添加所有列。最简单的方法是使用表格:
(Neighbor, Destination, Distance)
当前矢量将是每个目标的最小距离加1。
上面的伪代码实现水平分割和逆向毒化,但不触发更新
了解更多:
您是否检查过: - http://cseweb.ucsd.edu/classes/fa10/cse123/lectures/123-fa10-l13.pdf –
是的,该文件解释得很好,但不是很“清楚”。我读了3次以上。还有很多东西都不见了。 – jsp99
你能告诉一下它缺失的东西吗?我的意思是你想了解什么? –