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

Computer Networks: Topic: Network Layer: Delivery, Forwarding, and Routing

The document discusses the network layer's role in packet delivery, forwarding, and routing, detailing the processes involved in both direct and indirect delivery. It covers various forwarding techniques, routing tables, and the differences between static and dynamic routing tables, along with popular routing protocols like RIP, OSPF, and BGP. Additionally, it explains the concepts of autonomous systems and the importance of path vector routing for interdomain routing.

Uploaded by

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

Computer Networks: Topic: Network Layer: Delivery, Forwarding, and Routing

The document discusses the network layer's role in packet delivery, forwarding, and routing, detailing the processes involved in both direct and indirect delivery. It covers various forwarding techniques, routing tables, and the differences between static and dynamic routing tables, along with popular routing protocols like RIP, OSPF, and BGP. Additionally, it explains the concepts of autonomous systems and the importance of path vector routing for interdomain routing.

Uploaded by

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

Computer Networks

Topic: Network Layer: Delivery,


Forwarding, and Routing(1)
by
Himanshi Chaudhary
(M. Tech., Ph.D.*)
KIET Group of Institutions
22-1 DELIVERY

The network layer supervises the handling of the


packets by the underlying physical networks. We
define this handling as the delivery of a packet.

Topics discussed in this section:


Direct Versus Indirect Delivery
Direct and indirect delivery

22.3
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
Route method versus next-hop method

22.5
Host-specific versus network-specific method

22.6
Default method

22.7
Forwarding Process:

Simplified forwarding module in classless address

22.8

In classless addressing, we need at least four columns


in a routing table.
m3
Make a routing table
for router R1, using
the configuration in
Figure
Address aggregation

22.10
UNICAST ROUTING PROTOCOLS

A routing table can be either static or dynamic. A static


table is one with manual entries. A dynamic table is
one that is updated automatically when there is a
change somewhere on the Internet. A routing protocol
is a combination of rules and procedures that lets
routers in the Internet inform each other of changes.

Topics discussed in this section:


Optimization
Intra- and Interdomain Routing
Distance Vector Routing and RIP
Link State Routing and OSPF
Path Vector Routing and BGP
Routing table
Static Dynamic
• Which contains information • A routing table is updated
manually entered by the periodically by using RIP, OSPF,
administrator. BGP.
• Admin enters route to every • Update tables when there is
destination. change in internet due to
• It can not update automatically shutdown of router or breaking
when there is any change in of link.
internet. • Updating is done for efficient
delivery of packets.

22.12
nomous systems: An autonomous system (AS) is a group of networks and routers
r the authority of a single administration.

Routing inside an autonomous


system is referred to as
Intradomain Routing.

Routing between autonomous


systems is referred to as
Interdomain Routing.
Popular routing protocols

22.14
Distance vector routing tables: In distance vector routing, the least-
cost route between any two nodes is the route with minimum distance.
In this protocol, as the name implies, each node maintains a vector
(table) of minimum distances to every node.

22.15
Note

In distance vector routing, each node


shares its routing table with its
immediate neighbors22.16 periodically and

when there is a change.


RIP - Routing Information Protocol

• A simple intra-domain protocol


• Straight forward implementation of Distance Vector Routing
• Each router advertises its distance vector every 30 seconds (or whenever its
routing table changes) to all of its neighbors
• RIP always uses 1 as link metric
• Maximum hop count is 15, with “16” equal to “”
• Routes are timeout (set to 16) after 3 minutes if they are not updated

17
RIP Problems
• RIP takes a long time to stabilize
• Even for a small network, it takes several minutes until the routing tables have
settled after a change
• RIP has all the problems of distance vector algorithms, e.g., count-to-
Infinity
• RIP uses split horizon to avoid count-to-infinity
• The maximum path in RIP is 15 hops

18
Link state routing

• Each node has partial knowledge.


• Global knowledge about topology is not clear.
• Whole topology can be combined from partial knowledge of each
node.
• Topology is dynamic representing the latest state of each node and
each link.
• Each node uses same topology, but routing table for each node is
unique because the calculations are based on different
interpretations of topology.

22.19
Concept of link state routing

22.20
Link state knowledge

22.21
Building routing tables

• Creation of states of the link by each node, called the link state
packet.
• Dissemination of LSP to every other router, called flooding, in an
efficient and reliable way.
• Formation of a shortest path tree for each node.
• Calculation of a routing table based on shortest path tree.

