Stop-n-Wait vs. Sliding-Window
To compare the efficiencies of "stop-n-wait" and "sliding-window", I built a virtual network environment with 6 nodes and 2 traffic models which are 1 CBR, and 1 each aimed protocol, and run both protocols in the same condition such as queue limit, bandwidth, delay, etc. I compared two protocols in two different situation; one is in normal condition which means there is no packet loss ; the other is in congested condition which means there are some packet loss. To see parameter values, please refer to the ns scripts which attached below.
2. How these
2 protocols work in normal condition..?
|
|
Black packet is for "stop-n-wait" traffic while red
packets are for CBR traffic.
|
Black packets are for "sliding window" traffic while red
packets
are for CBR traffic.
|
With nam graph, we could see the total packets and ACKs sent and received. In "stop-n-wait", totally 5 packets are transmitted successfully. |
With nam graph, we could see the total packets and ACKs sent and received.
In "sliding window", totally 19 packets are transmitted successfully.
|
Here is ns script for the above simulation.
You can also download ns script and nam file. |
Here is ns script for the above simulation.
You can also download ns script and nam file. |
3. How these 2 protocols work in congested condition..?
stop-n-wait hardly be congested ! Followings show that even in congested condition, sliding window has better performance.
|
|
Black packet is for "stop-n-wait" traffic while red
packets are for CBR traffic.
|
Black packets are for "sliding window" traffic while red
packets
are for CBR traffic.
|
In "stop-n-wait", totally 7 packets are transmitted successfully.
|
In "sliding window", totally 17 packets are transmitted successfully
even in congested condition.
|
Here is ns script for the above simulation.
You can also download ns script and nam file. |
Here is ns script for the above simulation.
You can also download ns script and nam file. |
4. Result
As "sliding window" doesn't waste network bandwidth compared with "stop-n-wait", both in normal and in congested condition, "sliding window" show better performance than "stop-n-wait".