0% found this document useful (0 votes)
48 views29 pages

The Network Layer

This document discusses various topics related to network layer design and congestion control. It covers store-and-forward packet switching, routing algorithms like shortest path and distance vector routing, and congestion control techniques including congestion prevention policies, congestion control in virtual circuits and datagrams, load shedding, and jitter control. Random early detection is discussed as an algorithm to detect congestion before it occurs by selectively dropping packets.

Uploaded by

Rekha V R
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)
48 views29 pages

The Network Layer

This document discusses various topics related to network layer design and congestion control. It covers store-and-forward packet switching, routing algorithms like shortest path and distance vector routing, and congestion control techniques including congestion prevention policies, congestion control in virtual circuits and datagrams, load shedding, and jitter control. Random early detection is discussed as an algorithm to detect congestion before it occurs by selectively dropping packets.

Uploaded by

Rekha V R
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/ 29

Chapter 5

The Network Layer

1
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

2
Routing Algorithms
• The Optimality Principle

• Shortest Path Routing

• Flooding

• Distance Vector Routing

• Link State Routing

• Multicast Routing 3
Congestion Control Algorithms
• General Principles of Congestion Control
• Congestion Prevention Policies
• Congestion Control in Virtual-Circuit Subnets
• Congestion Control in Datagram Subnets
• Load Shedding
• Jitter Control

4
Congestion Control Algorithms
• Congestion is a problem when too many packets are
present in the subnet, performance degrades
• Congestions can be brought on by several factors:
– All of a sudden, streams of packets arrive on multiple input
lines and all of them need the same output line, a queue is
built up. Allocating more memory may help to a point but
with infinite memory, congestion gets worse because
packets are timed out.
– Slow processors make queue to be built up even though
there are enough bandwidth.
– Low-bandwidth also causes congestion.

5
Congestion

When too much traffic is offered, congestion sets in and


performance degrades sharply. 6
Congestion Control vs. Flow Control
• They are highly related to each other.

• Congestions control is a global issue, involving all


hosts, routers, and other factors

• Flow control relates to the point-to-point traffic


between a given sender and a given receiver, making
sure a faster sender won’t swamp a slow receiver.

7
General Principles of Congestion Control
• Open loop – solve the problem by essentially good
design.
– deciding when to accept new traffic, when to discard packets,
etc., without regard to the current state of the network

• Close loop – solve the problem based on the feedback.


– Monitor the system to detect when and where
congestion occurs.
– Pass information to places where action can be taken.
– Adjust system operation to correct the problem.

8
General Principles of Congestion Control
• The presence of congestion means that the load is
greater than the resources can handle

• Two solutions
– Increase the resource: increase the bandwidth, Split the
traffic over multiple routes, Put spare routers on-line

– Decrease the traffic: deny service to new users (hire-


freezing), degrade service to some/all users (reduce salary),
drop some users (lay off)

9
Congestion Prevention Policies

5-26

Policies that affect congestion.


10
Congestion Prevention Policies- Data link layer:
• Retransmission policy
• How fast a sender times out and what it transmits upon
times out. (go-back-n or selective repeat)
• Out of order caching policy
• If receiver discards all out-of-order packets, these need to
send again, leads to heavy load.- Buffering is required.
• Acknowledgement policy
• The ack packets generate extra traffic.
• If ack are saved up to piggyback onto reverse traffic, extra
timeouts and retransmission may result.
• Flow control policy
• A tight flow control scheme(eg- a small window) reduces
the data rate and prevent the congestion.
11
Congestion Prevention Policies- Network layer:

• Virtual circuits v/s datagram


• Many congestion control algorithm works only with
virtual circuits

• Packet queuing and service policy


• Relates to whether routers have one queue per input line
or one queue per output line or both.
• Also specifies the order in which packets are processed.

• Packet discard policy


• It is the rule telling which packet is dropped when there is
no space.
12
Congestion Prevention Policies- Network layer:

• Routing algm
A good routing algm can avoid congestion by spreading the
traffic all over the line.

