5' Congestion Control - PowerPoint PPT Presentation

1 / 39
About This Presentation
Title:

5' Congestion Control

Description:

Network Layer provides congestion control to ensure timely delivery of packets ... When a router becomes inundated with packets, it simply drops some. Load Shedding ... – PowerPoint PPT presentation

Number of Views:49
Avg rating:3.0/5.0
Slides: 40
Provided by: abc791
Category:

less

Transcript and Presenter's Notes

Title: 5' Congestion Control


1
5. Congestion Control
  • Too many packets in part of the subnet
  • Performance Degrades Congestion
  • Network Layer provides congestion control to
    ensure timely delivery of packets from souce to
    destination

2
Congestion Control
  • Causes of congestion
  • Types of congestion control schemes
  • Solving congestion

3
5.1 Causes of Congestion
  • 1. Exhaustion of buffer space
  • 2. Deadlock

4
5.1.1 Exhaustion of Buffer Space
  • Routers maintain packet queues (or buffers)
  • Buffers fill up if
  • Routers are too slow, OR
  • Combined input traffic rate exceeds the outgoing
    traffic rate
  • Insufficient buffer space leads to congestion

5
Exhaustion ofBuffer Space (contd)
50 Mbps
Router
50 Mbps
50 Mbps
50 Mbps
Buffer
6
5.1.2 Deadlock
  • The first router cannot proceed until the second
    router does something, and the second router
    cannot proceed until the first router does
    something
  • Both routers come to a completely halt and stay
    that way forever

7
Types of Deadlock
  • 1. Store and Forward Lockup
  • Direct Store and Forward Lockup
  • Indirect Store and Forward Lockup
  • 2. Reassembly Lockup

8
Direct Store and Forward Lockup
  • Simplest lockup between two routers
  • Example
  • Suppose router A has five buffers, all of which
    are queued for output to router B
  • Similarly, router B has five buffers, all of
    which are queued for output to router A
  • If there is flow control on the link between
    routers A and B, then neither router can accept
    any incoming packets from the other. They are
    both stuck.

9
Direct Store and Forward Lockup (contd)
Router A
To/from other routers
To/from other routers
Router B
To/from other routers
To/from other routers
10
Indirect Store and Forward Lockup
  • The same thing can happen on a larger scale

11
Reassembly Lockup
  • In some network layer implementations, the
    sending router must split messages into multiple
    network layer packets
  • Receiving routers reassemble split up packets
    into a single packet
  • If the receiving routers buffer fills up with
    incomplete packets, it cannot reassemble any more
    packets

12
Reassembly Lockup (contd)
Buffer size 16 packet segments
s0, p2
s1, p1
s2, p1
s3, p1
s0, p3
s1, p2
s2, p2
s3, p3
s0, p4
s1, p4
s2, p3
s3, p4
s0, p5
s1, p5
s2, p5
s3, p5
Input 0
Input 1
Input 2
Input 3
ssource, ppart
13
5.2 Types of Congestion Control
  • Preventive
  • The hosts and routers attempt to prevent
    congestion before it can occur
  • Reactive
  • The hosts and routers respond to congestion after
    it occurs and then attempt to stop it

14
Preventive and Reactive Control
  • Preventive Techniques
  • Resource reservation
  • Leaky/Token bucket
  • Isarithmic control
  • Reactive Techniques
  • Load shedding
  • Choke packets

15
5.3 Solving Congestion
  • Load Shedding
  • Choke Packets
  • Isarithmic Control
  • Resource Reservation
  • Leaky Bucket
  • Token Bucket

16
5.3.1 Load Shedding
  • When a router becomes inundated with packets, it
    simply drops some
  • Load Shedding

17
Intelligent Load Shedding
  • Discarding packets does not need to be done
    randomly
  • Router should take other information into account
  • Possibilities
  • Total packet dropping
  • Priority discarding
  • Age biased discarding

18
Total Packet Dropping
  • When the buffer fills and a packet segment is
    dropped, drop all the rest of the segments from
    that packet, since they will be useless anyway
  • Only works with routers that segment and
    reassemble packets

19
Priority Discarding
  • Sources specify the priority of their packets
  • When a packet is discarded, the router chooses a
    low priority packet
  • Requires hosts to participate by labeling their
    packets with priority levels

20
Age Biased Discarding
  • When the router has to discard a packet, it
    chooses the oldest one in its buffer
  • This works well for multimedia traffic which
    requires short delays
  • This may not work so well for data traffic, since
    more packets will need to be retransmitted

21
5.3.2 Choke Packets
  • Each router monitors the utilization of each of
    its output lines
  • Associated with each line is a variable u, which
    reflects the utilization of that line
  • Whenever u moves above a given threshold value,
    the output line enters a warning state
  • Each newly arriving packet checks if its output
    line is in the warning state
  • If so, the router sends a choke packet back to
    the source

