0% found this document useful (0 votes)
4 views

DCN Network Layer

The document provides an overview of the Network Layer, detailing its complexity, services, and design issues, including routing and forwarding mechanisms. It discusses various routing algorithms, including centralized and distributed routing, as well as static and dynamic routing methods. Additionally, it covers the implementation of connectionless and connection-oriented services, along with routing metrics and protocols like Distance Vector and Link State Routing.

Uploaded by

bugfinder1149
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)
4 views

DCN Network Layer

The document provides an overview of the Network Layer, detailing its complexity, services, and design issues, including routing and forwarding mechanisms. It discusses various routing algorithms, including centralized and distributed routing, as well as static and dynamic routing methods. Additionally, it covers the implementation of connectionless and connection-oriented services, along with routing metrics and protocols like Distance Vector and Link State Routing.

Uploaded by

bugfinder1149
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/ 36

The Network Layer

Dr. Ajay Singh Raghuvanshi


Electronics & Telecommunication
Engineering, NIT, Raipur
Network Layer Overview
 Network Layer: the most complex layer
 Requires the coordinated actions of multiple, geographically
distributed network elements (switches & routers)
 Must be able to deal with very large scales
 Billions of users (people & communicating devices)
 Biggest Challenges
 Addressing: where should information be directed to?
 Routing: what path should be used to get information there?

04/18/2025 Dr.Ajay Singh Raghuvanshi 2


Network Layer Services
Messages
Messages

Transport Segments Transport


layer layer

Network Network
service service

Network Network Network Network


layer layer layer layer

Data link Data link Data link Data link End


End layer layer layer layer
system
system
Physical Physical Physical Physical β
α
layer layer layer layer

04/18/2025 Dr.Ajay Singh Raghuvanshi 3


Network Layer Design Issues
• Store-and-Forward Packet Switching
• Services Provided to the Transport Layer
• Implementation of Connectionless Service
• Implementation of Connection-Oriented Service
• Comparison of Virtual-Circuit and Datagram
Subnets

04/18/2025 Dr.Ajay Singh Raghuvanshi 4


Network Layer Functions
Essential
 Routing: mechanisms for determining the set of best paths
for routing packets requires the collaboration of network
elements
 Forwarding: transfer of packets from NE inputs to outputs
 Priority & Scheduling: determining order of packet
transmission in each NE
Optional: congestion control, segmentation & reassembly,
security

04/18/2025 Dr.Ajay Singh Raghuvanshi 5


Store-and-Forward Packet Switching
The environment of the network layer protocols.

04/18/2025 Dr.Ajay Singh Raghuvanshi 6


Store-and-Forward Packet Switching
1 3
6

2
5 Node
(switch or router)

 Three possible (loop free) routes from 1 to 6:


 1-3-6, 1-4-5-6, 1-2-5-6
 Which is “best”?
 Mindelay? Min hop? Max bandwidth? Min cost?
Max reliability?
04/18/2025 Dr.Ajay Singh Raghuvanshi 7
1 3
6
Routing Tables
4

2
5 Node
Node 3
(switch or router)

Node 1 Destination Next node Node 6


Destination Next node 1 1 Destination Next node
2 2 2 4 1 3
3 3 4 4 2 5
4 4 5 6 3 3
5 2 6 6 4 3
6 3 5 5

Node 4
Destination Next node
1 1
2 2
Node 2 Node 5
3 3
Destination Next node Destination Next node
5 5
1 1 6 3 1 4
3 1 2 2
4 4 3 4
5 5 4 4
6 5 6 6
04/18/2025 Dr.Ajay Singh Raghuvanshi 8
Implementation of Connectionless Service
Routing within a diagram subnet.

04/18/2025 Dr.Ajay Singh Raghuvanshi 9


Implementation of Connection-Oriented Service
Routing within a virtual-circuit subnet.

04/18/2025 Dr.Ajay Singh Raghuvanshi 10


Comparison of Virtual-Circuit and Datagram Subnets

5-4

04/18/2025 Dr.Ajay Singh Raghuvanshi 11


