Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed little mistake #205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions book-2nd/principles/dv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ A router that uses distance vector routing regularly sends its distance vector o
v.add(Pair(d,R[d].cost))
for i in interfaces
# send vector v on this interface
send(v,interface)
send(v,i)


When a router boots, it does not know any destination in the network and its routing table only contains itself. It thus sends to all its neighbours a distance vector that contains only its address at a distance of `0`. When a router receives a distance vector on link `l`, it processes it as follows.
Expand Down Expand Up @@ -124,8 +124,8 @@ This count to infinity problem occurs because router `A` advertises to router `D
v=Vector()
for d in R[]:
if (R[d].link != l) :
v=v+Pair(d,R[d.cost])
send(v)
v.add(Pair(d,R[d].cost))
send(v,l)
# end for d in R[]
#end for l in interfaces

Expand All @@ -140,10 +140,10 @@ This technique is called `split-horizon`. With this technique, the count to infi
v=Vector()
for d in R[]:
if (R[d].link != l) :
v=v+Pair(d,R[d.cost])
v.add(Pair(d,R[d].cost))
else:
v=v+Pair(d,infinity);
send(v)
v.add(Pair(d,infinity))
send(v,l)
# end for d in R[]
#end for l in interfaces

Expand Down