22
Choke Packets (contd)
  • The data packet is tagged (by setting a bit in
    its header) so that it will not generate any more
    choke packets at downstream routers
  • When the source host receives the choke packet,
    it is required to reduce its traffic generation
    rate to the specified destination by X
  • Since other packets aimed at the same destination
    are probably already on their way to the
    congested location, the source host should ignore
    choke packets for that destination for a fixed
    time interval. After that, it resumes its
    response to choke packets.

23
Choke Packets Example
Congestion (u gtThr)
Host
router
router
Tagged Packets (to prevent further choke packet
generation at later routers)
Choke Packet
24
5.3.3 Isarithmic Control
  • Each host is initially allocated a pool of
    permits
  • Data packets carry permits between hosts
  • A host cant send a packet unless it has at least
    one permit
  • If no permit is available, the packet waits in
    the host until a permit becomes available.

25
Isarithmic ControlExample
3 Permits
0 Permits
A
B
Time 1
Data
2 Permits
0 Permits
A
B
Time 2
2 Permits
1 Permit
A
B
Time 3
26
Isarithmic Control (contd)
  • Isarithmic control is implemented at the hosts,
    not the routers
  • Isarithmic control guarantees that the number of
    packets in the network will never exceed the
    number of permits initially present

27
Isarithmic Control Problem
  • If a host doesnt send any packet, i.e. it just
    holds onto its permits, then the network will not
    be utilized fully
  • Solution Place a limit on the number of permits
    a host may keep. If the host has more than its
    allowed number of permits, it must transmit the
    excess permits to other hosts by piggybacking
    them onto other data packets or by using special
    permit-transport packets

28
Isarithmic ControlExample
Max-Permits 4
Data
1 Permit
3 Permits
A
B
Time 1
1 Permit
4 Permits
A
B
Time 2
Permit-transport Packet
1 Permit
3 Permits
A
B
Time 3
29
5.3.4 Resource Reservation
  • Primarily for connection-oriented networks
  • During connection setup
  • Request resources (e.g., buffer space, connection
    bandwidth) from the network
  • If the network has enough available resources to
    support the new connection, the connection will
    be established
  • Otherwise, the connection will be rejected

30
Resource Reservation Example
Router
Router
Src
Dest
4 Mbps available
6 Mbps available
10 Mbps available
Case 1 Source attempts to connect to
destination, and attempts to
reserve 4 Mbps for the connection Result
Connection accepted. There is enough bandwidth
available. Available link
bandwidths updated. Case 2 Source attempts to
connect to destination, and attempts to
reserve 5 Mbps for the connection Result
Failure. There is not enough bandwidth available
on one of the links.
31
Resource Reservation (contd)
  • Once a connection is accepted, the host must use
    only the amount of resources reserved. It may
    not use more than that.
  • What if the host is malicious and attempts to use
    more network resources than it reserved?

32
5.3.5 Leaky Bucket
  • Used in conjunction with resource reservation to
    police the hosts reservation
  • At the host-network interface, allow packets into
    the network at a constant rate
  • Packets may be generated in a bursty manner, but
    after they pass through the leaky bucket, they
    enter the network evenly spaced

33
Leaky Bucket Analogy
Packets from host
Leaky Bucket
Network
34
Leaky Bucket (contd)
  • The leaky bucket is a traffic shaper It
    changes the characteristics of packet stream
  • Traffic shaping makes more manageable and more
    predictable
  • Usually the network tells the leaky bucket the
    rate at which it may send packets when the
    connection begins

35
Leaky Bucket Doesnt allow bursty transmissions
  • In some cases, we may want to allow short bursts
    of packets to enter the network without smoothing
    them out
  • For this purpose we use a token bucket, which is
    a modified leaky bucket

36
5.3.6 Token Bucket
  • The bucket holds tokens instead of packets
  • Tokens are generated and placed into the token
    bucket at a constant rate
  • When a packet arrives at the token bucket, it is
    transmitted if there is a token available.
    Otherwise it is buffered until a token becomes
    available.
  • The token bucket has a fixed size, so when it
    becomes full, subsequently generated tokens are
    discarded

37
Token Bucket
Packets from host
Token Generator (Generates a token once every T
seconds)
Network
38
Token Bucket vs. Leaky Bucket
Case 1 Short burst arrivals
Arrival time at bucket
6
5
4
3
2
1
0
Departure time from a leaky bucket Leaky bucket
rate 1 packet / 2 time units Leaky bucket size
4 packets
6
5
4
3
2
1
0
Departure time from a token bucket Token bucket
rate 1 tokens / 2 time units Token bucket size
2 tokens
6
5
4
3
2
1
0
39
Token Bucket vs. Leaky Bucket
Case 2 Large burst arrivals
Arrival time at bucket
6
5
4
3
2
1
0
Departure time from a leaky bucket Leaky bucket
rate 1 packet / 2 time units Leaky bucket size
2 packets
6
5
4
3
2
1
0
Departure time from a token bucket Token bucket
rate 1 token / 2 time units Token bucket size
2 tokens
6
5
4
3
2
1
0
Write a Comment
User Comments (0)
About PowerShow.com