0% found this document useful (0 votes)
34 views46 pages

Network Layer Delivery, Forwarding and Routing

The document discusses network layer delivery, forwarding, and routing. There are two delivery methods: direct delivery when the sender and receiver are on the same network, and indirect delivery when they are on different networks. Forwarding involves using a routing table to determine the next hop to send a packet toward its destination. Routing tables can be static, requiring manual updates, or dynamic and automatically updated by routing protocols. Common routing protocols include RIP for intra-domain routing within an autonomous system and BGP for inter-domain routing between autonomous systems.

Uploaded by

John Amon
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)
34 views46 pages

Network Layer Delivery, Forwarding and Routing

The document discusses network layer delivery, forwarding, and routing. There are two delivery methods: direct delivery when the sender and receiver are on the same network, and indirect delivery when they are on different networks. Forwarding involves using a routing table to determine the next hop to send a packet toward its destination. Routing tables can be static, requiring manual updates, or dynamic and automatically updated by routing protocols. Common routing protocols include RIP for intra-domain routing within an autonomous system and BGP for inter-domain routing between autonomous systems.

Uploaded by

John Amon
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/ 46

Network layer:

Delivery,forwarding and
routing
Delivery
There are two different methods of delivery:
Direct delivery
Indirect delivery
Delivery
• The delivery of a packet is called direct if the deliverer(host or router)
and the destination are on the same network.
Delivery
• The delivery of a packet is called indirect if the deliverer(host or
router) and the destination are on different networks.
FORWARDING
Forwarding means to place the packet in its route to
its destination. Forwarding requires a host or a router
to have a routing table.. When a host has a packet to
send or when a router has received a packet to be
forwarded, it looks at this table to find the route to the
final destination.

Topics discussed in this section:


Forwarding Techniques
Forwarding Process
Routing Table
Forwarding Techniques
Next-hop method
Route method
In next-hop method the routing table holds only the address of the next
hop.
In route method the routing table holds the address of the complete
route.
Figure Route method versus next-hop method
Forwarding Techniques
Next-hop method
Route method
Network-specific method
Host-specific method
Figure Host-specific versus network-specific method
Routing Table
A host or a router has a routing table with an entry for each
destination, or a combination of destinations, to route IP packets.
The routing table can be either static or dynamic
Static Routing Table
• A static routing table contains information entered manually. The
administrator enters the route for each destination into the table.
• When a table is created, it cannot update automatically when there is
a change in the Internet.
• The table must be manually altered by the administrator.
• A static routing table can be used in a small internet that does not
change very often, or in an experimental internet for troubleshooting.
Dynamic Routing Table
• A dynamic routing table is updated periodically by using one of the
dynamic routing protocols such as RIP, OSPF, or BGP.
• Whenever there is a change in the Internet, such as a shutdown of a
router or breaking of a link, the dynamic routing protocols update all
the tables in the routers (and eventually in the host) automatically.
UNICAST ROUTING PROTOCOLS
• A routing protocol is a combination of rules and procedures that lets
routers in the internet inform each other of changes.
• It allows routers to share whatever they know about the internet or
their neighborhood.
• The routing protocols also include procedures for combining
information received from other routers.

Topics discussed in this section:


Intra- and Interdomain Routing
Distance Vector Routing and RIP
Link State Routing and OSPF
Path Vector Routing and BGP
Figure Autonomous systems

Routing inside an
autonomous system
is referred to as
intradomain routing.

Routing between
autonomous system
is referred to as
interdomain routing.
Intra- and Interdomain Routing
An internet can be so large that one routing protocol cannot handle the
task of updating the routing tables of all routers.
For this reason,an internet is divided into autonomous systems.
An autonomous system(AS) is a group of networks and routers under
the authority of a single administration.
Routing inside an autonomous system is referred to as intradomain
routing.
Routing between autonomous system is referred to as interdomain
routing.
Intra- and Interdomain Routing
We discuss two intradomain routing protocols:
Distance vector
Link state
We also introduce one interdomain routing protocol:
Path vector
Note:Routing Information protocol(RIP) is an implementation of the
distance vector protocol.it is an intradomain routing protocol used
inside an autonomous sysrem.It is a very simple protocol based on
distance vector roting.
Intra- and Interdomain Routing
We discuss two intradomain routing protocols:
Distance vector
Link state
We also introduce one interdomain routing protocol:
Path vector
Open shortest path first(OSPF) IS AN IMPLEMENTATION of the link state
protocol.
Border Gateway Protocol(BGP) is an implementation of the path vector
protocol.
Figure Popular routing protocols
Distance Vector Routing
• In distance vector routing, the least cost route between any two
nodes is the route with minimum distance.
• In this protocol ,each node maintains a vector(node) of minimum
distances to every node.
• The table at each node also guides the packets to the desired node by
showing the next stop in the route(next-hop routing).

Steps involved:
1.Initialization
2.Sharing
3.updating
Figure Distance vector routing tables

The table for node A shows how we can reach any node from this node.for example,our
least cost to reach node E is 6.The route passes through c.
Figure b Initialization of tables in distance vector routing
Initialization
• At the beginning,each node can know only the distance between itself
and its immediate neighbors,thos directly connected to it.
• So for the moment, we assume that each node can send a message to
the immediate neighbors and find the distance between itself and
these neighbors.
• fig:b shows the initial tables for each node.
• The distance for any entry that is not a neighbor is marked as
infinite(unreachable).
Sharing
• The whole idea of distance vector routing is the sharing of
information between neighbors.
• Although node A doesn't know about node E, node C does.
• So if node C shares its routing table with A, node A can also know how
to reach node E.
• On the other hand, node C doesn't know how to reach node D, but
node A does.
• If node A shares its routing table with node C,node C also knows how
to reach node D.
Sharing
• In other words, nodes A and C as immediate neighbors, can improve
their routing tables if they help each other.
• A node therefore can send only the first two columns of its table to
any neighbor.
• In other words,sharing here means sharing only the first two columns.
Note

In distance vector routing, each node


shares its routing table with its
immediate neighbors periodically and
when there is a change.
Figure Updating in distance vector routing

A’s Original table


To Cost Next
A 0 --
B 5 --
C 2 --
D 3 --
E ∞
Updating
When a node receives a two-column table from a neighbor.it needs to
update its routing table.Updating takes three steps:
1.The receiving node needs to add the cost between itself and the
sending node to each value in the second column.If node C claims that
its distance to a destination is x mi, and the distance between A and C is
y mi,then the distance between A and that distance , via C is x+y mi.
2.The receiving node needs to add the name of the sending node to each
row as the third column .The sending node is the next node in the route.
3.The receiving node needs to compare each row of its table with the
corresponding row of the modified version of the received table.
Link State Routing
In link state routing,if each node in the domain has the entire topology
of the domain---
The list of nodes and links, how they are connected including the
type,cost(metric),and condition of the links(up or down)----
The node can use Dijkstra’s algorithm to build a routing table.
Figure Concept of link state routing
Link State Routing
Each node uses the same topology to create a routing table.
But the routing table for each node is unique.
Note:
This is analogous to a city map.while each person may have the same
map,each needs to take a different route to reach her specific
destination.
Note:each node has the partial knowledge about the node.
Figure Link state knowledge
Link state knowledge
• Node A knows that is is connected to node B with metric 5,to node C
with metric 2, and to node D with metirc 3.
• Node C knows that it is connected to node A with metirc 2,to node B
with metirc 4 and to node E with metirc 4.
• So on…….
Building Routing Tables
• The Dijkstra algorithm creates a shortest path tree from a graph.
• The algorithm divides the nodes into two sets:
tentative
And
permanent
Figure Dijkstra algorithm
Figure Example of formation of shortest path tree
1.Permanent list:empty Tentative list:A(0)
2.Permanent list:A(0) Tentative list:B(5),C(2),D(3)
3.Permanent list:A(0),C(2) Tentative list:B(5),D(3),E(6)
4.Permanent list:A(0),C(2),D(3) Tentative list:B(5),E(6)
5.Permanent list:A(0),B(5),C(2),D(3) Tentative list:E(6)
6.Permanent list:A(0),B(5),C(2),D(3),E(6) Tentative list:empty.
Table Routing table for node A
Border Gate Protocol
• Border Gateway Protocol(BGP) is an implementation of the path
vector protocol.
• Path vector routing proved to be useful for interdomain routing.
• In path vector routing we assume that there is one node in each
autonomous system that acts on behalf of the entire autonomous
system.
• Let us call it the speaker node.
• The speaker node in an AS creates a routing table and advertises it to
speaker nodes in the neighboring ASs.
Steps to create the routing table in Border
Gateway protocol.
Initialization
Sharing
Updating
Figure Initial routing tables in path vector routing
Initialization
• At the beginning ,each speaker node can know only the reachability of
nodes inside its autonomous system.
• Node A1 is the speaker for AS1,B1 for AS2,C1 for AS3 ,and D1 for AS4.
• Node A1 creates an initial table that shows A1 to A5 are located in
AS1 and can be reached through it.
• Node B1 advertises that B1 to B4 are located in AS2 and can be
reached through B1.And so on.
Sharing
• In path vector routing, a speaker in an autonomous system shares its
table with immediate neighbors.
• Node A1 shares its table with nodes B1 and C1.
• Node C1 shares its table with nodes D1,B1, and A1.
• Node B1 shares its table with C1 and A1.
• Node D1 shares its table with C1.
Figure Stabilized tables for autonomous systems

AS1-AS2-AS3-AS4
OR
AS1-AS3-AS4
Updating
When a speaker node receives a two-column table from a neighbor,it
updates its own table by adding the nodes that are not in its routing
table and adding its own autonomous system and the autonomous
system that sent the table.

You might also like