TCP-WINDOW(SIZE,SCALING)
Window size RFC definition:
================
sender can send upto 65,535 bytes=2^16,,,where 16 is 16 bit field.(1111111111111111)
In SYN packet WS=8192
It
means "I have this much of space in my receiving buffer, so you can
send that amout of data to me at maximum". In other words, "Don't send
me the data more than that".
WS=0
It means "I have no space to receive any further data. So don't send me any data to me now".
>Window size flag maximum is only 65,535 bytes (64 kb),
>Window Scaling is used to increase the above value by 1Gig
>Window scaling maximum is 30bits.16 (original window field) + 14 (TCP Options 'Window Scaling') = 30 bits
>Window
Scaling was created for high-latency, high-bandwidth WAN links where a
limited Window size can cause severe performance problems.
best example:
========
phone conversation
saying some story to other person.
>while talking ill wait for the other person to acknowledge.
>If he acknowledge
>then ill again continue saying my story.
Window size My definition:
================
Now it means the amount of words(data) which i talked(sent) before getting the acknowledgment is called window size.
sender---------------------------------------------------------------------------------reciever
<========================= auto negotiation========================>
<================sender will learn receivers max window size================>
how it will learn:
window size = bandwidth(20MBps) * delay(RTT)(20ms)
Lets say window size is 16,000 bytes.
so sender has to sent 16,000 bytes before receiving the acknowledgment.
Now lets say my sender has mss of 1000 bytes.
=================1st time(1000 bytes)=============================>
=================2st time(1000 bytes)=============================>
=================3st time(1000 bytes)=============================>
=================4st time(1000 bytes)=============================>
=================5st time(1000 bytes)=============================>
=================6st time(1000 bytes)=============================>
=================7st time(1000 bytes)=============================>
=================8st time(1000 bytes)=============================>
=================9st time(1000 bytes)=============================>
=================10st time(1000 bytes)=============================>
=================11st time(1000 bytes)=============================>
=================12st time(1000 bytes)=============================>
=================13st time(1000 bytes)=============================>
=================14st time(1000 bytes)=============================>
=================15st time(1000 bytes)=============================>
=================16st time(1000 bytes)=============================>
waiting for acknowledgment from receiver..
<===============================ACKNOWLEDGMENT================
=================1st time(1000 bytes)=============================>
=================2st time(1000 bytes)=============================>
=================3st time(1000 bytes)=============================>
=================4st time(1000 bytes)=============================>
=================5st time(1000 bytes)=============================>
=================6st time(1000 bytes)=============================>
=================7st time(1000 bytes)=============================>
=================8st time(1000 bytes)=============================>
=================9st time(1000 bytes)=============================>
=================10st time(1000 bytes)=============================>
=================11st time(1000 bytes)=============================>
=================12st time(1000 bytes)=============================>
=================13st time(1000 bytes)=============================>
=================14st time(1000 bytes)=============================>
=================15st time(1000 bytes)=============================>
=================16st time(1000 bytes)=============================>
<===============================ACKNOWLEDGMENT================
..
.
.
.
.
.and so on........
window scaling
=========
sender---------------------------------------------------------------------------------reciever
<========================= auto negotiation==========================>
<======sender will whether rx supports Window scaling during first TCP 3 way handshake====>
maximum window scale factor =14
Lets say
window size =5840
window scale factor=7
2^7 * 5840=747,520.
===========================================================================
0 Response to "TCP-WINDOW(SIZE,SCALING)"
Post a Comment