How to set congestion window on TCP

1,272 views
Skip to first unread message

Guillermo Gala

unread,
Sep 20, 2011, 12:21:26 PM9/20/11
to ns-3-users
Hello everybody,

i'm a beginner in ns-3 and i want to implement a five nodes topology
with adhoc, wifi and TCP to investigate how to change the net
performance with differents congestion window values. I search how to
set this parameter, but i couldn't find it. The only parameter that i
found is: InitialCwnd-> TCP initial congestion window size (segments)

Can anyone help me?

Thanks in advance

Lalith Suresh

unread,
Sep 22, 2011, 6:32:54 PM9/22/11
to ns-3-...@googlegroups.com
Have you been through the tutorial yet? It's best to use the attribute system to set the TCP cwnd size.
 
Thanks in advance

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.




--
Lalith Suresh

Guillermo Gala

unread,
Sep 27, 2011, 10:47:40 PM9/27/11
to ns-3-users
I did the tutorial, and put this code in my program:

static void
CwndChange (uint32_t oldCwnd, uint32_t newCwnd)
{
//NS_LOG_UNCOND (Simulator::Now ().GetSeconds () << "\t" <<
oldCwnd); //Muestra el valor anterior de la ventana de congestión
NS_LOG_UNCOND (Simulator::Now ().GetSeconds () << "\t" << newCwnd);
}


I can see how change the congestion window, but i don't know how to
set this parameter to a fixed value. How can i use the attribute
system to control this?

Thanks for reply



On 23 sep, 00:32, Lalith Suresh <suresh.lal...@gmail.com> wrote:

Lalith Suresh

unread,
Sep 28, 2011, 5:37:16 AM9/28/11
to ns-3-...@googlegroups.com
On Wed, Sep 28, 2011 at 4:47 AM, Guillermo Gala <valenti...@gmail.com> wrote:
I did the tutorial, and put this code in my program:

static void
CwndChange (uint32_t oldCwnd, uint32_t newCwnd)
{
       //NS_LOG_UNCOND (Simulator::Now ().GetSeconds () << "\t" <<
oldCwnd); //Muestra el valor anterior de la ventana de congestión
       NS_LOG_UNCOND (Simulator::Now ().GetSeconds () << "\t" << newCwnd);
}


I can see how change the congestion window, but i don't know how to
set this parameter to a fixed value. How can i use the attribute
system to control this?


What you just used is the tracing mechanism. Look at examples/naming/object-names.cc to see how to use Config::Set().



--
Lalith Suresh

Guillermo Gala

unread,
Oct 7, 2011, 8:25:29 PM10/7/11
to ns-3-users
Hi again Lalith,

I want to replicate an article make with NS-2. In this paper is used
different values of TCP window, like 8 and 4.

To set this parameter in NS-3 i have to use the TCP Slow Start
Threshold parameter?

For example: window=8 means that TCP Slow Start Threshold = 1460*8=
11680 and window=4 means 1460*4=5840??

Now, i have this code:

uint32_t SlowStartThreshold = 65535; // TCP Slow Start Threshold
(bytes)
uint32_t numPackets = 100; // Number of APP packets
uint32_t AppPacketSize = 512; // Size of APP packet (bytes)
uint32_t maxPacketsQueue = 50; // Max packets on TCP Queue
uint32_t SegmentSize = 1460; // TCP Maximum segment size (bytes)
uint32_t DelAckCount = 1; // Number of packets until send one ACK
uint32_t InitialCwnd = 1; // TCP initial congestion window size
(segments)

and part of the result is: (time - congestion window value) (11 seg is
the begin)

Testing from node 4 to 0 with grid distance 250
11 1460
16.0773 2920
16.155 4380
16.2159 5840
16.3142 7300
16.3289 8760
16.3309 10220
16.3592 11680
16.5073 13140
16.5107 14600
16.5679 16060
16.5708 17520
16.5731 18980
16.6056 20440
16.6089 21900
16.7433 23360
16.7543 24820
16.7663 26280
16.8344 27740
16.8888 29200
16.8898 30660
16.8987 32120
16.9574 33580
16.9768 35040
17.0487 36500
17.2856 37960
17.3043 39420
17.3122 40880
17.3939 42340
17.3953 43800
17.3966 45260
17.3978 46720
17.3991 48180
17.4006 49640
17.7622 51100
17.914 52560
17.9162 54020
17.9183 55480
17.9264 56940
17.9354 58400
18.2004 59860
18.2029 61320
18.2052 62780
18.2137 64240
18.2146 65700
18.2165 65732
18.2179 65764
18.2199 65796
18.2282 65828
18.3295 27576
18.6784 29036
18.6794 30496


I can understand when a packet arrived at node 0, congestion window
increase 1460 because is the value of 1 maximum segment size (1 MSS),
but when cwnd pass from 65535 only increase 32, and i don't understand
that. Also i can't understand why later the congestion window down
until 27576.

Could you explain me that things?

I'm very grateful

On 28 sep, 11:37, Lalith Suresh <suresh.lal...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages