0% found this document useful (0 votes)
27 views18 pages

36-Routing Protocol-Distance Vector-Bellman Ford Algorithm-26-10-2023

Uploaded by

Abhey Aryaan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views18 pages

36-Routing Protocol-Distance Vector-Bellman Ford Algorithm-26-10-2023

Uploaded by

Abhey Aryaan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Network Layer Functions

Essential

• Routing: Mechanisms for determining the set of best paths


for routing packets requires the collaboration of network
elements
• Forwarding: transfer of packets from NE inputs to outputs
• Priority & Scheduling: determining order of packet
transmission in each NE

Optional: congestion control, segmentation & reassembly, security


Routing in Network Layer
• Determining the feasible path for packets to follow from each
source to destination.
• Best path.
• Minimize the number of hops.
• End to end delay.
• Greatest bandwidth.
• Goals
• Rapid and accurate delivery of packets.
• Adaptability to changes in Network Topology in failures
cases.
• Adaptability to varying load –heavy and light traffic periods.
• Ability route packets from temporarily congested links.
• Avoid routing loops.
Routing Metrics

Means for measuring desirability of a path


• Path Length = sum of costs or distances
• Possible metrics
• Hop count: rough measure of resources used
• Capacity: Send a packet through a path with highest capacity.
• Congestion: Traffic load
• Reliability: link availability; BER
• Delay: sum of delays along path; complex & dynamic
• Bandwidth: “available capacity” in a path
• Load: Link & router utilization along path
• Cost:
Packet-Switching Networks
Shortest Path Routing
Shortest Paths & Routing

• Many possible paths connect any given source and


to any given destination
• Routing involves the selection of the path to be
used to accomplish a given transfer
• Typically it is possible to attach a cost or distance to
a link connecting two nodes
• Routing can then be posed as a shortest path
problem
Routing
• Routing algorithm based on variants of shortest path.
• Set of nodes-each node represents packet switching
• Set of links- each link represents transmission line between two packet
switches.
• Shortest path between pair of nodes is the path with least
cost.
• Find the path from node 1 to 6 with least cost.
2 3
1 1
5 2

4
3 1 3 6

2
2 5
4
Shortest Path Approaches

Distance Vector Protocols(Bellman-Ford Alg.)


• Neighbors exchange list of distances to destinations
• Best next-hop determined for each destination
• Ford-Fulkerson (distributed) shortest path algorithm
• Process from destination to source node

Link State Protocols (Dijkstra)


• Link state information flooded to all routers
• Routers have complete topology information
• Shortest path (& hence next hop) calculated
• Dijkstra (centralized) shortest path algorithm
• Process from Source node to destination node
Shortest Path to SJ
Focus on how nodes find their shortest
path to a given destination node, i.e. SJ San
Jose

Dj
Cij
j
i
Di If Di is the shortest distance to SJ from i
and if j is a neighbor on the shortest path,
then Di = Cij + Dj
But we don’t know the shortest paths
i only has local info
from neighbors San
Dj' Jose
j'
Cij'
Dj
Cij j
i
Cij” Pick current
Di j"
Dj" shortest path
Bellman-Ford Algorithm-Minimum cost

• To find the minimum cost from each node to the destination node
(node 6 ).
• Each node ‘i’ maintains an entry (n,𝐷𝑖 ),
• where ‘n’ is the next node and
• Di is the current minimum cost from node ‘i’ to the
destination.
Steps involved

1. Initialization (destination node d is distance ‘0’ from itself)


• Di(d) =  for all i  d
• Dd = 0

2. Updating (find the minimum distance to destination


through neighbors ): For each i  d
Di = Minj { Cij + Dj } for all j  i

3. Repeat the steps until no more changes occur in the


iteration.
Problem-Distance Vector –Bellman-Ford
algorithm
• Apply Bellman-Ford algorithm to find the minimum distance from each
node to destination (node 6) and the next node along the shortest path.

2 3
1 1
5 2

4
3 1 3 6

2
2 5
4
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (-1, ) (-1, ) (-1, ) (-1, ) (-1, )


1
2
3

Table entry Table entry


@ node 1 @ node 3
for dest SJ for dest SJ
2 3
1
5 2
1 San
4
Jose
3 1 3 6

2
2 5
4
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (-1, ) (-1, ) (-1, ) (-1, ) (-1, )


1 (-1, ) (-1, ) (6,1) (-1, ) (6,2)
2
3

D3=D6+1
n3=6
D6=0
2 3 1
1 1
5 2
0
4 San
3 6
1 3
Jose
2 5 2
4
2
D5=D6+2 D6=0
n5=6
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (-1, ) (-1, ) (-1, ) (-1, ) (-1, )


1 (-1, ) (-1, ) (6, 1) (-1, ) (6,2)
2 (3,3) (5,6) (6, 1) (3,3) (6,2)
3

3 1
2 3
1 1
5 2
3 0
4 San
3 6
1 3
Jose
2 2
5
4
6 2
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (-1, ) (-1, ) (-1, ) (-1, ) (-1, )


1 (-1, ) (-1, ) (6, 1) (-1, ) (6,2)
2 (3,3) (5,6) (6, 1) (3,3) (6,2)
3 (3,3) (4,4) (6, 1) (3,3) (6,2)

1
3 2 3
1 1
5 2
3 0
4 San
3 6
1 3
Jose
2
2 5
4
6 4 2
Shortest path tree to node 6

2 3
1 1
2

4
1 6

2
2 5

You might also like