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
你能告訴一下它缺失的東西嗎?我的意思是你想了解什麼? –