SlideShare uma empresa Scribd logo
1 de 407
Computer Networking :
         Principles, Protocols and Practice
                 Part 3 : Transport Layer


                    Olivier Bonaventure
                   http://inl.info.ucl.ac.be/



CNP3/2008.3.                                    © O. Bonaventure 2008
Module 3 : Transport Layer
              Basics
              Building a reliable transport layer
                  Reliable data transmission
                  Connection establishment
                  Connection release

              UDP : a simple connectionless transport protocol
              TCP : a reliable connection oriented transport
               protocol




CNP3/2008.3.                                            © O. Bonaventure, 2008
The transport layer

      Transport                     Segments               Transport
      Network                        Network                Network
      Datalink                       Datalink               Datalink
      Physical                       Physical               Physical


       Goals
              Improves the service provided by the network
               layer to allow it to be useable by applications
                  reliability
                  multiplexing

       Transport           layer services
              Unreliable connectionless service
              Reliable connection-oriented service
CNP3/2008.3.                                             © O. Bonaventure, 2008
The network layer
      Network          Packets       Network      Packets       Network
      Datalink                       Datalink                   Datalink
      Physical                       Physical                   Physical



     Network         layer service in Internet
          Unreliable connectionless service
              Packets can be lost
              Packets can suffer from transmission errors
              Packet ordering is not preserved
              Packet can be duplicated
              Packet size is limited to about 64 KBytes

          How to build a service useable by applications ?

CNP3/2008.3.                                                 © O. Bonaventure, 2008
The transport layer

       Problems               to be solved by transport layer
              Transport layer must allow two applications to
               exchange information
                  This requires a method to identify the applications

              The transport layer service must be useable by
               applications
                  detection of transmission errors
                  correction of transmission errors
                  recovery from packet losses and packet duplications
                  different types of services
                      connectionless
                      connection-oriented
                      request-response



CNP3/2008.3.                                                     © O. Bonaventure, 2008
The transport layer (2)
     Internal            organisation
              The transport layer uses the service provide by the
               network layer
              Two transport layer entities exchanges segments

                 Application             ADU         Application


                                         Segment
  Transport      Transport                             Transport
  layer          entity                                entity

                                     Packet            Network
                  Network




CNP3/2008.3.                                               © O. Bonaventure, 2008
Module 3 : Transport layer
              Basics
              Building a reliable transport layer
               Reliable data transmission
               Connection establishment
               Connection release

              UDP : a simple connectionless transport protocol
              TCP : a reliable connection oriented transport
               protocol




CNP3/2008.3.                                              © O. Bonaventure, 2008
Transport layer protocols
        How    can we provide a reliable service in the
           transport layer
               Hypotheses
               1.    The application sends small SDUs
               2.    The network layer provides a perfect service
                    1.   There are no transmission errors inside the packets
                    2.   No packet is lost
                    3.   There is no packet reordering
                    4.   There are no duplications of packets
               3.    Data transmission is unidirectional




CNP3/2008.3.                                                                   © O. Bonaventure, 2008
Transport layer protocols (2)

       Reference                environment

                   Application           ADU               Application


                                         Segment
    Transport      Transport                                 Transport
    layer          entity                                    entity

                                         Packet              Network
                    Network



               Notations
                  data.req and data.ind primitives for application/
                   transport interactions
                  recv() and send() for interactions between transport
                   entity and network layer

CNP3/2008.3.                                                  © O. Bonaventure, 2008
Protocol 1 : Basics

               A                                                           B




              Principle
                  Upon reception of data.request(SDU), the transport
                   entity sends a segment containing this SDU through the
                   network layer (send(SDU))
                  Upon reception of the contents of one packet from the
                   network layer (recv(SDU)), transport entity delivers the
                   SDU found in the packet to its user by using
                   data.ind(SDU)

CNP3/2008.3.                                                      © O. Bonaventure, 2008
Protocol 1 : Basics

               A                                                           B
  Data.request(a)




              Principle
                  Upon reception of data.request(SDU), the transport
                   entity sends a segment containing this SDU through the
                   network layer (send(SDU))
                  Upon reception of the contents of one packet from the
                   network layer (recv(SDU)), transport entity delivers the
                   SDU found in the packet to its user by using
                   data.ind(SDU)

CNP3/2008.3.                                                      © O. Bonaventure, 2008
Protocol 1 : Basics

               A                                                           B
  Data.request(a)                         Segment(a)




              Principle
                  Upon reception of data.request(SDU), the transport
                   entity sends a segment containing this SDU through the
                   network layer (send(SDU))
                  Upon reception of the contents of one packet from the
                   network layer (recv(SDU)), transport entity delivers the
                   SDU found in the packet to its user by using
                   data.ind(SDU)

CNP3/2008.3.                                                      © O. Bonaventure, 2008
Protocol 1 : Basics

               A                                                           B
  Data.request(a)                         Segment(a)

                                                                 Data.ind(a)

              Principle
                  Upon reception of data.request(SDU), the transport
                   entity sends a segment containing this SDU through the
                   network layer (send(SDU))
                  Upon reception of the contents of one packet from the
                   network layer (recv(SDU)), transport entity delivers the
                   SDU found in the packet to its user by using
                   data.ind(SDU)

CNP3/2008.3.                                                      © O. Bonaventure, 2008
Protocol 1 as a FSM

       Sender

                                      Data.req(SDU)
                   Wait
                    for
                                       send(SDU)
                   SDU

       Receiver



                                     recvd(SDU)
                     Wait
                      for
                   segment           Data.ind(SDU)


CNP3/2008.3.                                © O. Bonaventure, 2008
Protocol 1 : Example

               A                                                                  B




        Issue
              What happens if the receiver is much slower than the
               sender ?
                  e.g. receiver can process one segment per second while sender is
                   producing 10 segments per second ?
CNP3/2008.3.                                                             © O. Bonaventure, 2008
Protocol 1 : Example

               A                                                                  B
  Data.request(a)                             Segment(a)

                                                                        Data.ind(a)




        Issue
              What happens if the receiver is much slower than the
               sender ?
                  e.g. receiver can process one segment per second while sender is
                   producing 10 segments per second ?
CNP3/2008.3.                                                             © O. Bonaventure, 2008
Protocol 1 : Example

               A                                                                  B
  Data.request(a)                             Segment(a)
 Data.request(b)                              Segment(b)                Data.ind(a)

                                                                        Data.ind(b)




        Issue
              What happens if the receiver is much slower than the
               sender ?
                  e.g. receiver can process one segment per second while sender is
                   producing 10 segments per second ?
CNP3/2008.3.                                                             © O. Bonaventure, 2008
Protocol 1 : Example

               A                                                                  B
  Data.request(a)                             Segment(a)
 Data.request(b)                              Segment(b)                Data.ind(a)

 Data.request(c)                                                        Data.ind(b)
                                             Segment(c)

                                                                        Data.ind(c)

        Issue
              What happens if the receiver is much slower than the
               sender ?
                  e.g. receiver can process one segment per second while sender is
                   producing 10 segments per second ?
CNP3/2008.3.                                                             © O. Bonaventure, 2008
Protocol 2
        Principle
              Use a control segment (OK) that is sent by the
               receiver after having processed the received
               segment
              creates a feedback loop between sender and
               receiver

        Consequences
              Two types of segments
                  Data segment containing on SDU
                      Notation : D(SDU)
                  Control segment
                      Notation : C(OK)                   Type
              Segment format
                  At least one bit in the segment header is used to indicate
                   the type of segment
CNP3/2008.3.                                                     © O. Bonaventure, 2008
Protocol 2 (cont.)

       Sender
                            Data.req(SDU)
                            send(D(SDU))

                    Wait                          Wait
                     for                          for
                    SDU                           OK
                                Recvd(C(OK))
       Receiver                      -

                         Recvd(D(SDU))
                          Data.ind(SDU)
                 Wait                       Process
                  for                        SDU
               segment
                                 -
                            Send(C(OK))
CNP3/2008.3.                                             © O. Bonaventure, 2008
Protocol 2 : Example


               A                                               B




               The sender only sends segments when authorised
                 by the receiver
CNP3/2008.3.                                         © O. Bonaventure, 2008
Protocol 2 : Example


               A                                               B
  Data.req(a)                       D(a)

                                                     Data.ind(a)




               The sender only sends segments when authorised
                 by the receiver
CNP3/2008.3.                                         © O. Bonaventure, 2008
Protocol 2 : Example


               A                                               B
  Data.req(a)                       D(a)

  Data.req(b)                                        Data.ind(a)




               The sender only sends segments when authorised
                 by the receiver
CNP3/2008.3.                                         © O. Bonaventure, 2008
Protocol 2 : Example


               A                                               B
  Data.req(a)                       D(a)

  Data.req(b)                      C(OK)             Data.ind(a)




               The sender only sends segments when authorised
                 by the receiver
CNP3/2008.3.                                         © O. Bonaventure, 2008
Protocol 2 : Example


               A                                               B
  Data.req(a)                       D(a)

  Data.req(b)                      C(OK)             Data.ind(a)

                                     D(b)

                                                     Data.ind(b)



               The sender only sends segments when authorised
                 by the receiver
CNP3/2008.3.                                         © O. Bonaventure, 2008
Protocol 2 : Example


               A                                               B
  Data.req(a)                       D(a)

  Data.req(b)                      C(OK)             Data.ind(a)

                                     D(b)
                                  C(OK)
                                                     Data.ind(b)



               The sender only sends segments when authorised
                 by the receiver
CNP3/2008.3.                                         © O. Bonaventure, 2008
Protocol 3
       How     can we provide a reliable service in the
           transport layer
          Hypotheses
          1.    The application sends small SDUs
          2.    The network layer provides a perfect service
               1.   Transmission errors are possible
               2.   No packet is lost
               3.   There is no packet reordering
               4.   There are no duplications of packets
          3.    Data transmission is unidirectional




CNP3/2008.3.                                                    © O. Bonaventure, 2008
Transmission errors

        Which   types of transmission errors do we
           need to consider in the transport layer ?

                                          Network



        Physical-layer                transmission errors caused by
           nature
              Random isolated error
                  one bit is flipped in the segment
              Random burst error
                  a group of n bits inside the segment is errored
                      most of the bits in the group are flipped

CNP3/2008.3.                                                      © O. Bonaventure, 2008
Security issues versus
                           transmission errors
       Information   sent over a network may
           become corrupted for other reasons than
           transmission errors



                          Network




CNP3/2008.3.                                  © O. Bonaventure, 2008
Security issues versus
                           transmission errors
       Information   sent over a network may
           become corrupted for other reasons than
           transmission errors



                          Network




CNP3/2008.3.                                  © O. Bonaventure, 2008
Security issues versus
                           transmission errors
       Information   sent over a network may
           become corrupted for other reasons than
           transmission errors



                          Network




CNP3/2008.3.                                  © O. Bonaventure, 2008
Security issues versus
                           transmission errors
       Information   sent over a network may
           become corrupted for other reasons than
           transmission errors



                          Network




CNP3/2008.3.                                  © O. Bonaventure, 2008
Security issues versus
                           transmission errors
       Information   sent over a network may
           become corrupted for other reasons than
           transmission errors



                          Network




CNP3/2008.3.                                  © O. Bonaventure, 2008
Security issues versus
                           transmission errors
       Information   sent over a network may
           become corrupted for other reasons than
           transmission errors



                          Network




CNP3/2008.3.                                  © O. Bonaventure, 2008
Security issues versus
                           transmission errors
       Information   sent over a network may
           become corrupted for other reasons than
           transmission errors



                          Network




CNP3/2008.3.                                  © O. Bonaventure, 2008
Security issues versus
                              transmission errors
     Information  sent over a network may
        become corrupted for other reasons than
        transmission errors



                             Network




      These        attacks are dealt by using special
             security protocols and mechanisms outside
CNP3/2008.3.
             the transport layer                  © O. Bonaventure, 2008
How to detect transmission errors ?

       Principle

              Sender adds some control information inside the
               segment
                  control information is computed over the entire segment
                   and placed in the segment header or trailer


                         Type+ Control             Type     Control

              Receiver checks that the received control
               information is correct by recomputing it




CNP3/2008.3.                                                    © O. Bonaventure, 2008
Parity bits

       Simple         solution to detect transmission errors
       Used         on slow-speed serial lines
              e.g. modems connected to the telephone network

       Odd         Parity
              For each group of n bits, sender computes the
               n+1th bit so that the n+1 group contains an odd
               number of bits set to 1
                  Examples
                              0011010        1101100

       Even         Parity
CNP3/2008.3.                                           © O. Bonaventure, 2008
Parity bits

       Simple         solution to detect transmission errors
       Used         on slow-speed serial lines
              e.g. modems connected to the telephone network

       Odd         Parity
              For each group of n bits, sender computes the
               n+1th bit so that the n+1 group contains an odd
               number of bits set to 1
                  Examples
                              0011010 0       1101100

       Even         Parity
CNP3/2008.3.                                            © O. Bonaventure, 2008
Parity bits

       Simple         solution to detect transmission errors
       Used         on slow-speed serial lines
              e.g. modems connected to the telephone network

       Odd         Parity
              For each group of n bits, sender computes the
               n+1th bit so that the n+1 group contains an odd
               number of bits set to 1
                  Examples
                              0011010 0       1101100 1

       Even         Parity
CNP3/2008.3.                                              © O. Bonaventure, 2008
Internet checksum

       Motivation
              Internet protocols are implemented in software
               and we would like to have efficient algorithms to
               detect transmission errors that are easy to
               implement

       Solution
              Internet checksum
                  Sender computes for each segment and over the entire
                   segment the 1s complement of the sum of all the 16
                   bits words in the segment
                  Receiver recomputes the checksum over each received
                   segment and verifies that it is correct. Otherwise, the


CNP3/2008.3.                                                   © O. Bonaventure, 2008
Internet checksum : example
         Assume   a segment composed of 48 bits

    0110011001101100 0101010101010101 0000111100001111




CNP3/2008.3.                                © O. Bonaventure, 2008
Internet checksum : example
         Assume   a segment composed of 48 bits

    0110011001101100                  0000111100001111
    0101010101010101




CNP3/2008.3.                                © O. Bonaventure, 2008
Internet checksum : example
         Assume   a segment composed of 48 bits

    0110011001101100                  0000111100001111
    0101010101010101

    1011101110111011




CNP3/2008.3.                                © O. Bonaventure, 2008
Internet checksum : example
         Assume   a segment composed of 48 bits

    0110011001101100
    0101010101010101

    1011101110111011
    0000111100001111




CNP3/2008.3.                                © O. Bonaventure, 2008
Internet checksum : example
         Assume   a segment composed of 48 bits

    0110011001101100
    0101010101010101

    1011101110111011
    0000111100001111

    1100101011001010




CNP3/2008.3.                                © O. Bonaventure, 2008
Internet checksum : example
         Assume   a segment composed of 48 bits

    0110011001101100
    0101010101010101

    1011101110111011
    0000111100001111

    1100101011001010                 0011010100110101




CNP3/2008.3.                                © O. Bonaventure, 2008
Cyclical Redundancy Check
                                              (CRC)
       Principle
              Improve the performance of the Internet
               checksum by using polynomial codes
                  Sender and receiver agree on r+1 bits pattern called
                   Generator (G)
                  Sender adds r bits of CRC to a d bits data segment
                   such that the d+r bits pattern is exactly divisible by G
                   using modulo 2 arithmetic
                      D * 2^r XOR R = n*G

                                      d bits         r bits

                  All computations are done in modulo 2 arithmetic by
                   using XOR
                      1011 + 0101 = 1110      1001 + 1101 = 0100
                      1011 - 0101 = 1110      1001 - 1101 = 0100
CNP3/2008.3.                                                        © O. Bonaventure, 2008
Detection of transmission errors (2)

       Behaviour               of the receiver
              If the checksum is correct
                  Send an OK control segment to the sender to
                      confirm the reception of the data segment
                      allow the sender to send the next segment

              If the checksum is incorrect
                  The content of the segment is corrupted and must be
                   discarded
                  Send a special control segment (NAK) to the sender to
                   ask it to retransmit the corrupted data segment




CNP3/2008.3.                                                       © O. Bonaventure, 2008
Protocol 3a : Sender

       Sender


                        Data.req(SDU)          Recvd(C(NAK))
                      send(D(SDU,CRC))       send(D(SDU,CRC))

               Wait                        Wait
                for                         for
               SDU                        OK/NAK
                           Recvd(C(OK))
                                 -




CNP3/2008.3.                                          © O. Bonaventure, 2008
Protocol 3a : Receiver

       Receiver Recvd(D(SDU,CRC))
                 AND IsOK(CRC,SDU)
                    Data.ind(SDU)             Process
                                              segment
                                                OK
                 Wait
                  for
               segment       Send(C(OK))
                                  -

                                        Send(C(NAK))
                                              -

                  Recvd(D(SDU,CRC))          Process
                                             segment
               AND Not(IsOK(CRC,SDU))          KO
                          -

CNP3/2008.3.                                        © O. Bonaventure, 2008
Protocol 3a : Example

               A                              B




CNP3/2008.3.                        © O. Bonaventure, 2008
Protocol 3a : Example

         A                                 B
  Data.req(a)      D(a)

                                 Data.ind(a)




CNP3/2008.3.                     © O. Bonaventure, 2008
Protocol 3a : Example

         A                                 B
  Data.req(a)      D(a)

  Data.req(b)                    Data.ind(a)




CNP3/2008.3.                     © O. Bonaventure, 2008
Protocol 3a : Example

         A                                 B
  Data.req(a)      D(a)

  Data.req(b)      C(OK)         Data.ind(a)




