SlideShare a Scribd company logo
Network Layer
Routing
UNICAST ROUTING PROTOCOLS
 A routing table can be either static or dynamic.
 A static table is one with manual entries.
 A dynamic table is one that is updated automatically
when there is a change somewhere in the Internet.
 A routing protocol is a combination of rules and
procedures that lets routers in the Internet inform each
other of changes.
Autonomous systems
Popular routing protocols
Bellman Ford Algorithm or Ford Fulkerson Algorithm
Distance vector routing
Distance vector routing tables
Initialization of tables in distance vector routing
In distance vector routing, each node shares its routing table with its immediate
neighbors periodically (30s) and when there is a change.
Updating in distance vector routing
 A problem with distance-vector routing is that
any decrease in cost (good news) propagates
quickly, but any increase in cost (bad news) will
propagate slowly.
The problem is referred to as count to infinity. It
sometimes takes several updates before the cost
for a broken link is recorded as infinity by all
routers.
Problem with distance vector routing
LINK STATE ROUTING
 Link state routing has a different philosophy from that of
distance vector routing.
 In link state routing, if each node in the domain has the
entire topology of the domain—the list of nodes and links,
how they are connected including the type, cost (metric),
and the condition of the links (up or down)—the node can
use the Dijkstra algorithm to build a routing table.
Concept of link state routing
Link state knowledge
Building Routing Tables
 Creation of the states of the links by each
node, called the link state packets (LSP)
 Dissemination of LSPs to every other
routers, called flooding (efficiently)
 Formation of a shortest path tree for each
node
 Calculation of a routing table based on the
shortest path tree
Creation of LSP
• LSP data: E.g. the node ID, the list of links, a
sequence number, and age.
• LSP Generation
– When there is a change in the topology of
the domain
– On a periodic basis
• There is no actual need for this type of LSP,
normally 60 minutes or 2 hours
Dijkstra algorithm
Example of formation of shortest path tree
Forming shortest path three for router A in a graph
Areas in an autonomous system
Types of links
Point-to-point link
Transient link
Stub link
PATH VECTOR ROUTING
 Distance vector and link state routing are both interior
routing protocols.
 They can be used inside an autonomous system. Both of
these routing protocols become intractable when the
domain of operation becomes large.
 Distance vector routing is subject to instability if there is
more than a few hops in the domain of operation.
 Link state routing needs a huge amount of resources to
calculate routing tables. It also creates heavy traffic
because of flooding.
 There is a need for a third routing protocol which we call
path vector routing.
Initial routing tables in path vector routing
Stabilized tables for three autonomous systems
Internal and external BGP sessions
BGP supports classless addressing and CIDR.
Unicasting
In unicasting, the router forwards the received packet through only one of its
interfaces.
Multicasting
In multicasting, the router may forward the received packet through several of
its interfaces.
1. Consider a network with five nodes, N1 to N5, as shown below.
The network uses a Distance Vector Routing protocol. Once the routes have stabilized, the
distance vectors at different nodes are as following. N1: (0, 1, 7, 8, 4)
N2: (1, 0, 6, 7, 3) N3: (7, 6, 0, 2, 6) N4: (8, 7, 2, 0, 4) N5: (4, 3, 6, 4, 0)
Each distance vector is the distance of the best known path at the instance to nodes, N1 to
N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in
both directions. In each round, all nodes exchange their distance vectors with their
respective neighbors. Then all nodes update their distance vectors. In between two rounds,
any change in cost of a link will cause the two incident nodes to change only that entry in
their distance vectors. The cost of link N2-N3 reduces to 2(in both directions). After the next
round of updates, what will be the new distance vector at node, N3.
(A) (3, 2, 0, 2, 5)
(B) (3, 2, 0, 2, 6)
(C) (7, 2, 0, 2, 5)
(D) (7, 2, 0, 2, 6)
Exercise
1. Consider a network with five nodes, N1 to N5, as shown below.
The network uses a Distance Vector Routing protocol. Once the routes have stabilized, the
distance vectors at different nodes are as following. N1: (0, 1, 7, 8, 4)
N2: (1, 0, 6, 7, 3) N3: (7, 6, 0, 2, 6) N4: (8, 7, 2, 0, 4) N5: (4, 3, 6, 4, 0)
Each distance vector is the distance of the best known path at the instance to nodes, N1 to
N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in
both directions. In each round, all nodes exchange their distance vectors with their
respective neighbors. Then all nodes update their distance vectors. In between two rounds,
any change in cost of a link will cause the two incident nodes to change only that entry in
their distance vectors. 52. The cost of link N2-N3 reduces to 2(in both directions). After the
next round of updates, what will be the new distance vector at node, N3.
(A) (3, 2, 0, 2, 5)
(B) (3, 2, 0, 2, 6)
(C) (7, 2, 0, 2, 5)
(D) (7, 2, 0, 2, 6)
Exercise
N3: (7, 2, 0, 2, 6)
N3 knows (1,0,2,7,3) from N2 and (8,7,2,0,4) from N4.
N3: (3,2,0,2,5)
2. Consider the same data as given in previous question.
After the update in the previous question, the link N1-N2 goes down. N2 will
reflect this change immediately in its distance vector as cost, infinite. After the
NEXT ROUND of update, what will be cost to N1 in the distance vector of N3?
(A) 3
(B) 9
(C) 10
(D) Infinite
Exercise
2. Consider the same data as given in previous question.
After the update in the previous question, the link N1-N2 goes down. N2 will
reflect this change immediately in its distance vector as cost, infinite. After the
NEXT ROUND of update, what will be cost to N1 in the distance vector of N3?
(A) 3
(B) 9
(C) 10
(D) Infinite
Exercise
N1: (0,infinity,3,8,4)
N2: (infinity,0,2,4,3)
N3: (3,2,0,2,5)
N4: (8,4,2,0,4)
N5: (4,3,5,4,0)
After the next round of exchange, N3 knows
the distance vector (infinity,0,2,4,3) from N2
and (8,4,2,0,4) from N4.
So N3 will update its distance vector to
(10,2,0,2,5).
3. Consider a network with 6 routers R1 to R6 connected with links having weights as
shown in the following diagram
All the routers use the distance vector based routing algorithm to update their routing
tables. Each router starts with its routing table initialized to contain an entry for each
neighbor with the weight of the respective connecting link. After all the routing tables
stabilize, how many links in the network will never be used for carrying any data?
(A) 4
(B) 3
(C) 2
(D) 1
Exercise
Sol: We can check one by one all shortest distances. When we check for all shortest
distances for Ri we don’t need to check its distances to R0 to Ri-1 because the network
graph is undirected.
Following will be distance vectors of all nodes.
Shortest Distances from R1 to R2, R3, R4, R5 and R6
R1 (5, 3, 12, 12, 16)
Links used: R1-R3, R3-R2, R2-R4, R3-R5, R5-R6
Shortest Distances from R2 to R3, R4, R5 and R6
R2 (2, 7, 8, 12)
Links used: R2-R3, R2-R4, R4-R5, R5-R6
Shortest Distances from R3 to R4, R5 and R6
R3 (9, 9, 13)
Links used: R3-R2, R2-R4, R3-R5, R5-R6
Shortest Distances from R4 to R5 and R6
R4 (1, 5)
Links used: R4-R5, R5-R6
Shortest Distance from R5 to R6
R5 (4)
Links Used: R5-R6
If we mark, all the used links one by one, we can see that following links are never used.
R1-R2
R4-R6
3. Consider a network with 6 routers R1 to R6 connected with links having weights as
shown in the following diagram
All the routers use the distance vector based routing algorithm to update their routing
tables. Each router starts with its routing table initialized to contain an entry for each
neighbour with the weight of the respective connecting link. After all the routing
tables stabilize, how many links in the network will never be used for carrying any
data?
(A) 4
(B) 3
(C) 2
(D) 1
Exercise
4. Suppose the weights of all unused links in the previous question are
changed to 2 and the distance vector algorithm is used again until all
routing tables stabilize. How many links will now remain unused?
(A) 0
(B) 1
(C) 2
(D) 3
Exercise
Sol: The distance vectors of all nodes
R1 (2, 3, 9, 10, 11)
Links used: R1-R2, R1-R3, R2-R4, R4-R5, R4-R6
R2 (2, 7, 8, 9)
Links used: R2-R3, R2-R4, R4-R5, R4-R6
R3 (9, 9, 11)
Links used: R3-R2, R2-R4, R3-R5, R4-R6
R4 (1, 2)
Links used: R4-R5, R4-R6
R5 (3)
Links Used: R5-R4, R4-R6
If we mark, all the used links one by one, we can see that all links are used except
the following link.
R5-R6
4. Suppose the weights of all unused links in the previous question are
changed to 2 and the distance vector algorithm is used again until all
routing tables stabilize. How many links will now remain unused?
(A) 0
(B) 1
(C) 2
(D) 3
Exercise
6. Consider the following three statements about link state and distance vector
routing protocols, for a large network with 500 network nodes and 4000 links.
[S1] The computational overhead in link state protocols is higher than in distance
vector protocols.
[S2] A distance vector protocol (with split horizon) avoids persistent routing
loops, but not a link state protocol.
[S3] After a topology change, a link state protocol will converge faster than a
distance vector protocol.
Which one of the following is correct about S1, S2, and S3 ?
(A) S1, S2, and S3 are all true.
(B) S1, S2, and S3 are all false.
(C) S1 and S2 are true, but S3 is false
(D) S1 and S3 are true, but S2 is false
Exercise

