Professional Documents
Culture Documents
5.3 Networl Layer
5.3 Networl Layer
Fig 9.? When too much traffic is offered, congestion sets in and performance degrades sharply
When no. of packets dumped into the subnet by the host is within its carrying capacity of
subnet, they are all delivered (except for few which have transmission error) and number
delivered is proportional to number sent.
As traffic increase too far, the routers are no longer able to cope and they begin losing
packets. At very high traffic, performance collapses completely and almost no packets are
delivered.
Following factors are responsible for congestion to occur
a) Many input line requires same output line
If all of sudden, streams of packets begin arriving on three or four input lines and all need the
same output line, a queue will build up. If there is insufficient memory to hold all of them,
packets will be lost.
Scientist Nagle discovered that even if routers have an infinite amount of memory still it does
not solve congestion problem. Because by the time packets get to the front of queue, they
have already timed out and their duplicates are sent by sender after timeout. So lot of packets
will be dutifully forwarded to next router, increasing the load all the way to destination.
b) Slow Processors
If router’s CPU is slow, then CPU requires more time to process each packet and for other
tasks such as queuing buffers, updating tables etc. So as a result queues are built up even
though there is enough buffer space.
Updating the lines (bandwidth) but not changing the processors or vice versa helps a little but
frequently just shifts bottleneck.
Solution is to upgrade all components and maintain balance them.
Presence of congestion means that load (temporarily) greater than resources ( in part of
system) can handle.
Two solutions can be possible
a) Increase Resources
For increasing resources possible ways are
• Subnet may start using dial-up telephone line to temporarily increase the bandwidth
between certain points.
• Splitting traffic over multiple routes instead of always using best one.
• Spare routers which are used as backups can make online to give more capacity.
• On satellite systems, increasing transmission power often gives higher bandwidth.
• But sometimes it is not possible to increase capacity or it has already been increased
to the limit.
b) Decrease Load
For decreasing load possible ways are
• Deny services to some users.
• Degrade services to some or all users.
• Users schedule their demands in a more predictable way.
There is always confusion between Congestion Control and Flow Control as their
relationship is subtle.
Congestion Control
It has global scope. Congestion control has to do with making sure the subnet is able to carry
the offered traffic.
Involve behavior of all hosts, all the routers, store-and-forward processing within the routers
and all other factors that tend to diminish the carrying capacity of subnet.
For example consider Store-and-Forward Network with 1 Mbps lines and 1000 large
computers, half of which are trying to transfer files at 100 Kbps to other half. The problem is
not that of facts senders overpowering slow receivers, but that the total offered traffic
exceeds the network handling capacity.
Flow Control
It has local scope. It relates to point-to-point traffic between a given sender and receiver.
Its job is to make sure that a fast sender cannot continuously transmit data faster than the
receiver is able to absorb it.
It frequently involves some direct feedback from receiver to sender to slow down speed.
For example consider Fiber Optic Network with capacity of 1000Gbps on which a
supercomputer is trying to transfer a file to personal computer at 1Gbps. Although there is no
congestion, flow control is needed to force the supercomputer to stop frequently to give
personal computer to relax.
Open Loop
It is Avoidance Strategy. Solve the problem by good design i.e. make sure it does not occur
in first place. Once the system is up and running, midcourse corrections are not made.
• Tools for Open Loop includes
• Deciding when to accept new traffic?
• Deciding when to discard packets and which ones?
• Making scheduling decisions at various points in the network.
All above factors have common fact is that they make decisions without regard to current
state of network.
Closed Loop
It is Repair Strategy. Solution based on concept of feedback loop. This approach has three
parts.
a) Monitor the system to detect when and where congestion occurs.
Variety of matrices can be used to monitor the subnet for congestion. List of Metrics are
Percentage of all packets discarded for lack of buffer space. Average Queue length No. of
packets that time out are transmitted Average packet delay, standard deviation of packet
delay. In all cases rising number indicates growing congestion.
i. Pass congestion information to place where action can be taken.
Routers, who’s detecting congestion sent packets to the traffic source or sources with
announcement of the congestion problem.
ii. Adjust system operation to correct the problem.
A bit of field can be reserved in every packet for routers. Router fills this field in all
outgoing packets whenever it detects collision and warns the neighbors. Hosts or
routers periodically send probe packets out to explicitly ask about congestion.
For feedback scheme to work properly, time scale must be adjusted carefully. Response of
congestion control policies should not be too much fast or too much slow. To work well,
some kind of averaging is needed.
Network Layer
i. Virtual Circuits Vs Data gram inside the subnet
Many congestion control algorithms works only with virtual circuit subnet. So choice
of either virtual circuit or datagram affects congestion.
Transport Layer
Issues are same as Data Link Layer but determining timeout interval is harder because transit
time across network is less predictable as transport entities run in end systems than transit
time over a wire between two routers.
If timeout interval is too short, extra packets will be sent unnecessarily. If it is too long,
congestion will be reduced but response time will suffer whenever a packet is lost.
Select alternative routes to avoid part of the network that is overloaded, i.e. temporarily
rebuild your view of network.
Suppose that host attached to router A wants to setup connection with host attached to router
B. As this connection is passes through one of congested routers. To avoid this situation
subnet is redrawn with omission of congested routers and their lines. Dashed line shows a
possible route for virtual circuits that avoids congested routers.
Reservation (Negotiation while virtual circuit set up)
Negotiate quality of connection in advance, so that network provider can reserve buffers and
other resources, guaranteed to be there
Advantages
With this approach, rare chances of congestion as necessary resources are guaranteed
available.
Disadvantages
It tends to waste resources.
i) Warning Bit
Special bit in packet header is set by router to warn the source when congestion is detected.
When packet arrived at its destination, special bit is copied and is piggybacked on
acknowledgement and send to sender. Source then cut back on traffic.
As long as router was in warning state, it continued to set warning bit and source
continued to get acknowledgement of warning bit. Source monitored fraction of
acknowledgements with bit set and adjusted its transmission rate accordingly.
When warning bits slow down, source increases transmission rate.
Diagram form net
Advantages
No bandwidth overhead for control packets and only one bit is set in packet.
Disadvantages
It uses round to tell source to slowdown so long delay before which sender can start reducing
traffic and thus relieve congested router.
Fig 9.? Functioning of Choke Packets a) Heavy traffic between nodes P & Q, b) Node Q sends
choke packet to p, c) Choke packet reaches P, d) P reduces the flow and send a reduced flow out
e) Reduced flow reaches node Q
Advantage:
It provides quicker warning to the sender to reduce traffic.
Disadvantages:
Difficult to decide by how much a host slow down. Because answer depends on how much
traffic host is sending, how much of congestion it is responsible for and total capacity of
congested region. Such information is not readily available in practice.
Figure 9.? Hop-by-Hop choke packets, (a) Heavy traffic between nodes P and Q, (b) Node Q
sends the Choke packet to P, (c) Choke packet reaches R, and the flow between R and Q is
curtail down, Choke packer reaches P, and P reduces the flow out
In hop-by-hop, router sends a choke packet to previous router which reduces rate in the line
(network interface) through which warning is received. Only if necessary the previous router
forwards the warning to its previous hop.
Advantage:
Provide very quick relief.
Load Shedding (Discarding Packets)
It is one of the simplest and more effective techniques. In this, whenever a router finds that
there is congestion in the network, it simply starts dropping out the packets. Packet which is
to be dropped depends on application. There are different methods by which a host can find
out which packets to drop.
i) Discard Randomly
This method picks packets at random to discard. Not good method.
ii) Discard younger ones (Wine Policy)
Suitable for file transfers. Cannot discard older packets since this will cause gap in the
received data.
For example in 12 packet file, dropping 6 may require 7 through 12 to be retransmitted (if the
receiver routinely discards out-of-order packets) whereas dropping 10th packet may require
only 10 through 12 to be retransmitted.
iii) Discard Older Ones (Milk Policy)
Suitable for multimedia files. For multimedia, a new packet is more important than an old
one. For example for real-time voice or video, it is probably better to throw away old data
and keep new packets.
iv) Discard less important ones (Intelligent Policy)
Support from sender is requires to mark their packets in priority classes to indicate how
important they are. Priority classes may be of type very important, ever discard etc.
For example, in MPEG video standard, periodically an entire frame is transmitted and this is
followed by subsequent frames as differences from full reference frame. Drop packets that is
part of difference is preferred to drop one that contains part of last full reference frame.
Another example, consider transmitting a document containing ASCII text and pictures.
Losing a line of pixels in some image is far less damaging than losing a line of readable text.
Jitter Control
For applications such as audio and video streaming, it does not matter much if packets takes
20msec or 30msec to be delivered as long as the transit time is constant.
The variation in packet arrival times is called Jitter. For example, some packets taking
20msec and other taking 30msec to arrive will give an uneven quality to sound or movie.
Two approaches to overcome the jitter problem
i. Check packet schedule at each router along the path
When packet arrives at a router, the router checks to see how much the packet is
behind or ahead of its schedule. This information is stored in the packet and updated
at each hop. If the packet is ahead of schedule, it is held long enough to get back on
schedule. If is behind schedule, the router tries to get it out the door quickly.
ii. Buffering
Buffering data at receiver and then fetching data for display from the buffer instead of
from network in real time. It is suitable for video on demand. Not suitable for real-
time interaction applications such as Internet Telephony & Video Conferencing