Network protocols and
Algorithms
Ch2: The Network Layer
OSI Model
7 Application
6 Presentation
Session
5
Transport
4
Network
3
Data Link
2
Physical
1
Network Layer
• The network layer is responsible for routing packets
from the source to destination.
• The network layer must know the topology of the
subnet and choose appropriate paths through it.
• When source and destination are in different
networks, the network layer (IP) must deal with
these differences.
Network Layer Functionality
• Network layer functionality (host)
– Routing algorithms
– Provide a service model to the transport layer
– Pass it up to transport if destination reached
• Network layer functionality (Routers)
– Routing algorithms
The Internet Network layer
Functionality
Host, router network layer functions:
Transport layer: TCP, UDP
Routing protocols IP protocol
•path selection •addressing conventions
•RIP, OSPF, BGP •datagram format
Network •packet handling conventions
layer forwarding
table ICMP protocol
•error reporting
•router “signaling”
Link layer
physical layer
Issues Related to the Network
Layer
• Error Control
• Flow Control
• Congestion Control
• Routing
• Security
Routing
• Routing algorithm: is the piece of software (part of
the Network Layer) responsible for deciding on
which output line to transmit an incoming packet.
Algorithm properties: correctness, simplicity,
robustness,, fairness, optimality, and scalability.
Routing Algorithm Classification
Adaptive Routing Non-Adaptive
Algorithms Routing
Use dynamic information as Algorithms
current topology, load, delay,
etc. to select routes. routes never change once initial
routes have been selected.
Also called static routing.
1. Centralized
2. Isolated 1. Flooding
3. Distributed 2. Selective flooding
Adaptive Algorithms (Routing)
1) Centralized : a centralized node makes all routing
decisions. It has access to global information.
2) Isolated : each router makes its routing decisions
using only the local information it has on hand.
Specifically, routers do not even exchange
information with their neighbors.
3) Distributed: algorithms that use a combination
of local and global information.
None Adaptive Routing Algorithms
1) Flooding: is a form of isolated routing. Does not
select a specific route. When a router receives a
packet, it sends a copy of the packet out on each
line (except the one on which it arrived). Used in
military applications.
2) Selective flooding: a router sends packets out only
on those lines in the general direction of the
destination.
Shortest Path Routing
1. Bellman-Ford Algorithm [Distance Vector]
2. Dijkstra’s Algorithm [Link State]
What does it mean to be the shortest route?
a. Minimize mean packet delay
b. Maximize the network throughput
c. Mininize the number of hops along the path