CNP3/2008.3.                     © O. Bonaventure, 2008
Protocol 3a : Example

         A                                     B
  Data.req(a)      D(a)

  Data.req(b)      C(OK)             Data.ind(a)
                            Transmission error
                    D(b')
                            Invalid checksum




CNP3/2008.3.                         © O. Bonaventure, 2008
Protocol 3a : Example

         A                                     B
  Data.req(a)       D(a)

  Data.req(b)      C(OK)             Data.ind(a)
                            Transmission error
                    D(b')
                  C(NAK)    Invalid checksum




CNP3/2008.3.                         © O. Bonaventure, 2008
Protocol 3a : Example

         A                                                     B
  Data.req(a)                       D(a)

  Data.req(b)                      C(OK)             Data.ind(a)
                                            Transmission error
                                    D(b')
                                  C(NAK)    Invalid checksum

               Retransmission




CNP3/2008.3.                                         © O. Bonaventure, 2008
Protocol 3a : Example

         A                                                     B
  Data.req(a)                       D(a)

  Data.req(b)                      C(OK)             Data.ind(a)
                                            Transmission error
                                    D(b')
                                  C(NAK)    Invalid checksum

               Retransmission       D(b)

                                                     Data.ind(b)



CNP3/2008.3.                                         © O. Bonaventure, 2008
Protocol 3a : Example

         A                                                     B
  Data.req(a)                       D(a)

  Data.req(b)                      C(OK)             Data.ind(a)
                                            Transmission error
                                    D(b')
                                  C(NAK)    Invalid checksum

               Retransmission       D(b)

                                   C(OK)
                                                     Data.ind(b)



CNP3/2008.3.                                         © O. Bonaventure, 2008
Protocol 3b

       How     can we provide a reliable service in the
           transport layer ?
               Hypotheses
               1.    The application sends small SDUs
               2.    The network layer provides a perfect service
                    1.   Transmission errors are possible
                    2.   Packets can be lost
                    3.   There is no packet reordering
                    4.   There are no duplications of packets
               3.    Data transmission is unidirectional


          2.    How to deal with these problems ?



CNP3/2008.3.                                                        © O. Bonaventure, 2008
Protocol 3a and segment losses

       How        do segment losses affect protocol 3a ?

               A                                            B




CNP3/2008.3.                                      © O. Bonaventure, 2008
Protocol 3a and segment losses

       How     do segment losses affect protocol 3a ?

         A                                               B
  Data.req(a)                  D(a)

                                               Data.ind(a)




CNP3/2008.3.                                   © O. Bonaventure, 2008
Protocol 3a and segment losses

       How     do segment losses affect protocol 3a ?

         A                                               B
  Data.req(a)                  D(a)

                               C(OK)           Data.ind(a)




CNP3/2008.3.                                   © O. Bonaventure, 2008
Protocol 3a and segment losses

       How     do segment losses affect protocol 3a ?

         A                                               B
  Data.req(a)                  D(a)

                               C(OK)           Data.ind(a)
  Data.req(b)




CNP3/2008.3.                                   © O. Bonaventure, 2008
Protocol 3a and segment losses

       How     do segment losses affect protocol 3a ?

         A                                                  B
  Data.req(a)                  D(a)

                               C(OK)             Data.ind(a)
  Data.req(b)                            Lost segment
                                D(b)




CNP3/2008.3.                                      © O. Bonaventure, 2008
Protocol 3a and segment losses

       How     do segment losses affect protocol 3a ?

         A                                                  B
  Data.req(a)                  D(a)

                               C(OK)              Data.ind(a)
  Data.req(b)                            Lost segment
                                D(b)



                        DEADLOCK
   A is waiting for a                    B is waiting for a
   control segment                       data segment
CNP3/2008.3.                                      © O. Bonaventure, 2008
Protocol 3b

       Modification          to the sender
              Add a retransmission timer to retransmit the lost
               segment after some time
                         Data.req(SDU)               Recvd(C(NAK))
                      send(D(SDU,CRC))             send(D(SDU,CRC))
                        start_timer()               restart_timer()
               Wait                        Wait
                for                         for
               SDU                        OK/NAK
                        Recvd(C(OK))
                       cancel_timer()
                                     Timer expires
                                  send(D(SDU,CRC))
                                   restart_timer()
              No modification to the receiver
CNP3/2008.3.                                             © O. Bonaventure, 2008
Protocol 3b : Example

               A                               B




CNP3/2008.3.                        © O. Bonaventure, 2008
Protocol 3b : Example

          A                                        B
   Data.req(a)                 D(a)
                 start timer

                                         Data.ind(a)




CNP3/2008.3.                            © O. Bonaventure, 2008
Protocol 3b : Example

          A                                                 B
   Data.req(a)                        D(a)
                        start timer

                                      C(OK)       Data.ind(a)
                 cancel timer




CNP3/2008.3.                                     © O. Bonaventure, 2008
Protocol 3b : Example

          A                                                 B
   Data.req(a)                        D(a)
                        start timer

                                      C(OK)       Data.ind(a)
                 cancel timer
   Data.req(b)
                    start timer




CNP3/2008.3.                                     © O. Bonaventure, 2008
Protocol 3b : Example

          A                                                 B
   Data.req(a)                        D(a)
                        start timer

                                      C(OK)       Data.ind(a)
                 cancel timer
   Data.req(b)
                    start timer




CNP3/2008.3.                                     © O. Bonaventure, 2008
Protocol 3b : Example

          A                                                    B
   Data.req(a)                        D(a)
                        start timer

                                      C(OK)          Data.ind(a)
                 cancel timer
   Data.req(b)
                    start timer        D(b)   Lost segment




CNP3/2008.3.                                        © O. Bonaventure, 2008
Protocol 3b : Example

          A                                                    B
   Data.req(a)                        D(a)
                        start timer

                                      C(OK)          Data.ind(a)
                 cancel timer
   Data.req(b)
                    start timer        D(b)   Lost segment



                 timer expires




CNP3/2008.3.                                        © O. Bonaventure, 2008
Protocol 3b : Example

          A                                                    B
   Data.req(a)                        D(a)
                        start timer

                                      C(OK)          Data.ind(a)
                 cancel timer
   Data.req(b)
                    start timer        D(b)   Lost segment


                                      D(b)
                 timer expires

                                                     Data.ind(b)



CNP3/2008.3.                                        © O. Bonaventure, 2008
Protocol 3b : Example

          A                                                    B
   Data.req(a)                        D(a)
                        start timer

                                      C(OK)          Data.ind(a)
                 cancel timer
   Data.req(b)
                    start timer        D(b)   Lost segment


                                      D(b)
                 timer expires

                                      C(OK)
                                                     Data.ind(b)



CNP3/2008.3.                                        © O. Bonaventure, 2008
Protocol 3b : Example

          A                                                       B
   Data.req(a)                           D(a)
                           start timer

                                         C(OK)          Data.ind(a)
                    cancel timer
   Data.req(b)
                        start timer       D(b)   Lost segment


                                         D(b)
                     timer expires

                                         C(OK)
                                                        Data.ind(b)

       Does     this protocol always work ?
CNP3/2008.3.                                           © O. Bonaventure, 2008
Protocol 3b : Example

               A                              B




CNP3/2008.3.                        © O. Bonaventure, 2008
Protocol 3b : Example

         A                                                B
  Data.req(a)                        D(a)
                       start timer

                                     C(OK)      Data.ind(a)
                cancel timer




CNP3/2008.3.                                    © O. Bonaventure, 2008
Protocol 3b : Example

         A                                                  B
  Data.req(a)                        D(a)
                       start timer

                                     C(OK)        Data.ind(a)
                cancel timer
  Data.req(b)
                   start timer        D(b)

                                                  Data.ind(b)




CNP3/2008.3.                                      © O. Bonaventure, 2008
Protocol 3b : Example

         A                                                       B
  Data.req(a)                             D(a)
                            start timer

                                          C(OK)        Data.ind(a)
                     cancel timer
  Data.req(b)
                        start timer        D(b)
                Lost segment              C(OK)
                                                       Data.ind(b)




CNP3/2008.3.                                           © O. Bonaventure, 2008
Protocol 3b : Example

         A                                                       B
  Data.req(a)                             D(a)
                            start timer

                                          C(OK)        Data.ind(a)
                     cancel timer
  Data.req(b)
                        start timer        D(b)
                Lost segment              C(OK)
                                                       Data.ind(b)
                                          D(b)
                     timer expires

                                          C(OK)
                                                  Data.ind(b)
CNP3/2008.3.                                           © O. Bonaventure, 2008
Protocol 3b : Example

         A                                                       B
  Data.req(a)                             D(a)
                            start timer

                                          C(OK)        Data.ind(a)
                     cancel timer
  Data.req(b)
                        start timer        D(b)
                Lost segment              C(OK)
                                                       Data.ind(b)
                                          D(b)
                     timer expires

                                          C(OK)
                                                  Data.ind(b)
        How     to solve this problem ?
CNP3/2008.3.                                           © O. Bonaventure, 2008
Alternating bit protocol

       Principles          of the solution
              Add sequence numbers to each data segment sent by
               sender
              By looking at the sequence number, the receiver can
               check whether it has already received this segment

       Contents           of each segment
              Data segments
              Control segments
                                                Type, Seq. number CRC



                                            Type, Seq. number CRC
              How many bits do we need for the sequence number?
                  a single bit is enough
CNP3/2008.3.                                                   © O. Bonaventure, 2008
Alternating bit protocol
                                           Sender
                                                          Recvd(C(NAK?)) OR
                                                            Recvd(C(OK1))
                         Data.req(SDU)                       or timer expires
                     send(D(0,SDU,CRC))                  send(D(0,SDU,CRC))
                        start_timer()                      restart_timer()
           Wait                               Wait
            for                               for
          D(0,...)                          OK0/NAK

  Recvd(C(OK1))                        Recvd(C(OK0))
 cancel_timer()                       cancel_timer()
                          Data.req(SDU)
                      send(D(1,SDU,CRC))             All corrupted
                         start_timer()               segments are
            Wait                             Wait    discarded in all states
            for                                 for
          OK1/NAK                             D(1,...)


                Recvd(C(NAK?)) or recvd(C(OK0)) or timer expires
                             send(D(1,SDU,CRC))
CNP3/2008.3.                   restart-timer()        © O. Bonaventure, 2008
Alternating bit protocol
                                          Receiver
  Recvd(D(1,SDU,CRC))                           Recvd(D(0,SDU,CRC))
   AND IsOK(CRC,SDU)                             AND IsOK(CRC,SDU)
      Send(C(OK1)) Recvd(D(0,SDU,CRC))              Send(C(OK0))
                    AND IsOK(CRC,SDU)
                                                     -
                       Data.ind(SDU)   Process Send(C(OK0))Wait
           Wait
            for                         SDU0                for
          D(0,...)                       OK               D(1,...)

Bad(D(?,SDU,CRC))
                                                           Bad(D(?,SDU,CRC))
        -
                                                                   -
                                     Recvd(D(1,SDU,CRC))
                                      AND IsOK(CRC,SDU)
                                                                 -
                     -                   Data.ind(SDU)     Send(C(NAK1))
               Send(C(NAK0))
                                     -
           Process             Send(C(OK1))
                                              Process           Process
            SDU0                               SDU1              SDU1
             KO                                 OK                KO

CNP3/2008.3.                                                 © O. Bonaventure, 2008
Alternating bit protocol
                          Example
               A                                 B




CNP3/2008.3.                           © O. Bonaventure, 2008
Alternating bit protocol
                       Example
         A                                    B
  Data.req(a)       D(0,a)

                   C(OK0)           Data.ind(a)




CNP3/2008.3.                        © O. Bonaventure, 2008
Alternating bit protocol
                       Example
         A                                    B
  Data.req(a)       D(0,a)

  Data.req(b)      C(OK0)           Data.ind(a)

                     D(1,b)

                                   Data.ind(b)




CNP3/2008.3.                        © O. Bonaventure, 2008
Alternating bit protocol
                                             Example
         A                                                              B
  Data.req(a)                             D(0,a)

  Data.req(b)                            C(OK0)               Data.ind(a)

                                           D(1,b)
               Retransmission timer
                                      D(1,b)                  Data.ind(b)
                  D(1,b) recvd        C(OK1)            Duplicate detected
                                               C(OK1)
                  D(1,b) recvd




CNP3/2008.3.                                                  © O. Bonaventure, 2008
Alternating bit protocol
                                             Example
         A                                                              B
  Data.req(a)                             D(0,a)

  Data.req(b)                            C(OK0)               Data.ind(a)

                                           D(1,b)
               Retransmission timer
                                      D(1,b)                  Data.ind(b)
                  D(1,b) recvd        C(OK1)            Duplicate detected
  Data.req(c)                                  C(OK1)
                  D(1,b) recvd                               Lost segment
                                           D(0,c)



CNP3/2008.3.                                                  © O. Bonaventure, 2008
Alternating bit protocol
                                             Example
         A                                                              B
  Data.req(a)                             D(0,a)

  Data.req(b)                            C(OK0)               Data.ind(a)

                                           D(1,b)
               Retransmission timer
                                      D(1,b)                  Data.ind(b)
                  D(1,b) recvd        C(OK1)            Duplicate detected
  Data.req(c)                                  C(OK1)
                  D(1,b) recvd                               Lost segment
                                           D(0,c)
               Retransmission timer


CNP3/2008.3.                                                  © O. Bonaventure, 2008
Alternating bit protocol
                                             Example
         A                                                              B
  Data.req(a)                             D(0,a)

  Data.req(b)                            C(OK0)               Data.ind(a)

                                           D(1,b)
               Retransmission timer
                                      D(1,b)                  Data.ind(b)
                  D(1,b) recvd        C(OK1)            Duplicate detected
  Data.req(c)                                  C(OK1)
                  D(1,b) recvd                               Lost segment
                                           D(0,c)
               Retransmission timer
                                           D(0,c)             Data.ind(c)
CNP3/2008.3.                                                  © O. Bonaventure, 2008
Performance of the alternating bit
                             protocol
   What       is the performance of the ABP in this case
         One-way delay : 250 msec
         Physical layer throughput : 50 kbps
         segment size : 1000 bits




CNP3/2008.3.                                    © O. Bonaventure, 2008
Performance of the alternating bit
                             protocol
   What       is the performance of the ABP in this case
         One-way delay : 250 msec
         Physical layer throughput : 50 kbps
         segment size : 1000 bits

                                   Data
      1000/50000 = 20 msec                      250 msec
                                                              520 msec
                             Ack




CNP3/2008.3.                                         © O. Bonaventure, 2008
Performance of the alternating bit
                               protocol
   What        is the performance of the ABP in this case
         One-way delay : 250 msec
         Physical layer throughput : 50 kbps
         segment size : 1000 bits

                                   Data
      1000/50000 = 20 msec                      250 msec
                                                              520 msec
                             Ack




     ->       Performance is function of
CNP3/2008.3.          bandwidth * round-trip-time    © O. Bonaventure, 2008
How to improve
                        the alternating bit protocol ?
       Use a pipeline
       Principle
              The sender should be allowed to send more than
               one segment while waiting for an
               acknowledgement from the receiver




CNP3/2008.3.                                         © O. Bonaventure, 2008
How to improve
                        the alternating bit protocol ?
       Use a pipeline
       Principle
              The sender should be allowed to send more than
               one segment while waiting for an
               acknowledgement from the receiver
            A                                                  B
    Data.req(a)                   D(0,a)
    Data.req(b)
        ...
                                                     Data.ind(a)
    Data.req(e)                                         ...

                                  D(4,e)
                                                      Data.ind(e)


CNP3/2008.3.                                         © O. Bonaventure, 2008
How to improve
                         the alternating bit protocol ? (2)
       Modifications            to alternating bit protocol
              Sequence numbers inside each segment
                  Each data segment contains its own sequence number
                  Each control segment indicates the sequence number of
                   the data segment being acknowledged (OK/NAK)

              Sender
                  Needs enough buffers to store the data segments that
                   have not yet been acknowledged to be able to retransmit
                   them if required

              Receiver
                  Needs enough buffers to store the out-of-sequence
                   segments


CNP3/2008.3.                                                   © O. Bonaventure, 2008
How to improve
                         the alternating bit protocol ? (2)
       Modifications            to alternating bit protocol
              Sequence numbers inside each segment
                  Each data segment contains its own sequence number
                  Each control segment indicates the sequence number of
                   the data segment being acknowledged (OK/NAK)

              Sender
                  Needs enough buffers to store the data segments that
                   have not yet been acknowledged to be able to retransmit
                   them if required

              Receiver
                  Needs enough buffers to store the out-of-sequence
                   segments
               How to avoid an overflow of the receiverʼs buffers ?
CNP3/2008.3.                                                   © O. Bonaventure, 2008
Sliding window
   Principle
        Sender keeps a list of all the segments that it is allowed
         to send
              sending_window

                   ... 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ....
Acked segments                             Available seq. nums Forbidden seq. num.
                        Unacknowledged segments

        Receiver also maintains a receiving window with the list
         of acceptable sequence number
              receiving_window

        Sender and receiver must use compatible windows
              sending_window ≤ receiving window
               For example, window size is a constant for a given protocol or negotiated
                during connection establishment phase
CNP3/2008.3.                                                            © O. Bonaventure, 2008
Sliding windows : example

   Sending        and receiving window : 3 segments
               A                             B
          Sending window
         012345678




CNP3/2008.3.                                     © O. Bonaventure, 2008
Sliding windows : example

   Sending          and receiving window : 3 segments
               A                                   B
           Sending window
         0 1 2 3 4 5 6 7 8 Data.req(a)
         012345678
                                         D(0,a)


                                                  Data.ind(a)




CNP3/2008.3.                                           © O. Bonaventure, 2008
Sliding windows : example

   Sending          and receiving window : 3 segments
               A                                   B
           Sending window
         0 1 2 3 4 5 6 7 8 Data.req(a)
         012345678
         0 1 2 3 4 5 6 7 8 Data.req(b)   D(0,a)

                                         D(1,b)
                                                  Data.ind(a)
                                                  Data.ind(b)




CNP3/2008.3.                                           © O. Bonaventure, 2008
Sliding windows : example

   Sending          and receiving window : 3 segments
               A                                     B
           Sending window
         0 1 2 3 4 5 6 7 8 Data.req(a)
         012345678
         0 1 2 3 4 5 6 7 8 Data.req(b)   D(0,a)
         012345678                       D(1,b)
                           Data.req(c)
                                                    Data.ind(a)
                                           D(2,c)
                                                    Data.ind(b)
                                                    Data.ind(c)




CNP3/2008.3.                                             © O. Bonaventure, 2008
Sliding windows : example

   Sending          and receiving window : 3 segments
               A                                      B
           Sending window
         0 1 2 3 4 5 6 7 8 Data.req(a)
         012345678
         0 1 2 3 4 5 6 7 8 Data.req(b)    D(0,a)
         012345678                         D(1,b)
                           Data.req(c)
                                                     Data.ind(a)
                                            D(2,c)
                                                     Data.ind(b)
         012345678                       C(OK0)      Data.ind(c)




CNP3/2008.3.                                              © O. Bonaventure, 2008
Sliding windows : example

   Sending          and receiving window : 3 segments
               A                                      B
           Sending window
         0 1 2 3 4 5 6 7 8 Data.req(a)
         012345678
         0 1 2 3 4 5 6 7 8 Data.req(b)    D(0,a)
         012345678                         D(1,b)
                           Data.req(c)
                                                     Data.ind(a)
                                            D(2,c)
                                                     Data.ind(b)
         012345678                       C(OK0)      Data.ind(c)
                                            C(OK1)




CNP3/2008.3.                                              © O. Bonaventure, 2008
Sliding windows : example

   Sending          and receiving window : 3 segments
               A                                      B
           Sending window
         0 1 2 3 4 5 6 7 8 Data.req(a)
         012345678
         0 1 2 3 4 5 6 7 8 Data.req(b)    D(0,a)
         012345678                         D(1,b)
                           Data.req(c)
                                                     Data.ind(a)
                                            D(2,c)
                                                     Data.ind(b)
         012345678                       C(OK0)      Data.ind(c)
                                            C(OK1)
         012345678




CNP3/2008.3.                                              © O. Bonaventure, 2008
Sliding windows : example

   Sending          and receiving window : 3 segments
               A                                         B
           Sending window
         0 1 2 3 4 5 6 7 8 Data.req(a)
         012345678
         0 1 2 3 4 5 6 7 8 Data.req(b)    D(0,a)
         012345678                         D(1,b)
                           Data.req(c)
                                                        Data.ind(a)
                                            D(2,c)
                                                        Data.ind(b)
         012345678                       C(OK0)         Data.ind(c)
                                            C(OK1)
         0 1 2 3 4 5 6 7 8 Data.req(d)
         012345678
                                               D(3,d)
                                                        Data.ind(d)

CNP3/2008.3.                                                 © O. Bonaventure, 2008
Sliding windows : example

   Sending          and receiving window : 3 segments
               A                                               B
           Sending window
         0 1 2 3 4 5 6 7 8 Data.req(a)
         012345678
         0 1 2 3 4 5 6 7 8 Data.req(b)    D(0,a)
         012345678                         D(1,b)
                           Data.req(c)
                                                              Data.ind(a)
                                            D(2,c)
                                                              Data.ind(b)
         012345678                       C(OK0)               Data.ind(c)
                                            C(OK1)
         0 1 2 3 4 5 6 7 8 Data.req(d)
                                                     C(OK2)
         012345678
                                               D(3,d)
                                                              Data.ind(d)

CNP3/2008.3.                                                       © O. Bonaventure, 2008
Sliding windows : example

   Sending          and receiving window : 3 segments
               A                                               B
           Sending window
         0 1 2 3 4 5 6 7 8 Data.req(a)
         012345678
         0 1 2 3 4 5 6 7 8 Data.req(b)    D(0,a)
         012345678                         D(1,b)
                           Data.req(c)
                                                              Data.ind(a)
                                            D(2,c)
                                                              Data.ind(b)
         012345678                       C(OK0)               Data.ind(c)
                                            C(OK1)
         0 1 2 3 4 5 6 7 8 Data.req(d)
                                                     C(OK2)
         012345678
         012345678                             D(3,d)
                                                              Data.ind(d)

CNP3/2008.3.                                                       © O. Bonaventure, 2008
Sliding windows : example

   Sending          and receiving window : 3 segments
               A                                               B
           Sending window
         0 1 2 3 4 5 6 7 8 Data.req(a)
         012345678
         0 1 2 3 4 5 6 7 8 Data.req(b)    D(0,a)
         012345678                         D(1,b)
                           Data.req(c)
                                                              Data.ind(a)
                                            D(2,c)
                                                              Data.ind(b)
         012345678                       C(OK0)               Data.ind(c)
                                            C(OK1)
         0 1 2 3 4 5 6 7 8 Data.req(d)
                                                     C(OK2)
         012345678
         0 1 2 3 4 5 6 7 8 Data.req(e)         D(3,d)
         012345678                                            Data.ind(d)
                                               D(4,e)

CNP3/2008.3.                                                       © O. Bonaventure, 2008
Encoding sequence numbers

       Problem
              How many bits do we have in the segment
               header to encode the sequence number
                  N bits means 2N different sequence numbers

       Solution
              place inside each transmitted segment its
               sequence number modulo 2N
              The same sequence number will be used for
               several different segments
                  be careful, this could cause problems...

              Sliding window
                  List of consecutive sequence numbers (modulo 2N) that
                   the sender is allowed to transmit

CNP3/2008.3.                                                    © O. Bonaventure, 2008
Sliding window : second
                                    example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
               A                               B
           Sending window
         0123




                                OK(0)




CNP3/2008.3.                                        © O. Bonaventure, 2008
Sliding window : second
                                      example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
               A                                  B
           Sending window
         0123           Data.req(a)
         0123
                                        D(0,a)


                                                 Data.ind(a)

                                      OK(0)




CNP3/2008.3.                                          © O. Bonaventure, 2008
Sliding window : second
                                      example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
               A                                  B
           Sending window
         0123           Data.req(a)
         0123
         0123           Data.req(b)     D(0,a)

                                        D(1,b)
                                                 Data.ind(a)
                                                 Data.ind(b)
                                      OK(0)




CNP3/2008.3.                                          © O. Bonaventure, 2008
Sliding window : second
                                      example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
               A                                    B
           Sending window
         0123           Data.req(a)
         0123
         0123           Data.req(b)     D(0,a)
         0123                           D(1,b)
                        Data.req(c)
                                                   Data.ind(a)
                                          D(2,c)
                                                   Data.ind(b)
                                      OK(0)
                                                   Data.ind(c)




CNP3/2008.3.                                            © O. Bonaventure, 2008
Sliding window : second
                                      example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
               A                                    B
           Sending window
         0123           Data.req(a)
         0123
         0123           Data.req(b)     D(0,a)
         0123                           D(1,b)
                        Data.req(c)
                                                   Data.ind(a)
                                          D(2,c)
                                                   Data.ind(b)
                                      C(OK0)
                                      OK(0)
                                                   Data.ind(c)




CNP3/2008.3.                                            © O. Bonaventure, 2008
Sliding window : second
                                      example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
                A                                   B
           Sending window
         0123           Data.req(a)
         0123
         0123           Data.req(b)     D(0,a)
         0123                           D(1,b)
                        Data.req(c)
                                                   Data.ind(a)
                                          D(2,c)
                                                   Data.ind(b)
         0123                         C(OK0)
                                      OK(0)
                                                   Data.ind(c)




CNP3/2008.3.                                            © O. Bonaventure, 2008
Sliding window : second
                                      example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
                A                                   B
           Sending window
         0123           Data.req(a)
         0123
         0123           Data.req(b)     D(0,a)
         0123                           D(1,b)
                        Data.req(c)
                                                   Data.ind(a)
                                          D(2,c)
                                                   Data.ind(b)
         0123                         C(OK0)
                                      OK(0)
                                                   Data.ind(c)
                                          C(OK1)




CNP3/2008.3.                                            © O. Bonaventure, 2008
Sliding window : second
                                      example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
                A                                   B
           Sending window
         0123           Data.req(a)
         0123
         0123           Data.req(b)     D(0,a)
         0123                           D(1,b)
                        Data.req(c)
                                                   Data.ind(a)
                                          D(2,c)
                                                   Data.ind(b)
         0123                         C(OK0)
                                      OK(0)
                                                   Data.ind(c)
                                          C(OK1)
         0123




CNP3/2008.3.                                            © O. Bonaventure, 2008
Sliding window : second
                                      example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
                A                                       B
           Sending window
         0123           Data.req(a)
         0123
         0123           Data.req(b)      D(0,a)
         0123                            D(1,b)
                        Data.req(c)
                                                       Data.ind(a)
                                           D(2,c)
                                                       Data.ind(b)
         0123                          C(OK0)
                                       OK(0)
                                                       Data.ind(c)
                                           C(OK1)
         0123            Data.req(d)

                                              D(3,d)
                                                       Data.ind(d)
CNP3/2008.3.                                                © O. Bonaventure, 2008
Sliding window : second
                                      example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
                A                                       B
           Sending window
         0123           Data.req(a)
         0123
         0123           Data.req(b)      D(0,a)
         0123                            D(1,b)
                        Data.req(c)
                                                       Data.ind(a)
                                           D(2,c)
                                                       Data.ind(b)
         0123                          C(OK0)
                                       OK(0)
                                                       Data.ind(c)
                                           C(OK1)
         0123            Data.req(d)
         0123
                                              D(3,d)
                                                       Data.ind(d)
CNP3/2008.3.                                                © O. Bonaventure, 2008
Sliding window : second
                                      example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
                A                                             B
           Sending window
         0123           Data.req(a)
         0123
         0123           Data.req(b)      D(0,a)
         0123                            D(1,b)
                        Data.req(c)
                                                             Data.ind(a)
                                           D(2,c)
                                                             Data.ind(b)
         0123                          C(OK0)
                                       OK(0)
                                                             Data.ind(c)
                                           C(OK1)
         0123            Data.req(d)                C(OK2)
         0123
                                              D(3,d)
                                                             Data.ind(d)
CNP3/2008.3.                                                      © O. Bonaventure, 2008
Sliding window : second
                                      example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
                A                                             B
           Sending window
         0123           Data.req(a)
         0123
         0123           Data.req(b)      D(0,a)
         0123                            D(1,b)
                        Data.req(c)
                                                             Data.ind(a)
                                           D(2,c)
                                                             Data.ind(b)
         0123                          C(OK0)
                                       OK(0)
                                                             Data.ind(c)
                                           C(OK1)
         0123            Data.req(d)                C(OK2)
         0123
         0123                                 D(3,d)
                                                             Data.ind(d)
CNP3/2008.3.                                                      © O. Bonaventure, 2008
Sliding window : second
                                      example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
                A                                             B
           Sending window
         0123           Data.req(a)
         0123
         0123           Data.req(b)      D(0,a)
         0123                            D(1,b)
                        Data.req(c)
                                                             Data.ind(a)
                                           D(2,c)
                                                             Data.ind(b)
         0123                          C(OK0)
                                       OK(0)
                                                             Data.ind(c)
                                           C(OK1)
         0123            Data.req(d)                C(OK2)
         0123
         0123            Data.req(e)          D(3,d)
                                                             Data.ind(d)
                                              D(0,e)
CNP3/2008.3.                                                      © O. Bonaventure, 2008
Sliding window : second
                                      example
   3      segments sending and receiving window
          Sequence number encoded as 2 bits field
                A                                             B
           Sending window
         0123           Data.req(a)
         0123
         0123           Data.req(b)      D(0,a)
         0123                            D(1,b)
                        Data.req(c)
                                                             Data.ind(a)
                                           D(2,c)
                                                             Data.ind(b)
         0123                          C(OK0)
                                       OK(0)
                                                             Data.ind(c)
                                           C(OK1)
         0123            Data.req(d)                C(OK2)
         0123
         0123            Data.req(e)          D(3,d)
         0123                                                Data.ind(d)
                                              D(0,e)
CNP3/2008.3.                                                      © O. Bonaventure, 2008
Reliable transfer with a sliding window

       How      to provide a reliable data transfer with a
           sliding window
               How to react upon reception of a control segment ?
               Senderʼs and receiverʼs behaviours

       Basic          solutions
               Go-Back-N
                  simple implementation, in particular on receiving side
                  throughput will be limited when losses occur

               Selective Repeat
                  more difficult from an implementation viewpoint
                  throughput can remain high when limited losses occur


CNP3/2008.3.                                                     © O. Bonaventure, 2008
GO-BACK-N

       Principle
              Receiver must be as simple as possible
              Receiver
                  Only accepts consecutive in-sequence data segments
                  Meaning of control segments
                       Upon reception of data segment
                        OKX means that all data segments, up to and including X have
                          been received correctly
                        NAKX means that the data segment whose sequence number is
                          X contained an error or was lost

              Sender
                  Relies on a retransmission timer to detect segment losses
                  Upon expiration of retransmission time or arrival of a NAK
                   segment : retransmit all the unacknowledged data
                   segments
                          the sender may thus retransmit a segment that was already
                           received correctly but out-of-sequence at destination
CNP3/2008.3.                                                              © O. Bonaventure, 2008
Go-Back-N : Receiver
              State variable
                  next : sequence number of expected data segment

   Recvd(D(next,SDU,CRC))                 Recvd(D(next,SDU,CRC))
   AND NOT(IsOK(CRC,SDU))                    AND IsOK(CRC,SDU)
        discard(SDU);                           Data.ind(SDU)
   send(C(NAK,next,CRC));
                                                                  Process
                                   Wait                            SDU
                                                                    OK

                                                     -
                                          send(C(OK,next,CRC));
      Recvd(D(t<>next,SDU,CRC))               next=(next+1);
          AND IsOK(CRC,SDU)
            discard(SDU);
      send(C(OK,(next-1) ,CRC));



CNP3/2008.3.                                                © O. Bonaventure, 2008
Go-Back-N : Sender

              State variables
               base : sequence number of oldest data segment
               seq : first available sequence number
               W : size of sending window
     Recvd(C(?,?,CRC))                             Data.req(SDU)
and NOT( CRCOK(C(?,?,CRC)))                  AND ( seq < (base+w) )
             -                          if (seq==base) { start_timer ; }
                                        insert_in_buffer(SDU);
                                        send(D(seq,SDU,CRC));
                      Wait              seq=seq+1 ;

                                        [ Recvd(C(NAK,?,CRC))
                                      and CRCOK(C(NAK,?,CRC))]
      Recvd(C(OK,t,CRC))                    or timer expires
    and CRCOK(C(OK,t,CRC))           for (i=base;i<seq; i=i+1)
    base=(t+1);                      { send(D(i,SDU,CRC)); }
    if (base==seq)                   restart_timer();
    { cancel_timer();}
    else
    { restart_timer(); }
CNP3/2008.3.                                               © O. Bonaventure, 2008
Go-Back-N : Example

               A                 B
   Sending window
      0123




CNP3/2008.3.                         © O. Bonaventure, 2008
Go-Back-N : Example

               A                            B
   Sending window
      0123          Data.req(a)
      0123
                                  D(0,a)


                                           Data.ind(a)




CNP3/2008.3.                                    © O. Bonaventure, 2008
Go-Back-N : Example

               A                                         B
   Sending window
      0123          Data.req(a)
      0123
      0123          Data.req(b)   D(0,a)
                                           Transmission error
                                  D(1,b)
                                                       Data.ind(a)

                                                      Invalid CRC, discarded




CNP3/2008.3.                                                    © O. Bonaventure, 2008
Go-Back-N : Example

               A                                           B
   Sending window
      0123          Data.req(a)
      0123
      0123          Data.req(b)   D(0,a)
                                             Transmission error
      0123                        D(1,b)
                    Data.req(c)
                                                         Data.ind(a)
                                    D(2,c)
                                                        Invalid CRC, discarded
                                                        Not expected seq num,
                                                        discarded




CNP3/2008.3.                                                      © O. Bonaventure, 2008
Go-Back-N : Example

                A                                            B
   Sending window
      0123          Data.req(a)
      0123
      0123          Data.req(b)     D(0,a)
                                               Transmission error
      0123                          D(1,b)
                    Data.req(c)
                                                           Data.ind(a)
                                      D(2,c)
         0123                     C(OK,0)                 Invalid CRC, discarded
                                                          Not expected seq num,
                                                          discarded




CNP3/2008.3.                                                        © O. Bonaventure, 2008
Go-Back-N : Example

                A                                           B
   Sending window
      0123          Data.req(a)
      0123
      0123          Data.req(b)    D(0,a)
                                              Transmission error
      0123                          D(1,b)
                    Data.req(c)
                                                          Data.ind(a)
                                     D(2,c)
         0123                     C(OK,0)                Invalid CRC, discarded
                                     C(NAK,1)            Not expected seq num,
         0123
                                                         discarded




CNP3/2008.3.                                                       © O. Bonaventure, 2008
Go-Back-N : Example

                A                                           B
   Sending window
      0123          Data.req(a)
      0123
      0123          Data.req(b)    D(0,a)
                                              Transmission error
      0123                          D(1,b)
                    Data.req(c)
                                                          Data.ind(a)
                                     D(2,c)
         0123                     C(OK,0)                Invalid CRC, discarded
                                     C(NAK,1)            Not expected seq num,
         0123                              C(OK,0)       discarded




CNP3/2008.3.                                                       © O. Bonaventure, 2008
Go-Back-N : Example

                A                                                B
   Sending window
      0123             Data.req(a)
      0123
      0123             Data.req(b)     D(0,a)
                                                   Transmission error
      0123                              D(1,b)
                        Data.req(c)
                                                               Data.ind(a)
                                         D(2,c)
         0123                         C(OK,0)                 Invalid CRC, discarded
                    Retransmission       C(NAK,1)             Not expected seq num,
         0123                                  C(OK,0)        discarded
         0123
                                                 D(1,b)
         0123
                                                    D(2,c)
                                                               Data.ind(b)
                                                                       Data.ind(c)


CNP3/2008.3.                                                            © O. Bonaventure, 2008
Go-Back-N : Example

                A                                                B
   Sending window
      0123             Data.req(a)
      0123
      0123             Data.req(b)     D(0,a)
                                                   Transmission error
      0123                              D(1,b)
                        Data.req(c)
                                                               Data.ind(a)
                                         D(2,c)
         0123                         C(OK,0)                 Invalid CRC, discarded
                    Retransmission       C(NAK,1)             Not expected seq num,
         0123                                  C(OK,0)
                        Data.req(d)                           discarded
         0123
                                                 D(1,b)
         0123
                                                    D(2,c)
                                                               Data.ind(b)
                                                     D(3,d)            Data.ind(c)
                                                                       Data.ind(d)

CNP3/2008.3.                                                            © O. Bonaventure, 2008
Go-Back-N : Example

                A                                                B
   Sending window
      0123             Data.req(a)
      0123
      0123             Data.req(b)     D(0,a)
                                                   Transmission error
      0123                              D(1,b)
                        Data.req(c)
                                                               Data.ind(a)
                                         D(2,c)
         0123                         C(OK,0)                 Invalid CRC, discarded
                    Retransmission       C(NAK,1)             Not expected seq num,
         0123                                  C(OK,0)
                        Data.req(d)                           discarded
         0123
                                                 D(1,b)
         0123           Data.req(e)
                                                    D(2,c)
                                                               Data.ind(b)
                                                     D(3,d)            Data.ind(c)
                                                                       Data.ind(d)

CNP3/2008.3.                                                            © O. Bonaventure, 2008
Go-Back-N : Example

                A                                                  B
   Sending window
      0123                Data.req(a)
      0123
      0123                Data.req(b)    D(0,a)
                                                     Transmission error
      0123                                D(1,b)
                          Data.req(c)
                                                                 Data.ind(a)
                                           D(2,c)
         0123                           C(OK,0)                 Invalid CRC, discarded
                      Retransmission       C(NAK,1)             Not expected seq num,
         0123                                    C(OK,0)
                          Data.req(d)                           discarded
         0123
                                                   D(1,b)
         0123             Data.req(e)
                                                      D(2,c)
                                                                 Data.ind(b)
               Sending window is full
                                                       D(3,d)            Data.ind(c)
               Application blocked
                                                                         Data.ind(d)
               e will be accepted
               and sent later                                             © O. Bonaventure, 2008
CNP3/2008.3.
Go-Back-N : Example (2)

               A                    B
   Sending window
      0123




CNP3/2008.3.                            © O. Bonaventure, 2008
Go-Back-N : Example (2)

               A                            B
   Sending window
      0123          Data.req(a)
      0123
      0123                        D(0,a)


                                           Data.ind(a)




CNP3/2008.3.                                    © O. Bonaventure, 2008
Go-Back-N : Example (2)

               A                                           B
   Sending window
      0123          Data.req(a)
      0123
      0123          Data.req(b)   D(0,a)   Segment lost
                                  D(1,b)
                                                          Data.ind(a)




CNP3/2008.3.                                                   © O. Bonaventure, 2008
Go-Back-N : Example (2)

               A                                             B
   Sending window
      0123          Data.req(a)
      0123
      0123          Data.req(b)   D(0,a)     Segment lost
      0123                        D(1,b)
                    Data.req(c)
                                                            Data.ind(a)
                                    D(2,c)


                                                        Not expected seq num,
                                                        discarded




CNP3/2008.3.                                                     © O. Bonaventure, 2008
Go-Back-N : Example (2)

                A                                              B
   Sending window
      0123          Data.req(a)
      0123
      0123          Data.req(b)     D(0,a)     Segment lost
      0123                          D(1,b)
                    Data.req(c)
                                                              Data.ind(a)
                                      D(2,c)
         0123                     C(OK,0)
                                                          Not expected seq num,
                                                          discarded




CNP3/2008.3.                                                       © O. Bonaventure, 2008
Go-Back-N : Example (2)

                A                                              B
   Sending window
      0123          Data.req(a)
      0123
      0123          Data.req(b)     D(0,a)     Segment lost
      0123                          D(1,b)
                    Data.req(c)
                                                              Data.ind(a)
                                      D(2,c)
         0123                     C(OK,0)
                                                          Not expected seq num,
                                               C(OK,0)    discarded




CNP3/2008.3.                                                       © O. Bonaventure, 2008
Go-Back-N : Example (2)

                A                                                     B
   Sending window
      0123                Data.req(a)
      0123
      0123                Data.req(b)      D(0,a)     Segment lost
      0123                                 D(1,b)
                           Data.req(c)
                                                                     Data.ind(a)
                                             D(2,c)
         0123       Retransmission       C(OK,0)
                    timer expires                                Not expected seq num,
                                                      C(OK,0)    discarded
         0123
                                                    D(1,b)
         0123
                                                       D(2,c)
                                                                     Data.ind(b)
                                                                             Data.ind(c)


CNP3/2008.3.                                                              © O. Bonaventure, 2008
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key
3 transport.key

Mais conteúdo relacionado

Mais procurados

Multicasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP Networks
Multicasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP NetworksMulticasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP Networks
Multicasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP Networks
Editor IJMTER
 
A feasibility study on vehicle to-infrastructure communication wi fi vs. wimax
A feasibility study on vehicle to-infrastructure communication wi fi vs. wimaxA feasibility study on vehicle to-infrastructure communication wi fi vs. wimax
A feasibility study on vehicle to-infrastructure communication wi fi vs. wimax
Muhammad Waqas Khan Abbasi
 

Mais procurados (20)

A Quality of Service Strategy to Optimize Bandwidth Utilization in Mobile Net...
A Quality of Service Strategy to Optimize Bandwidth Utilization in Mobile Net...A Quality of Service Strategy to Optimize Bandwidth Utilization in Mobile Net...
A Quality of Service Strategy to Optimize Bandwidth Utilization in Mobile Net...
 
RESOURCE ALLOCATION ALGORITHMS FOR QOS OPTIMIZATION IN MOBILE WIMAX NETWORKS
RESOURCE ALLOCATION ALGORITHMS FOR QOS OPTIMIZATION IN MOBILE WIMAX NETWORKSRESOURCE ALLOCATION ALGORITHMS FOR QOS OPTIMIZATION IN MOBILE WIMAX NETWORKS
RESOURCE ALLOCATION ALGORITHMS FOR QOS OPTIMIZATION IN MOBILE WIMAX NETWORKS
 
Atomf ov
Atomf ovAtomf ov
Atomf ov
 
report
reportreport
report
 
Optimal Streaming Protocol for VoD Using Clients' Residual Bandwidth
Optimal Streaming Protocol for VoD Using Clients' Residual BandwidthOptimal Streaming Protocol for VoD Using Clients' Residual Bandwidth
Optimal Streaming Protocol for VoD Using Clients' Residual Bandwidth
 
Multicasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP Networks
Multicasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP NetworksMulticasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP Networks
Multicasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP Networks
 
(Paper) MTcast: Robust and Efficient P2P-based Video Delivery for Heterogeneo...
(Paper) MTcast: Robust and Efficient P2P-based Video Delivery for Heterogeneo...(Paper) MTcast: Robust and Efficient P2P-based Video Delivery for Heterogeneo...
(Paper) MTcast: Robust and Efficient P2P-based Video Delivery for Heterogeneo...
 
A feasibility study on vehicle to-infrastructure communication wi fi vs. wimax
A feasibility study on vehicle to-infrastructure communication wi fi vs. wimaxA feasibility study on vehicle to-infrastructure communication wi fi vs. wimax
A feasibility study on vehicle to-infrastructure communication wi fi vs. wimax
 
Ppt multicast routing
Ppt multicast routingPpt multicast routing
Ppt multicast routing
 
Infocom03 rajiv
Infocom03 rajivInfocom03 rajiv
Infocom03 rajiv
 
Digital TV, IPTV
Digital TV, IPTVDigital TV, IPTV
Digital TV, IPTV
 
Chp4
Chp4Chp4
Chp4
 
Quality of Service for Video Streaming using EDCA in MANET
Quality of Service for Video Streaming using EDCA in MANETQuality of Service for Video Streaming using EDCA in MANET
Quality of Service for Video Streaming using EDCA in MANET
 
05999528
0599952805999528
05999528
 
Long Term Evolution-Advanced
Long Term Evolution-AdvancedLong Term Evolution-Advanced
Long Term Evolution-Advanced
 
Motivation and results coverage enhancment for 3GPP NR Rel.17
Motivation and results coverage enhancment for 3GPP NR Rel.17 Motivation and results coverage enhancment for 3GPP NR Rel.17
Motivation and results coverage enhancment for 3GPP NR Rel.17
 
Integrated Video Transport Network Multiplexer
Integrated Video Transport Network MultiplexerIntegrated Video Transport Network Multiplexer
Integrated Video Transport Network Multiplexer
 
08 01 01
08 01 0108 01 01
08 01 01
 
Multi-Protocol Lambda Switching: The Role of IP Technologies in Controlling a...
Multi-Protocol Lambda Switching: The Role of IP Technologies in Controlling a...Multi-Protocol Lambda Switching: The Role of IP Technologies in Controlling a...
Multi-Protocol Lambda Switching: The Role of IP Technologies in Controlling a...
 
8The Affects of Different Queuing Algorithms within the Router on QoS VoIP a...
8The Affects of Different Queuing Algorithms  within the Router on QoS VoIP a...8The Affects of Different Queuing Algorithms  within the Router on QoS VoIP a...
8The Affects of Different Queuing Algorithms within the Router on QoS VoIP a...
 

Destaque

Multipath TCP
Multipath TCPMultipath TCP
Multipath TCP
Olivier Bonaventure
 

Destaque (12)

Internet innovation with Multipath TCP
Internet innovation with Multipath TCPInternet innovation with Multipath TCP
Internet innovation with Multipath TCP
 
12 ethernet-wifi
12 ethernet-wifi12 ethernet-wifi
12 ethernet-wifi
 
11 bgp-ethernet
11 bgp-ethernet11 bgp-ethernet
11 bgp-ethernet
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocols
 
4 transport-sharing
4 transport-sharing4 transport-sharing
4 transport-sharing
 
2 reliability-network
2 reliability-network2 reliability-network
2 reliability-network
 
Packet Reordering Response for MPTCP under Wireless Heterogeneous Environment
Packet Reordering Response for MPTCP under Wireless Heterogeneous EnvironmentPacket Reordering Response for MPTCP under Wireless Heterogeneous Environment
Packet Reordering Response for MPTCP under Wireless Heterogeneous Environment
 
A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...
A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...
A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...
 
Multipath TCP & practical usage
Multipath TCP & practical usageMultipath TCP & practical usage
Multipath TCP & practical usage
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocols
 
Multipath TCP
Multipath TCPMultipath TCP
Multipath TCP
 
Computer Networking : Principles, Protocols and Practice - lesson 1
Computer Networking : Principles, Protocols and Practice - lesson 1Computer Networking : Principles, Protocols and Practice - lesson 1
Computer Networking : Principles, Protocols and Practice - lesson 1
 

Semelhante a 3 transport.key

Chapter 1 overview-stij3053 - Network Design
Chapter 1 overview-stij3053 - Network DesignChapter 1 overview-stij3053 - Network Design
Chapter 1 overview-stij3053 - Network Design
nakomuri
 
Overlapped carrier sense multiple access
Overlapped carrier sense multiple accessOverlapped carrier sense multiple access
Overlapped carrier sense multiple access
ambitlick
 
Chapter 3 a
Chapter 3 aChapter 3 a
Chapter 3 a
lara_ays
 
Data Communication and Internet
Data Communication and InternetData Communication and Internet
Data Communication and Internet
Anuradha Udunuwara
 
A Review on Congestion control Mechanisms in Wireless Sensor Networks
A Review on Congestion control Mechanisms in Wireless Sensor NetworksA Review on Congestion control Mechanisms in Wireless Sensor Networks
A Review on Congestion control Mechanisms in Wireless Sensor Networks
IJERA Editor
 

Semelhante a 3 transport.key (20)

Project synopsis
Project synopsisProject synopsis
Project synopsis
 
Transmitting urgent data using ANKM method.
Transmitting urgent data using ANKM method.Transmitting urgent data using ANKM method.
Transmitting urgent data using ANKM method.
 
Enhancement of energy efficiency and throughput using csmaca dcf operation fo...
Enhancement of energy efficiency and throughput using csmaca dcf operation fo...Enhancement of energy efficiency and throughput using csmaca dcf operation fo...
Enhancement of energy efficiency and throughput using csmaca dcf operation fo...
 
Transport laye
Transport laye Transport laye
Transport laye
 
Chapter 1 overview-stij3053 - Network Design
Chapter 1 overview-stij3053 - Network DesignChapter 1 overview-stij3053 - Network Design
Chapter 1 overview-stij3053 - Network Design
 
Eh33798804
Eh33798804Eh33798804
Eh33798804
 
Eh33798804
Eh33798804Eh33798804
Eh33798804
 
Overlapped carrier sense multiple access
Overlapped carrier sense multiple accessOverlapped carrier sense multiple access
Overlapped carrier sense multiple access
 
i2ct_submission_105
i2ct_submission_105i2ct_submission_105
i2ct_submission_105
 
MSN_CameraReady.pdf
MSN_CameraReady.pdfMSN_CameraReady.pdf
MSN_CameraReady.pdf
 
Chapter 3 a
Chapter 3 aChapter 3 a
Chapter 3 a
 
Data Communication and Internet
Data Communication and InternetData Communication and Internet
Data Communication and Internet
 
Chap 1 introduction
Chap 1 introductionChap 1 introduction
Chap 1 introduction
 
IMPROVING THE PERFORMACE OF DATA AGGREGATION IN WIRELESS SENSOR NETWORK
IMPROVING THE PERFORMACE OF DATA AGGREGATION IN WIRELESS SENSOR NETWORKIMPROVING THE PERFORMACE OF DATA AGGREGATION IN WIRELESS SENSOR NETWORK
IMPROVING THE PERFORMACE OF DATA AGGREGATION IN WIRELESS SENSOR NETWORK
 
CCNxCon2012: Session 3: Content-centric VANETs: routing and transport issues
CCNxCon2012: Session 3: Content-centric VANETs: routing and transport issuesCCNxCon2012: Session 3: Content-centric VANETs: routing and transport issues
CCNxCon2012: Session 3: Content-centric VANETs: routing and transport issues
 
Transport layer
Transport layerTransport layer
Transport layer
 
Uw as ns design challenges in transport layer
Uw as ns design challenges in transport layerUw as ns design challenges in transport layer
Uw as ns design challenges in transport layer
 
A Review on Congestion control Mechanisms in Wireless Sensor Networks
A Review on Congestion control Mechanisms in Wireless Sensor NetworksA Review on Congestion control Mechanisms in Wireless Sensor Networks
A Review on Congestion control Mechanisms in Wireless Sensor Networks
 
IRJET- QOS Aware Manet Routing Protocol for Multimedia Traffic in an Adaptive...
IRJET- QOS Aware Manet Routing Protocol for Multimedia Traffic in an Adaptive...IRJET- QOS Aware Manet Routing Protocol for Multimedia Traffic in an Adaptive...
IRJET- QOS Aware Manet Routing Protocol for Multimedia Traffic in an Adaptive...
 
Computer Network Interview Questions
Computer Network Interview QuestionsComputer Network Interview Questions
Computer Network Interview Questions
 

Mais de Olivier Bonaventure

Mais de Olivier Bonaventure (20)

Part3-reliable.pptx
Part3-reliable.pptxPart3-reliable.pptx
Part3-reliable.pptx
 
Part10-router.pptx
Part10-router.pptxPart10-router.pptx
Part10-router.pptx
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 
Part9-congestion.pptx
Part9-congestion.pptxPart9-congestion.pptx
Part9-congestion.pptx
 
Part2-Apps-Security.pptx
Part2-Apps-Security.pptxPart2-Apps-Security.pptx
Part2-Apps-Security.pptx
 
Part11-lan.pptx
Part11-lan.pptxPart11-lan.pptx
Part11-lan.pptx
 
Part5-tcp-improvements.pptx
Part5-tcp-improvements.pptxPart5-tcp-improvements.pptx
Part5-tcp-improvements.pptx
 
Part8-ibgp.pptx
Part8-ibgp.pptxPart8-ibgp.pptx
Part8-ibgp.pptx
 
Part4-reliable-tcp.pptx
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptx
 
Part7-routing.pptx
Part7-routing.pptxPart7-routing.pptx
Part7-routing.pptx
 
Part6-network-routing.pptx
Part6-network-routing.pptxPart6-network-routing.pptx
Part6-network-routing.pptx
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 
Part2-Apps-Security.pptx
Part2-Apps-Security.pptxPart2-Apps-Security.pptx
Part2-Apps-Security.pptx
 
Part4-reliable-tcp.pptx
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptx
 
Part3-reliable.pptx
Part3-reliable.pptxPart3-reliable.pptx
Part3-reliable.pptx
 
A personal journey towards more reproducible networking research
A personal journey towards more reproducible networking researchA personal journey towards more reproducible networking research
A personal journey towards more reproducible networking research
 
Part 12 : Local Area Networks
Part 12 : Local Area Networks Part 12 : Local Area Networks
Part 12 : Local Area Networks
 
Part 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPPart 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGP
 
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPPart 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGP
 
Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6
 

3 transport.key

  • 1. Computer Networking : Principles, Protocols and Practice Part 3 : Transport Layer Olivier Bonaventure http://inl.info.ucl.ac.be/ CNP3/2008.3. © O. Bonaventure 2008
  • 2. Module 3 : Transport Layer  Basics  Building a reliable transport layer  Reliable data transmission  Connection establishment  Connection release  UDP : a simple connectionless transport protocol  TCP : a reliable connection oriented transport protocol CNP3/2008.3. © O. Bonaventure, 2008
  • 3. The transport layer Transport Segments Transport Network Network Network Datalink Datalink Datalink Physical Physical Physical  Goals  Improves the service provided by the network layer to allow it to be useable by applications  reliability  multiplexing  Transport layer services  Unreliable connectionless service  Reliable connection-oriented service CNP3/2008.3. © O. Bonaventure, 2008
  • 4. The network layer Network Packets Network Packets Network Datalink Datalink Datalink Physical Physical Physical  Network layer service in Internet  Unreliable connectionless service  Packets can be lost  Packets can suffer from transmission errors  Packet ordering is not preserved  Packet can be duplicated  Packet size is limited to about 64 KBytes  How to build a service useable by applications ? CNP3/2008.3. © O. Bonaventure, 2008
  • 5. The transport layer  Problems to be solved by transport layer  Transport layer must allow two applications to exchange information  This requires a method to identify the applications  The transport layer service must be useable by applications  detection of transmission errors  correction of transmission errors  recovery from packet losses and packet duplications  different types of services  connectionless  connection-oriented  request-response CNP3/2008.3. © O. Bonaventure, 2008
  • 6. The transport layer (2)  Internal organisation  The transport layer uses the service provide by the network layer  Two transport layer entities exchanges segments Application ADU Application Segment Transport Transport Transport layer entity entity Packet Network Network CNP3/2008.3. © O. Bonaventure, 2008
  • 7. Module 3 : Transport layer  Basics  Building a reliable transport layer  Reliable data transmission  Connection establishment  Connection release  UDP : a simple connectionless transport protocol  TCP : a reliable connection oriented transport protocol CNP3/2008.3. © O. Bonaventure, 2008
  • 8. Transport layer protocols  How can we provide a reliable service in the transport layer  Hypotheses 1. The application sends small SDUs 2. The network layer provides a perfect service 1. There are no transmission errors inside the packets 2. No packet is lost 3. There is no packet reordering 4. There are no duplications of packets 3. Data transmission is unidirectional CNP3/2008.3. © O. Bonaventure, 2008
  • 9. Transport layer protocols (2)  Reference environment Application ADU Application Segment Transport Transport Transport layer entity entity Packet Network Network  Notations  data.req and data.ind primitives for application/ transport interactions  recv() and send() for interactions between transport entity and network layer CNP3/2008.3. © O. Bonaventure, 2008
  • 10. Protocol 1 : Basics A B  Principle  Upon reception of data.request(SDU), the transport entity sends a segment containing this SDU through the network layer (send(SDU))  Upon reception of the contents of one packet from the network layer (recv(SDU)), transport entity delivers the SDU found in the packet to its user by using data.ind(SDU) CNP3/2008.3. © O. Bonaventure, 2008
  • 11. Protocol 1 : Basics A B Data.request(a)  Principle  Upon reception of data.request(SDU), the transport entity sends a segment containing this SDU through the network layer (send(SDU))  Upon reception of the contents of one packet from the network layer (recv(SDU)), transport entity delivers the SDU found in the packet to its user by using data.ind(SDU) CNP3/2008.3. © O. Bonaventure, 2008
  • 12. Protocol 1 : Basics A B Data.request(a) Segment(a)  Principle  Upon reception of data.request(SDU), the transport entity sends a segment containing this SDU through the network layer (send(SDU))  Upon reception of the contents of one packet from the network layer (recv(SDU)), transport entity delivers the SDU found in the packet to its user by using data.ind(SDU) CNP3/2008.3. © O. Bonaventure, 2008
  • 13. Protocol 1 : Basics A B Data.request(a) Segment(a) Data.ind(a)  Principle  Upon reception of data.request(SDU), the transport entity sends a segment containing this SDU through the network layer (send(SDU))  Upon reception of the contents of one packet from the network layer (recv(SDU)), transport entity delivers the SDU found in the packet to its user by using data.ind(SDU) CNP3/2008.3. © O. Bonaventure, 2008
  • 14. Protocol 1 as a FSM  Sender Data.req(SDU) Wait for send(SDU) SDU  Receiver recvd(SDU) Wait for segment Data.ind(SDU) CNP3/2008.3. © O. Bonaventure, 2008
  • 15. Protocol 1 : Example A B  Issue  What happens if the receiver is much slower than the sender ?  e.g. receiver can process one segment per second while sender is producing 10 segments per second ? CNP3/2008.3. © O. Bonaventure, 2008
  • 16. Protocol 1 : Example A B Data.request(a) Segment(a) Data.ind(a)  Issue  What happens if the receiver is much slower than the sender ?  e.g. receiver can process one segment per second while sender is producing 10 segments per second ? CNP3/2008.3. © O. Bonaventure, 2008
  • 17. Protocol 1 : Example A B Data.request(a) Segment(a) Data.request(b) Segment(b) Data.ind(a) Data.ind(b)  Issue  What happens if the receiver is much slower than the sender ?  e.g. receiver can process one segment per second while sender is producing 10 segments per second ? CNP3/2008.3. © O. Bonaventure, 2008
  • 18. Protocol 1 : Example A B Data.request(a) Segment(a) Data.request(b) Segment(b) Data.ind(a) Data.request(c) Data.ind(b) Segment(c) Data.ind(c)  Issue  What happens if the receiver is much slower than the sender ?  e.g. receiver can process one segment per second while sender is producing 10 segments per second ? CNP3/2008.3. © O. Bonaventure, 2008
  • 19. Protocol 2  Principle  Use a control segment (OK) that is sent by the receiver after having processed the received segment  creates a feedback loop between sender and receiver  Consequences  Two types of segments  Data segment containing on SDU  Notation : D(SDU)  Control segment  Notation : C(OK) Type  Segment format  At least one bit in the segment header is used to indicate the type of segment CNP3/2008.3. © O. Bonaventure, 2008
  • 20. Protocol 2 (cont.)  Sender Data.req(SDU) send(D(SDU)) Wait Wait for for SDU OK Recvd(C(OK))  Receiver - Recvd(D(SDU)) Data.ind(SDU) Wait Process for SDU segment - Send(C(OK)) CNP3/2008.3. © O. Bonaventure, 2008
  • 21. Protocol 2 : Example A B The sender only sends segments when authorised by the receiver CNP3/2008.3. © O. Bonaventure, 2008
  • 22. Protocol 2 : Example A B Data.req(a) D(a) Data.ind(a) The sender only sends segments when authorised by the receiver CNP3/2008.3. © O. Bonaventure, 2008
  • 23. Protocol 2 : Example A B Data.req(a) D(a) Data.req(b) Data.ind(a) The sender only sends segments when authorised by the receiver CNP3/2008.3. © O. Bonaventure, 2008
  • 24. Protocol 2 : Example A B Data.req(a) D(a) Data.req(b) C(OK) Data.ind(a) The sender only sends segments when authorised by the receiver CNP3/2008.3. © O. Bonaventure, 2008
  • 25. Protocol 2 : Example A B Data.req(a) D(a) Data.req(b) C(OK) Data.ind(a) D(b) Data.ind(b) The sender only sends segments when authorised by the receiver CNP3/2008.3. © O. Bonaventure, 2008
  • 26. Protocol 2 : Example A B Data.req(a) D(a) Data.req(b) C(OK) Data.ind(a) D(b) C(OK) Data.ind(b) The sender only sends segments when authorised by the receiver CNP3/2008.3. © O. Bonaventure, 2008
  • 27. Protocol 3  How can we provide a reliable service in the transport layer  Hypotheses 1. The application sends small SDUs 2. The network layer provides a perfect service 1. Transmission errors are possible 2. No packet is lost 3. There is no packet reordering 4. There are no duplications of packets 3. Data transmission is unidirectional CNP3/2008.3. © O. Bonaventure, 2008
  • 28. Transmission errors  Which types of transmission errors do we need to consider in the transport layer ? Network  Physical-layer transmission errors caused by nature  Random isolated error  one bit is flipped in the segment  Random burst error  a group of n bits inside the segment is errored  most of the bits in the group are flipped CNP3/2008.3. © O. Bonaventure, 2008
  • 29. Security issues versus transmission errors  Information sent over a network may become corrupted for other reasons than transmission errors Network CNP3/2008.3. © O. Bonaventure, 2008
  • 30. Security issues versus transmission errors  Information sent over a network may become corrupted for other reasons than transmission errors Network CNP3/2008.3. © O. Bonaventure, 2008
  • 31. Security issues versus transmission errors  Information sent over a network may become corrupted for other reasons than transmission errors Network CNP3/2008.3. © O. Bonaventure, 2008
  • 32. Security issues versus transmission errors  Information sent over a network may become corrupted for other reasons than transmission errors Network CNP3/2008.3. © O. Bonaventure, 2008
  • 33. Security issues versus transmission errors  Information sent over a network may become corrupted for other reasons than transmission errors Network CNP3/2008.3. © O. Bonaventure, 2008
  • 34. Security issues versus transmission errors  Information sent over a network may become corrupted for other reasons than transmission errors Network CNP3/2008.3. © O. Bonaventure, 2008
  • 35. Security issues versus transmission errors  Information sent over a network may become corrupted for other reasons than transmission errors Network CNP3/2008.3. © O. Bonaventure, 2008
  • 36. Security issues versus transmission errors  Information sent over a network may become corrupted for other reasons than transmission errors Network  These attacks are dealt by using special security protocols and mechanisms outside CNP3/2008.3. the transport layer © O. Bonaventure, 2008
  • 37. How to detect transmission errors ?  Principle  Sender adds some control information inside the segment  control information is computed over the entire segment and placed in the segment header or trailer Type+ Control Type Control  Receiver checks that the received control information is correct by recomputing it CNP3/2008.3. © O. Bonaventure, 2008
  • 38. Parity bits  Simple solution to detect transmission errors  Used on slow-speed serial lines  e.g. modems connected to the telephone network  Odd Parity  For each group of n bits, sender computes the n+1th bit so that the n+1 group contains an odd number of bits set to 1  Examples 0011010 1101100  Even Parity CNP3/2008.3. © O. Bonaventure, 2008
  • 39. Parity bits  Simple solution to detect transmission errors  Used on slow-speed serial lines  e.g. modems connected to the telephone network  Odd Parity  For each group of n bits, sender computes the n+1th bit so that the n+1 group contains an odd number of bits set to 1  Examples 0011010 0 1101100  Even Parity CNP3/2008.3. © O. Bonaventure, 2008
  • 40. Parity bits  Simple solution to detect transmission errors  Used on slow-speed serial lines  e.g. modems connected to the telephone network  Odd Parity  For each group of n bits, sender computes the n+1th bit so that the n+1 group contains an odd number of bits set to 1  Examples 0011010 0 1101100 1  Even Parity CNP3/2008.3. © O. Bonaventure, 2008
  • 41. Internet checksum  Motivation  Internet protocols are implemented in software and we would like to have efficient algorithms to detect transmission errors that are easy to implement  Solution  Internet checksum  Sender computes for each segment and over the entire segment the 1s complement of the sum of all the 16 bits words in the segment  Receiver recomputes the checksum over each received segment and verifies that it is correct. Otherwise, the CNP3/2008.3. © O. Bonaventure, 2008
  • 42. Internet checksum : example  Assume a segment composed of 48 bits 0110011001101100 0101010101010101 0000111100001111 CNP3/2008.3. © O. Bonaventure, 2008
  • 43. Internet checksum : example  Assume a segment composed of 48 bits 0110011001101100 0000111100001111 0101010101010101 CNP3/2008.3. © O. Bonaventure, 2008
  • 44. Internet checksum : example  Assume a segment composed of 48 bits 0110011001101100 0000111100001111 0101010101010101 1011101110111011 CNP3/2008.3. © O. Bonaventure, 2008
  • 45. Internet checksum : example  Assume a segment composed of 48 bits 0110011001101100 0101010101010101 1011101110111011 0000111100001111 CNP3/2008.3. © O. Bonaventure, 2008
  • 46. Internet checksum : example  Assume a segment composed of 48 bits 0110011001101100 0101010101010101 1011101110111011 0000111100001111 1100101011001010 CNP3/2008.3. © O. Bonaventure, 2008
  • 47. Internet checksum : example  Assume a segment composed of 48 bits 0110011001101100 0101010101010101 1011101110111011 0000111100001111 1100101011001010 0011010100110101 CNP3/2008.3. © O. Bonaventure, 2008
  • 48. Cyclical Redundancy Check (CRC)  Principle  Improve the performance of the Internet checksum by using polynomial codes  Sender and receiver agree on r+1 bits pattern called Generator (G)  Sender adds r bits of CRC to a d bits data segment such that the d+r bits pattern is exactly divisible by G using modulo 2 arithmetic  D * 2^r XOR R = n*G d bits r bits  All computations are done in modulo 2 arithmetic by using XOR  1011 + 0101 = 1110 1001 + 1101 = 0100  1011 - 0101 = 1110 1001 - 1101 = 0100 CNP3/2008.3. © O. Bonaventure, 2008
  • 49. Detection of transmission errors (2)  Behaviour of the receiver  If the checksum is correct  Send an OK control segment to the sender to  confirm the reception of the data segment  allow the sender to send the next segment  If the checksum is incorrect  The content of the segment is corrupted and must be discarded  Send a special control segment (NAK) to the sender to ask it to retransmit the corrupted data segment CNP3/2008.3. © O. Bonaventure, 2008
  • 50. Protocol 3a : Sender  Sender Data.req(SDU) Recvd(C(NAK)) send(D(SDU,CRC)) send(D(SDU,CRC)) Wait Wait for for SDU OK/NAK Recvd(C(OK)) - CNP3/2008.3. © O. Bonaventure, 2008
  • 51. Protocol 3a : Receiver  Receiver Recvd(D(SDU,CRC)) AND IsOK(CRC,SDU) Data.ind(SDU) Process segment OK Wait for segment Send(C(OK)) - Send(C(NAK)) - Recvd(D(SDU,CRC)) Process segment AND Not(IsOK(CRC,SDU)) KO - CNP3/2008.3. © O. Bonaventure, 2008
  • 52. Protocol 3a : Example A B CNP3/2008.3. © O. Bonaventure, 2008
  • 53. Protocol 3a : Example A B Data.req(a) D(a) Data.ind(a) CNP3/2008.3. © O. Bonaventure, 2008
  • 54. Protocol 3a : Example A B Data.req(a) D(a) Data.req(b) Data.ind(a) CNP3/2008.3. © O. Bonaventure, 2008
  • 55. Protocol 3a : Example A B Data.req(a) D(a) Data.req(b) C(OK) Data.ind(a) CNP3/2008.3. © O. Bonaventure, 2008
  • 56. Protocol 3a : Example A B Data.req(a) D(a) Data.req(b) C(OK) Data.ind(a) Transmission error D(b') Invalid checksum CNP3/2008.3. © O. Bonaventure, 2008
  • 57. Protocol 3a : Example A B Data.req(a) D(a) Data.req(b) C(OK) Data.ind(a) Transmission error D(b') C(NAK) Invalid checksum CNP3/2008.3. © O. Bonaventure, 2008
  • 58. Protocol 3a : Example A B Data.req(a) D(a) Data.req(b) C(OK) Data.ind(a) Transmission error D(b') C(NAK) Invalid checksum Retransmission CNP3/2008.3. © O. Bonaventure, 2008
  • 59. Protocol 3a : Example A B Data.req(a) D(a) Data.req(b) C(OK) Data.ind(a) Transmission error D(b') C(NAK) Invalid checksum Retransmission D(b) Data.ind(b) CNP3/2008.3. © O. Bonaventure, 2008
  • 60. Protocol 3a : Example A B Data.req(a) D(a) Data.req(b) C(OK) Data.ind(a) Transmission error D(b') C(NAK) Invalid checksum Retransmission D(b) C(OK) Data.ind(b) CNP3/2008.3. © O. Bonaventure, 2008
  • 61. Protocol 3b  How can we provide a reliable service in the transport layer ?  Hypotheses 1. The application sends small SDUs 2. The network layer provides a perfect service 1. Transmission errors are possible 2. Packets can be lost 3. There is no packet reordering 4. There are no duplications of packets 3. Data transmission is unidirectional 2. How to deal with these problems ? CNP3/2008.3. © O. Bonaventure, 2008
  • 62. Protocol 3a and segment losses  How do segment losses affect protocol 3a ? A B CNP3/2008.3. © O. Bonaventure, 2008
  • 63. Protocol 3a and segment losses  How do segment losses affect protocol 3a ? A B Data.req(a) D(a) Data.ind(a) CNP3/2008.3. © O. Bonaventure, 2008
  • 64. Protocol 3a and segment losses  How do segment losses affect protocol 3a ? A B Data.req(a) D(a) C(OK) Data.ind(a) CNP3/2008.3. © O. Bonaventure, 2008
  • 65. Protocol 3a and segment losses  How do segment losses affect protocol 3a ? A B Data.req(a) D(a) C(OK) Data.ind(a) Data.req(b) CNP3/2008.3. © O. Bonaventure, 2008
  • 66. Protocol 3a and segment losses  How do segment losses affect protocol 3a ? A B Data.req(a) D(a) C(OK) Data.ind(a) Data.req(b) Lost segment D(b) CNP3/2008.3. © O. Bonaventure, 2008
  • 67. Protocol 3a and segment losses  How do segment losses affect protocol 3a ? A B Data.req(a) D(a) C(OK) Data.ind(a) Data.req(b) Lost segment D(b) DEADLOCK A is waiting for a B is waiting for a control segment data segment CNP3/2008.3. © O. Bonaventure, 2008
  • 68. Protocol 3b  Modification to the sender  Add a retransmission timer to retransmit the lost segment after some time Data.req(SDU) Recvd(C(NAK)) send(D(SDU,CRC)) send(D(SDU,CRC)) start_timer() restart_timer() Wait Wait for for SDU OK/NAK Recvd(C(OK)) cancel_timer() Timer expires send(D(SDU,CRC)) restart_timer()  No modification to the receiver CNP3/2008.3. © O. Bonaventure, 2008
  • 69. Protocol 3b : Example A B CNP3/2008.3. © O. Bonaventure, 2008
  • 70. Protocol 3b : Example A B Data.req(a) D(a) start timer Data.ind(a) CNP3/2008.3. © O. Bonaventure, 2008
  • 71. Protocol 3b : Example A B Data.req(a) D(a) start timer C(OK) Data.ind(a) cancel timer CNP3/2008.3. © O. Bonaventure, 2008
  • 72. Protocol 3b : Example A B Data.req(a) D(a) start timer C(OK) Data.ind(a) cancel timer Data.req(b) start timer CNP3/2008.3. © O. Bonaventure, 2008
  • 73. Protocol 3b : Example A B Data.req(a) D(a) start timer C(OK) Data.ind(a) cancel timer Data.req(b) start timer CNP3/2008.3. © O. Bonaventure, 2008
  • 74. Protocol 3b : Example A B Data.req(a) D(a) start timer C(OK) Data.ind(a) cancel timer Data.req(b) start timer D(b) Lost segment CNP3/2008.3. © O. Bonaventure, 2008
  • 75. Protocol 3b : Example A B Data.req(a) D(a) start timer C(OK) Data.ind(a) cancel timer Data.req(b) start timer D(b) Lost segment timer expires CNP3/2008.3. © O. Bonaventure, 2008
  • 76. Protocol 3b : Example A B Data.req(a) D(a) start timer C(OK) Data.ind(a) cancel timer Data.req(b) start timer D(b) Lost segment D(b) timer expires Data.ind(b) CNP3/2008.3. © O. Bonaventure, 2008
  • 77. Protocol 3b : Example A B Data.req(a) D(a) start timer C(OK) Data.ind(a) cancel timer Data.req(b) start timer D(b) Lost segment D(b) timer expires C(OK) Data.ind(b) CNP3/2008.3. © O. Bonaventure, 2008
  • 78. Protocol 3b : Example A B Data.req(a) D(a) start timer C(OK) Data.ind(a) cancel timer Data.req(b) start timer D(b) Lost segment D(b) timer expires C(OK) Data.ind(b)  Does this protocol always work ? CNP3/2008.3. © O. Bonaventure, 2008
  • 79. Protocol 3b : Example A B CNP3/2008.3. © O. Bonaventure, 2008
  • 80. Protocol 3b : Example A B Data.req(a) D(a) start timer C(OK) Data.ind(a) cancel timer CNP3/2008.3. © O. Bonaventure, 2008
  • 81. Protocol 3b : Example A B Data.req(a) D(a) start timer C(OK) Data.ind(a) cancel timer Data.req(b) start timer D(b) Data.ind(b) CNP3/2008.3. © O. Bonaventure, 2008
  • 82. Protocol 3b : Example A B Data.req(a) D(a) start timer C(OK) Data.ind(a) cancel timer Data.req(b) start timer D(b) Lost segment C(OK) Data.ind(b) CNP3/2008.3. © O. Bonaventure, 2008
  • 83. Protocol 3b : Example A B Data.req(a) D(a) start timer C(OK) Data.ind(a) cancel timer Data.req(b) start timer D(b) Lost segment C(OK) Data.ind(b) D(b) timer expires C(OK) Data.ind(b) CNP3/2008.3. © O. Bonaventure, 2008
  • 84. Protocol 3b : Example A B Data.req(a) D(a) start timer C(OK) Data.ind(a) cancel timer Data.req(b) start timer D(b) Lost segment C(OK) Data.ind(b) D(b) timer expires C(OK) Data.ind(b)  How to solve this problem ? CNP3/2008.3. © O. Bonaventure, 2008
  • 85. Alternating bit protocol  Principles of the solution  Add sequence numbers to each data segment sent by sender  By looking at the sequence number, the receiver can check whether it has already received this segment  Contents of each segment  Data segments  Control segments Type, Seq. number CRC Type, Seq. number CRC  How many bits do we need for the sequence number?  a single bit is enough CNP3/2008.3. © O. Bonaventure, 2008
  • 86. Alternating bit protocol Sender Recvd(C(NAK?)) OR Recvd(C(OK1)) Data.req(SDU) or timer expires send(D(0,SDU,CRC)) send(D(0,SDU,CRC)) start_timer() restart_timer() Wait Wait for for D(0,...) OK0/NAK Recvd(C(OK1)) Recvd(C(OK0)) cancel_timer() cancel_timer() Data.req(SDU) send(D(1,SDU,CRC)) All corrupted start_timer() segments are Wait Wait discarded in all states for for OK1/NAK D(1,...) Recvd(C(NAK?)) or recvd(C(OK0)) or timer expires send(D(1,SDU,CRC)) CNP3/2008.3. restart-timer() © O. Bonaventure, 2008
  • 87. Alternating bit protocol Receiver Recvd(D(1,SDU,CRC)) Recvd(D(0,SDU,CRC)) AND IsOK(CRC,SDU) AND IsOK(CRC,SDU) Send(C(OK1)) Recvd(D(0,SDU,CRC)) Send(C(OK0)) AND IsOK(CRC,SDU) - Data.ind(SDU) Process Send(C(OK0))Wait Wait for SDU0 for D(0,...) OK D(1,...) Bad(D(?,SDU,CRC)) Bad(D(?,SDU,CRC)) - - Recvd(D(1,SDU,CRC)) AND IsOK(CRC,SDU) - - Data.ind(SDU) Send(C(NAK1)) Send(C(NAK0)) - Process Send(C(OK1)) Process Process SDU0 SDU1 SDU1 KO OK KO CNP3/2008.3. © O. Bonaventure, 2008
  • 88. Alternating bit protocol Example A B CNP3/2008.3. © O. Bonaventure, 2008
  • 89. Alternating bit protocol Example A B Data.req(a) D(0,a) C(OK0) Data.ind(a) CNP3/2008.3. © O. Bonaventure, 2008
  • 90. Alternating bit protocol Example A B Data.req(a) D(0,a) Data.req(b) C(OK0) Data.ind(a) D(1,b) Data.ind(b) CNP3/2008.3. © O. Bonaventure, 2008
  • 91. Alternating bit protocol Example A B Data.req(a) D(0,a) Data.req(b) C(OK0) Data.ind(a) D(1,b) Retransmission timer D(1,b) Data.ind(b) D(1,b) recvd C(OK1) Duplicate detected C(OK1) D(1,b) recvd CNP3/2008.3. © O. Bonaventure, 2008
  • 92. Alternating bit protocol Example A B Data.req(a) D(0,a) Data.req(b) C(OK0) Data.ind(a) D(1,b) Retransmission timer D(1,b) Data.ind(b) D(1,b) recvd C(OK1) Duplicate detected Data.req(c) C(OK1) D(1,b) recvd Lost segment D(0,c) CNP3/2008.3. © O. Bonaventure, 2008
  • 93. Alternating bit protocol Example A B Data.req(a) D(0,a) Data.req(b) C(OK0) Data.ind(a) D(1,b) Retransmission timer D(1,b) Data.ind(b) D(1,b) recvd C(OK1) Duplicate detected Data.req(c) C(OK1) D(1,b) recvd Lost segment D(0,c) Retransmission timer CNP3/2008.3. © O. Bonaventure, 2008
  • 94. Alternating bit protocol Example A B Data.req(a) D(0,a) Data.req(b) C(OK0) Data.ind(a) D(1,b) Retransmission timer D(1,b) Data.ind(b) D(1,b) recvd C(OK1) Duplicate detected Data.req(c) C(OK1) D(1,b) recvd Lost segment D(0,c) Retransmission timer D(0,c) Data.ind(c) CNP3/2008.3. © O. Bonaventure, 2008
  • 95. Performance of the alternating bit protocol  What is the performance of the ABP in this case  One-way delay : 250 msec  Physical layer throughput : 50 kbps  segment size : 1000 bits CNP3/2008.3. © O. Bonaventure, 2008
  • 96. Performance of the alternating bit protocol  What is the performance of the ABP in this case  One-way delay : 250 msec  Physical layer throughput : 50 kbps  segment size : 1000 bits Data 1000/50000 = 20 msec 250 msec 520 msec Ack CNP3/2008.3. © O. Bonaventure, 2008
  • 97. Performance of the alternating bit protocol  What is the performance of the ABP in this case  One-way delay : 250 msec  Physical layer throughput : 50 kbps  segment size : 1000 bits Data 1000/50000 = 20 msec 250 msec 520 msec Ack  -> Performance is function of CNP3/2008.3. bandwidth * round-trip-time © O. Bonaventure, 2008
  • 98. How to improve the alternating bit protocol ?  Use a pipeline  Principle  The sender should be allowed to send more than one segment while waiting for an acknowledgement from the receiver CNP3/2008.3. © O. Bonaventure, 2008
  • 99. How to improve the alternating bit protocol ?  Use a pipeline  Principle  The sender should be allowed to send more than one segment while waiting for an acknowledgement from the receiver A B Data.req(a) D(0,a) Data.req(b) ... Data.ind(a) Data.req(e) ... D(4,e) Data.ind(e) CNP3/2008.3. © O. Bonaventure, 2008
  • 100. How to improve the alternating bit protocol ? (2)  Modifications to alternating bit protocol  Sequence numbers inside each segment  Each data segment contains its own sequence number  Each control segment indicates the sequence number of the data segment being acknowledged (OK/NAK)  Sender  Needs enough buffers to store the data segments that have not yet been acknowledged to be able to retransmit them if required  Receiver  Needs enough buffers to store the out-of-sequence segments CNP3/2008.3. © O. Bonaventure, 2008
  • 101. How to improve the alternating bit protocol ? (2)  Modifications to alternating bit protocol  Sequence numbers inside each segment  Each data segment contains its own sequence number  Each control segment indicates the sequence number of the data segment being acknowledged (OK/NAK)  Sender  Needs enough buffers to store the data segments that have not yet been acknowledged to be able to retransmit them if required  Receiver  Needs enough buffers to store the out-of-sequence segments How to avoid an overflow of the receiverʼs buffers ? CNP3/2008.3. © O. Bonaventure, 2008
  • 102. Sliding window  Principle  Sender keeps a list of all the segments that it is allowed to send  sending_window ... 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 .... Acked segments Available seq. nums Forbidden seq. num. Unacknowledged segments  Receiver also maintains a receiving window with the list of acceptable sequence number  receiving_window  Sender and receiver must use compatible windows  sending_window ≤ receiving window  For example, window size is a constant for a given protocol or negotiated during connection establishment phase CNP3/2008.3. © O. Bonaventure, 2008
  • 103. Sliding windows : example  Sending and receiving window : 3 segments A B Sending window 012345678 CNP3/2008.3. © O. Bonaventure, 2008
  • 104. Sliding windows : example  Sending and receiving window : 3 segments A B Sending window 0 1 2 3 4 5 6 7 8 Data.req(a) 012345678 D(0,a) Data.ind(a) CNP3/2008.3. © O. Bonaventure, 2008
  • 105. Sliding windows : example  Sending and receiving window : 3 segments A B Sending window 0 1 2 3 4 5 6 7 8 Data.req(a) 012345678 0 1 2 3 4 5 6 7 8 Data.req(b) D(0,a) D(1,b) Data.ind(a) Data.ind(b) CNP3/2008.3. © O. Bonaventure, 2008
  • 106. Sliding windows : example  Sending and receiving window : 3 segments A B Sending window 0 1 2 3 4 5 6 7 8 Data.req(a) 012345678 0 1 2 3 4 5 6 7 8 Data.req(b) D(0,a) 012345678 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) Data.ind(c) CNP3/2008.3. © O. Bonaventure, 2008
  • 107. Sliding windows : example  Sending and receiving window : 3 segments A B Sending window 0 1 2 3 4 5 6 7 8 Data.req(a) 012345678 0 1 2 3 4 5 6 7 8 Data.req(b) D(0,a) 012345678 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 012345678 C(OK0) Data.ind(c) CNP3/2008.3. © O. Bonaventure, 2008
  • 108. Sliding windows : example  Sending and receiving window : 3 segments A B Sending window 0 1 2 3 4 5 6 7 8 Data.req(a) 012345678 0 1 2 3 4 5 6 7 8 Data.req(b) D(0,a) 012345678 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 012345678 C(OK0) Data.ind(c) C(OK1) CNP3/2008.3. © O. Bonaventure, 2008
  • 109. Sliding windows : example  Sending and receiving window : 3 segments A B Sending window 0 1 2 3 4 5 6 7 8 Data.req(a) 012345678 0 1 2 3 4 5 6 7 8 Data.req(b) D(0,a) 012345678 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 012345678 C(OK0) Data.ind(c) C(OK1) 012345678 CNP3/2008.3. © O. Bonaventure, 2008
  • 110. Sliding windows : example  Sending and receiving window : 3 segments A B Sending window 0 1 2 3 4 5 6 7 8 Data.req(a) 012345678 0 1 2 3 4 5 6 7 8 Data.req(b) D(0,a) 012345678 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 012345678 C(OK0) Data.ind(c) C(OK1) 0 1 2 3 4 5 6 7 8 Data.req(d) 012345678 D(3,d) Data.ind(d) CNP3/2008.3. © O. Bonaventure, 2008
  • 111. Sliding windows : example  Sending and receiving window : 3 segments A B Sending window 0 1 2 3 4 5 6 7 8 Data.req(a) 012345678 0 1 2 3 4 5 6 7 8 Data.req(b) D(0,a) 012345678 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 012345678 C(OK0) Data.ind(c) C(OK1) 0 1 2 3 4 5 6 7 8 Data.req(d) C(OK2) 012345678 D(3,d) Data.ind(d) CNP3/2008.3. © O. Bonaventure, 2008
  • 112. Sliding windows : example  Sending and receiving window : 3 segments A B Sending window 0 1 2 3 4 5 6 7 8 Data.req(a) 012345678 0 1 2 3 4 5 6 7 8 Data.req(b) D(0,a) 012345678 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 012345678 C(OK0) Data.ind(c) C(OK1) 0 1 2 3 4 5 6 7 8 Data.req(d) C(OK2) 012345678 012345678 D(3,d) Data.ind(d) CNP3/2008.3. © O. Bonaventure, 2008
  • 113. Sliding windows : example  Sending and receiving window : 3 segments A B Sending window 0 1 2 3 4 5 6 7 8 Data.req(a) 012345678 0 1 2 3 4 5 6 7 8 Data.req(b) D(0,a) 012345678 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 012345678 C(OK0) Data.ind(c) C(OK1) 0 1 2 3 4 5 6 7 8 Data.req(d) C(OK2) 012345678 0 1 2 3 4 5 6 7 8 Data.req(e) D(3,d) 012345678 Data.ind(d) D(4,e) CNP3/2008.3. © O. Bonaventure, 2008
  • 114. Encoding sequence numbers  Problem  How many bits do we have in the segment header to encode the sequence number  N bits means 2N different sequence numbers  Solution  place inside each transmitted segment its sequence number modulo 2N  The same sequence number will be used for several different segments  be careful, this could cause problems...  Sliding window  List of consecutive sequence numbers (modulo 2N) that the sender is allowed to transmit CNP3/2008.3. © O. Bonaventure, 2008
  • 115. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 OK(0) CNP3/2008.3. © O. Bonaventure, 2008
  • 116. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 Data.req(a) 0123 D(0,a) Data.ind(a) OK(0) CNP3/2008.3. © O. Bonaventure, 2008
  • 117. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) D(1,b) Data.ind(a) Data.ind(b) OK(0) CNP3/2008.3. © O. Bonaventure, 2008
  • 118. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) OK(0) Data.ind(c) CNP3/2008.3. © O. Bonaventure, 2008
  • 119. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) C(OK0) OK(0) Data.ind(c) CNP3/2008.3. © O. Bonaventure, 2008
  • 120. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 0123 C(OK0) OK(0) Data.ind(c) CNP3/2008.3. © O. Bonaventure, 2008
  • 121. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 0123 C(OK0) OK(0) Data.ind(c) C(OK1) CNP3/2008.3. © O. Bonaventure, 2008
  • 122. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 0123 C(OK0) OK(0) Data.ind(c) C(OK1) 0123 CNP3/2008.3. © O. Bonaventure, 2008
  • 123. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 0123 C(OK0) OK(0) Data.ind(c) C(OK1) 0123 Data.req(d) D(3,d) Data.ind(d) CNP3/2008.3. © O. Bonaventure, 2008
  • 124. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 0123 C(OK0) OK(0) Data.ind(c) C(OK1) 0123 Data.req(d) 0123 D(3,d) Data.ind(d) CNP3/2008.3. © O. Bonaventure, 2008
  • 125. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 0123 C(OK0) OK(0) Data.ind(c) C(OK1) 0123 Data.req(d) C(OK2) 0123 D(3,d) Data.ind(d) CNP3/2008.3. © O. Bonaventure, 2008
  • 126. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 0123 C(OK0) OK(0) Data.ind(c) C(OK1) 0123 Data.req(d) C(OK2) 0123 0123 D(3,d) Data.ind(d) CNP3/2008.3. © O. Bonaventure, 2008
  • 127. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 0123 C(OK0) OK(0) Data.ind(c) C(OK1) 0123 Data.req(d) C(OK2) 0123 0123 Data.req(e) D(3,d) Data.ind(d) D(0,e) CNP3/2008.3. © O. Bonaventure, 2008
  • 128. Sliding window : second example 3 segments sending and receiving window  Sequence number encoded as 2 bits field A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) Data.ind(b) 0123 C(OK0) OK(0) Data.ind(c) C(OK1) 0123 Data.req(d) C(OK2) 0123 0123 Data.req(e) D(3,d) 0123 Data.ind(d) D(0,e) CNP3/2008.3. © O. Bonaventure, 2008
  • 129. Reliable transfer with a sliding window  How to provide a reliable data transfer with a sliding window  How to react upon reception of a control segment ?  Senderʼs and receiverʼs behaviours  Basic solutions  Go-Back-N  simple implementation, in particular on receiving side  throughput will be limited when losses occur  Selective Repeat  more difficult from an implementation viewpoint  throughput can remain high when limited losses occur CNP3/2008.3. © O. Bonaventure, 2008
  • 130. GO-BACK-N  Principle  Receiver must be as simple as possible  Receiver  Only accepts consecutive in-sequence data segments  Meaning of control segments  Upon reception of data segment  OKX means that all data segments, up to and including X have been received correctly  NAKX means that the data segment whose sequence number is X contained an error or was lost  Sender  Relies on a retransmission timer to detect segment losses  Upon expiration of retransmission time or arrival of a NAK segment : retransmit all the unacknowledged data segments  the sender may thus retransmit a segment that was already received correctly but out-of-sequence at destination CNP3/2008.3. © O. Bonaventure, 2008
  • 131. Go-Back-N : Receiver  State variable  next : sequence number of expected data segment Recvd(D(next,SDU,CRC)) Recvd(D(next,SDU,CRC)) AND NOT(IsOK(CRC,SDU)) AND IsOK(CRC,SDU) discard(SDU); Data.ind(SDU) send(C(NAK,next,CRC)); Process Wait SDU OK - send(C(OK,next,CRC)); Recvd(D(t<>next,SDU,CRC)) next=(next+1); AND IsOK(CRC,SDU) discard(SDU); send(C(OK,(next-1) ,CRC)); CNP3/2008.3. © O. Bonaventure, 2008
  • 132. Go-Back-N : Sender  State variables  base : sequence number of oldest data segment  seq : first available sequence number  W : size of sending window Recvd(C(?,?,CRC)) Data.req(SDU) and NOT( CRCOK(C(?,?,CRC))) AND ( seq < (base+w) ) - if (seq==base) { start_timer ; } insert_in_buffer(SDU); send(D(seq,SDU,CRC)); Wait seq=seq+1 ; [ Recvd(C(NAK,?,CRC)) and CRCOK(C(NAK,?,CRC))] Recvd(C(OK,t,CRC)) or timer expires and CRCOK(C(OK,t,CRC)) for (i=base;i<seq; i=i+1) base=(t+1); { send(D(i,SDU,CRC)); } if (base==seq) restart_timer(); { cancel_timer();} else { restart_timer(); } CNP3/2008.3. © O. Bonaventure, 2008
  • 133. Go-Back-N : Example A B Sending window 0123 CNP3/2008.3. © O. Bonaventure, 2008
  • 134. Go-Back-N : Example A B Sending window 0123 Data.req(a) 0123 D(0,a) Data.ind(a) CNP3/2008.3. © O. Bonaventure, 2008
  • 135. Go-Back-N : Example A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Transmission error D(1,b) Data.ind(a) Invalid CRC, discarded CNP3/2008.3. © O. Bonaventure, 2008
  • 136. Go-Back-N : Example A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Transmission error 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) Invalid CRC, discarded Not expected seq num, discarded CNP3/2008.3. © O. Bonaventure, 2008
  • 137. Go-Back-N : Example A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Transmission error 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) 0123 C(OK,0) Invalid CRC, discarded Not expected seq num, discarded CNP3/2008.3. © O. Bonaventure, 2008
  • 138. Go-Back-N : Example A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Transmission error 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) 0123 C(OK,0) Invalid CRC, discarded C(NAK,1) Not expected seq num, 0123 discarded CNP3/2008.3. © O. Bonaventure, 2008
  • 139. Go-Back-N : Example A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Transmission error 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) 0123 C(OK,0) Invalid CRC, discarded C(NAK,1) Not expected seq num, 0123 C(OK,0) discarded CNP3/2008.3. © O. Bonaventure, 2008
  • 140. Go-Back-N : Example A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Transmission error 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) 0123 C(OK,0) Invalid CRC, discarded Retransmission C(NAK,1) Not expected seq num, 0123 C(OK,0) discarded 0123 D(1,b) 0123 D(2,c) Data.ind(b) Data.ind(c) CNP3/2008.3. © O. Bonaventure, 2008
  • 141. Go-Back-N : Example A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Transmission error 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) 0123 C(OK,0) Invalid CRC, discarded Retransmission C(NAK,1) Not expected seq num, 0123 C(OK,0) Data.req(d) discarded 0123 D(1,b) 0123 D(2,c) Data.ind(b) D(3,d) Data.ind(c) Data.ind(d) CNP3/2008.3. © O. Bonaventure, 2008
  • 142. Go-Back-N : Example A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Transmission error 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) 0123 C(OK,0) Invalid CRC, discarded Retransmission C(NAK,1) Not expected seq num, 0123 C(OK,0) Data.req(d) discarded 0123 D(1,b) 0123 Data.req(e) D(2,c) Data.ind(b) D(3,d) Data.ind(c) Data.ind(d) CNP3/2008.3. © O. Bonaventure, 2008
  • 143. Go-Back-N : Example A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Transmission error 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) 0123 C(OK,0) Invalid CRC, discarded Retransmission C(NAK,1) Not expected seq num, 0123 C(OK,0) Data.req(d) discarded 0123 D(1,b) 0123 Data.req(e) D(2,c) Data.ind(b) Sending window is full D(3,d) Data.ind(c) Application blocked Data.ind(d) e will be accepted and sent later © O. Bonaventure, 2008 CNP3/2008.3.
  • 144. Go-Back-N : Example (2) A B Sending window 0123 CNP3/2008.3. © O. Bonaventure, 2008
  • 145. Go-Back-N : Example (2) A B Sending window 0123 Data.req(a) 0123 0123 D(0,a) Data.ind(a) CNP3/2008.3. © O. Bonaventure, 2008
  • 146. Go-Back-N : Example (2) A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Segment lost D(1,b) Data.ind(a) CNP3/2008.3. © O. Bonaventure, 2008
  • 147. Go-Back-N : Example (2) A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Segment lost 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) Not expected seq num, discarded CNP3/2008.3. © O. Bonaventure, 2008
  • 148. Go-Back-N : Example (2) A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Segment lost 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) 0123 C(OK,0) Not expected seq num, discarded CNP3/2008.3. © O. Bonaventure, 2008
  • 149. Go-Back-N : Example (2) A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Segment lost 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) 0123 C(OK,0) Not expected seq num, C(OK,0) discarded CNP3/2008.3. © O. Bonaventure, 2008
  • 150. Go-Back-N : Example (2) A B Sending window 0123 Data.req(a) 0123 0123 Data.req(b) D(0,a) Segment lost 0123 D(1,b) Data.req(c) Data.ind(a) D(2,c) 0123 Retransmission C(OK,0) timer expires Not expected seq num, C(OK,0) discarded 0123 D(1,b) 0123 D(2,c) Data.ind(b) Data.ind(c) CNP3/2008.3. © O. Bonaventure, 2008