• Packet life time management


• Deals with how long a packet may live before being
discarded.
• If it is too long or too short , problem occurs.

13
Congestion Prevention Policies- Transport layer:

• Same issue as in data link layer

• Timeout determination
• Determining the timeout interval is very important.
• If the interval is too short, extra packets will be sent
unnecessarily.
• If it is too long, congestion will be reduced, but the
response time will suffer whenever a packet is lost.

14
Congestion Control in Virtual-Circuit
Subnets

(a) A congested subnet. (b) A redrawn subnet, eliminates


congestion and a virtual circuit from A to B.
15
Congestion Control in Datagram Subnets
• Each router can easily monitor the utilization of its
output lines and other resources.

• The Warning bit


• If the router is in warning state, it sends the warning bits.
• As long as the warning bits continued to flow in, the
source continued to decrease its transmission rate.

• The choke packets


• If a router is congested, it sends a choke packet back to
the source host

16
The choke packets
• When the source host gets the choke packet, it is required
to reduce the traffic to the specific destination by X %.

• Since other hosts may also send choke packets to that


source, the source should ignore choke packets referring
that destination for a fixed time interval.

• After that time interval, the source again listen for choke
packets for another interval. If one arrives, the line is still
congested, so the host reduces the flow still more and
begins ignoring choke packets again.

17
The choke packets
• If no choke packets arrive during the listening period, the
host may increase the flow again.

• Hop-by-hop choke packets


– Sending a choke packet to a long distance does not work.

– An alternative approach is to have the choke packet take


effect at every hop it passes through.

– i.e as soon as the choke packet reaches at F, it reduces the


traffic to D.
– In effect, quick relief at the point of congestion.
18
Choke packets

A choke packet that affects only the source..


Hop-by-hope choke packets

A choke packet that affects each hop it passes through.


Load shedding
• If the routers can no longer handle the flow or traffic, just
throw the packets away.

• Which packet to discard may depend on the applications


running.

• For file transfer, old packets worth more than a new one. i.e
dropping packet 6 and keeping packets 7 through 10 will cause
a gap at the receiver which may lead to packet retransmission.

• For multimedia, a new packet is more important than an old


one.

• First policy is called wine, and the second is called milk. 21


Load shedding
• The selection process of packet to be discarded, requires
cooperation from the sender.

• To implement an intelligent discard policy, the applications


may mark their packets in priority classes to indicate how
important they are.

• So when packets have to be discarded, the routers can first drop


packets from the lowest class, then the next lowest class and so
on.

22
Random Early Detection- RED
• i.e detect the congestion before it happens.

• Here the algorithm use the idea of discarding packets before


all the buffer space is really exhausted.

• In TCP, slow down the source to prevent packet losing.

• Or the routers can drop the packets before it get congested.

• The idea is that there is a time for action to be taken before it is


too late.

23
Random Early Detection- RED
• To determine when to start discarding, routers maintain a
running average of their queue length.

• When the avg queue length on some line exceeds a


threshold, the line is said to be congested and action is
taken.

24
Random Early Detection- RED
• How router tell the source about the problem?
– With Choke packets-
» it put even more load on the already congested network.

– Just discard the selected packet and not report it.


» Source will notice lack of acknowledgment and take
necessary action
» Source knows that packet loss is generally due to
congestion and discards, it will respond by slowing
down instead of trying harder.

25
Jitter control
• The variation (standard deviation) in the packet arrival
time is called jitter.

• High jitter ie having some packets taking 20msec and


others taking 30 msec to arrive will give an uneven
quality to the sound or movie.

• An agreement that 99 of the packets be delivered with a


delay in the range 24.5msecto 25.5 msec is acceptable.

26
Jitter Control

(a) High jitter. (b) Low jitter. 27


Jitter control
• In some applications like video on demand, the jitter can
be eliminated by buffering at the receiver and then
fetching data for display from the buffer instead of from
the network in real time.

28
29

You might also like