0% found this document useful (0 votes)
14 views34 pages

Module4 3

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)
14 views34 pages

Module4 3

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/ 34

Unicast

Routing

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 4: Outline

20.1 INTRODUCTION

20.2 ROUTING ALGORITHMS

20.3 UNICAST ROUTING PROTOCOLS


20.20.1 General Idea

• In unicast routing, a packet is routed, hop by hop,


from its source to its destination by the help of
forwarding tables.
• The source host needs no forwarding table because
it delivers its packet to the default router in its local
network.
• The destination host needs no forwarding table
either because it receives the packet from its default
router in its local network.
• This means that only the routers that glue together
the networks in the internet need forwarding tables.

20.3
20.20.2 Least-Cost Routing

• When an internet is modeled as a


weighted graph, one of the ways to
interpret the best route from the source
router to the destination router is to
find the least cost between the two.
• In other words, the source router
chooses a route to the destination
router in such a way that the total cost
for the route is the least cost among all
possible routes.
20.4
Figure 20.1: An internet and its graphical representation

20.5
Figure 20.2: Least-cost trees for nodes in the internet of Figure 4.56

20.6
20.2.1 Distance-Vector Routing
• The distance-vector (DV) routing uses the goal
we discussed in the introduction, to find the best
route. In distance-vector routing, the first thing
each node creates is its own least-cost tree with
the rudimentary information it has about its
immediate neighbors.
• The incomplete trees are exchanged between
immediate neighbors to make the trees more and
more complete and to represent the whole
internet.
• We can say that in distance-vector routing, a
router continuously tells all of its neighbors what
it knows about the whole internet (although the
20.7
knowledge can be incomplete).
Figure 20.3: Graphical idea behind Bellman-Ford equation

20.8
20-3 UNICAST ROUTING PROTOCOLS

Three common protocols used in the Internet:


• Routing Information Protocol (RIP) based
on the distance-vector algorithm.
• Open Shortest Path First (OSPF) based on
the link-state algorithm.
• Border Gateway Protocol (BGP) based on
the path-vector algorithm.

20.9
Figure 20.14: Internet structure

20.10
20.3.2 Routing Information Protocol

• The Routing Information Protocol (RIP) is


one of the most widely used intradomain
routing protocols based on the distance-
vector routing algorithm.
• RIP was started as part of the Xerox Network
System (XNS), but it was the Berkeley
Software Distribution (BSD) version of UNIX
that helped make the use of RIP widespread.

20.11
Figure 20.15: Hop counts in RIP

1 hop (N4)

2 hops (N3, N4)

3 hops (N2, N3, N4)

20.12
Figure 20.16: Forwarding tables

20.13
Figure 20.17: RIP message format

20.14
Example 20.1
Figure 20.18 shows a more realistic example of the
operation of RIP in an autonomous system. First, the figure
shows all forwarding tables after all routers have been
booted. Then we show changes in some tables when some
update messages have been exchanged. Finally, we show the
stabilized forwarding tables when there is no more change.

20.15
Figure 20.18: Example of an autonomous system using RIP (Part I)

20.16
Figure 20.18: Example of an autonomous system using RIP (Part II)

20.17
Figure 4.73: Example of an autonomous system using RIP (Part III)

20.18
20.3.3 Open Shortest Path First

Open Shortest Path First (OSPF) is also an


intradomain routing protocol like RIP, but it is based
on the link-state routing protocol .
OSPF is an open protocol, which means that the
specification is a public document.

20.19
Figure 20.19: Metric in OSPF

Total cost: 4
Total cost: 7

Total cost: 12

20.20
Figure 20.20: Forwarding tables in OSPF

20.21
Figure 20.23: OSPF message formats

20.22
20.3.4 Border Gateway Protocol

• The Border Gateway Protocol version 4 (BGP4)


is the only interdomain routing protocol used in
the Internet today.
• BGP4 is based on the path-vector algorithm

20.23
Figure 20.24: A sample internet with four ASs

20.24
Figure20.25: eBGP operation

20.25
Figure 20.26: Combination of eBGP and iBGP sessions in our internet

20.26
Figure 20.27: Finalized BGP path tables (Part I)

20.27
Figure 20.27: Finalized BGP path tables (Part II)

20.28
Figure 20.27: Finalized BGP path tables (Part III)

20.29
Figure 20.28: Forwarding tables after injection from BGP (Part I)

20.30
Figure 20.28: Forwarding tables after injection from BGP (Part II)

20.31
Figure 20.29: Format of path attribute

20.32
Figure 20.30: Flow diagram for route selection

20.33
Figure 20.30: BGP messages

20.34

You might also like