0% found this document useful (0 votes)
10 views19 pages

Lec 25

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

Lec 25

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

Module-4

NETWORK LAYER
Routing Algorithms
Interior Gateway Protocols (IGP)

IGP is a type of protocols used by the routers in an autonomous system to exchange network reachability and
routing information.

RIP
It is one of the most widely used IGP. This implements Distance Vector algorithm.

OSPF
It is also an IGP. This algorithm scales better than the vector distance algorithms

2
Routing Algorithms
RIP
RIP uses a hop count metric to measure the distance to a destination.
All routing updates are broadcast. This allows all hosts on the network to know about the routes.
To prevent routes from oscillating between two or more equal cost paths, RIP specifies that existing routes
should be retained until a new route has strictly lower cost.
To prevent instabilities, RIP must use a low value for the maximum possible distance.
RIP uses 16 as the maximum hop count. This restricts the maximum network diameter of the system to 16.
RIP runs on top of TCP/IP.
RIP allows addresses to be of a maximum size of 14 Bytes.
The Distance varies from 1 to 16 (where 16 is used to signify infinity).
RIP address 0.0.0.0 denotes a default route.
There is no explicit size of the RIP message and any number of routes can be advertized.
3
Routing Algorithms
OSPF

OSPF includes type of service(ToS) routing. So, you can install multiple routers to a given destination, one for each type of service. When
routing a datagram, a router running OSPF uses both the destination address and type of service fields in the IP Header to choose a route.
OSPF provides load balancing. If there are multiple routes to a given destination at the same cost, OSPF distributes traffic over all the routes
equally.
OSPF allows for creation of AREA HIERARCHIES. This makes the growth of the network easier and makes the network at a site easier to
manage.
OSPF protocol specifies that all exchanges between the routers be authenticated. OSPF allows variety of authentication schemes, and even
allows one area to choose a different scheme from the other areas.
To accommodate multi-access networks like ethernet, OSPF allows every multi-access network to have a designated router
(designated gateway).
To permit maximum flexibility, OSPF allows the description of a virtual network topology that abstracts away from details of physical
connections.
OSPF also allows for routers to exchange routing information learned from other sites.
The message format distinguishes between information acquired from external sources and information acquired from routers interior to the
site, so there is no ambiguity about the source or reliability of routes.
4
Routing Algorithms
Exterior Gateway Protocol (EGP)

EGP is used only to find network reachability and not for differentiating between good and bad routes.
We can only use distance metric to declare a route plausible and not for comparing it with some other route
(unless the two route form part of a same autonomous system).
Since there cannot be two different routes to the same network, EGP restricts the topology of any internet to a
tree structure in which a core system forms the root

5
Routing Algorithms
Border Gateway Protocol(BGP)

BGP is a distance-vector protocol used to communicate between different autonomous systems.


Instead of maintaining just the cost to each destination, each BGP router keeps track of the exact path used.
 Every BGP router contains a module that examines routes to a given destination and scores them returning a
number for destination to each route.
 Any route violating a policy constraint automatically gets a score of infinity.
The router adapts a route with shortest distance
BGP easily solves the count to infinity problem that plagues other distance-vector algorithms as whole path is
known.

6
7
Distance Vector Routing
In distance vector routing, each node shares its routing table with its immediate neighbors
periodically and when there is a change

8
Distance Vector Routing

Each router maintains a routing table containing entries of each router in the subnet

The entry contains two parts:


1) Preferred outgoing line to use for that destination 2) Estimate of time or distance to reach that
destination

 The metric used might be no. of hops, time delay in milliseconds, total number of
packets queued along the path

9
Distance Vector Routing
Count to Infinity Problem

Suppose the link between A and E is down events may occur are:
(1) F tells A that it has a path to E with cost 6
(2) A sets cost to E to be 11, and advertise to F again
(3) F sets the cost to E to be 16, and advertise to A again
This cycle will continue and the cost to E goes to infinity.
The core of the problem is that when X tells Y that it has a path somewhere ,Y has no way to know whether it
itself is on the path.
 During this process of counting to infinity, packets from A or F destined to E are likely to loop back and forth
between A and F, causing congestion for other packets.

10
Distance Vector Routing
Problems of DVR

Count to Infinity Problem


Line Bandwidth was not taken into consideration while choosing routes

11
Link State Routing
Each Router must do the following:

Discover its neighbours and learn their network addresses


Measure the delay or cost to each of its neighbours
Construct a packet telling all it has just learned
Send this packet to all other routers
Compute the shortest path to every other router

12
Link State Routing

13
Link State Routing

14
Link State Routing

15
Link State Routing

16
Link State Routing

17
Dijkstra’s
Algorithm

Shortest Path

18
Unicast Routing vs Multicast
Routing
Unicasting Multicasting

The router forwards the received packet through The router may forward the received packet through
only one of its interfaces. several of its interfaces

Each router in the domain has a table that defines Each involved router needs to construct a shortest path
a shortest path tree to possible destination tree for each group.

19

You might also like