Re: General question about TCP and buffering in switch/router/modem




"JF Mezei" <jfmezei.spamnot@xxxxxxxxxxxxx> wrote in message
news:0071e8de$0$10051$c3e8da3@xxxxxxxxxxxxxxxxxxxx

I have the following setup:


COMPUTERS ROUTER MODEM1 MODEM2
| | | | |
============ =========================
VLAN 10 [Switch] VLAN 20


ROUTER has a fixed 10mbps/half duplex interface for its wan port.
MODEM1 has a fixed 10mbs/half (acts as backup)
MODEM2 has auto adjust 10/100 half/full duplex.

ADSL service is 5mbps/800kbps.

The switch negotiates properly with each device.

QUESTION:

Say the window size is 64k (roughly 50 packets). When the computer
starts sending data after the TCP call has been established, is it
correct to state that it will send a burst of 50 packets at 100mbps
non-stop to fill the window and only after that will it moderate its
sending throughput to match received ACKs ?


No it is not. TCP only increases the TCP window by 1 packet each time an
ACK is received and the receiver's TCP buffer is not full. Each time a
packet is dropped, the TCP window is cut in half. This is a gross
simplification of initial TCP window size, but adequate to answer your
question.


If the router's buffers are not large enough, it will be dropping
packets from the initial burst of 50 packets, right ?

Similarly, the modem will be receiving data over 10 times faster than it
can push it onto the ADSL line, so the modem would also be losing plenty
of packets in that initial burst.


It is normal/expected that the first batch of packets in a TCP
connection will experience high packet loss rate ? Or is there
expectation that the devices allong the way should be able to buffer the
full window size ?

It is NEVER expected that any device (router) between the sender and
receiver will buffer ANY traffic. Buffers in routers are there because
traffic is inherently bursty, and buffers allow traffic to be queued for a
very small period of time, instead of dropping it. "small" is relative
depending on the speed of the interface. On a 56K line, small might be
500ms, but on a 100MB/s interface small might be on only 1ms or 100us.
Buffering is NEVER substitute for bandwidth, and buffering data causes
jitter.


While I am at it: is there a standard time/logic that a sender uses to
waits for an ack before starting to resend data from the last aked
sequence number ?
You need to read up on TCP. An explanation here would take too long for me
to write.



In terms of the switch:

Since the router's WAN port is fixed at 10/half and it talks to the modem.

Are there any advantages/disadvantages of having the modem at 100/full
vs 10/half in terms of performance ?

No, but always use 10/full whenever possible because 10/half has an
effective maximum bandwidth of about 3Mb/s in each direction. 10/full has
an effective maximum bandwidth of about 9 Mb/s. If both connections are
10/half you could possibly have two bottlenecks and more dropped packets
meaning lower performance.

aka:

10/h <----> 10/h
100/f <----> 10/h

My thinking is that by having the modem at full duplex, it would remove
some latency and would let the switch worry about feeding the older
router at the right time/rate.

Latency is not the problem, because at 10Mb/s each hop adds about 52us
(thats micro seconds, millionths of a second, not milli seconds, or
thousandths of a second). As a comparison, a 5MB/s ADSL line adds at least
3 or 4 ms in delay, or 3000 or 4000 us (because of speed (aka serialization
delay) and the distance the signal must travel.) Everything is relative, so
adding a few microseconds in delay is a drop in the bucket compared to the
RTT of your slowest link.


.



Relevant Pages

  • Re: Socket send blocking problem
    ... The network becomes congested, ... sending thus slows down dramatically and *thus* the buffer fills. ... TCP will packetise the data in buffer as suits the ... You have no direct control over what packets TCP will send ...
    (microsoft.public.win32.programmer.networks)
  • Re: Fundamentals question, is this how it works?
    ... processing packets after you are done with one. ... receving the buffer size each time. ... TCP is a stream-based protocol, which means that it ignores any attempt ... then the receiving side might get ...
    (microsoft.public.win32.programmer.networks)
  • Re: MSS on router, why?
    ... Usually the client -> server send their MSS in the SYN packet. ... So why do I need ip tcp adjust-mss on a router? ... This is be sure that TCP packets with improper MSS is not dropped on a ...
    (comp.dcom.sys.cisco)
  • Re: Reading TCP data stream and finding an End of line
    ... Of course, the TCP tools DataIn function fires for partial messages, ... buffer to the left in case part of another message was in the previous ... The first step is to stop thinking of data you receive over TCP as "packets". ... You need a layer between your application and your network i/o that handles "packetizing" the TCP stream. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Missing UDP packets
    ... that TCP would be nice; however, in this case, I'm not free to use TCP ... I'm sure that I'm losing packets, but my question is why?  ... the network card, and indeed they are.  ... all of the packets will simply sit in the buffer for each port until I ...
    (comp.lang.labview)