Subject: A question when reading RFC2960

From: <[email-masked]>
Date: Wed, 19 Mar 2003 01:15:51 -0800 (PST)

The diagram below is an example provided by RFC2960 about how
SCTP creat association and then transmit data between A and Z.

 Endpoint A                                          Endpoint Z
   {app sets association with Z}
   (build TCB)
   INIT [I-Tag=Tag_A
         & other info]  --------\
   (Start T1-init timer)         \
   (Enter COOKIE-WAIT state)      \---> (compose temp TCB and Cookie_Z)

                                   /--- INIT ACK [Veri Tag=Tag_A,
                                  /              I-Tag=Tag_Z,
   (Cancel T1-init timer) <------/               Cookie_Z, & other info]
                                        (destroy temp TCB)
   COOKIE ECHO [Cookie_Z] ------\
   (Start T1-init timer)         \
   (Enter COOKIE-ECHOED state)    \---> (build TCB enter ESTABLISHED
                                         state)

                                  /---- COOKIE-ACK
                                 /
   (Cancel T1-init timer, <-----/
    Enter ESTABLISHED state)
   {app sends 1st user data; strm 0}
   DATA [TSN=initial TSN_A
       Strm=0,Seq=1 & user data]--\
    (Start T3-rtx timer)            \
                                     \->
                                 /----- SACK [TSN Ack=init
                                             TSN_A,Block=0]
   (Cancel T3-rtx timer) <------/

                                        ...
                                        {app sends 2 messages;strm 0}
                                  /---- DATA
                                 /        [TSN=init TSN_Z
                             <--/          Strm=0,Seq=1 & user data 1]
   SACK [TSN Ack=init TSN_Z,      /---- DATA
         Block=0]     --------\  /        [TSN=init TSN_Z +1,
                               \/          Strm=0,Seq=2 & user data 2]
                        <------/\
                                 \
                                  \------>

                     Figure 4: INITiation Example

Questions:
1. Stream is a uni-directional logical channel, as defined in RFC2960.
Why, in the example, data were transmitted in both directions with the
same Strm ID(0)? Moreover, when the data were tranmitted from Z, the
stream sequence number went back to 1, which had been used by A in Strm=0.
It sounds to me that the two streams in opposite directions are different
to SCTP, ahthough they used the same stream id. Am I right?

2. The association was established following the request of A. It is
reasonable to surmise that A wanted to transmit data to Z. But in the
association, I noticed that Z was sending data to A. Why? Could you give
me any application, as an example, like that?

Thank you for your answer!

---

From: "Brian F. G. Bidulock" <[email-masked]>
Date: Wed, 19 Mar 2003 03:06:58 -0700

yuzhou,

> to SCTP, ahthough they used the same stream id. Am I right?

Yes, you are right.

> me any application, as an example, like that?

Telnet: after connection the connector receives "login: "

--brian

-- 
Brian F. G. Bidulock    ¦ The reasonable man adapts himself to the ¦
[email-masked]    ¦ world; the unreasonable one persists in  ¦
http://www.openss7.org/ ¦ trying  to adapt the  world  to himself. ¦
                        ¦ Therefore  all  progress  depends on the ¦
                        ¦ unreasonable man. -- George Bernard Shaw ¦

---

From: "Manish Rajpal" <[email-masked]>
Date: Wed, 19 Mar 2003 10:14:28 -0000

hi yuzhou,

The streams are unidirectional only and you are probably missing upon the
fact that both sides maintain two sets of streams, one each for incoming and
outgoing. So the outgoing stream 0 used by A, in your example, is the
incoming stream 0 for Z. Later Z sends data on outgoing stream 0 to A. So
the streams are unidirectional and i think that also clears why sequence
number 1 is used again. it is used for the first time in fact.

regarding the application......, when a browser connects to a web server, it
wud send a request (i.e. SCTP data) to the server and server will respond
back with the response (SCTP data from the server).
Imagine how difficult life wud be if A cud only send data and never received
anything. It wud have eventually ran out of data :-).

regards
manish
www.hssworld.com