More Related Content

PPT
MATLAB : Numerical Differention and Integration
PPTX
Sensitivity analysis linear programming copy
PPTX
Transformations (complex variable & numerical method)
PPTX
Nams- Roots of equations by numerical methods
PDF
Recurrence and master theorem
PPTX
Interpolation and its applications
PDF
Partial Differential Equations, 3 simple examples
PDF
Interpolation with Finite differences
MATLAB : Numerical Differention and Integration
Sensitivity analysis linear programming copy
Transformations (complex variable & numerical method)
Nams- Roots of equations by numerical methods
Recurrence and master theorem
Interpolation and its applications
Partial Differential Equations, 3 simple examples
Interpolation with Finite differences

What's hot (20)

PPTX
False Point Method / Regula falsi method
PDF
Χρήσιμα αρχεία στην Ανάλυση της Γ Λυκείου
DOC
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONS
PPTX
Partial differential equations
PDF
Boundary Value Problems - Finite Difference
PPT
Newton raphson method
PDF
Matlab differential
PPTX
Bessel equation
PPTX
Jacobi method
PDF
Matlab solved problems
PDF
algebraic&transdential equations
PPTX
Applications of differential equations(by Anil.S.Nayak)
PPTX
The False-Position Method
PPTX
UNIT-1EMFT_KEE301 by anuj sharma.pptx
PPTX
Newton's forward difference
PPTX
Secant method
PPTX
ROBOT MANIPULATOR AND TYPES.pptx
PDF
11 rocket dyanmics.pdf
 
PDF
Eigen value and eigen vectors shwetak
PPTX
Partial Differentiation
False Point Method / Regula falsi method
Χρήσιμα αρχεία στην Ανάλυση της Γ Λυκείου
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONS
Partial differential equations
Boundary Value Problems - Finite Difference
Newton raphson method
Matlab differential
Bessel equation
Jacobi method
Matlab solved problems
algebraic&transdential equations
Applications of differential equations(by Anil.S.Nayak)
The False-Position Method
UNIT-1EMFT_KEE301 by anuj sharma.pptx
Newton's forward difference
Secant method
ROBOT MANIPULATOR AND TYPES.pptx
11 rocket dyanmics.pdf
 
Eigen value and eigen vectors shwetak
Partial Differentiation
Ad

Similar to routing algo n (20)