Notas do Editor

  1. These slides are licensed under the creative commons attribution share-alike license 3.0. You can obtain detailed information about this license at http://creativecommons.org/licenses/by-sa/3.0/ The slides are part of an effort to develop an open-source networking textbook. See http://inl.info.ucl.ac.be/CNP3 for the current version of the textbook and more information on how to contribute.
  2. To avoid overloading the slide, we assume that sequence numbers are integers. Of course, all computations must be performed modulo 2 N .
  3. To avoid overloading the slide, we assume that sequence numbers are integers. Of course, all computations must be performed modulo 2 N .
  4. To avoid overloading the slide, we assume that sequence numbers are integers. Of course, all computations must be performed modulo 2 N .
  5. To avoid overloading the slide, we assume that sequence numbers are integers. Of course, all computations must be performed modulo 2 N . Other retransmission strategies are possible at the sender.
  6. MSL means Maximum Segment Lifetime
  7. In this example, the duplicate CR is likely to be a previous retransmission of the CR that was delayed in the network.
  8. In this example, the duplicate CR is likely to be a previous retransmission of the CR that was delayed in the network.
  9. In this example, the duplicate CR is likely to be a previous retransmission of the CR that was delayed in the network.
  10. In this example, the duplicate CR is likely to be a previous retransmission of the CR that was delayed in the network.
  11. In this example, the duplicate CR is likely to be a previous retransmission of the CR that was delayed in the network.
  12. In this example, the duplicate CR is likely to be a previous retransmission of the CR that was delayed in the network.
  13. In this example, the duplicate CR is likely to be a previous retransmission of the CR that was delayed in the network.
  14. In this example, the duplicate CR is likely to be a previous retransmission of the CR that was delayed in the network.
  15. In this example, the duplicate CR is likely to be a previous retransmission of the CR that was delayed in the network.
  16. In this example, the duplicate CR is likely to be a previous retransmission of the CR that was delayed in the network.
  17. In this example, the duplicate CR is likely to be a previous retransmission of the CR that was delayed in the network.
  18. In this example, the duplicate CR is likely to be a previous retransmission of the CR that was delayed in the network.
  19. The computation of the UDP checksum is defined in : R. Braden, D. Borman, C. Partridge, Computing the Internet Checksum, RFC1071, Septembre 1988
  20. The computation of the UDP checksum is defined in : R. Braden, D. Borman, C. Partridge, Computing the Internet Checksum, RFC1071, Septembre 1988
  21. The computation of the UDP checksum is defined in : R. Braden, D. Borman, C. Partridge, Computing the Internet Checksum, RFC1071, Septembre 1988
  22. The computation of the UDP checksum is defined in : R. Braden, D. Borman, C. Partridge, Computing the Internet Checksum, RFC1071, Septembre 1988
  23. UDP is mainly used for applications where either short messages are exchanged or losses or not a severe problem (either because they can be supported by the application or because they are used in LAN environment where there are almost no losses) Domain Name System, Network File System (NFS), Remote Procedure Call (RPC), jeux Multimedia (conversational) applications such as VoIP or VideooverIP often use UDP. In this case, UDP is often combined with RTP H. Schulzrinne, S. Casner, R. Frederick, V. Jacobson.RTP: A Transport Protocol for Real-Time Applications. RFC1889, Jan 1996
  24. TCP was defined in J. Postel. Transmission control protocol. Request for Comments 793, Internet Engineering Task Force, September 1981. It has been heavily modified since A more detailed description of TCP may be found in W. Stevens. TCP/IP Illustrated, volume 1 : The protocols. Addison-Wesley, 1994.
  25. Urgent pointer is rarely used and will not be described. The THL is indicated in blocs of 32 bits. The TCP header may contain options, these will be discussed later.
  26. Urgent pointer is rarely used and will not be described. The THL is indicated in blocs of 32 bits. The TCP header may contain options, these will be discussed later.
  27. Urgent pointer is rarely used and will not be described. The THL is indicated in blocs of 32 bits. The TCP header may contain options, these will be discussed later.
  28. MSL in IP networks : 120 seconds
  29. MSL in IP networks : 120 seconds
  30. MSL in IP networks : 120 seconds
  31. MSL in IP networks : 120 seconds
  32. MSL in IP networks : 120 seconds
  33. MSL in IP networks : 120 seconds
  34. MSL in IP networks : 120 seconds
  35. MSL in IP networks : 120 seconds
  36. MSL in IP networks : 120 seconds
  37. MSL in IP networks : 120 seconds
  38. MSL in IP networks : 120 seconds
  39. MSL in IP networks : 120 seconds
  40. MSL in IP networks : 120 seconds
  41. Le segment TCP avec le flag RST est &amp;#xE9;galement utilis&amp;#xE9; envoy&amp;#xE9; lorsqu&apos;une entit&amp;#xE9; TCP re&amp;#xE7;oit un segment TCP n&apos;ayant pas le bit SYN mis &amp;#xE0; vrai et qui est relatif &amp;#xE0; une connexion TCP n&apos;existant pas &amp;#xE0; ce moment sur cette entit&amp;#xE9;. Le segment RST peut &amp;#xE9;galement &amp;#xEA;tre utilis&amp;#xE9; pour informer l&apos;autre extremit&amp;#xE9; de la connexion TCP de probl&amp;#xE8;mes de syntaxe dans un segment TCP re&amp;#xE7;u. Tout envoi d&apos;un segment TCP avec le flag RST mis &amp;#xE0; vrai provoque la fin de la connexion TCP sur laquelle il est envoy&amp;#xE9;. Cependant, afin d&apos;&amp;#xE9;viter des envois permanents de segments RST, une entit&amp;#xE9; TCP n&apos;enverra jamais de segment RST en r&amp;#xE9;ponse &amp;#xE0; un segment RST.
  42. Le segment TCP avec le flag RST est &amp;#xE9;galement utilis&amp;#xE9; envoy&amp;#xE9; lorsqu&apos;une entit&amp;#xE9; TCP re&amp;#xE7;oit un segment TCP n&apos;ayant pas le bit SYN mis &amp;#xE0; vrai et qui est relatif &amp;#xE0; une connexion TCP n&apos;existant pas &amp;#xE0; ce moment sur cette entit&amp;#xE9;. Le segment RST peut &amp;#xE9;galement &amp;#xEA;tre utilis&amp;#xE9; pour informer l&apos;autre extremit&amp;#xE9; de la connexion TCP de probl&amp;#xE8;mes de syntaxe dans un segment TCP re&amp;#xE7;u. Tout envoi d&apos;un segment TCP avec le flag RST mis &amp;#xE0; vrai provoque la fin de la connexion TCP sur laquelle il est envoy&amp;#xE9;. Cependant, afin d&apos;&amp;#xE9;viter des envois permanents de segments RST, une entit&amp;#xE9; TCP n&apos;enverra jamais de segment RST en r&amp;#xE9;ponse &amp;#xE0; un segment RST.
  43. Le segment TCP avec le flag RST est &amp;#xE9;galement utilis&amp;#xE9; envoy&amp;#xE9; lorsqu&apos;une entit&amp;#xE9; TCP re&amp;#xE7;oit un segment TCP n&apos;ayant pas le bit SYN mis &amp;#xE0; vrai et qui est relatif &amp;#xE0; une connexion TCP n&apos;existant pas &amp;#xE0; ce moment sur cette entit&amp;#xE9;. Le segment RST peut &amp;#xE9;galement &amp;#xEA;tre utilis&amp;#xE9; pour informer l&apos;autre extremit&amp;#xE9; de la connexion TCP de probl&amp;#xE8;mes de syntaxe dans un segment TCP re&amp;#xE7;u. Tout envoi d&apos;un segment TCP avec le flag RST mis &amp;#xE0; vrai provoque la fin de la connexion TCP sur laquelle il est envoy&amp;#xE9;. Cependant, afin d&apos;&amp;#xE9;viter des envois permanents de segments RST, une entit&amp;#xE9; TCP n&apos;enverra jamais de segment RST en r&amp;#xE9;ponse &amp;#xE0; un segment RST.
  44. Le segment TCP avec le flag RST est &amp;#xE9;galement utilis&amp;#xE9; envoy&amp;#xE9; lorsqu&apos;une entit&amp;#xE9; TCP re&amp;#xE7;oit un segment TCP n&apos;ayant pas le bit SYN mis &amp;#xE0; vrai et qui est relatif &amp;#xE0; une connexion TCP n&apos;existant pas &amp;#xE0; ce moment sur cette entit&amp;#xE9;. Le segment RST peut &amp;#xE9;galement &amp;#xEA;tre utilis&amp;#xE9; pour informer l&apos;autre extremit&amp;#xE9; de la connexion TCP de probl&amp;#xE8;mes de syntaxe dans un segment TCP re&amp;#xE7;u. Tout envoi d&apos;un segment TCP avec le flag RST mis &amp;#xE0; vrai provoque la fin de la connexion TCP sur laquelle il est envoy&amp;#xE9;. Cependant, afin d&apos;&amp;#xE9;viter des envois permanents de segments RST, une entit&amp;#xE9; TCP n&apos;enverra jamais de segment RST en r&amp;#xE9;ponse &amp;#xE0; un segment RST.
  45. En pratique, cette ouverture simultann&amp;#xE9;e est assez rare car souvent le client choisit un num&amp;#xE9;ro de port TCP local eph&amp;#xE9;m&amp;#xE8;re pour contacter le serveur. Une ouverture simultan&amp;#xE9;e ne se produira en pratique que si le client et le serveur utilisent chacun un num&amp;#xE9;ro de port TCP &amp;#xAB;&amp;#xA0;bien connu&amp;#xA0;&amp;#xBB;. Dans cette ouverture, le premier segment envoy&amp;#xE9; par chaque entit&amp;#xE9; est un segment dont le bit SYN est mis &amp;#xE0; vrai. Ensuite, apr&amp;#xE8;s avoir re&amp;#xE7;u le segment SYN, chaque entit&amp;#xE9; va acquiter ce segment SYN en envoyant un segment dont le bit ACK est mis &amp;#xE0; vrai et en acquittant le num&amp;#xE9;ro de s&amp;#xE9;quence annonc&amp;#xE9; dans le segment SYN re&amp;#xE7;u. Cet acquittement prouve que l&apos;entit&amp;#xE9; qui l&apos;envoie a bien re&amp;#xE7;u le segment SYN. Il faut noter que le bit SYN est mis &amp;#xE0; vrai dans le segment d&apos;acquittement car le segment SYN n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;. Lors de la r&amp;#xE9;ception de l&apos;acquit, le three-way handshake se termine pour l&apos;entit&amp;#xE9; qui le re&amp;#xE7;oit car &amp;#xE0; ce moment son SYN a &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9; et elle a acquit&amp;#xE9; le SYN envoy&amp;#xE9; par l&apos;autre entit&amp;#xE9;.
  46. En pratique, cette ouverture simultann&amp;#xE9;e est assez rare car souvent le client choisit un num&amp;#xE9;ro de port TCP local eph&amp;#xE9;m&amp;#xE8;re pour contacter le serveur. Une ouverture simultan&amp;#xE9;e ne se produira en pratique que si le client et le serveur utilisent chacun un num&amp;#xE9;ro de port TCP &amp;#xAB;&amp;#xA0;bien connu&amp;#xA0;&amp;#xBB;. Dans cette ouverture, le premier segment envoy&amp;#xE9; par chaque entit&amp;#xE9; est un segment dont le bit SYN est mis &amp;#xE0; vrai. Ensuite, apr&amp;#xE8;s avoir re&amp;#xE7;u le segment SYN, chaque entit&amp;#xE9; va acquiter ce segment SYN en envoyant un segment dont le bit ACK est mis &amp;#xE0; vrai et en acquittant le num&amp;#xE9;ro de s&amp;#xE9;quence annonc&amp;#xE9; dans le segment SYN re&amp;#xE7;u. Cet acquittement prouve que l&apos;entit&amp;#xE9; qui l&apos;envoie a bien re&amp;#xE7;u le segment SYN. Il faut noter que le bit SYN est mis &amp;#xE0; vrai dans le segment d&apos;acquittement car le segment SYN n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;. Lors de la r&amp;#xE9;ception de l&apos;acquit, le three-way handshake se termine pour l&apos;entit&amp;#xE9; qui le re&amp;#xE7;oit car &amp;#xE0; ce moment son SYN a &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9; et elle a acquit&amp;#xE9; le SYN envoy&amp;#xE9; par l&apos;autre entit&amp;#xE9;.
  47. En pratique, cette ouverture simultann&amp;#xE9;e est assez rare car souvent le client choisit un num&amp;#xE9;ro de port TCP local eph&amp;#xE9;m&amp;#xE8;re pour contacter le serveur. Une ouverture simultan&amp;#xE9;e ne se produira en pratique que si le client et le serveur utilisent chacun un num&amp;#xE9;ro de port TCP &amp;#xAB;&amp;#xA0;bien connu&amp;#xA0;&amp;#xBB;. Dans cette ouverture, le premier segment envoy&amp;#xE9; par chaque entit&amp;#xE9; est un segment dont le bit SYN est mis &amp;#xE0; vrai. Ensuite, apr&amp;#xE8;s avoir re&amp;#xE7;u le segment SYN, chaque entit&amp;#xE9; va acquiter ce segment SYN en envoyant un segment dont le bit ACK est mis &amp;#xE0; vrai et en acquittant le num&amp;#xE9;ro de s&amp;#xE9;quence annonc&amp;#xE9; dans le segment SYN re&amp;#xE7;u. Cet acquittement prouve que l&apos;entit&amp;#xE9; qui l&apos;envoie a bien re&amp;#xE7;u le segment SYN. Il faut noter que le bit SYN est mis &amp;#xE0; vrai dans le segment d&apos;acquittement car le segment SYN n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;. Lors de la r&amp;#xE9;ception de l&apos;acquit, le three-way handshake se termine pour l&apos;entit&amp;#xE9; qui le re&amp;#xE7;oit car &amp;#xE0; ce moment son SYN a &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9; et elle a acquit&amp;#xE9; le SYN envoy&amp;#xE9; par l&apos;autre entit&amp;#xE9;.
  48. En pratique, cette ouverture simultann&amp;#xE9;e est assez rare car souvent le client choisit un num&amp;#xE9;ro de port TCP local eph&amp;#xE9;m&amp;#xE8;re pour contacter le serveur. Une ouverture simultan&amp;#xE9;e ne se produira en pratique que si le client et le serveur utilisent chacun un num&amp;#xE9;ro de port TCP &amp;#xAB;&amp;#xA0;bien connu&amp;#xA0;&amp;#xBB;. Dans cette ouverture, le premier segment envoy&amp;#xE9; par chaque entit&amp;#xE9; est un segment dont le bit SYN est mis &amp;#xE0; vrai. Ensuite, apr&amp;#xE8;s avoir re&amp;#xE7;u le segment SYN, chaque entit&amp;#xE9; va acquiter ce segment SYN en envoyant un segment dont le bit ACK est mis &amp;#xE0; vrai et en acquittant le num&amp;#xE9;ro de s&amp;#xE9;quence annonc&amp;#xE9; dans le segment SYN re&amp;#xE7;u. Cet acquittement prouve que l&apos;entit&amp;#xE9; qui l&apos;envoie a bien re&amp;#xE7;u le segment SYN. Il faut noter que le bit SYN est mis &amp;#xE0; vrai dans le segment d&apos;acquittement car le segment SYN n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;. Lors de la r&amp;#xE9;ception de l&apos;acquit, le three-way handshake se termine pour l&apos;entit&amp;#xE9; qui le re&amp;#xE7;oit car &amp;#xE0; ce moment son SYN a &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9; et elle a acquit&amp;#xE9; le SYN envoy&amp;#xE9; par l&apos;autre entit&amp;#xE9;.
  49. En pratique, cette ouverture simultann&amp;#xE9;e est assez rare car souvent le client choisit un num&amp;#xE9;ro de port TCP local eph&amp;#xE9;m&amp;#xE8;re pour contacter le serveur. Une ouverture simultan&amp;#xE9;e ne se produira en pratique que si le client et le serveur utilisent chacun un num&amp;#xE9;ro de port TCP &amp;#xAB;&amp;#xA0;bien connu&amp;#xA0;&amp;#xBB;. Dans cette ouverture, le premier segment envoy&amp;#xE9; par chaque entit&amp;#xE9; est un segment dont le bit SYN est mis &amp;#xE0; vrai. Ensuite, apr&amp;#xE8;s avoir re&amp;#xE7;u le segment SYN, chaque entit&amp;#xE9; va acquiter ce segment SYN en envoyant un segment dont le bit ACK est mis &amp;#xE0; vrai et en acquittant le num&amp;#xE9;ro de s&amp;#xE9;quence annonc&amp;#xE9; dans le segment SYN re&amp;#xE7;u. Cet acquittement prouve que l&apos;entit&amp;#xE9; qui l&apos;envoie a bien re&amp;#xE7;u le segment SYN. Il faut noter que le bit SYN est mis &amp;#xE0; vrai dans le segment d&apos;acquittement car le segment SYN n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;. Lors de la r&amp;#xE9;ception de l&apos;acquit, le three-way handshake se termine pour l&apos;entit&amp;#xE9; qui le re&amp;#xE7;oit car &amp;#xE0; ce moment son SYN a &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9; et elle a acquit&amp;#xE9; le SYN envoy&amp;#xE9; par l&apos;autre entit&amp;#xE9;.
  50. En pratique, cette ouverture simultann&amp;#xE9;e est assez rare car souvent le client choisit un num&amp;#xE9;ro de port TCP local eph&amp;#xE9;m&amp;#xE8;re pour contacter le serveur. Une ouverture simultan&amp;#xE9;e ne se produira en pratique que si le client et le serveur utilisent chacun un num&amp;#xE9;ro de port TCP &amp;#xAB;&amp;#xA0;bien connu&amp;#xA0;&amp;#xBB;. Dans cette ouverture, le premier segment envoy&amp;#xE9; par chaque entit&amp;#xE9; est un segment dont le bit SYN est mis &amp;#xE0; vrai. Ensuite, apr&amp;#xE8;s avoir re&amp;#xE7;u le segment SYN, chaque entit&amp;#xE9; va acquiter ce segment SYN en envoyant un segment dont le bit ACK est mis &amp;#xE0; vrai et en acquittant le num&amp;#xE9;ro de s&amp;#xE9;quence annonc&amp;#xE9; dans le segment SYN re&amp;#xE7;u. Cet acquittement prouve que l&apos;entit&amp;#xE9; qui l&apos;envoie a bien re&amp;#xE7;u le segment SYN. Il faut noter que le bit SYN est mis &amp;#xE0; vrai dans le segment d&apos;acquittement car le segment SYN n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;. Lors de la r&amp;#xE9;ception de l&apos;acquit, le three-way handshake se termine pour l&apos;entit&amp;#xE9; qui le re&amp;#xE7;oit car &amp;#xE0; ce moment son SYN a &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9; et elle a acquit&amp;#xE9; le SYN envoy&amp;#xE9; par l&apos;autre entit&amp;#xE9;.
  51. En pratique, cette ouverture simultann&amp;#xE9;e est assez rare car souvent le client choisit un num&amp;#xE9;ro de port TCP local eph&amp;#xE9;m&amp;#xE8;re pour contacter le serveur. Une ouverture simultan&amp;#xE9;e ne se produira en pratique que si le client et le serveur utilisent chacun un num&amp;#xE9;ro de port TCP &amp;#xAB;&amp;#xA0;bien connu&amp;#xA0;&amp;#xBB;. Dans cette ouverture, le premier segment envoy&amp;#xE9; par chaque entit&amp;#xE9; est un segment dont le bit SYN est mis &amp;#xE0; vrai. Ensuite, apr&amp;#xE8;s avoir re&amp;#xE7;u le segment SYN, chaque entit&amp;#xE9; va acquiter ce segment SYN en envoyant un segment dont le bit ACK est mis &amp;#xE0; vrai et en acquittant le num&amp;#xE9;ro de s&amp;#xE9;quence annonc&amp;#xE9; dans le segment SYN re&amp;#xE7;u. Cet acquittement prouve que l&apos;entit&amp;#xE9; qui l&apos;envoie a bien re&amp;#xE7;u le segment SYN. Il faut noter que le bit SYN est mis &amp;#xE0; vrai dans le segment d&apos;acquittement car le segment SYN n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;. Lors de la r&amp;#xE9;ception de l&apos;acquit, le three-way handshake se termine pour l&apos;entit&amp;#xE9; qui le re&amp;#xE7;oit car &amp;#xE0; ce moment son SYN a &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9; et elle a acquit&amp;#xE9; le SYN envoy&amp;#xE9; par l&apos;autre entit&amp;#xE9;.
  52. Cette machine ne prend pas en compte les retransmissions sur temporisateur. Typiquement, un client va passer par les &amp;#xE9;tats Init, SynSent et Established. Un serveur passera lui par les &amp;#xE9;tats Init, SynRcvd et Established. Ce n&apos;est que lors d&apos;une ouverture simultan&amp;#xE9;e que le chemin suivi est Init, SynSent, SynRcvd, Established. Dans la transition entre l&apos;&amp;#xE9;tat SYN-Sent et l&apos;&amp;#xE9;tat SYN-RCV, le bit ACK est positionn&amp;#xE9; pour acquitter le segment SYN re&amp;#xE7;u et le bit SYN est positionn&amp;#xE9; car la premi&amp;#xE8;re transmission n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;e. Lors d&apos;une ouverture simultann&amp;#xE9;e, la transition entre SYN-RCVD et Established sera fera lors de la r&amp;#xE9;ception d&apos;un segment dont le bit ACK et le bit SYN seront positionn&amp;#xE9;s.
  53. Cette machine ne prend pas en compte les retransmissions sur temporisateur. Typiquement, un client va passer par les &amp;#xE9;tats Init, SynSent et Established. Un serveur passera lui par les &amp;#xE9;tats Init, SynRcvd et Established. Ce n&apos;est que lors d&apos;une ouverture simultan&amp;#xE9;e que le chemin suivi est Init, SynSent, SynRcvd, Established. Dans la transition entre l&apos;&amp;#xE9;tat SYN-Sent et l&apos;&amp;#xE9;tat SYN-RCV, le bit ACK est positionn&amp;#xE9; pour acquitter le segment SYN re&amp;#xE7;u et le bit SYN est positionn&amp;#xE9; car la premi&amp;#xE8;re transmission n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;e. Lors d&apos;une ouverture simultann&amp;#xE9;e, la transition entre SYN-RCVD et Established sera fera lors de la r&amp;#xE9;ception d&apos;un segment dont le bit ACK et le bit SYN seront positionn&amp;#xE9;s.
  54. Cette machine ne prend pas en compte les retransmissions sur temporisateur. Typiquement, un client va passer par les &amp;#xE9;tats Init, SynSent et Established. Un serveur passera lui par les &amp;#xE9;tats Init, SynRcvd et Established. Ce n&apos;est que lors d&apos;une ouverture simultan&amp;#xE9;e que le chemin suivi est Init, SynSent, SynRcvd, Established. Dans la transition entre l&apos;&amp;#xE9;tat SYN-Sent et l&apos;&amp;#xE9;tat SYN-RCV, le bit ACK est positionn&amp;#xE9; pour acquitter le segment SYN re&amp;#xE7;u et le bit SYN est positionn&amp;#xE9; car la premi&amp;#xE8;re transmission n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;e. Lors d&apos;une ouverture simultann&amp;#xE9;e, la transition entre SYN-RCVD et Established sera fera lors de la r&amp;#xE9;ception d&apos;un segment dont le bit ACK et le bit SYN seront positionn&amp;#xE9;s.
  55. Cette machine ne prend pas en compte les retransmissions sur temporisateur. Typiquement, un client va passer par les &amp;#xE9;tats Init, SynSent et Established. Un serveur passera lui par les &amp;#xE9;tats Init, SynRcvd et Established. Ce n&apos;est que lors d&apos;une ouverture simultan&amp;#xE9;e que le chemin suivi est Init, SynSent, SynRcvd, Established. Dans la transition entre l&apos;&amp;#xE9;tat SYN-Sent et l&apos;&amp;#xE9;tat SYN-RCV, le bit ACK est positionn&amp;#xE9; pour acquitter le segment SYN re&amp;#xE7;u et le bit SYN est positionn&amp;#xE9; car la premi&amp;#xE8;re transmission n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;e. Lors d&apos;une ouverture simultann&amp;#xE9;e, la transition entre SYN-RCVD et Established sera fera lors de la r&amp;#xE9;ception d&apos;un segment dont le bit ACK et le bit SYN seront positionn&amp;#xE9;s.
  56. Cette machine ne prend pas en compte les retransmissions sur temporisateur. Typiquement, un client va passer par les &amp;#xE9;tats Init, SynSent et Established. Un serveur passera lui par les &amp;#xE9;tats Init, SynRcvd et Established. Ce n&apos;est que lors d&apos;une ouverture simultan&amp;#xE9;e que le chemin suivi est Init, SynSent, SynRcvd, Established. Dans la transition entre l&apos;&amp;#xE9;tat SYN-Sent et l&apos;&amp;#xE9;tat SYN-RCV, le bit ACK est positionn&amp;#xE9; pour acquitter le segment SYN re&amp;#xE7;u et le bit SYN est positionn&amp;#xE9; car la premi&amp;#xE8;re transmission n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;e. Lors d&apos;une ouverture simultann&amp;#xE9;e, la transition entre SYN-RCVD et Established sera fera lors de la r&amp;#xE9;ception d&apos;un segment dont le bit ACK et le bit SYN seront positionn&amp;#xE9;s.
  57. Cette machine ne prend pas en compte les retransmissions sur temporisateur. Typiquement, un client va passer par les &amp;#xE9;tats Init, SynSent et Established. Un serveur passera lui par les &amp;#xE9;tats Init, SynRcvd et Established. Ce n&apos;est que lors d&apos;une ouverture simultan&amp;#xE9;e que le chemin suivi est Init, SynSent, SynRcvd, Established. Dans la transition entre l&apos;&amp;#xE9;tat SYN-Sent et l&apos;&amp;#xE9;tat SYN-RCV, le bit ACK est positionn&amp;#xE9; pour acquitter le segment SYN re&amp;#xE7;u et le bit SYN est positionn&amp;#xE9; car la premi&amp;#xE8;re transmission n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;e. Lors d&apos;une ouverture simultann&amp;#xE9;e, la transition entre SYN-RCVD et Established sera fera lors de la r&amp;#xE9;ception d&apos;un segment dont le bit ACK et le bit SYN seront positionn&amp;#xE9;s.
  58. Cette machine ne prend pas en compte les retransmissions sur temporisateur. Typiquement, un client va passer par les &amp;#xE9;tats Init, SynSent et Established. Un serveur passera lui par les &amp;#xE9;tats Init, SynRcvd et Established. Ce n&apos;est que lors d&apos;une ouverture simultan&amp;#xE9;e que le chemin suivi est Init, SynSent, SynRcvd, Established. Dans la transition entre l&apos;&amp;#xE9;tat SYN-Sent et l&apos;&amp;#xE9;tat SYN-RCV, le bit ACK est positionn&amp;#xE9; pour acquitter le segment SYN re&amp;#xE7;u et le bit SYN est positionn&amp;#xE9; car la premi&amp;#xE8;re transmission n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;e. Lors d&apos;une ouverture simultann&amp;#xE9;e, la transition entre SYN-RCVD et Established sera fera lors de la r&amp;#xE9;ception d&apos;un segment dont le bit ACK et le bit SYN seront positionn&amp;#xE9;s.
  59. Cette machine ne prend pas en compte les retransmissions sur temporisateur. Typiquement, un client va passer par les &amp;#xE9;tats Init, SynSent et Established. Un serveur passera lui par les &amp;#xE9;tats Init, SynRcvd et Established. Ce n&apos;est que lors d&apos;une ouverture simultan&amp;#xE9;e que le chemin suivi est Init, SynSent, SynRcvd, Established. Dans la transition entre l&apos;&amp;#xE9;tat SYN-Sent et l&apos;&amp;#xE9;tat SYN-RCV, le bit ACK est positionn&amp;#xE9; pour acquitter le segment SYN re&amp;#xE7;u et le bit SYN est positionn&amp;#xE9; car la premi&amp;#xE8;re transmission n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;e. Lors d&apos;une ouverture simultann&amp;#xE9;e, la transition entre SYN-RCVD et Established sera fera lors de la r&amp;#xE9;ception d&apos;un segment dont le bit ACK et le bit SYN seront positionn&amp;#xE9;s.
  60. Cette machine ne prend pas en compte les retransmissions sur temporisateur. Typiquement, un client va passer par les &amp;#xE9;tats Init, SynSent et Established. Un serveur passera lui par les &amp;#xE9;tats Init, SynRcvd et Established. Ce n&apos;est que lors d&apos;une ouverture simultan&amp;#xE9;e que le chemin suivi est Init, SynSent, SynRcvd, Established. Dans la transition entre l&apos;&amp;#xE9;tat SYN-Sent et l&apos;&amp;#xE9;tat SYN-RCV, le bit ACK est positionn&amp;#xE9; pour acquitter le segment SYN re&amp;#xE7;u et le bit SYN est positionn&amp;#xE9; car la premi&amp;#xE8;re transmission n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;e. Lors d&apos;une ouverture simultann&amp;#xE9;e, la transition entre SYN-RCVD et Established sera fera lors de la r&amp;#xE9;ception d&apos;un segment dont le bit ACK et le bit SYN seront positionn&amp;#xE9;s.
  61. Cette machine ne prend pas en compte les retransmissions sur temporisateur. Typiquement, un client va passer par les &amp;#xE9;tats Init, SynSent et Established. Un serveur passera lui par les &amp;#xE9;tats Init, SynRcvd et Established. Ce n&apos;est que lors d&apos;une ouverture simultan&amp;#xE9;e que le chemin suivi est Init, SynSent, SynRcvd, Established. Dans la transition entre l&apos;&amp;#xE9;tat SYN-Sent et l&apos;&amp;#xE9;tat SYN-RCV, le bit ACK est positionn&amp;#xE9; pour acquitter le segment SYN re&amp;#xE7;u et le bit SYN est positionn&amp;#xE9; car la premi&amp;#xE8;re transmission n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;e. Lors d&apos;une ouverture simultann&amp;#xE9;e, la transition entre SYN-RCVD et Established sera fera lors de la r&amp;#xE9;ception d&apos;un segment dont le bit ACK et le bit SYN seront positionn&amp;#xE9;s.
  62. Cette machine ne prend pas en compte les retransmissions sur temporisateur. Typiquement, un client va passer par les &amp;#xE9;tats Init, SynSent et Established. Un serveur passera lui par les &amp;#xE9;tats Init, SynRcvd et Established. Ce n&apos;est que lors d&apos;une ouverture simultan&amp;#xE9;e que le chemin suivi est Init, SynSent, SynRcvd, Established. Dans la transition entre l&apos;&amp;#xE9;tat SYN-Sent et l&apos;&amp;#xE9;tat SYN-RCV, le bit ACK est positionn&amp;#xE9; pour acquitter le segment SYN re&amp;#xE7;u et le bit SYN est positionn&amp;#xE9; car la premi&amp;#xE8;re transmission n&apos;a pas encore &amp;#xE9;t&amp;#xE9; acquitt&amp;#xE9;e. Lors d&apos;une ouverture simultann&amp;#xE9;e, la transition entre SYN-RCVD et Established sera fera lors de la r&amp;#xE9;ception d&apos;un segment dont le bit ACK et le bit SYN seront positionn&amp;#xE9;s.
  63. Ces connexions doivent avoir des identificateurs diff&amp;#xE9;rents Adresse application destination choisie par l&apos;application serveur, en g&amp;#xE9;n&amp;#xE9;ral port fixe Adresse application source en g&amp;#xE9;n&amp;#xE9;ral l&apos;application client laisse l&apos;entit&amp;#xE9; transport choisira le port source chaque fois qu&apos;elle &amp;#xE9;tabli une connexion. En pratique, l&apos;entit&amp;#xE9; de transport maintiendra une liste des connexions TCP actives et lorsqu&apos;un nouvelle connexion est demand&amp;#xE9;e elle choisira le premier num&amp;#xE9;ro de port TCP libre. Typiquement ces ports &amp;#xAB;&amp;#xA0;&amp;#xE9;ph&amp;#xE9;m&amp;#xE8;re&amp;#xA0;&amp;#xBB; auront des valeurs entre 1024 et 5000. si il y a plusieurs connexions avec la m&amp;#xEA;me application serveur, l&apos;entit&amp;#xE9; transport du client choisira des valeurs diff&amp;#xE9;rentes pour les ports source utilis&amp;#xE9;s Sur une machine Unix, il est possible de visualiser l&apos;&amp;#xE9;tat des connexions TCP activant en utilisant la commande netstat (man netstat) bismarck!obo [5] netstat -n | more TCP Local Address Remote Address Swind Send-Q Rwind Recv-Q State -------------------- -------------------- ----- ------ ----- ------ ------- 130.104.229.58.1023 130.104.229.109.2049 8760 0 8760 116 ESTABLISHED 130.104.229.58.1021 130.104.229.51.2049 49640 0 8760 0 ESTABLISHED 130.104.229.58.997 130.104.229.33.2049 33176 0 8760 0 ESTABLISHED ...
  64. Some heavily loaded web servers, use abrupt release to close their connection to avoid maintaining state for 2*MSL seconds.
  65. Some heavily loaded web servers, use abrupt release to close their connection to avoid maintaining state for 2*MSL seconds.
  66. Some heavily loaded web servers, use abrupt release to close their connection to avoid maintaining state for 2*MSL seconds.
  67. Some heavily loaded web servers, use abrupt release to close their connection to avoid maintaining state for 2*MSL seconds.
  68. Some heavily loaded web servers, use abrupt release to close their connection to avoid maintaining state for 2*MSL seconds.
  69. Some heavily loaded web servers, use abrupt release to close their connection to avoid maintaining state for 2*MSL seconds.
  70. La retransmission apr&amp;#xE8;s expiration du temporisateur est le seul m&amp;#xE9;canisme d&amp;#xE9;crit dans la sp&amp;#xE9;cification originale de TCP. Toutes les impl&amp;#xE9;mentations TCP actuelles le supportent. Le bon fonctionnement du m&amp;#xE9;canisme de retransmission d&amp;#xE9;pend de la bonne &amp;#xE9;valuation de la valeur &amp;#xE0; utiliser pour le temporisateur. Dans de nombreuses impl&amp;#xE9;mentations TCP, la valeur minimale du temporisateur est d&apos;une centaine de millisecondes, m&amp;#xEA;me si le d&amp;#xE9;lai entre l&apos;&amp;#xE9;metteur et le receveur n&apos;est que d&apos;une milliseconde.
  71. La retransmission apr&amp;#xE8;s expiration du temporisateur est le seul m&amp;#xE9;canisme d&amp;#xE9;crit dans la sp&amp;#xE9;cification originale de TCP. Toutes les impl&amp;#xE9;mentations TCP actuelles le supportent. Le bon fonctionnement du m&amp;#xE9;canisme de retransmission d&amp;#xE9;pend de la bonne &amp;#xE9;valuation de la valeur &amp;#xE0; utiliser pour le temporisateur. Dans de nombreuses impl&amp;#xE9;mentations TCP, la valeur minimale du temporisateur est d&apos;une centaine de millisecondes, m&amp;#xEA;me si le d&amp;#xE9;lai entre l&apos;&amp;#xE9;metteur et le receveur n&apos;est que d&apos;une milliseconde.
  72. La retransmission apr&amp;#xE8;s expiration du temporisateur est le seul m&amp;#xE9;canisme d&amp;#xE9;crit dans la sp&amp;#xE9;cification originale de TCP. Toutes les impl&amp;#xE9;mentations TCP actuelles le supportent. Le bon fonctionnement du m&amp;#xE9;canisme de retransmission d&amp;#xE9;pend de la bonne &amp;#xE9;valuation de la valeur &amp;#xE0; utiliser pour le temporisateur. Dans de nombreuses impl&amp;#xE9;mentations TCP, la valeur minimale du temporisateur est d&apos;une centaine de millisecondes, m&amp;#xEA;me si le d&amp;#xE9;lai entre l&apos;&amp;#xE9;metteur et le receveur n&apos;est que d&apos;une milliseconde.
  73. La retransmission apr&amp;#xE8;s expiration du temporisateur est le seul m&amp;#xE9;canisme d&amp;#xE9;crit dans la sp&amp;#xE9;cification originale de TCP. Toutes les impl&amp;#xE9;mentations TCP actuelles le supportent. Le bon fonctionnement du m&amp;#xE9;canisme de retransmission d&amp;#xE9;pend de la bonne &amp;#xE9;valuation de la valeur &amp;#xE0; utiliser pour le temporisateur. Dans de nombreuses impl&amp;#xE9;mentations TCP, la valeur minimale du temporisateur est d&apos;une centaine de millisecondes, m&amp;#xEA;me si le d&amp;#xE9;lai entre l&apos;&amp;#xE9;metteur et le receveur n&apos;est que d&apos;une milliseconde.
  74. La retransmission apr&amp;#xE8;s expiration du temporisateur est le seul m&amp;#xE9;canisme d&amp;#xE9;crit dans la sp&amp;#xE9;cification originale de TCP. Toutes les impl&amp;#xE9;mentations TCP actuelles le supportent. Le bon fonctionnement du m&amp;#xE9;canisme de retransmission d&amp;#xE9;pend de la bonne &amp;#xE9;valuation de la valeur &amp;#xE0; utiliser pour le temporisateur. Dans de nombreuses impl&amp;#xE9;mentations TCP, la valeur minimale du temporisateur est d&apos;une centaine de millisecondes, m&amp;#xEA;me si le d&amp;#xE9;lai entre l&apos;&amp;#xE9;metteur et le receveur n&apos;est que d&apos;une milliseconde.
  75. La retransmission apr&amp;#xE8;s expiration du temporisateur est le seul m&amp;#xE9;canisme d&amp;#xE9;crit dans la sp&amp;#xE9;cification originale de TCP. Toutes les impl&amp;#xE9;mentations TCP actuelles le supportent. Le bon fonctionnement du m&amp;#xE9;canisme de retransmission d&amp;#xE9;pend de la bonne &amp;#xE9;valuation de la valeur &amp;#xE0; utiliser pour le temporisateur. Dans de nombreuses impl&amp;#xE9;mentations TCP, la valeur minimale du temporisateur est d&apos;une centaine de millisecondes, m&amp;#xEA;me si le d&amp;#xE9;lai entre l&apos;&amp;#xE9;metteur et le receveur n&apos;est que d&apos;une milliseconde.
  76. La retransmission apr&amp;#xE8;s expiration du temporisateur est le seul m&amp;#xE9;canisme d&amp;#xE9;crit dans la sp&amp;#xE9;cification originale de TCP. Toutes les impl&amp;#xE9;mentations TCP actuelles le supportent. Le bon fonctionnement du m&amp;#xE9;canisme de retransmission d&amp;#xE9;pend de la bonne &amp;#xE9;valuation de la valeur &amp;#xE0; utiliser pour le temporisateur. Dans de nombreuses impl&amp;#xE9;mentations TCP, la valeur minimale du temporisateur est d&apos;une centaine de millisecondes, m&amp;#xEA;me si le d&amp;#xE9;lai entre l&apos;&amp;#xE9;metteur et le receveur n&apos;est que d&apos;une milliseconde.
  77. La retransmission apr&amp;#xE8;s expiration du temporisateur est le seul m&amp;#xE9;canisme d&amp;#xE9;crit dans la sp&amp;#xE9;cification originale de TCP. Toutes les impl&amp;#xE9;mentations TCP actuelles le supportent. Le bon fonctionnement du m&amp;#xE9;canisme de retransmission d&amp;#xE9;pend de la bonne &amp;#xE9;valuation de la valeur &amp;#xE0; utiliser pour le temporisateur. Dans de nombreuses impl&amp;#xE9;mentations TCP, la valeur minimale du temporisateur est d&apos;une centaine de millisecondes, m&amp;#xEA;me si le d&amp;#xE9;lai entre l&apos;&amp;#xE9;metteur et le receveur n&apos;est que d&apos;une milliseconde.
  78. La retransmission apr&amp;#xE8;s expiration du temporisateur est le seul m&amp;#xE9;canisme d&amp;#xE9;crit dans la sp&amp;#xE9;cification originale de TCP. Toutes les impl&amp;#xE9;mentations TCP actuelles le supportent. Le bon fonctionnement du m&amp;#xE9;canisme de retransmission d&amp;#xE9;pend de la bonne &amp;#xE9;valuation de la valeur &amp;#xE0; utiliser pour le temporisateur. Dans de nombreuses impl&amp;#xE9;mentations TCP, la valeur minimale du temporisateur est d&apos;une centaine de millisecondes, m&amp;#xEA;me si le d&amp;#xE9;lai entre l&apos;&amp;#xE9;metteur et le receveur n&apos;est que d&apos;une milliseconde.
  79. La retransmission apr&amp;#xE8;s expiration du temporisateur est le seul m&amp;#xE9;canisme d&amp;#xE9;crit dans la sp&amp;#xE9;cification originale de TCP. Toutes les impl&amp;#xE9;mentations TCP actuelles le supportent. Le bon fonctionnement du m&amp;#xE9;canisme de retransmission d&amp;#xE9;pend de la bonne &amp;#xE9;valuation de la valeur &amp;#xE0; utiliser pour le temporisateur. Dans de nombreuses impl&amp;#xE9;mentations TCP, la valeur minimale du temporisateur est d&apos;une centaine de millisecondes, m&amp;#xEA;me si le d&amp;#xE9;lai entre l&apos;&amp;#xE9;metteur et le receveur n&apos;est que d&apos;une milliseconde.
  80. La retransmission apr&amp;#xE8;s expiration du temporisateur est le seul m&amp;#xE9;canisme d&amp;#xE9;crit dans la sp&amp;#xE9;cification originale de TCP. Toutes les impl&amp;#xE9;mentations TCP actuelles le supportent. Le bon fonctionnement du m&amp;#xE9;canisme de retransmission d&amp;#xE9;pend de la bonne &amp;#xE9;valuation de la valeur &amp;#xE0; utiliser pour le temporisateur. Dans de nombreuses impl&amp;#xE9;mentations TCP, la valeur minimale du temporisateur est d&apos;une centaine de millisecondes, m&amp;#xEA;me si le d&amp;#xE9;lai entre l&apos;&amp;#xE9;metteur et le receveur n&apos;est que d&apos;une milliseconde.
  81. La retransmission apr&amp;#xE8;s expiration du temporisateur est le seul m&amp;#xE9;canisme d&amp;#xE9;crit dans la sp&amp;#xE9;cification originale de TCP. Toutes les impl&amp;#xE9;mentations TCP actuelles le supportent. Le bon fonctionnement du m&amp;#xE9;canisme de retransmission d&amp;#xE9;pend de la bonne &amp;#xE9;valuation de la valeur &amp;#xE0; utiliser pour le temporisateur. Dans de nombreuses impl&amp;#xE9;mentations TCP, la valeur minimale du temporisateur est d&apos;une centaine de millisecondes, m&amp;#xEA;me si le d&amp;#xE9;lai entre l&apos;&amp;#xE9;metteur et le receveur n&apos;est que d&apos;une milliseconde.
  82. Cette figure a &amp;#xE9;t&amp;#xE9; obtenue en mesurant le d&amp;#xE9;lai aller-retour entre deux machines connect&amp;#xE9;es &amp;#xE0; Internet. Une &amp;#xE9;tait localis&amp;#xE9;e dans une universit&amp;#xE9; avec une bonne connexion et l&apos;autre &amp;#xE9;tait connect&amp;#xE9;e via un cable-modem introduisant parfois des variations importantes de d&amp;#xE9;lai.
  83. The computation of TCP&amp;#x2019;s retransmission timer is described in RFC2988 Computing TCP&apos;s Retransmission Timer. V. Paxson, M. Allman. November 2000. Usual values for alpha and beta are 1/8 and 1/4.
  84. See P. Karn, C. Partridge, Improving round-trip time estimates in reliable transport protocols, Proc. ACM SIGCOMM87, August 1987
  85. Les timestamps TCP ont &amp;#xE9;t&amp;#xE9;s introduits dans : RFC1323 TCP Extensions for High Performance. V. Jacobson, R. Braden, D. Borman. May 1992. L&apos;utilisation de ces timestamps est n&amp;#xE9;goci&amp;#xE9;e lors de l&apos;&amp;#xE9;tablissement de la connexion TCP. La plupart des impl&amp;#xE9;mentations TCP actuelles supportent ces extensions.
  86. Don&amp;#x2019;t forget that TCP&amp;#x2019;s acknowledgements are cumulative.
  87. Don&amp;#x2019;t forget that TCP&amp;#x2019;s acknowledgements are cumulative.
  88. Don&amp;#x2019;t forget that TCP&amp;#x2019;s acknowledgements are cumulative.
  89. Don&amp;#x2019;t forget that TCP&amp;#x2019;s acknowledgements are cumulative.
  90. Don&amp;#x2019;t forget that TCP&amp;#x2019;s acknowledgements are cumulative.
  91. Don&amp;#x2019;t forget that TCP&amp;#x2019;s acknowledgements are cumulative.
  92. Don&amp;#x2019;t forget that TCP&amp;#x2019;s acknowledgements are cumulative.
  93. Don&amp;#x2019;t forget that TCP&amp;#x2019;s acknowledgements are cumulative.
  94. Don&amp;#x2019;t forget that TCP&amp;#x2019;s acknowledgements are cumulative.
  95. Don&amp;#x2019;t forget that TCP&amp;#x2019;s acknowledgements are cumulative.
  96. Don&amp;#x2019;t forget that TCP&amp;#x2019;s acknowledgements are cumulative.
  97. See e.g. RFC2001 TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery Algorithms. W. Stevens. January 1997.
  98. See e.g. RFC2001 TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery Algorithms. W. Stevens. January 1997.
  99. See e.g. RFC2001 TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery Algorithms. W. Stevens. January 1997.
  100. See e.g. RFC2001 TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery Algorithms. W. Stevens. January 1997.
  101. See e.g. RFC2001 TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery Algorithms. W. Stevens. January 1997.
  102. See e.g. RFC2001 TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery Algorithms. W. Stevens. January 1997.
  103. See e.g. RFC2001 TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery Algorithms. W. Stevens. January 1997.
  104. See e.g. RFC2001 TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery Algorithms. W. Stevens. January 1997.
  105. See e.g. RFC2001 TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery Algorithms. W. Stevens. January 1997.
  106. See e.g. RFC2001 TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery Algorithms. W. Stevens. January 1997.
  107. Cette extension &amp;#xE0; TCP est d&amp;#xE9;finie dans : RFC2018 TCP Selective Acknowledgement Options. M. Mathis, J. Mahdavi, S. Floyd, A. Romanow. October 1996.
  108. Cette strat&amp;#xE9;gie dite des &amp;#xAB;&amp;#xA0;delayed acknowledgements&amp;#xA0;&amp;#xBB; est utilis&amp;#xE9;e par la plupart des impl&amp;#xE9;mentations TCP afin de r&amp;#xE9;duire le nombre de segments contenant uniquement un acquit transmis.
  109. Une extension &amp;#xE0; la version initiale de TCP, d&amp;#xE9;crite dans RFC1323 permet d&apos;utiliser des fen&amp;#xEA;tres dont la taille est sup&amp;#xE9;rieure &amp;#xE0; 64 Kbytes. Ces extensions commencent &amp;#xE0; &amp;#xEA;tre support&amp;#xE9;es par les impl&amp;#xE9;mentations TCP courantes. L&apos;id&amp;#xE9;e de base de cette extension est relativement simple. Tout d&apos;abord, lors de l&apos;&amp;#xE9;tablissement de la connexion TCP, on s&apos;appuie sur le m&amp;#xE9;canisme d&apos;extension d&apos;ent&amp;#xEA;te pour transmettre de l&apos;information compl&amp;#xE9;mentaire et d&amp;#xE9;terminer si l&apos;autre entit&amp;#xE9; TCP de la connexion supporte les extensions RFC1323. Si oui, RFC1323, modifie un peu la s&amp;#xE9;mantique du champ window contenu dans l&apos;ent&amp;#xEA;te du TPDU TCP. Avant RFC1323, ce champ &amp;#xE9;tait cod&amp;#xE9; sur 16 bits. Avec RFC1323, il est maintenu sur N bits (32&gt;=N&gt;=16) dans chaque entit&amp;#xE9;, et le champ window du TPDU est utilis&amp;#xE9; pour transmettre les 16 bits de poids fort de cette fen&amp;#xEA;tre plut&amp;#xF4;t que l&apos;enti&amp;#xE8;ret&amp;#xE9; de la fen&amp;#xEA;tre.
  110. RFC896 Congestion control in IP/TCP internetworks. J. Nagle. Jan-06-1984. Cet algorithme est impl&amp;#xE9;ment&amp;#xE9; dans toutes les impl&amp;#xE9;mentations de TCP ou presque, il ne n&amp;#xE9;cessite que quelques lignes de code. Pour une description d&amp;#xE9;taill&amp;#xE9;e d&apos;une impl&amp;#xE9;mentation de TCP dans un kernel Unix, voir : G. Wright, R. Stevens, TCP/IP Illustrated, volume 2, Addison-Wesley Source : http://www.nlanr.net/NA/Learn/packetsizes.html Cette information date de quelques ann&amp;#xE9;es. Pour des statistiques plus r&amp;#xE9;centes sur les tailles des paquets, voir par exemple : http://ipmon.sprint.com et par exemple http://ipmon.sprint.com/packstat/packet.php?030407
  111. See March/April 1995 issue of IEEE Network Magazine.
  112. L&apos;Internet a souffert de plusieurs &amp;#xE9;pisodes d&apos;effondrement &amp;#xE0; cause de la congestion lorsque les impl&amp;#xE9;mentations TCP ne supportaient que le contr&amp;#xF4;le de flux TCP de base d&amp;#xE9;fini dans [RFC793]. Par exemple, en 1986, le d&amp;#xE9;bit utilisable sur un chemin compos&amp;#xE9; de trois routeurs entre l&apos;universit&amp;#xE9; de Berkeley et le LBL en Californie &amp;#xE9;tait tomb&amp;#xE9; de 32 Kbps &amp;#xE0; 40 bits par seconde suite &amp;#xE0; la congestion. Une premi&amp;#xE8;re solution au probl&amp;#xE8;me de la congestion avait &amp;#xE9;t&amp;#xE9; propos&amp;#xE9;e par Karn et Partridge sous la forme d&apos;un exponential backoff. L&apos;id&amp;#xE9;e de cette solution est que lorsqu&apos;un segment TCP retransmis est perdu, c&apos;est un signe de congestion importante et que si le m&amp;#xEA;me segment doit &amp;#xEA;tre transmis 4 fois, la congestion est plus importante que si un segment ne doit &amp;#xEA;tre retransmis qu&apos;une seule fois. La solution propos&amp;#xE9;e est la suivante : - lorsqu&apos;un segment de donn&amp;#xE9;es qui a &amp;#xE9;t&amp;#xE9; retransmis pr&amp;#xE9;c&amp;#xE9;demment doit &amp;#xE0; nouveau &amp;#xEA;tre retransmis suite &amp;#xE0; l&apos;expiration du temporisateur de retransmission, la valeur de ce temporisateur est doubl&amp;#xE9;e. Ainsi, il le temporisateur a initialement une valeur de 1 seconde, apr&amp;#xE8;s une premi&amp;#xE8;re expiration pour un segment donn&amp;#xE9;, il passera &amp;#xE0; 2 secondes, puis &amp;#xE0; 4, puis &amp;#xE0; 8,... En pratique, une impl&amp;#xE9;mentation de TCP fermera la connexion apr&amp;#xE8;s une dizaine d&apos;essais infructeux d&apos;envoi du m&amp;#xEA;me segment TCP
  113. La fen&amp;#xEA;tre de congestion est donc une variable maintenue par l&apos;&amp;#xE9;metteur et qui sert &amp;#xE0; limiter la quantit&amp;#xE9; d&apos;information que l&apos;&amp;#xE9;metteur peut envoyer sans attendre d&apos;acquits du receveur. Le receveur n&apos;est pas au courant de la valeur actuelle de la fen&amp;#xEA;tre de congestion.
  114. TCP congestion control was proposed in V. Jacobson, Congestion avoidance and control, Proc. ACM SIGCOMM88, August 1988 A more detailed description may be found in : RFC2581 TCP Congestion Control. M. Allman, V. Paxson, W. Stevens. April 1999.
  115. More detailed models can be found in the scientific literature : M. Mathis,J. Semke, J. Mahdavi and T. Ott, The macroscopic behaviour of the TCP congestion avoidance algorithm, ACM Computer Communication Review, 1997