0% found this document useful (0 votes)
11 views28 pages

24-12-24 26-12-24 Lectur Notes (Wk-13)

Uploaded by

Maaz Bhatti
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)
11 views28 pages

24-12-24 26-12-24 Lectur Notes (Wk-13)

Uploaded by

Maaz Bhatti
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/ 28

Computer Networks

Week # 13

M.Nadeem Akhtar
CS & IT Department
The University of Lahore
Email: nadeem.akhtar@cs.uol.edu.pk
URL- https://sites.google.com/view/nadeemuolcscn/home/course-material
Powerpoint Templates 1
ACKNOWLEDGMENTS
Mostly adopted from lecture slides by Behrouz A.
Forouzan.

http://www.inetdaemon.com/tutorials/internet/ip/routing/i
nterior_vs_exterior.shtml#sthash.dhDkYN0q.dpuf

Week 13- Course Plan

Routing
 Distance vector routing (RIP)
 Link state Routing (OSPF)
 Overview of Path vector routing

2
Routing Information Protocol (RIP)

3
Routing Information Protocol
 The Routing Information Protocol (RIP) is an intra-domain
(interior) routing protocol used inside an autonomous
system.
 It is a very simple protocol based on distance vector
routing.
 RIP implements distance vector routing directly with some
considerations.

4
Routing Information Protocol
 The destination in a routing table is a network, which
means the first column defines a network address

 The metric used is distance (hop count) which is defined


as the number of links (networks) to reach the destination.
 Infinity is defined as 16, which means that any route
in an autonomous system using RIP cannot have more
than 15 hops.

 The next-node column defines the address of the router to


which the packet is to be sent to reach its destination

5
RIP Operation
 Router sends update message to neighbors every
30 sec
 A router expects to receive an update message
from each of its neighbors within 180 seconds in
the worst case
 If router does not receive update message from
neighbor X within this limit, it assumes the link to
X has failed and sets the corresponding minimum
cost to 16 (infinity)
 Based on convergence speeded up by triggered
updates
 neighbors notified immediately of changes in
distance vector table 66
Example of a domain using RIP

 Autonomous system with seven networks and four routers with


table of each router.
 Routing table for Rl has seven entries to show how to reach each
network in the autonomous system.
 Router is directly connected to networks 130.10.0.0 and
130.11.0.0 which means that there are no next-hop entries for
these two networks. 7
RIP Updating Algorithm
Receive a response RIP message
1. Add one hop to the hop count for each advertised
destination.
2. Repeat the following steps for each advertised
destination: If (destination is not in the routing table)
Add the advertised information to the table.
Else
If (next-hop field is the same)
Replace entry in the table with the new one.
Else
If (new hop count < the one in the table)
Replace entry in the routing table.

88
Example of updating a routing table

9
Initial routing tables in a small
autonomous system

10
Final routing tables (previous figure)

11
 RIP is implemented as a process that uses the services of
UDP on the well known port 520
 It runs in the background (a daemon process)
 RIP routing protocol helps IP in routing datagrams
through AS
 So RIP messages are encapsulated inside UDP user
datagrams; which in turn are encapsulated inside IP
datagrams
 Two versions are RIP-1 and RIP-2
 RIP-2 is backward compatible with RIP-1

12
Link State Routing and OSPF

13
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, i.e.,
 the list of nodes and links, how they are connected
including the type, cost (metric), and
 the condition of the links (up or down)
 Then the node can use the Dijkstra algorithm to build a routing
table
 In this algorithm, the cost associated with an edge defines the
state of the link
 Links with lower costs are preferred to links with higher costs;
 if the cost of a link is infinity, it means that the link does not exist
or has been broken.
14
LINK STATE DataBase (LSDB)
 To create a least-cost tree with this method, each node
needs to have a complete map of the network, which
means it needs to know the state of each link.

 The collection of states for all links is called the link-


state database (LSDB).

 There is only one LSDB for the whole internet; each


node needs to have a duplicate of it to be able to create
the least-cost tree.

15
LINK STATE DataBase (LSDB)
 The LSDB can be represented as a two-dimensional array(matrix)
in which the value of each cell defines the cost of the
corresponding link.

16
How LSDB is created?
 Done by a process called flooding
 Each node can send some greeting messages to all its immediate
neighbors (those nodes to which it is connected directly) to
collect two pieces of information for each neighboring node:
 the identity of the node and
 the cost of the link.
 The combination of these two pieces of information is called the
LS packet (LSP);

 the LSP is sent out of each interface

17
How LSDB is created?
 after receiving all new LSPs, each node creates the
comprehensive LSDB
 This LSDB is the same for each node and shows the whole map
of the internet.

18
Formation of Least Cost Trees
 To create a least-cost tree for itself, using the shared LSDB, each
node needs to run the famous Dijkstra Algorithm.
This iterative algorithm uses the following steps:
1. The node chooses itself as the root of the tree, creating a tree
with a single node, and sets the total cost of each node based on
the information in the LSDB.
2. The node selects one node, among all nodes not in the tree,
which is closest to the root, and adds this to the tree. After this
node is added to the tree, the cost of all other nodes not in the
tree needs to be updated because the paths may have been
changed.
3. The node repeats step 2 until all nodes are added to the tree.

These three steps finally create the least-cost tree

19
Formation of Least Cost Trees

20
Formation of Least Cost Trees

21
Formation of Least Cost Trees

22
Formation of Least Cost Trees
An initialization step and six iterations to find the least-cost tree

23
For Simplicity, link state routing can be stated as five
Parts and each router must do the following things to
make it work:

1. Discover its neighbors and learn their network addresses.

2. Set the distance or cost metric to each of its neighbors.

3. Construct a packet telling all it has just learned.

4. Send this packet to and receive packets from all other routers.

5. Compute the shortest path to every other router [Dijkstra Algo].

24
Open Shortest Path First (OSPF)

 Distance vector based RIP works well in small systems, but less
well as network gets larger
 Count to infinity as well as convergence issues
 IETF began work on a link state protocol for intra-domain
routing in 1988
 The Open Shortest Path First (OSPF) protocol became a
standard in 1990
 OSPF is an intra-domain routing protocol based on link state
routing.
 Its domain is also an autonomous system.

25
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.
26
 The difference between the distance vector routing and
path vector routing can be compared
 to the difference between a national map and an
international map.

 A national map can tell us the road to each city and the
distance to be traveled if we choose a particular route;
 an international map can tell us which cities exist in each
country and which countries should be passed before
reaching that city.

27
Border Gateway Protocol
 Border Gateway Protocol Version 4 (BGP) based on Path vector
Routing
 BGP is used between different Ass
 BGP has been designed to allow many kinds of routing policies to
be enforced in the interAS traffic
 Typical policies involve political, security, or economic
considerations

A few examples of possible routing constraints are:


1. Do not carry commercial traffic on the educational network.
2. Never send traffic from the Pentagon on a route through Iraq.
3. Traffic starting or ending at Apple should not transit Google.

28

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy