Hello
I want to know how windows TCP scaling works.I know it performs left shift operation but If we do that wont our data will be lost.

This is a good explanation: http://en.wikipedia.org/wiki/Transmission_Control_Protocol#Window_scaling
The left shift is only for the size field. IE: each shift multiplies the window size by 2x. It doesn't (or shouldn't) affect the data already in the window buffer, but as mentioned in the article, the resulting mismatch between sender and receiver window sizes can negatively affect performance.

so in that case how does it sends extra message byte in same length of data..i read wiki article but i am not able to get it how extra bytes are transferred

The scaling option is used internally by the protocol to decide how many bytes can be sent out on the wire at a time. Without scaling, you are confined by the size of the window field which is 16 bits. With only 16 bits you get 2^16 or 65535 bytes. For certain links (in LFNs) the bandwidth-dealy product (BDP) allows for a much larger amount of bytes to be in transit at any given time. If you use the scaling option, you can left shift the value of the window field to acheive much higher windows on such networks.

For example, if you have a BDP of 124,733 bytes then 65,535 bytes will only fill ~52% of that without scaling. However, setting the scaling to left-shift the window by 4 you have a theoretical window cap of 2^16 << 4 or 1,048,576 bytes which is more than capable of saturating the link described above.

Note that the scaling negotiation happens only once during connection handshake and is fixed for the remainder of the connection.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.