PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Noms de domaine > comp.protocols.tcp-ip > Sequence number and maximum segment size
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.protocols.tcp-ip TCP and IP network protocols.

Sequence number and maximum segment size

Réponse
 
LinkBack Outils de la discussion
Vieux 04/10/2006, 07h48   #1
webfan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Sequence number and maximum segment size

"How does TCP handshake work?

1. Local device sends sequence number and maximum segment size.
2. Destination device responds by sending its sequence number and maximum
segment size back to local device.
3. Local device acknowledges receipt of the sequence number and segment size
information."

What're "sequence number and maximum segment size" in the above?


  Réponse avec citation
Vieux 04/10/2006, 08h34   #2
Dana
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Sequence number and maximum segment size

"webfan" <webfan@yahoo.com> wrote in message
news:HOIUg.186934$QM6.97097@bgtnsc05-news.ops.worldnet.att.net...
> "How does TCP handshake work?
>
> 1. Local device sends sequence number and maximum segment size.
> 2. Destination device responds by sending its sequence number and maximum
> segment size back to local device.
> 3. Local device acknowledges receipt of the sequence number and segment

size
> information."
>
> What're "sequence number and maximum segment size" in the above?


A sequence number is a 32 bit number. TCP will pick a random sequence number
as the initial sequence number in a TCP connection. these numbers are
clocked at a 4us rate, hence it will take over 4 hours to count through each
possible number using a 32bit word.

Maximum segment size is maximum amount of data allowed in a segment, not
counting headers. So your segment can actually be larger than the MSS when
you add up the headers

Or from RFC 879

THE TCP MAXIMUM SEGMENT SIZE IS THE IP MAXIMUM DATAGRAM SIZE MINUS
FORTY.

The default IP Maximum Datagram Size is 576.
The default TCP Maximum Segment Size is 536.


>
>



  Réponse avec citation
Vieux 04/10/2006, 10h01   #3
Casper H.S. Dik
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Sequence number and maximum segment size

"Dana" <raff242@yahoo.com> writes:

>A sequence number is a 32 bit number. TCP will pick a random sequence number
>as the initial sequence number in a TCP connection. these numbers are
>clocked at a 4us rate, hence it will take over 4 hours to count through each
>possible number using a 32bit word.


What does "clocked at a 4us rate" mean here? If it's initial sequence
numbers, they're supposed to be random (though they weren't) and they're
no longer "clocked".

For existing connections it's clocked at the data rate. (And Gbit ethernet
could theoretically wrap this in under 40 seconds)


Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
  Réponse avec citation
Vieux 04/10/2006, 17h23   #4
webfan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Sequence number and maximum segment size

Dana <raff242@yahoo.com> wrote in message
news:12i6ouddk9fso8d@corp.supernews.com...
> "webfan" <webfan@yahoo.com> wrote in message
> news:HOIUg.186934$QM6.97097@bgtnsc05-news.ops.worldnet.att.net...
> > "How does TCP handshake work?
> >
> > 1. Local device sends sequence number and maximum segment size.
> > 2. Destination device responds by sending its sequence number and

maximum
> > segment size back to local device.
> > 3. Local device acknowledges receipt of the sequence number and segment

> size
> > information."
> >
> > What're "sequence number and maximum segment size" in the above?

>
> A sequence number is a 32 bit number. TCP will pick a random sequence

number
> as the initial sequence number in a TCP connection. these numbers are
> clocked at a 4us rate, hence it will take over 4 hours to count through

each
> possible number using a 32bit word.
>
> Maximum segment size is maximum amount of data allowed in a segment, not
> counting headers. So your segment can actually be larger than the MSS

when
> you add up the headers
>
> Or from RFC 879
>
> THE TCP MAXIMUM SEGMENT SIZE IS THE IP MAXIMUM DATAGRAM SIZE MINUS
> FORTY.
>
> The default IP Maximum Datagram Size is 576.
> The default TCP Maximum Segment Size is 536.
>
>


Thanks!

So the handshake of TCP is "simply":
1. A sends "A random sequence number + 536"
2. B responds with "the same sequence number as in 1 + 536"
3. A responds with ACK to B

Is this basically correct?

What does this accomplish anyway?


  Réponse avec citation
Vieux 04/10/2006, 18h01   #5
Rick Jones
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Sequence number and maximum segment size

webfan <webfan@yahoo.com> wrote:
> Thanks!


> So the handshake of TCP is "simply":
> 1. A sends "A random sequence number + 536"


No. The SYN will contain an ISN (Initial Sequence Number) and then
there may be an optional MSS advertisement. If there is no MSS option
in the SYN the SPEC says one should assume 536.

> 2. B responds with "the same sequence number as in 1 + 536"


B will ACK A's ISN and will send its own ISN which will be different
from A's.

> 3. A responds with ACK to B


Correct.

> Is this basically correct?


> What does this accomplish anyway?


The two sides know at what point in the sequence space data transfer
starts so they know which sequence numbers will be "in the window" and
thus valid at a given point in time, and which are not and should be
ignored. That, combined with the TIME_WAIT state will protect a new
TCP connection from accepting as valid old segments from a previous
TCP connection of the same "name." (local/remote ports and
local/remote IPs)

The switch to random ISNs was prompted by security concerns that those
wishing to spoof would be able to guess the next TCP ISN a TCP would
use and so be abel to impersonate that TCP. From a practical
standpoint, it also meant it was no longer likely to have a successful
early transition from TIME_WAIT to ESTABLISHED because the ISN for the
new connection would not be in the right place relative to where that
connection name last left-off.

rick jones
--
a wide gulf separates "what if" from "if only"
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
  Réponse avec citation
Vieux 04/10/2006, 19h24   #6
Dana
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Sequence number and maximum segment size

"Casper H.S. Dik" <Casper.Dik@Sun.COM> wrote in message
news:45237860$0$4528$e4fe514c@news.xs4all.nl...
> "Dana" <raff242@yahoo.com> writes:
>
> >A sequence number is a 32 bit number. TCP will pick a random sequence

number
> >as the initial sequence number in a TCP connection. these numbers are
> >clocked at a 4us rate, hence it will take over 4 hours to count through

each
> >possible number using a 32bit word.

>
> What does "clocked at a 4us rate" mean here? If it's initial sequence
> numbers, they're supposed to be random (though they weren't) and they're
> no longer "clocked".
>
> For existing connections it's clocked at the data rate. (And Gbit

ethernet
> could theoretically wrap this in under 40 seconds)


Thanks for the correction. My older book used the slower clock speeds in
existance.
On one sentence you say they are no longer clocked, the next sentence you
say they are clocked at the data rate, can you offer some clarification.


>
>
> Casper
> --
> Expressed in this posting are my opinions. They are in no way related
> to opinions held by my employer, Sun Microsystems.
> Statements on Sun products included here are not gospel and may
> be fiction rather than truth.



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h23.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12002 seconds with 14 queries