22.22
Continue…….
• Creation of LSP
• When there is change in topology of domain
• On a periodic basis
• Flooding of LSP
• Creating Node sends copy of LSP out of each interface.
• If a node receives LSP, compares it with the copy it may
already have. If older discards it and if newer it does
following:
• It discards the old LSP and keeps the new one.
• It sends a copy to each interface except the one from it receives.

• Formation of shortest path tree : Dijkstra Algorithm

22.23
Dijkstra algorithm

22.24
Example of formation of shortest path tree

Routing table for node A


OSPF
Open shortest path first
Intra-domain routing protocol.
It is based on link state routing.

22.26
Areas in an autonomous system

22.27
Types of links

22.28
Point-to-point link

A point-to-point link connects two routers without any other host or router in
between.
The purpose of the link (network) is just to connect the two routers.
Transient link
A transient link is a network with several routers attached to it. The data can
enter through any of the routers and leave through any router.

22.30
Stub link
A stub link is a network that is connected to only one router. The data
packets enter the network through this single router and leave the network
through this same router.

22.31
Popular routing protocols

22.32
Path vector routing (Inter domain Routing)

 Path vector routing proved to be useful for interdomain


routing. The principle of path vector routing is similar to
that of distance vector routing.
Path vector routing
 Initialization. At
the beginning,
each speaker node
can know only the
reachability of
nodes inside its
autonomous
system
Sharing: a speaker in an …
autonomous system shares
its table with immediate
neighbors.
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
Advantage of path vector routing
Loop prevention: The instability of distance vector routing and the creation of loops
can be avoided in path vector routing. When a router receives a message, it checks
to see if its autonomous system is in the path list to the destination. If it is, looping is
involved and the message is ignored.
Policy routing: Policy routing can be easily implemented through path vector
routing. When a router receives a message, it can check the path. If one of the
autonomous systems listed in the path is against its policy, it can ignore that path
and that destination. It does not update its routing table with this path, and it does
not send this message to its neighbors.
Optimum path: Similar AS and such as security, safety, and reliability, can also be
applied.
Border gateway protocol (BGP)

 Border Gateway Protocol (BGP) is an interdomain routing


protocol using path vector routing. It first appeared in
1989 and has gone through four versions.
 Stub AS: A stub AS has only one Types of Autonomous Systems
connection to another AS.
 Multihomed AS : A
multihomed AS has more than
one connection to other ASs, but
it is still only a source or sink for
data traffic
 Transit AS: A transit AS is a
multihomed AS that also allows
transient traffic. Good examples
of transit ASs are national and
international ISPs (Internet
backbones).
Path attributes
The path was presented as a list of autonomous systems, but is, in fact, a list of
attributes. Each attribute gives some information about the path.
The list of attributes helps the receiving router make a more-informed decision
when applying its policy.

Attributes are divided into two broad categories:


well known and optional.

A well-known attribute is one that every BGP router must recognize.
 An optional attribute is one that needs not be recognized by every router.

Well-known attributes are themselves divided into two categories:


mandatory and discretionary.
A well-known mandatory attribute is one that must appear in the description of a
route.
A well-known discretionary attribute is one that must be recognized by each router,
but is not required to be included in every update message.

 One well-known mandatory attribute is ORIGIN.


 This defines the source of the routing information (RIP, OSPF,
and so on). Another well-known mandatory attribute is
AS_PATH. This defines the list of autonomous systems
through which the destination can be reached. Still another
well-known mandatory attribute is NEXT-HOP, which defines
the next router to which the data packet should be sent.

The optional attributes can also be subdivided into two categories:

transitive and nontransitive.


An optional transitive attribute is one that must be passed to the next router by the
router that has not implemented this attribute.
An optional nontransitive attribute is one that must be discarded if the receiving
router has not implemented it.
BGP session

 BGP session: The exchange of routing information


between two routers using BGP takes place in a session.
 A session is a connection that is established between
two BGP routers only for the sake of exchanging routing
information.
 To create a reliable environment, BGP uses the services
of TCP.
 In other words, a session at the BGP level, as an
application program, is a connection at the TCP level.
External and Internal BGP
BGP can have two types of sessions:

external BGP (E-BGP) and internal BGP (I-BGP) sessions.


The E-BGP session is used to exchange information between two
speaker nodes belonging to two different autonomous systems.
The I-BGP session, on the other hand, is used to exchange
routing information between two routers
inside an autonomous system.
Reference
•Behrouz Forouzan, “Data Communication and
Networking”, McGraw Hill

45
Thank
You

You might also like