views:

88

answers:

2

I initially assumed that since tcp has a sequence number field of 32 bits and each byte sent on a tcp connection is labeled with a unique number, maximum number of bytes that can be sent on a tcp connection is about 2^32-1 or 2^32-2 (which?).

but now I feel that since TCP is a sliding window protocol, the wraparound of sequence numbers during the connection should not have an affect on the maximum number of bytes that can be sent over a tcp connection as long as the when wraparound occurs the old packet is no longer in the network (it is sent after 2*MSL).

What is the correct answer?

+3  A: 

That there is indeed no limit on the amount of data you can transfer on a TCP connection.

calmh
+1 for the quick response
iamrohitbanga
I wonder what the longest-running TCP connection ever was... :-p
Steven Schlansker
may be you could start a question for that
iamrohitbanga
long running tcp connections may be common among heavily used smtp servers like gmail and yahoo as multiple mails could be sent on the same tcp connections. i am not sure though. see this question http://serverfault.com/questions/140951/do-busy-smtp-servers-use-long-running-tcp-connections-to-exchange-lot-of-mails
iamrohitbanga
also bgp routers maintain semi permanent tcp connections on port 179. these could qualify for longest-running tcp connections.
iamrohitbanga
+1  A: 

There is no limit on the number of bytes that can be sent over a TCP connection. However there is a limit on the number of outstanding unacknowleged bytes before the sender stops sending, waiting for acks.

Originally the window size was limited to 64kB, but with window sliding it can be extended to 1GB. (Source: Wikipedia).

Anders Abel