Routing Algorithm: Requirements
 Rapid and accurate delivery of packets
 Must operate correctly
 Rapid convergence
 Responsiveness to changes and avoid routing loops
 Topology or bandwidth changes, congestion
 Freedom from persistent loops
 Optimality
 Resource utilization, path length
 Robustness
 Continues working under high load, congestion, faults
 Simplicity
 Efficient implementation, reasonable processing load
04/18/2025 Dr.Ajay Singh Raghuvanshi 12
Routing Algorithm: Classification
Centralized vs Distributed Routing
 Centralized Routing
 All routes determined by a central node
 All state information sent to central node
 Problems adapting to frequent topology changes
 Does not scale
 Distributed Routing
 Routes determined by routers using distributed algorithm
 State information exchanged by routers
 Adapts to topology and other changes
 Better scalability

04/18/2025 Dr.Ajay Singh Raghuvanshi 13


Static vs Dynamic Routing
 Static Routing
 Setup manually, do not change; requires administration
 Works when traffic predictable & network is simple
 Used to override some routes set by dynamic algorithm
 Used to provide default router
 Dynamic Routing
 Adapt to changes in network conditions
 Automated
 Calculates routes based on received updated network state information

04/18/2025 Dr.Ajay Singh Raghuvanshi 14


Flat vs Hierarchical Routing
 Flat Routing
 All
routers are peers
 Does not scale
 Hierarchical Routing
 Partitioning:
Domains, autonomous systems, areas...
 Some routers part of routing backbone
 Some routers only communicate within an area
 Scales

04/18/2025 Dr.Ajay Singh Raghuvanshi 15


Routing Algorithms
• The Optimality Principle
• Shortest Path Routing
• Flooding
• Distance Vector Routing
• Link State Routing
• Hierarchical Routing
• Broadcast Routing
• Multicast Routing
• Routing for Mobile Hosts
• Routing in Ad Hoc Networks

04/18/2025 Dr.Ajay Singh Raghuvanshi 16


Shortest Paths Problem
 Many possible paths connect any given source and to any
given destination
 Routing involves the selection of the path to be used to
accomplish a given transfer
 Typically it is possible to attach a cost or distance to a link
connecting two nodes
 Routing can then be posed as a shortest path problem

04/18/2025 Dr.Ajay Singh Raghuvanshi 17


Shortest Path Routing (Link Cost)

The first 5 steps used in computing the shortest path from A to D (A-B-E-F-H-D) Link Cost = 10. The arrows indicate the
working node.
04/18/2025 Dr.Ajay Singh Raghuvanshi 18
Routing Metrics
Means for measuring desirability of a path
 Path Length = sum of costs or distances
 Possible metrics
 Hop count: rough measure of resources used
 Reliability: link availability; BER
 Delay: sum of delays along path; complex & dynamic
 Bandwidth: “available capacity” in a path
 Load: Link & router utilization along path
 Cost: $$$

04/18/2025 Dr.Ajay Singh Raghuvanshi 19


Shortest Path Protocols
Distance Vector Protocols
 Neighbors exchange list of distances to destinations
 Best next-hop determined for each destination
 Bellman-Ford (distributed) shortest path algorithm

Link State Protocols


 Link state information flooded to all routers
 Routers have complete topology information
 Shortest path (& hence next hop) calculated
 Dijkstra (centralized) shortest path algorithm

04/18/2025 Dr.Ajay Singh Raghuvanshi 20


Distance Vector Routing
Distance Vector Routing is one of the dynamic routing algorithm.
It is suitable for packet switched network.
In distance vector routing, each router maintains a routing table. It contains one
entry for each router in the subnet.
This entry has two parts:
a. The first part shows the preferred outgoing line to be used to reach the
destination.
b. Second part gives an estimate of the time or distance or hop count to the
destination.
In distance vector routing, a node tells its neighbour about its distance
to every other node in the network.

04/18/2025 Dr.Ajay Singh Raghuvanshi 21


