```Distance Vector Routing
박주호
Introduction.
 Modern computer Network generally
use Dynamic routing algorithms
rather than
The static one.
 Two dynamic algorithm
– Distance vector routing
– Link state routing
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */
2
Distance vector routing
 This algorithms operate by
– Having each router maintain a table
– The table(i.e vector) give
 the best known distance to each destination and
 which line to use to get there.
Updated by exchanging information with the
neighbors.
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */
3
History
 Sometimes called by other names…
 Distributed Bellman-Ford routing algorithm(1957)
 Ford-Fulkerson algorithm(1962)
 It was original ARPANET routing algorithm
 And was used
– In the Internet(RIP)
– In early versions of DECnet and Novell’s IPX
 AppleTalk and Cisco routers use improved
distributed vector protocols.
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */
4
The Routing table
 Each router maintains a routing table
– Contain one entry.
– Two part of one entry
 The preferred outgoing line
 An estimate of the time or distance
distance
20
10
Line
A
B
 The router is assumed to know the
“distance” to each of its neighbors.
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */
5
The Metric of distance
 Number of hops
– The distance is just one hop
 Time delay in milliseconds
– The router can measure…
– Using special ECHO packets(timestamps)
 Total number of packets queued along
the path
– The router simply examines each queue
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */
6
Algorithm
A
E
B
C
F
G
D
H
To
A
I
H
K
A
0
24
20
21
8
A
B
12
36
31
28
20
A
C
25
18
19
36
28
I
D
40
27
8
24
20
H
E
14
7
17
I
30
I
18
H
12
H
10
I
F
G
H
I
J
K
L
(a)
Distances to (b)
from
each
neighbors
neighbor
New estimated
dealy from J
Line
I
30
JA
=228
23
20
19
40
JA
= 68 31
18
31
17 AB
20 = 12
0
19
JB21= JA+AB
20
0
14 =22
J
9
11
7
10
0
-
K
24
22
22
0
6
K
L
29
33
9
9
15
K
JA
JI
JH
JK
delay delay delay delay
is
is
is
is
8
10
12
6
J’s four neighbors
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */
New
routing
table
for J
7
The Count-to-Infinity Problem
 Distance vector routing works in theory
– A serious drawback in practice
 Reacts rapidly to good news,
 But leisurely to bad news.
A
B
C
D
E
 
1 
1 2
1 2
1 2



3
3




4
A
Initially
After 1 exchange
After 2 exchange
After 3 exchange
After 4 exchange
B
C
1
3
3
5
5
7
7
2
2
4
4
6
6
8
3
3
3
5
5
7
7
4
4
4
4
6
6
8




[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */
D
E
Initially
After 1 exchange
After 2 exchange
After 3 exchange
After 4 exchange
After 5 exchange
After 6 exchange
8
 In case good news.
– If longest path of subnet is N hops,
– Everyone will know good news.
 In case bad news.
– Infinity…
– Set infinity to the longest path + 1.
– If metric is time delay, no well-defined
upper bound.
– There is a tradeoff…
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */
9
The Split Horizon Hack
 Many ad hoc solutions to the problem
have been proposed…
– But, complicate , useless …
 One of them will be described(why fail?)
 The Split Horizon Hack algorithm
A
B
C
D
E
1




2 3 4 Initially
2 3 4 After 1 exchange
 3 4 After 2 exchange
  4 After 3 exchange
   After 4 exchange
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */
10
A
B
C
Router
D
Fig. 5-12. An example where split horizon fails.
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */
11
```