manas11 / implementation-of-rLEDBAT-in-ns-3

Implementation of rLEDBAT in ns-3
1 stars 2 forks source link
computer-networks ledbat ns-3

Implementation-of-rLEDBAT-in-ns-3

Course Code: CO365

Course Name: Advanced Computer Networks

Team members:

Overview

rLEDBAT, a receiver-based, less-than-best-effort congestion control algorithm. rLEDBAT is inspired in.
LEDBAT but with the following differences:

Suppose that the rl.WND was last updated at time t0 and its current value is then rl.WND(t0) and at time t1 a packet is received.The rLEDBAT receiver updates rl.WND as follows:

if qd < T, then rl.WND(t1) = rl.WND(t0) + alpha*MSS/rl.WND(t0)

 if qd > T, then rl.WND(t1) = rl.WND(t0)*betad

alpha > 1 
0 < betad < 1

with MSS being the Maximum Segment Size of the TCP connection, and alpha and betad being the additive increase and multiplicative decrease parameters respectively

Controlling Receiver Window

Avoiding Window Shrinking

Window Scale option

Using the RTT to estimate the queueing delay

This section needs to be updated because as per the draft there is no algorithm available.
We can try using the queueing delay calculation algorithm by replacing the one-way delay by RTT. (Not sure how to do so placing it in Things need to be done)

Inter-rLEDBAT fairness

Reacting to packet loss

ALgorithm

The Below algorithm assumes that we don't use WS option because if we use that and it get more than 11 then the nature of rLEDBAT is not known. Also according to the draft a value less than 11 is suggested.

on initialization
       DRAINED.BYTES = 0
       base_RTTs set to maximum value
       current_RTTs set to maximum value
       rl.WND set to max value
       end.reduction.time = 0
on packet arrival
    DRAINED.BYTES = DRAINED.BYTES + SEG.LEN
    RTT calculation
        SEG.RTT = SEG.Time - SEG.TSE (the new sample of the RTT is the time of
        arrival of the segment minus the time at which the segment containing
        the TSVal value was issued)
        Update current_RTTs with SEG.RTT (substitute the oldest RTT sample in
        the current_RTTs array by SEG.RTT)
        Update base_RTTs with SEG.RTT (store SEG.RTT in the current current
        minute position, if SEG.RTT is smaller than the value in that
        position)
QD = min(current_RTTs) - min(base_RTTs)
If local.time > end.reduction.time then
        If SEG.SEQ < RCV.HGH AND SEG.TSE > TSE.HGH then
            rl.WND = max(rl.WND*betal, 1)
            end.reduction.time = local.time + min(current_RTTs)
        else
            If QD < T, then rl.WND = rl.WND+ alpha*MSS/rl.WND
            else QD > T, then rl.WND(t1) = max(rl.WND*beta1, 1)

          on sending a packet
      if rl.WND > rl.WND.WS or (rl.WND.WS - rl.WND) < DRAINED.BYTES then
          rl.WND.WS = rl.WND
      else
          rl.WND.WS = rl.WND.WS - DRAINED.BYTES
      DRAINED.BYTES = 0
      RCV.WND = min(fc.WND, rl.WND.WS)

Parameters

T: Target delay

      betal: multiplicative decrease factor in case of packet loss

      betad: multiplicative decrease factor in case of RTT exceeds T

      alpha: additive increase factor.

Variables

current_RTTs is an array with the last k measured RTTs

      base_RTTs is an array with the minimum observed RTTs in the last n
      minutes

      RCV.SEQ is the sequence number of the last byte that was received
      and acknowledged

      RCV.HGH is the highest sequence number of a received byte (which
      may not have been acknowledged yet)

      TSE.HGH is the TSecr value contained in the segment containing the
      byte with sequence number RCV.HGH

      SEG.SEQ is the sequence number of the incoming segment

      SEG.TSE is the TSecr value of the incoming segment

      SEG.time is the local time at which the incoming segment was
      received

      SEG.RTT is the latest sample of the RTT

      QD latest estimation of the queueing delay

      rl.WND window calculated by rLEDBAT without taking into account
      the window shrinking avoidance constraints

      rl.WND.WS window calculated by rLEDBAT after taking into account
      the window shrinking avoidance constrains

      DRAINED.BYTES number of bytes drained from the flight-size since
      the last packet sent

      fc.WND window calculated by standard TCP receiver

      end.reduction.time auxiliary variable used to prevent rl.WND from
      being updated after a window reduction

NOTE:- The proposed algorithm has been derived after going through the draft algorithm may change and some other variable might be used when actually implemting in NS-3.

Assumptions