Chapte 3 (2)
Chapte 3 (2)
Unicast and
Multicast
Routing
Protocol
By : Sumit Parmar
Introduction to Routing Protocol
Routing Protocol
Basic Terms:
Minimum
Cost or Metric:
N/W 2
4 3
N/W 1 N/W 4
5 6
N/W 3
Introduction to Routing Protocol
Static and Dynamic Routing:
Interior[intra]
Routing Protocol
Exterior[inter]
Intra and Inter Domain Routing
Internet is divided in to Autonomous System [AS] which is a group of
Network and Router under Authority of single Administration.
R1
AS2
R2
R21
Exterior[inter
Domain Routing]
R22
Types of Routing Protocol
Border Gateway Protocol Routing Information Protocol Open Shortest Path First
Distance Vector Routing
It sees an AS with all the Routers and Network as a Graph.
B -1
6
E Dijikstra Algorithm
-2
A 3
C 3 Not Efficient in case
4
of – ve cost.
5 -2 F
D -1
Bell-man Ford Algorithm
∞
∞ Go on relaxing all the nodes N-1
B -1
6 times.
E
0 N = No. of Vertices (Nodes)
-2
A 3
C 3 relaxing
4 ∞
If [d(u) + C (u,v) < d(V) ]
5 -2 F then d(v) = d(u) + C (u,v)
D -1 ∞
Edges ∞
(A,B), (A,C), (A,D), (B,E), (C,E), (C,B), (D,C), (D,F), (E,F)
Edges
Bell-man Ford Algorithm
ITERATION = N-1 = 5
(A,B), (A,C), (A,D), (B,E), (C,E), (D,C), (D,F), (E,F), (C,B),
∞ 6 ITERATION 1:
v 1
-1 ∞5 Apply If [d(u) + C (u,v) < d(V) ]
6 B
E then d(v) = d(u) + C (u,v)
0
-2
u
A 3 3
C ∞
4 4
3
5 -2 F
D -1 ∞4
∞5
Edges
Bell-man Ford Algorithm
(A,B), (A,C), (A,D), (B,E), (C,E), (D,C), (D,F), (E,F), (C,B),
∞ 6 ITERATION 2:
v 1
-1 ∞5 Apply If [d(u) + C (u,v) < d(V) ]
6 B 0
E then d(v) = d(u) + C (u,v)
0
-2
u
A 3 3
C ∞
4 4
3
5 -2 F
D -1 ∞4
3
∞5
Edges
Bell-man Ford Algorithm
(A,B), (A,C), (A,D), (B,E), (C,E), (D,C), (D,F), (E,F), (C,B),
∞ 6 ITERATION 3:
v 1
-1 ∞5 Apply If [d(u) + C (u,v) < d(V) ]
6 B 0
E then d(v) = d(u) + C (u,v)
0
-2
u
A 3 3 No Change in Iteration
C ∞
4 4
3
5 Vertex:
-2 F
A=0
D -1 ∞4 B=1
3 C=3
∞5 D=5
E=0
F=3
Bell-man
5 ∞5Ford
-4 Edges
Algorithm
0 1 3
(1,3), (1,2), (3,2), (2,4), (4,3)
7
4 -15
7 ITERATION 1:
2 4
∞4 ∞11
5 ∞5 -4
0 1 3 -5
7 ITERATION 2:
4 -15
7
2 4
∞4 ∞11
3 10
5 Bell-man
∞5 -4 Ford
Edges
Algorithm
0 1 3 -5
-6
(1,3), (1,2), (3,2), (2,4), (4,3)
7
4 -15
ITERATION 3:
7
2 4
Go on relaxing all the nodes N-1
∞4 ∞11 times.
3 10 9 N = No. of Vertices (Nodes)
2
N-1= 4-1 = 3 ITERATION
5 ∞5 -4
0 1 3 -5 ITERATION 4:
-6
7
4 -15
-VE Weight Cycle
7
2 4
∞4 ∞11
3 10 9
2 1
Bell-man Ford Algorithm
Solve by using Bellman ford Algorithm.
-1
6 2 5 3
-2
1
1
3 7
5
5 3
-2
4 6
-1
Bell-man Ford Algorithm
Solve by using Bellman ford Algorithm.
Link State Routing Protocol
Link State Routing
Link state routing is the second family of routing protocols. While distance
vector routers use a distributed algorithm to compute their routing tables,
link-state routing uses link-state routers to exchange messages that allow each
router to learn the entire network topology. Based on this learned topology,
each router is then able to compute its routing table by using a shortest path
computation.
0 11 8 ∞ 14 14 7 ∞
7
6 If [0 + 4 <∞]
8
10 then d(v) = 0 + 4
4 5 6
1 2 ∞
∞ ∞
Link State Routing Protocol
∞4 ∞12 ∞25 19
2 3
1 7
8 If [d(u) + C (u,v) < d(V) ]
4 9 then d(v) = d(u) + C (u,v)
2
0 11 8 ∞15 4 14 7 ∞21
14
7
6
8 If [0 + 4 <∞]
1 2
10 then d(v) = 0 + 4
4 5 6
∞11
∞8 ∞9
Link State Routing Protocol
1
B D
10 Source vertices =A
A
2 3 9 If [d(u) + C (u,v) < d(V) ]
6 then d(v) = d(u) + C (u,v)
5
2 Path from A to D : D-B-C-A
C E =A-C-B-D
= 5+3+1
A B C D E =9
A 0 Path from A to B= 8
∞ ∞ ∞ ∞ =B-C-A
C 10 5 ∞ ∞ =A-C-B
E 8 14 7 = 5+3
B 8 13 =8
D 9
Link State Routing Protocol
Path From 1-2
1
5
2
∞5
1-2=5
But 1-3-4-2=1
10 -10
3 4
1
∞11
∞10
Link State Routing Protocol
Link State Routing Protocol
Path Vector Routing
Path Vector Routing
Reachability A1 A2 B1 B2
Routing Table of A2 A3 A4 B3 B4
Dest. Path
A1 AS1 AS1 AS2
A2 AS1 C1 C2
A3 AS1
A4 AS1 C3 C4 AS3
Path Vector Routing
Path Vector Routing
Routing Table
Path Vector Routing Table for each router can be created if AS share
their reachability with each other.
Destination Path
A1 AS1
A4 AS1
B1 AS1---AS2
B4 AS1---AS2
C1 AS1---AS3
C4 AS1---AS3
Path Vector Routing
Loop Prevention
When a router receives reachability information it checks to see if its ‘AS’ in the
path list to any destination . If the looping is involved and that network path
pair is discarded.
RIP
The Routing Information Protocol (RIP) is an intradomain routing protocol used
inside an autonomous system. It is a very simple protocol based on distance vector
routing.
o Version: 8-bit
Define the RIP version
o Family: 16-bit
Define the family of the protocol used
TCP/IP: value is 2
o Distance: 32-bit
The hop count from the advertising router to the destination network
RIP Message Format
Types of Message
o Request
Sent by a router that has just come up or
has some time-out entries
Can ask specific entries or all entries
Types of Request Message
Types of Response Message
Response: solicited or unsolicited