Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Maximum file size for TCP
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Fri Jun 18, 2010 7:07 am    Post subject: Maximum file size for TCP Reply with quote

I was wondering that the sequence number part of the header is limited to 32 bits, that means it can store only ~4 billion packet number... so what happens after all these numbers has been utilized?... i.e a unique number cannot be generated within the 32 bit limit. So if I have to transfer a single very large file with has to be split to for e.g. 6 billion packets, then is this possible using the TCP protocol?
_________________
My blog
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Fri Jun 18, 2010 1:29 pm    Post subject: Reply with quote

Oh, you again. :P

The tcp sequence numbers loop around, if the "maximum" value is used then the next value should be 0.

Two things to point out, the initial sequence number need not be 0, in fact it should be completely random, therefore it could even be the last available number (2^32), and they are per connection, so for one single connection to use up all available sequence numbers and loop around to whatever it's initial value was, you are talking about a transfer of 10's of terabytes...
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Fri Jun 18, 2010 1:57 pm    Post subject: Reply with quote

Ok, got that. Thanks for the info.
_________________
My blog
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10459
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Jun 18, 2010 2:57 pm    Post subject: Reply with quote

Well, not exactly. Sequence numbers count data bytes, not packet numbers, so the amount of data transferred before a sequence number wrap is exactly 4TiB. However, sequence numbers are not required not to wrap. They just need to not wrap while the data is still in transit. This is can become problematic on networks where very high data rates meet relatively high latencies but work is being done to address the issues. See RFC #1323.

In practice, on networks that we are likely to encounter, it's a non-issue. And there's no limit on the number of bytes that can be transferred in a single intact TCP/IP session.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Fri Jun 18, 2010 3:49 pm    Post subject: Reply with quote

John R. Graham wrote:
Sequence numbers count data bytes, not packet numbers
Poop...

It's been a while since I covered this stuff, getting rusty.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10459
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Jun 18, 2010 3:58 pm    Post subject: Reply with quote

When I went to work for Cisco, I thought I knew a fair amount about networks. Now, 4 years in, I'm much more aware of my own ignorance. :P

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Sat Jun 19, 2010 5:45 am    Post subject: Reply with quote

Quote:
Sequence numbers count data bytes


That means a sequence number might contain 1.5 packets?
_________________
My blog
Back to top
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 623

PostPosted: Sat Jun 19, 2010 6:46 am    Post subject: Reply with quote

dE_logics wrote:
Quote:
Sequence numbers count data bytes


That means a sequence number might contain 1.5 packets?


What do you mean by contain? Btw. it's 4GiB not 4TiB.
_________________
Death by snoo-snoo!
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10459
Location: Somewhere over Atlanta, Georgia

PostPosted: Sat Jun 19, 2010 2:34 pm    Post subject: Reply with quote

Of course, you're correct. You know, I almost wrote 2**32, but then I got fancy and mis-converted in my head. Thanks for the clarification.

dE_logics wrote:
That means a sequence number might contain 1.5 packets?
Nope, since packets always contain an integral number of payload data bytes.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Sun Jun 20, 2010 1:09 pm    Post subject: Reply with quote

:? This appears confusing...
_________________
My blog
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10459
Location: Somewhere over Atlanta, Georgia

PostPosted: Sun Jun 20, 2010 1:27 pm    Post subject: Reply with quote

So, ask a question. :wink:

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Sun Jun 20, 2010 4:48 pm    Post subject: Reply with quote

Anyway, I don't need that much of details... the standards keep changing. However this wont I guess.
_________________
My blog
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10459
Location: Somewhere over Atlanta, Georgia

PostPosted: Sun Jun 20, 2010 7:33 pm    Post subject: Reply with quote

You're right: the handling of the Sequence Number in the TCP header is today still essentially the same as defined in RFC 675, dated December 1974.

- John

JRG: Edited out one incorrect statement.
_________________
I can confirm that I have received between 0 and 499 National Security Letters.


Last edited by John R. Graham on Mon Jun 21, 2010 1:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
oRDeX
Veteran
Veteran


Joined: 19 Oct 2003
Posts: 1309

PostPosted: Sun Jun 20, 2010 9:28 pm    Post subject: Reply with quote

John R. Graham wrote:
In IPv4, I guess you're right: the handling of the Sequence Number in the TCP header is today still essentially the same as defined in RFC 675, dated December 1974. However, the IPv6 TCP header doesn't even contain a sequence number. Change is coming. :)

- John


?? Should the TCP header be the same either on IPv4 or IPv6?!
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10459
Location: Somewhere over Atlanta, Georgia

PostPosted: Mon Jun 21, 2010 1:39 pm    Post subject: Reply with quote

Sorry; you're right. Taking the opportunity to edit out one silly statement from my previous post.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum