[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to change congestion window?



On Fri, 11 Feb 2000 [email protected] wrote:

> Hi all,
> 
> I want to implement "new TCP congestion control algorithm"
> and "router mechanism" with ns.
> I'm going to simulate as follows.
>  
>       s1                      s3
>          \                  /
>            \              / 
>              r1 ------ r2
>            /              \ 
>          /                  \
>       s2                      s4
>  
> s1->r1->r2->s3 : TCP flow
> s2->r1->r2->s4 : UDP flow
> 
> I want to read ACK(s3->r2->r1->s1) at r1(router),
> and change "acknowledgement field" in TCP header in the ACK packet.
> (Of course, I know it's impossible in practice.)

Is it really?  Check e.g. http://www.packeteer.com/

> Ultimately, I change sender's congestion window to calculated value at r1.
> 
> How should I do?

It's not particularly difficult.  I have implemented several algorithms
into the ns-2 that work exactly like this.  On way of achieving your goal
is to define your own queue management algorithm 'X'.  You can then
configure the simplex-link r1->s1 to employ queue management 'X'.  When
acks arrive at 'X' (via enque method) you can manipulate the ack header
(see hdr_tcp in tcp.h).

Congestion window (cwnd) : I never set the senders cwnd explicitly from r1
 - but it is surely possible in ns.  I rather modified the TCPSink to
advertise a (static) receiver window (by expanding hdr_tcp) and modified
the TcpAgent to consider the advertised window when calculating the
effective send window (requires small modification to TcpAgent::recv() ).  
Once you have come so far, your queue 'X' can modify the advertised window
(carried in the ack) by replacing it by the value calculated at r1.

Feel free to contact me if you need any details.

-chris


 ---------------------------------------------------------------------
  Dipl.-Ing. Christof Brandauer        [email protected]
  TechnoZ Research & Development       Tel.  +43 662 454888-726
  Advanced Networking Center (ANC)     Fax.  +43 662 456174
  Jakob Haringer Str. 5/III, A - 5020 Salzburg, Austria
 ---------------------------------------------------------------------