A B C D E
A - ,0 A, 1 B, 2 C, 3 D, 4
B B, 1 - ,0 B, 1 C, 2 D, 3
C B, 2 C, 1 0, - C, 1 D, 2
D B, 3 C, 2 D, 1 0, - D, 1
E B, 4 C, 3 D, 2 E, 1 0, -
04/18/2025 Dr.Ajay Singh Raghuvanshi 22
Distance Vector Routing count-to-infinity problem

The count-to-infinity problem.

04/18/2025 Dr.Ajay Singh Raghuvanshi 23


Routing Information Protocol (RIP)
 RIP had widespread use because it was distributed with BSD Unix in
“routed”, a router management daemon.
 RIP is the most used Distance Vector protocol.
 RFC1058 in June 1988.
 Sends packets every 30 seconds or faster.
 Runs over UDP.
 Metric = hop count
 BIG problem is max. hop count =16
 RIP limited to running on small networks!!
 Upgraded to RIPv2

04/18/2025 Dr.Ajay Singh Raghuvanshi 24


Link State Routing
Each router must do the following:
1. Discover its neighbors, learn their network address.
2. Measure the delay or cost to each of its neighbors.
3. Construct a packet telling all it has just learned.
4. Send this packet to all other routers.
5. Compute the shortest path to every other router.

04/18/2025 Dr.Ajay Singh Raghuvanshi 25


Link State Algorithm
1. Each router is responsible for meeting its neighbors and
learning their names.
2. Each router constructs a link state packet (LSP) which
consists of a list of names and cost to reach each of its
neighbors.
3. The LSP is transmitted to ALL other routers. Each router
stores the most recently generated LSP from each other
router.
4. Each router uses complete information on the network
topology to compute the shortest path route to each
destination node.
04/18/2025 Dr.Ajay Singh Raghuvanshi 26
Building Link State Packets

(a) A subnet. (b) The link state packets for this


subnet.

04/18/2025 Dr.Ajay Singh Raghuvanshi 27


X A X A

C B D C B D

(a) (b)

X A X A

C B D C B D

(c) (d)

Reliable LSP Flooding

04/18/2025 Dr.Ajay Singh Raghuvanshi 28


Reliable Flooding
• The process of making sure all the nodes participating in the
routing protocol get a copy of the link-state information from all the
other nodes.
• LSP contains:
– Sending router’s node ID
– List connected neighbors with the associated link cost to each
neighbor
– Sequence number
– Time-to-live

04/18/2025 Dr.Ajay Singh Raghuvanshi 29


Reaction to Failure
 If a link fails,
 Router sets link distance to infinity & floods the network with an update
packet
 All routers immediately update their link database & recalculate their shortest
paths
 Recovery very quick
 But watch out for old update messages
 Add time stamp or sequence # to each update message
 Check whether each received update message is new
 If new, add it to database and broadcast
 If older, send update message on arriving link

04/18/2025 Dr.Ajay Singh Raghuvanshi 30


Why is Link State Better?
 Fast,loop-less convergence
 Support for precise metrics, and multiple metrics if
necessary (throughput, delay, cost, reliability)
 Support for multiple paths to a destination
algorithm can be modified to find best two paths

04/18/2025 Dr.Ajay Singh Raghuvanshi 31


Hierarchical Routing
All links are 1 cost

04/18/2025 Dr.Ajay Singh Raghuvanshi 32


Broadcast Routing

Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The tree built by
reverse path forwarding.

04/18/2025 Dr.Ajay Singh Raghuvanshi 33


Multicast Routing

(a) A network. (b) A spanning tree for the leftmost router.


(c) A multicast tree for group 1. (d) A multicast tree for group 2.
04/18/2025 Dr.Ajay Singh Raghuvanshi 34
Routing for Mobile Hosts
A WAN to which LANs, MANs, and wireless cells are attached.

04/18/2025 Dr.Ajay Singh Raghuvanshi 35


Routing in Ad Hoc Networks
Possibilities when the routers are mobile:
1. Military vehicles on battlefield.
 No infrastructure.

2. A fleet of ships at sea.


 All moving all the time
3. Emergency works at earthquake .
 The infrastructure destroyed.

4. A gathering of people with notebook computers.


 In an area lacking 802.11.

04/18/2025 Dr.Ajay Singh Raghuvanshi 36

You might also like