Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 35

Network Layer -2

Routing
Delivered By:
Avinash Bhagat
9463281930
[email protected]
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1. Routing Chapter 22
Routing is the act of moving information
across an inter-network from a source to a
destination. Along the way, at least one
intermediate node typically is encountered.

It’s also referred to as the process of


choosing a path over which to send the
packets.

routing occurs at Layer 3 (the network layer)


Routing protocols use metrics to evaluate what path will be
the best for a packet to travel.

A metric is a standard of measurement;


1. path bandwidth,
2. reliability,
3. delay,
4. current load on that path,
5. Communicating cost.
Routing Protocol

A routing protocol specifies how routers communicate with


each other, disseminating information that enables them to
select routes between any two nodes on a computer network.

Each router has a prior knowledge only of networks attached


to it directly.

A routing protocol shares this information first among


immediate neighbours, and then throughout the network. This
way, routers gain knowledge of the topology of the network.
Unicasting Routing Protocols
 Routing Protocol
 Routing protocols can be either an interior protocol
or an exterior protocol.

1. An interior protocol handles intradomain routing;


2. an exterior protocol handles interdomain routing.
Routing Protocols

Static Routing Dynamic Routing

Interior Gateway Exterior Gateway


Protocols (IGPs) Protocols (EGPs)
Static Routing Protocols
Dynamic routing protocol
 Dynamic routing protocol classification.

Classful routing protocols


Popular routing protocols

Routing Open Border


Information Shortest Gateway
Protocol Path First Protocol

Distance Link Path


Vector State vector
Popular routing protocols
Distance Vector Routing
 We first discuss distance
vector routing. This
method sees an AS
Autonomous Station, with
all routers and networks, as
a graph, a set of nodes and
lines (edges) connecting the
nodes.
 A router can normally be
represented by a node and
a network by a link
connecting two nodes,
although other
representations are also
possible.
Distance Vector Routing

 The graph theory used an


algorithm called Bellman-Ford to
find the shortest path between
nodes in a graph given the
distance between nodes.

 If we know the cost between


each pair of nodes, we can use
the algorithm to find the least
cost (shortest path) between any
two nodes.
Distance Vector Routing
Distance Vector Routing Algorithm
We can use the algorithm for creating the routing table for
routers in an AS, we need to change the algorithm:

1.In distance vector routing, the cost is normally hop counts


(how many networks are passed before reaching the
destination). So the cost between any two neighbours is set to
1.

2. Each router needs to update its routing table


asynchronously, whenever it has received some information
from its neighbours. In other words, each router executes part
of the whole algorithm in the Bellman-Ford algorithm.
Distance Vector Routing
3. After a router has updated its routing table, it should send
the result to its neighbours so that they can also update their
routing table.

4. Each router should keep at least three pieces of information


for each route:
destination network, the cost, and the next hop.
Tablei.dest, Tablei.cost, and Tablei.next.

5. We refer to information about each route received from a


neighbour as R (record), which has only two pieces of
information: R.dest and R.cost. The next hop is not included in
the received record because it is the source address of the
sender.
Link-State Routing
 Link state routing protocols
-Also known as shortest path first
algorithms
-These protocols built around
Dijkstra’s algorithm
Link-State Routing
Dikjstra’s algorithm also known as the shortest path first
(SPF) algorithm
Link-State Routing
 The shortest path to a destination is not necessarily the
path with the least number of hops
Link-State Routing Process

How routers using Link State Routing


Protocols reach convergence
-Each routers learns about its own
directly connected networks
-Link state routers exchange hello packet
to “meet” other directly connected link
state routers.
-Each router builds its own Link State
Packet (LSP) which includes information
about neighbors such as neighbor ID,
link type, & bandwidth.
Link-State Routing Process

-After the LSP is created the router


floods it to all neighbors who then
store the information and then
forward it until all routers have the
same information.
-Once all the routers have received
all the LSPs, the routers then
construct a topological map of the
network which is used to determine
the best routes to a destination
Link-State Routing

 Directly Connected
Networks
 Link
This is an interface on
a router
 Link state
This is the information
about the state of the
links
Link-State Routing
Sending Hello Packets to Neighbors
 Link state routing protocols use a hello protocol
-To discover neighbors (that use the same link state
routing protocol) on its link
Link-State Routing
Sending Hello Packets to
Neighbors
 Connected interfaces that are using the
same link state routing protocols will
exchange hello packets.
 Once routers learn it has neighbors they
form an adjacency and adjacent
neighbors will exchange hello packets
 These packets will serve as a keep alive
function
Link-State Routing
Building the Link State Packet
 Each router builds its own Link
State Packet (LSP)
 Contents of LSP:
 State of each directly
connected link Includes
 information about neighbors
such as
–neighbor ID,
–link type,
–& bandwidth.
Link-State Routing
Flooding LSPs to Neighbors
 Once LSP are created they are forwarded out to
neighbors.
-After receiving the LSP the neighbor continues to
forward it throughout routing area.
Link-State Routing
 LSPs are sent out under the following conditions
-Initial router start up or routing process
-When there is a change in topology
Summary

 Link State Routing protocols are also known as Shortest


Path First protocols
 Summarizing the link state process
-Routers 1ST learn of directly connected networks
-Routers then say “hello” to neighbors
-Routers then build link state packets
-Routers then flood LSPs to all neighbors
-Routers use LSP database to build a network topology map &
calculate the best path to each destination
Summary
 Link
An interface on the router
 Link State
Information about an interface such as
-IP address
-Subnet mask
-Type of network
-Cost associated with link
-Neighboring routers on the link
Summary

 Link State Packets


After initial flooding, additional LSP are sent out
when a change in topology occurs

 Examples of link state routing protocols


-Open shortest path first
-IS-IS

You might also like