PPTX
Comparative Analysis of Distance Vector Routing & Link State Protocols
PPT
Network Layer_Routing_Forwarding-1.ppt engineering
PPT
Routing in Engineering: Principles and Applications.ppt
PDF
SIMULATION AND ANALYSIS OF AODV, DSDV, ZRP IN VANET
PDF
Influence of Clustering on the Performance of MobileAd Hoc Networks (MANETs)
PPT
DSR,LSR,IGMP,RIP,OSPF.ppt
PPTX
PPT on Project Report Ashutosh Kumar.pptx
PDF
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
PDF
COMPARATIVE STUDY FOR PERFORMANCE ANALYSIS OF ROUTING PROTOCOLS IN MOBILITY A...
PDF
Comparative Study for Performance Analysis of Routing Protocols in Mobility a...
PDF
COMPARATIVE STUDY FOR PERFORMANCE ANALYSIS OF ROUTING PROTOCOLS IN MOBILITY A...
PDF
PERFORMANCE ANALYSIS AND COMPARISON OF IMPROVED DSR WITH DSR, AODV AND DSDV R...
PDF
PERFORMANCE ANALYSIS AND COMPARISON OF IMPROVED DSR WITH DSR, AODV AND DSDV R...
PDF
PERFORMANCE ANALYSIS AND COMPARISON OF IMPROVED DSR WITH DSR, AODV AND DSDV R...
PDF
ENHANCING STUDENTS’ LEARNING AND SATISFACTION THROUGH THE USE OF SOCIAL MEDIA
PPT
module10-rip (1).ppt
PDF
PERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOL
PDF
Network Surveillance Based Data Transference in Cognitive Radio Network with ...
PDF
Network Surveillance Based Data Transference in Cognitive Radio Network with ...
PDF
Performance Evaluation of a Layered WSN Using AODV and MCF Protocols in NS-2
Comparative Analysis of Distance Vector Routing & Link State Protocols
Network Layer_Routing_Forwarding-1.ppt engineering
Routing in Engineering: Principles and Applications.ppt
SIMULATION AND ANALYSIS OF AODV, DSDV, ZRP IN VANET
Influence of Clustering on the Performance of MobileAd Hoc Networks (MANETs)
DSR,LSR,IGMP,RIP,OSPF.ppt
PPT on Project Report Ashutosh Kumar.pptx
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
COMPARATIVE STUDY FOR PERFORMANCE ANALYSIS OF ROUTING PROTOCOLS IN MOBILITY A...
Comparative Study for Performance Analysis of Routing Protocols in Mobility a...
COMPARATIVE STUDY FOR PERFORMANCE ANALYSIS OF ROUTING PROTOCOLS IN MOBILITY A...
PERFORMANCE ANALYSIS AND COMPARISON OF IMPROVED DSR WITH DSR, AODV AND DSDV R...
PERFORMANCE ANALYSIS AND COMPARISON OF IMPROVED DSR WITH DSR, AODV AND DSDV R...
PERFORMANCE ANALYSIS AND COMPARISON OF IMPROVED DSR WITH DSR, AODV AND DSDV R...
ENHANCING STUDENTS’ LEARNING AND SATISFACTION THROUGH THE USE OF SOCIAL MEDIA
module10-rip (1).ppt
PERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOL
Network Surveillance Based Data Transference in Cognitive Radio Network with ...
Network Surveillance Based Data Transference in Cognitive Radio Network with ...
Performance Evaluation of a Layered WSN Using AODV and MCF Protocols in NS-2
Ad

More from SwatiHans10 (20)

PPT
ip addressing _
PPT
stop and wait _
PPT
PPT
subnetting _
PPT
PipelineHazards _
PPT
Pipelining _
PPTX
Mobile Customer Experience Management.pptx
PPTX
Social Web multimedia analytics goals _
PPTX
Hardwires and Microprogrammed Control ,
PPTX
Restoring Algorithm _
PPTX
Non -Restoring Algorithm _
PPTX
loops _
PPT
functions _
PDF
Instruction execution cycle _
PPT
RTL,Instruction set _
PPT
Data representation _
PPTX
CAO PPT-Lect 1 _
PPTX
CIRCULAR LINKED LIST _
PPT
Transmission control protocol _
PPTX
Numpy _
ip addressing _
stop and wait _
subnetting _
PipelineHazards _
Pipelining _
Mobile Customer Experience Management.pptx
Social Web multimedia analytics goals _
Hardwires and Microprogrammed Control ,
Restoring Algorithm _
Non -Restoring Algorithm _
loops _
functions _
Instruction execution cycle _
RTL,Instruction set _
Data representation _
CAO PPT-Lect 1 _
CIRCULAR LINKED LIST _
Transmission control protocol _
Numpy _

Recently uploaded (20)

PPT
Mechanical Engineering MATERIALS Selection
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Construction Project Organization Group 2.pptx
PPTX
Lecture Notes Electrical Wiring System Components
PDF
composite construction of structures.pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
additive manufacturing of ss316l using mig welding
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
DOCX
573137875-Attendance-Management-System-original
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
Mechanical Engineering MATERIALS Selection
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Operating System & Kernel Study Guide-1 - converted.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Embodied AI: Ushering in the Next Era of Intelligent Systems
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Model Code of Practice - Construction Work - 21102022 .pdf
bas. eng. economics group 4 presentation 1.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Foundation to blockchain - A guide to Blockchain Tech
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Construction Project Organization Group 2.pptx
Lecture Notes Electrical Wiring System Components
composite construction of structures.pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
OOP with Java - Java Introduction (Basics)
additive manufacturing of ss316l using mig welding
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
573137875-Attendance-Management-System-original
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS

routing algo n

  • 2. UNICAST ROUTING PROTOCOLS  A routing table can be either static or dynamic.  A static table is one with manual entries.  A dynamic table is one that is updated automatically when there is a change somewhere in the Internet.  A routing protocol is a combination of rules and procedures that lets routers in the Internet inform each other of changes.
  • 5. Bellman Ford Algorithm or Ford Fulkerson Algorithm Distance vector routing
  • 7. Initialization of tables in distance vector routing In distance vector routing, each node shares its routing table with its immediate neighbors periodically (30s) and when there is a change.
  • 8. Updating in distance vector routing
  • 9.  A problem with distance-vector routing is that any decrease in cost (good news) propagates quickly, but any increase in cost (bad news) will propagate slowly. The problem is referred to as count to infinity. It sometimes takes several updates before the cost for a broken link is recorded as infinity by all routers. Problem with distance vector routing
  • 10. LINK STATE ROUTING  Link state routing has a different philosophy from that of distance vector routing.  In link state routing, if each node in the domain has the entire topology of the domain—the list of nodes and links, how they are connected including the type, cost (metric), and the condition of the links (up or down)—the node can use the Dijkstra algorithm to build a routing table.
  • 11. Concept of link state routing
  • 13. Building Routing Tables  Creation of the states of the links by each node, called the link state packets (LSP)  Dissemination of LSPs to every other routers, called flooding (efficiently)  Formation of a shortest path tree for each node  Calculation of a routing table based on the shortest path tree
  • 14. Creation of LSP • LSP data: E.g. the node ID, the list of links, a sequence number, and age. • LSP Generation – When there is a change in the topology of the domain – On a periodic basis • There is no actual need for this type of LSP, normally 60 minutes or 2 hours
  • 16. Example of formation of shortest path tree
  • 17. Forming shortest path three for router A in a graph
  • 18. Areas in an autonomous system
  • 23. PATH VECTOR ROUTING  Distance vector and link state routing are both interior routing protocols.  They can be used inside an autonomous system. Both of these routing protocols become intractable when the domain of operation becomes large.  Distance vector routing is subject to instability if there is more than a few hops in the domain of operation.  Link state routing needs a huge amount of resources to calculate routing tables. It also creates heavy traffic because of flooding.  There is a need for a third routing protocol which we call path vector routing.
  • 24. Initial routing tables in path vector routing
  • 25. Stabilized tables for three autonomous systems
  • 26. Internal and external BGP sessions BGP supports classless addressing and CIDR.
  • 27. Unicasting In unicasting, the router forwards the received packet through only one of its interfaces.
  • 28. Multicasting In multicasting, the router may forward the received packet through several of its interfaces.
  • 29. 1. Consider a network with five nodes, N1 to N5, as shown below. The network uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following. N1: (0, 1, 7, 8, 4) N2: (1, 0, 6, 7, 3) N3: (7, 6, 0, 2, 6) N4: (8, 7, 2, 0, 4) N5: (4, 3, 6, 4, 0) Each distance vector is the distance of the best known path at the instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors. The cost of link N2-N3 reduces to 2(in both directions). After the next round of updates, what will be the new distance vector at node, N3. (A) (3, 2, 0, 2, 5) (B) (3, 2, 0, 2, 6) (C) (7, 2, 0, 2, 5) (D) (7, 2, 0, 2, 6) Exercise
  • 30. 1. Consider a network with five nodes, N1 to N5, as shown below. The network uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following. N1: (0, 1, 7, 8, 4) N2: (1, 0, 6, 7, 3) N3: (7, 6, 0, 2, 6) N4: (8, 7, 2, 0, 4) N5: (4, 3, 6, 4, 0) Each distance vector is the distance of the best known path at the instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors. 52. The cost of link N2-N3 reduces to 2(in both directions). After the next round of updates, what will be the new distance vector at node, N3. (A) (3, 2, 0, 2, 5) (B) (3, 2, 0, 2, 6) (C) (7, 2, 0, 2, 5) (D) (7, 2, 0, 2, 6) Exercise N3: (7, 2, 0, 2, 6) N3 knows (1,0,2,7,3) from N2 and (8,7,2,0,4) from N4. N3: (3,2,0,2,5)
  • 31. 2. Consider the same data as given in previous question. After the update in the previous question, the link N1-N2 goes down. N2 will reflect this change immediately in its distance vector as cost, infinite. After the NEXT ROUND of update, what will be cost to N1 in the distance vector of N3? (A) 3 (B) 9 (C) 10 (D) Infinite Exercise
  • 32. 2. Consider the same data as given in previous question. After the update in the previous question, the link N1-N2 goes down. N2 will reflect this change immediately in its distance vector as cost, infinite. After the NEXT ROUND of update, what will be cost to N1 in the distance vector of N3? (A) 3 (B) 9 (C) 10 (D) Infinite Exercise N1: (0,infinity,3,8,4) N2: (infinity,0,2,4,3) N3: (3,2,0,2,5) N4: (8,4,2,0,4) N5: (4,3,5,4,0) After the next round of exchange, N3 knows the distance vector (infinity,0,2,4,3) from N2 and (8,4,2,0,4) from N4. So N3 will update its distance vector to (10,2,0,2,5).
  • 33. 3. Consider a network with 6 routers R1 to R6 connected with links having weights as shown in the following diagram All the routers use the distance vector based routing algorithm to update their routing tables. Each router starts with its routing table initialized to contain an entry for each neighbor with the weight of the respective connecting link. After all the routing tables stabilize, how many links in the network will never be used for carrying any data? (A) 4 (B) 3 (C) 2 (D) 1 Exercise
  • 34. Sol: We can check one by one all shortest distances. When we check for all shortest distances for Ri we don’t need to check its distances to R0 to Ri-1 because the network graph is undirected. Following will be distance vectors of all nodes. Shortest Distances from R1 to R2, R3, R4, R5 and R6 R1 (5, 3, 12, 12, 16) Links used: R1-R3, R3-R2, R2-R4, R3-R5, R5-R6 Shortest Distances from R2 to R3, R4, R5 and R6 R2 (2, 7, 8, 12) Links used: R2-R3, R2-R4, R4-R5, R5-R6 Shortest Distances from R3 to R4, R5 and R6 R3 (9, 9, 13) Links used: R3-R2, R2-R4, R3-R5, R5-R6 Shortest Distances from R4 to R5 and R6 R4 (1, 5) Links used: R4-R5, R5-R6 Shortest Distance from R5 to R6 R5 (4) Links Used: R5-R6 If we mark, all the used links one by one, we can see that following links are never used. R1-R2 R4-R6
  • 35. 3. Consider a network with 6 routers R1 to R6 connected with links having weights as shown in the following diagram All the routers use the distance vector based routing algorithm to update their routing tables. Each router starts with its routing table initialized to contain an entry for each neighbour with the weight of the respective connecting link. After all the routing tables stabilize, how many links in the network will never be used for carrying any data? (A) 4 (B) 3 (C) 2 (D) 1 Exercise
  • 36. 4. Suppose the weights of all unused links in the previous question are changed to 2 and the distance vector algorithm is used again until all routing tables stabilize. How many links will now remain unused? (A) 0 (B) 1 (C) 2 (D) 3 Exercise
  • 37. Sol: The distance vectors of all nodes R1 (2, 3, 9, 10, 11) Links used: R1-R2, R1-R3, R2-R4, R4-R5, R4-R6 R2 (2, 7, 8, 9) Links used: R2-R3, R2-R4, R4-R5, R4-R6 R3 (9, 9, 11) Links used: R3-R2, R2-R4, R3-R5, R4-R6 R4 (1, 2) Links used: R4-R5, R4-R6 R5 (3) Links Used: R5-R4, R4-R6 If we mark, all the used links one by one, we can see that all links are used except the following link. R5-R6
  • 38. 4. Suppose the weights of all unused links in the previous question are changed to 2 and the distance vector algorithm is used again until all routing tables stabilize. How many links will now remain unused? (A) 0 (B) 1 (C) 2 (D) 3 Exercise
  • 39. 6. Consider the following three statements about link state and distance vector routing protocols, for a large network with 500 network nodes and 4000 links. [S1] The computational overhead in link state protocols is higher than in distance vector protocols. [S2] A distance vector protocol (with split horizon) avoids persistent routing loops, but not a link state protocol. [S3] After a topology change, a link state protocol will converge faster than a distance vector protocol. Which one of the following is correct about S1, S2, and S3 ? (A) S1, S2, and S3 are all true. (B) S1, S2, and S3 are all false. (C) S1 and S2 are true, but S3 is false (D) S1 and S3 are true, but S2 is false Exercise