Computer Networking :
         Principles, Protocols and Practice
                               Part 5
               Datalink Layer and Local Area Network


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


CNP3/2008.5.                                         © O. Bonaventure 2008
Datalink layer

       Point-to         datalink layer
              How to transmit and receive frames

       Local         area networks
              Optimistic Medium access control
                  ALOHA, CSMA, CSMA/CD, CSMA/CA

              Ethernet networks
              WiFi networks
              Deterministic Medium access control
                  Token Ring, FDDI

CNP3/2008.5.                                           © O. Bonaventure, 2008
Usage of the physical layer

          Service        provided by physical layer
              Bit transmission between nodes attached to the
               same physical transmission channel
                  cable, radio, optical fiber, ...

          Better       service for computers
              Transmission/reception of short messages
              Service provided by the datalink layer



     2         Datalink                                Datalink

     1         Physical                                Physical


CNP3/2008.5.                                              © O. Bonaventure, 2008
Datalink layer

        Goals
              Provide a reliable transfert of packets although
                  Physical layer sends/receives bits and not packets
                  Physical layer service is imperfect
                      transmission errors
                      Losses of bits
                      Creation of bits



                                                                 Packet


          Datalink                                        Datalink




CNP3/2008.5.                                                     © O. Bonaventure, 2008
Datalink layer

        Goals
               Provide a reliable transfert of packets although
                  Physical layer sends/receives bits and not packets
                  Physical layer service is imperfect
                       transmission errors
                       Losses of bits
                       Creation of bits



               Packet                                             Packet


          Datalink                                         Datalink




CNP3/2008.5.                                                      © O. Bonaventure, 2008
Frame delineation
      Frame
              Unit of information transfer between two entities of
               the datalink layer
               sequence of N bits
               Datalink layer usually supports variable-length frames

                Packet                                       Packet


                 Datalink             Frames                 Datalink

                 Physical               Bits                 Physical



              How can the receiver extract the frames from the
               received bit stream ?

CNP3/2008.5.                                                  © O. Bonaventure, 2008
Frame delineation

       Naïve            solutions
              Use frame size to delineate frames
                  Insert frame size in frame header
                  Issue
                      What happens when errors affect frame payload and frame
                       header ?

              Use special character/bitstring to mark beginning/
               end of frame
                  Example
                      all frames start with #
                  Issue
                      What happens when the special character/bitstring appears
                       inside the frame payload ?




CNP3/2008.5.                                                            © O. Bonaventure, 2008
Character stuffing

        Character       stuffing
              Suitable for frames containing an integer number
               of bytes
              'DLE' 'STX' to indicate beginning of frame
              'DLE' 'ETX' to indicate end of frame
              When transmitting frame, sender replaces 'DLE' by
               'DLE' 'DLE' if 'DLE' appears inside the frame
              Receiver removes 'DLE' if followed by 'DLE'

        Example
              Packet : 1 2 3 'DLE' 4
              Frame
               'DLE' 'STX' 1 2 3 'DLE' 'DLE' 4 'DLE' 'ETX'

CNP3/2008.5.                                                 © O. Bonaventure, 2008
Bit stuffing

       Alternative              to character stuffing
              Suitable for frames composed of n bits
              01111110 used as marker at beginning and end of
               frame
              Sender behaviour
                  If five bits set to ʻ1ʼ must be sent, sender adds a bit set to
                   ʻ0ʼ immediately after the fifth bit set to ʻ1ʼ
              Receiver behaviour
                  Counts the number of successive bits set to 1
                      6 successive bits set to 1 followed by 0 : marker
                      5 successive bits set to 1 followed by 0 : remove bit set to 0

                  Example
                      Packet : 0110111111111111111110010
                      Frame
                       01111110011011111011111011111011001001111110

CNP3/2008.5.                                                                © O. Bonaventure, 2008
Frame delineation

       Co-operation               with physical layer
              Some physical layers are able to transmit special
               physical codes that represent neither 0 nor 1
              Example : Manchester coding

                      1   0    1     0    0   1   1    0
                                                           InvHInvB




                  invH (or N times invH) could be used to mark the beginning
                   of a frame and invB (or N times invB) to mark the end of a
                   frame

CNP3/2008.5.                                                   © O. Bonaventure, 2008
Frame delineation in practice

       Most          datalink protocols use
              Character stuffing or bit stuffing
                  Character stuffing is preferred by software
                   implementations
              A length field in the frame header
              A checksum or CRC in the header or trailer to
               detect transmission errors

       A receiver          frame is considered valid if
              the correct delimiter appears at the beginning
              the length is correct
              the CRC/checksum is valid
              the correct delimiter appears at the beginning


CNP3/2008.5.                                                    © O. Bonaventure, 2008
PPP : Point-to-Point Protocol

       Goal
                  Allow the transmission of network layer (IP but
                   also other protocols) packets over serial lines
                   modems, leased lines, ISDN, ...
       Architecture
                  PPP is composed of three different protocols
          1.       PPP
                   transmission of data frames (e.g. IP packets)
          2.       LCP : Link Control Protocol
               •    Negotiation of some options and authentication
                    (username, password) and end of connection
          3.       NCP : Network Control Protocol
               •    Negotiation of options related to the network layer
                    protocol used above PPP
                    (ex: IP address, IP address of DNS resolver, ...)

CNP3/2008.5.                                                        © O. Bonaventure, 2008
PPP (2)

       PPP               frame format
                 Flag      Address     Control                          Checksum         Flag
               01111110    11111111   00000011   Protocol     Packet   16bits/32bits   01111110


                                                  Identification of the network layer packet
                                                  transported in the PPP frame
                Mechanisms used by PPP
                   character stuffing for asynchronous lines
                   bit stuffing for synchronous lines
                   CRC for error detection
                      16 bits default but 32 bits CRC can be negotiated
                   No error correction by default
                      a reliable protocol can be negotiated
                   Data compression option
                      content of PPP frames can be compressed. To be negotiated at
                       beginning of PPP connection

CNP3/2008.5.                                                                   © O. Bonaventure, 2008
DataLink layer

       Point-to         datalink layer
              How to transmit and receive frames

       Local         area networks
              Optimistic Medium access control
                  ALOHA, CSMA, CSMA/CD, CSMA/CA

              Ethernet networks
              WiFi networks
              Deterministic Medium access control
                  Token Ring, FDDI

CNP3/2008.5.                                           © O. Bonaventure, 2008
Local area networks
         How      to efficiently connect N hosts together ?
              Ideally we would like to have a single cable on
               each host while being able to reach all the others


         Network      topologies
              Star-shaped network
              Ring-shaped network
              Bus-shaped network




CNP3/2008.5.                                           © O. Bonaventure, 2008
Local area networks
        Problems              to be solved
              How to identify the hosts attached to the LAN ?
              The LAN is a shared resource
                   How to regulate access to this shared resource to
                    provide :
                    fairness
                     All hosts should be able to use a fair fraction of the shared
                        resource
                    performance
                     The shared resource should be used efficiently




CNP3/2008.5.                                                             © O. Bonaventure, 2008
Static allocation

       Time       Division Multiplexing

               A                                                    D




                               B                  C


                                                                                  T
                   A B C DA B C D A B C D A B C D A B C D A B C D A B C D
                         DA




CNP3/2008.5.                                                         © O. Bonaventure, 2008
Static allocation

       Time           Division Multiplexing

                   A                                                     D




                                    B                   C


                                                                                       T
                        A B C DA B C D A B C D A B C D A B C D A B C D A B C D
                              DA

              No suitable for a computer network
                      Leads to low link utilisation and high delays
                      Computers generate bursty trafic
            A more    adaptive access control mechanism is
               required
CNP3/2008.5.                                                              © O. Bonaventure, 2008
Medium access control

       Hypotheses
              N stations need to share the same transmission
               channel
                  A single transmission channel is available
              Definition
                  Collision
                      If two stations transmit their frame at the same time, their
                       electrical signal appears on the channel and causes a collision

       Options
              Frame transmission
                  A station can transmit at any time
                  A station can only transmit at specific instants
              Listening while transmitting
                  A station can listen while transmitting
                  A station cannot listen while transmitting

CNP3/2008.5.                                                               © O. Bonaventure, 2008
Medium access control
        How   to regulate access to the shared
           medium ?
              Statistical or optimistic solutions
                  hosts can transmit frames at almost any time
                      if the low is low, the frames will arrive correctly at destination
                      if the low is high, frames may collide
                  distributed algorithm allows to recover from the
                   collisions
              Deterministic or pessimistic solutions
                  Collisions are expensive and need to be avoided
                   Distributed algorithm distributes authorisations to
                   transmit to ensure that a single host is allowed to
                   transmit at any time
                      avoids collisions when load is high, but may delay transmission
                       when load is low




CNP3/2008.5.                                                                   © O. Bonaventure, 2008
DataLink layer

       Point-to         datalink layer
              How to transmit and receive frames

       Local         area networks
              Optimistic Medium access control
                  ALOHA, CSMA, CSMA/CD, CSMA/CA

              Ethernet networks
              WiFi networks
              Deterministic Medium access control
                  Token Ring, FDDI

CNP3/2008.5.                                           © O. Bonaventure, 2008
ALOHA

        Problem
              terminals need to exchange data with computer
               but phone lines are costly




        Solution
           Wireless network
            upstream frequency shared by all terminals
             terminals do not hear each other
            downlink frequency reserved for computer
CNP3/2008.5.                                         © O. Bonaventure, 2008
ALOHA (3)
        How       to organise frame transmission ?
              If a host is alone, no problem
              If two hosts transmit at the same time, a collision
               will occur and it will be impossible to decode their
               transmission




        A
        B




CNP3/2008.5.                                             © O. Bonaventure, 2008
ALOHA (3)
        How       to organise frame transmission ?
              If a host is alone, no problem
              If two hosts transmit at the same time, a collision
               will occur and it will be impossible to decode their
               transmission




        A
        B




CNP3/2008.5.                                             © O. Bonaventure, 2008
ALOHA (3)
        How       to organise frame transmission ?
              If a host is alone, no problem
              If two hosts transmit at the same time, a collision
               will occur and it will be impossible to decode their
               transmission




        A
        B




CNP3/2008.5.                                             © O. Bonaventure, 2008
ALOHA (3)
        How       to organise frame transmission ?
              If a host is alone, no problem
              If two hosts transmit at the same time, a collision
               will occur and it will be impossible to decode their
               transmission




        A
        B


                                collision
CNP3/2008.5.                                             © O. Bonaventure, 2008
ALOHA (3)
        How       to organise frame transmission ?
              If a host is alone, no problem
              If two hosts transmit at the same time, a collision
               will occur and it will be impossible to decode their
               transmission




        A
        B


                                collision
CNP3/2008.5.                                             © O. Bonaventure, 2008
ALOHA (3)

       Medium         access algorithm
              First solution

         N=1;
         while ( N<= max) do
             send frame;
             wait for ack on return channel or timeout:
             if ack on return channel
                 exit while;
             else
                 /* timeout */
                 /* retransmission is needed */
                 N=N+1;
         end do
         /* too many attempts */



CNP3/2008.5.                                    © O. Bonaventure, 2008
ALOHA (4)

       Drawback
              When two stations enter in collision, they may
               continue to collide after

                    T0               T3                   T3+timeout

           A
           B                                  Collision

                           T1        T2                   T2+timeout

                  How to avoid this synchronisation among stations ?



CNP3/2008.5.                                                    © O. Bonaventure, 2008
ALOHA (5)

       Improved    algorithm
          


         N=1;
         while ( N<= max) do
             send frame;
             wait for ack on return channel or timeout:
             if ack on return channel
                 exit while;
             else
                 /* timeout */
                 /* retransmission is needed */
                 wait for random time;
                 N=N+1;
         end do
         /* too many attempts */


CNP3/2008.5.                                  © O. Bonaventure, 2008
Slotted ALOHA

       How            to improve ALOHA
              Idea
                  Divide time in slots and force stations to only transmit
                   frames at the beginning of slots
                      requires a common clock heard by all stations
                  decrease risk of collisions since a slot is either
                      empty (no frame)
                      full (a single frame was transmitted)
                      in collision (more than one frame was transmitted)




CNP3/2008.5.                                                                © O. Bonaventure, 2008
Slotted ALOHA

       How            to improve ALOHA
              Idea
                  Divide time in slots and force stations to only transmit
                   frames at the beginning of slots
                      requires a common clock heard by all stations
                  decrease risk of collisions since a slot is either
                      empty (no frame)
                      full (a single frame was transmitted)
                      in collision (more than one frame was transmitted)


           A
           B


                                           collision

CNP3/2008.5.                                                                © O. Bonaventure, 2008
Carrier Sense Multiple Access

       How            to improve slotted Aloha ?
       Idea
              Stations should be polite
                  Listens to the transmission channel before transmitting
                  Wait until the channel becomes free to transmit

              Limitations
                  Politeness is only possible if all stations can listen to
                   the transmission of all stations
                      true when all stations are attached to the same cable, but not in
                       wireless networks




CNP3/2008.5.                                                               © O. Bonaventure, 2008
CSMA

       CSMA
              Carrier Sense Multiple Access

               N=1;
               while ( N<= max) do
                   wait until channel becomes free;
                   send frame immediately;
                   wait for ack or timeout:
                   if ack received
                       exit while;
                   else
                       /* timeout */
                       /* retransmission is needed */
                       N=N+1;
               end do
               /* too many attempts */

CNP3/2008.5.                                     © O. Bonaventure, 2008
non-persistent CSMA
    Idea
          Transmitting a frame immediately after the end of
           the previous one is a very aggressive behaviour
              If the channel is free, transmit
              Otherwise wait some random time before listening again
           N=1;
           while ( N<= max) do
                listen channel;
                if channel is empty
                     send frame;
                     wait for ack or timeout
                     if ack received
                          exit while;
                     else /* retransmission is needed */
                          N=N+1:
                else
                     wait for random time;
           end do


CNP3/2008.5.                                                © O. Bonaventure, 2008
p-persistent CSMA
     Tradeoff        between CSMA and non-persistent
         CSMA

               N=1;
               while ( N<= max) do
                    listen channel;
                    if channel is empty
                         with probability p
                              send frame;
                              wait for ack or timeout
                              if ack received
                                   exit while;
                              else /* retransmission needed */
                                   N=N+1;
                    else
                         wait for random time;
               end do



CNP3/2008.5.                                             © O. Bonaventure, 2008
Improvements to CSMA

        Problems            with CSMA
              If one bit of a frame is affected by a collision, the
               entire frame is lost

        Solution
              Stop the transmission of a frame as soon as a
               collision has been detected

        How         to detect collisions ?
              Station listens to channel while transmitting
                  If there is no collision, it will hear the signal it transmits
                  If there is a collision, is will hear an incorrect signal

        CSMA/CD
              Carrier Sense Multiple Access with Collision
CNP3/2008.5.
               Detection                               © O. Bonaventure, 2008
CSMA/CD

       Medium       access control
           N=1;
           while ( N<= max) do
                wait until channel becomes free;
                send frame and listen;
                wait until (end of frame) or (collision)
                if collision detected
                     stop transmitting;
                     /* after a special jam signal */
                else
                     /* no collision detected */
                     wait for interframe delay;
                     exit while;
                N=N+1;
           end do
           /* too many attempts */




CNP3/2008.5.                                           © O. Bonaventure, 2008
CSMA/CD : Example


               A           B




CNP3/2008.5.                     © O. Bonaventure, 2008
CSMA/CD : Example


                         A              B

        1
               Start of frame




CNP3/2008.5.                                  © O. Bonaventure, 2008
CSMA/CD : Example


                             A                                   B

        1
                   Start of frame


         2
               Frame is propagated on LAN (5 microsecond per kilometer)




CNP3/2008.5.                                                              © O. Bonaventure, 2008
CSMA/CD : Example


                             A                                      B

        1
                   Start of frame


         2
               Frame is propagated on LAN (5 microsecond per kilometer)



         3

                       Frame stops at left side and first bit reaches B




CNP3/2008.5.                                                              © O. Bonaventure, 2008
CSMA/CD : Example


                             A                                      B

           1
                   Start of frame


           2
               Frame is propagated on LAN (5 microsecond per kilometer)



           3

                       Frame stops at left side and first bit reaches B




       4
                Frame leaves the LAN
CNP3/2008.5.                                                              © O. Bonaventure, 2008
CSMA/CD : Collisions


               A             B




CNP3/2008.5.                       © O. Bonaventure, 2008
CSMA/CD : Collisions


                     A                                           B


          1
               Frame starts at A and B almost at the same time




CNP3/2008.5.                                                         © O. Bonaventure, 2008
CSMA/CD : Collisions


                     A                                         B


          1
               Frame starts at A and B almost at the same time
                                                             Collision : at this point on the
                                                             shared medium, it is impossible
                                                             to decode the signal


          2




CNP3/2008.5.                                                                  © O. Bonaventure, 2008
CSMA/CD : Collisions


                                A                                        B


          1
                         Frame starts at A and B almost at the same time
                                                                       Collision : at this point on the
                                                                       shared medium, it is impossible
                                                                       to decode the signal


          2

               A detects the collision and
               stops transmitting its frame




              3

CNP3/2008.5.                                                                            © O. Bonaventure, 2008
CSMA/CD : Collisions (2)
       Advantages
              Improves channel utilisation as stations do not
               transmit corrupted frames
              a station can detect whether its frame was sent
               without collision
                  implicit acknowledgement if destination is up
                  when a collision is detected, automatic retransmission

       Is   it possible for a station to detect all
           collisions on all its frames ?




CNP3/2008.5.                                                    © O. Bonaventure, 2008
CSMA/CD : Collisions (3)


               A                B




CNP3/2008.5.                         © O. Bonaventure, 2008
CSMA/CD : Collisions (3)


                    A                                        B


           1
               A and B send a small frame almost at the same time




CNP3/2008.5.                                                        © O. Bonaventure, 2008
CSMA/CD : Collisions (3)


                     A                                        B


           1
               A and B send a small frame almost at the same time




           2
               The two frame collide in the middle of the medium




CNP3/2008.5.                                                        © O. Bonaventure, 2008
CSMA/CD : Collisions (3)


                     A                                          B


           1
               A and B send a small frame almost at the same time




           2
               The two frame collide in the middle of the medium


           3
               A did not notice any collision
               B did not notice any collision
               They both consider that their frames were received correctly

CNP3/2008.5.                                                                  © O. Bonaventure, 2008
CSMA/CD : Collisions (4)
     How         to ensure that all collisions are detected ?
              Worst case scenario



          A                                                B




CNP3/2008.5.                                         © O. Bonaventure, 2008
CSMA/CD : Collisions (4)
     How         to ensure that all collisions are detected ?
              Worst case scenario



          A                                                   B

           1        Start of the frame sent by A




CNP3/2008.5.                                            © O. Bonaventure, 2008
CSMA/CD : Collisions (4)
     How         to ensure that all collisions are detected ?
              Worst case scenario



          A                                                                              B

           1        Start of the frame sent by A


          2
                      After τ seconds, Aʼs frame reaches B
                      A time τ−ε, B starts to transmit its own frame
                      B notices the collision immediately and stops transmitting




CNP3/2008.5.                                                                       © O. Bonaventure, 2008
CSMA/CD : Collisions (4)
     How          to ensure that all collisions are detected ?
              Worst case scenario



          A                                                                              B

           1        Start of the frame sent by A


          2
                      After τ seconds, Aʼs frame reaches B
                      A time τ−ε, B starts to transmit its own frame
                      B notices the collision immediately and stops transmitting

               3
                       A detects collision at time τ+τ−ε

CNP3/2008.5.                                                                       © O. Bonaventure, 2008
CSMA/CD : Collisions (5)
        How    can a station ensure that it will be able
           to detect all the collisions affecting its
           frames ?
              Each frame must be transmitted for at least a
               duration equal to the two way delay (2∗τ)
                  As the throughput on a bus is fixed, if the two way delay
                   is fixed, then all frames must be larger than a minimum
                   frame size
                  Improvement
                      To ensure that all stations detect collisions, a station that notices
                       a collision should send a jamming signal




CNP3/2008.5.                                                                  © O. Bonaventure, 2008
Exponential backoff

       How            to deal with collisions ?
              If the stations that collide retransmit together, a
               new collision will happen

       Solution
              Wait some random time after the collision
              After collision, time is divided in slots
                  a slot = time required to send a minimum sized frame
                      After first collision, wait 0 or 1 slot before retransmitting
                      After first collision, wait 0, 1,2 or 3 slots before retransmitting
                      After first collision, wait 0..2i-1 slots before retransmitting




CNP3/2008.5.                                                                   © O. Bonaventure, 2008
CSMA/CD with exponential backoff

       Medium       access control
           N=1;
           while ( N<= max) do
                wait until channel becomes free;
                send frame and listen;
                wait until (end of frame) or (collision)
                if collision detected
                     stop transmitting;
                     /* after a special jam signal */
                     k = min (10, N);
                     r = random(0, 2k - 1) * slotTime;
                     wait for r time slots;
                else
                     /* no collision detected */
                     wait for interframe delay;
                     exit while;
                N=N+1;
           end do
           /* too many attempts */



CNP3/2008.5.                                           © O. Bonaventure, 2008
CSMA with Collision Avoidance

       Goal
              Design a medium access control method suitable for
               wireless networks
                  on a wireless network, a sender cannot usually listen to its
                   transmission (and thus CSMA/CD cannot be used)

       Improvements               to CSMA
              Initial delay before transmitting if channel is empty
                  Extended Inter Frame Space (EIFS)
              Minimum delay between two successive frames
                  Distributed Coordination Function Inter Frame Space (DIFS)
              Delay between frame reception and ack transmission
                  Short Inter Frame Spacing (SIFS, SIFS< DIFS < EIFS)



CNP3/2008.5.                                                     © O. Bonaventure, 2008
CSMA/CA (1)

       Sender
               N=1;
               while ( N<= max) do
                    if (previous frame corrupted)
                    { wait until channel free during t>=EIFS; }
                    else
                    { wait until endofframe;
                      wait until channel free during t>=DIFS; }
                    send data frame ;
                    wait for ack or timeout:
                    if ack received
                         exit while;
                    else
                         /* timeout retransmission is needed */
                         N=N+1;
               end do
               /* too many attempts */



CNP3/2008.5.                                             © O. Bonaventure, 2008
CSMA/CA (2)

       Receiver


               While (true)
               {
                 Wait for data frame;
                    if not(duplicate)
                        { deliver (frame) }
                 wait during SIFS;
                 send ack (frame) ;
               }




CNP3/2008.5.                                     © O. Bonaventure, 2008
CSMA/CA : Example


                     B            C
               A




CNP3/2008.5.                     © O. Bonaventure, 2008
CSMA/CA : Example


                      B            C
                A
         DIFS




CNP3/2008.5.                      © O. Bonaventure, 2008
CSMA/CA : Example


                                   B            C
                A
         DIFS


                    Data frame




CNP3/2008.5.                                   © O. Bonaventure, 2008
CSMA/CA : Example


                                   B            C
                A
         DIFS


                    Data frame


                                       SIFS




CNP3/2008.5.                                   © O. Bonaventure, 2008
CSMA/CA : Example


                                    B            C
                A
         DIFS


                     Data frame


                                        SIFS
                    ACK frame




CNP3/2008.5.                                    © O. Bonaventure, 2008
CSMA/CA : Example


                                    B            C
                A
         DIFS


                     Data frame
                                                        Busy

                                        SIFS
                    ACK frame




CNP3/2008.5.                                    © O. Bonaventure, 2008
CSMA/CA : Example


                                    B            C
                A
         DIFS


                     Data frame
                                                        Busy

                                        SIFS
                    ACK frame




CNP3/2008.5.                                    © O. Bonaventure, 2008
CSMA/CA : Example


                                    B                        C
                A
         DIFS


                     Data frame
                                                                    Busy

                                        SIFS
                    ACK frame

                                                                   DIFS

                                               Data frame


CNP3/2008.5.                                                © O. Bonaventure, 2008
CSMA/CA : Problem


                     B            C
               A




CNP3/2008.5.                     © O. Bonaventure, 2008
CSMA/CA : Problem


                      B            C
                A
         DIFS
                                          DIFS




CNP3/2008.5.                      © O. Bonaventure, 2008
CSMA/CA : Problem


                                   B                  C
                A
         DIFS
                                                             DIFS

        Busy        Data frame          Data frame
                                                             Busy




CNP3/2008.5.                                         © O. Bonaventure, 2008
CSMA/CA : Problem


                                   B                  C
                A
         DIFS
                                                             DIFS

        Busy        Data frame          Data frame
                                                             Busy


     Timeout                                                 Timeout




CNP3/2008.5.                                         © O. Bonaventure, 2008
CSMA/CA : Problem


                                   B                  C
                A
         DIFS
                                                             DIFS

        Busy        Data frame          Data frame
                                                             Busy


     Timeout                                                 Timeout



                    Data frame
                                        Data frame
                                                            Busy

CNP3/2008.5.                                         © O. Bonaventure, 2008
CSMA/CA
                             First improvement (2)
        Sender
      N=1;
      while ( N<= max) do
           if (previous frame corruped)
           { wait until channel free during t>=EIFS; }
           else
           { wait until endofframe;
              wait until channel free during t>=DIFS; }
           backoff_time = int(random[0,min(255,7*2N-1)])*T
           wait(backoff_time)
           if (channel still free)
           { send data frame ;
              wait for ack or timeout:
             if ack received
                 exit while;
             else /* timeout retransmission is needed */
                 N=N+1; }
      end do



CNP3/2008.5.                                          © O. Bonaventure, 2008
CSMA/CA : Example 2
               A      B           C




CNP3/2008.5.                      © O. Bonaventure, 2008
CSMA/CA : Example 2
                A      B           C



         DIFS
                                           DIFS




CNP3/2008.5.                       © O. Bonaventure, 2008
CSMA/CA : Example 2
                A      B           C



         DIFS
                                           DIFS
 Backoff[0,7]
                                          Backoff[0,7]




CNP3/2008.5.                       © O. Bonaventure, 2008
CSMA/CA : Example 2
                A                  B           C



         DIFS
                                                       DIFS
 Backoff[0,7]
                                                      Backoff[0,7]
                    Data frame


                                       SIFS

                    Ack frame




CNP3/2008.5.                                   © O. Bonaventure, 2008
CSMA/CA : Example 2
                A                  B                       C



         DIFS
                                                                   DIFS
 Backoff[0,7]
                                                                  Backoff[0,7]
                    Data frame
                                                                 Channel busy!

                                       SIFS                       Busy

                    Ack frame




                                              Data frame
CNP3/2008.5.                                               © O. Bonaventure, 2008
CSMA/CA : Example 2
                A                  B                       C



         DIFS
                                                                   DIFS
 Backoff[0,7]
                                                                  Backoff[0,7]
                    Data frame
                                                                 Channel busy!

                                       SIFS                       Busy

                    Ack frame

                                                                  End of
                                                                  backoff

                                              Data frame
CNP3/2008.5.                                               © O. Bonaventure, 2008
CSMA/CA
                                   Hidden station problem
                  Often occurs in wireless networks



                                     B
                                               Hears A and C



                                               C
                     A




  Only hears B, not C                         Hears B, but not A



CNP3/2008.5.                                                       © O. Bonaventure, 2008
CSMA/CA
                                          Second improvement
       Principle
              Allow the sender to “reserve” some air time
                  Special (short) RTS frame indicates duration
                      Using a short RTS frame reduces the risk of collisions while
                       transmitting this frame

              Allow the receiver to confirm the reservation
                  Special (short) CTS frame indicates reservation
                      Using a short CTS frame reduces the risk of collisions while
                       transmitting this frame
              The stations that could collide with the
               transmission will hear at least CTS
              Frame contains an indication of transmission time



CNP3/2008.5.                                                               © O. Bonaventure, 2008
CSMA/CA : Example 3
               A     B            C




CNP3/2008.5.                      © O. Bonaventure, 2008
CSMA/CA : Example 3
               A     B            C



DIFS+Backoff




CNP3/2008.5.                      © O. Bonaventure, 2008
CSMA/CA : Example 3
               A               B         C



DIFS+Backoff

                   RTS [100 microsec]




CNP3/2008.5.                             © O. Bonaventure, 2008
CSMA/CA : Example 3
               A                   B          C



DIFS+Backoff

                       RTS [100 microsec]

                                       SIFS
                   CTS[100microsec]                Busy[
                                                   100microsec+
                                                   SIFS+
                                                   CTS+
                                                   SIFS+
                                                   ACK
                                                   ]




CNP3/2008.5.                                  © O. Bonaventure, 2008
CSMA/CA : Example 3
               A                     B              C



DIFS+Backoff

                        RTS [100 microsec]

                                         SIFS
                   CTS[100microsec]                      Busy[
                                                         100microsec+
          SIFS                                           SIFS+
                                                         CTS+
                   Data [100 microsec]                   SIFS+
                                                         ACK
                                                         ]
                                             SIFS
                   ACK frame

CNP3/2008.5.                                        © O. Bonaventure, 2008
Datalink layer

       Point-to         datalink layer
       Local         area networks
              Optimistic Medium access control
                  ALOHA, CSMA, CSMA/CD, CSMA/CA

              Ethernet networks
                  Basics of Ethernet
                  IP over Ethernet
                  Interconnection of Ethernet networks


              WiFi networks
              Deterministic Medium access control
CNP3/2008.5.      Token Ring, FDDI                        © O. Bonaventure, 2008
Ethernet/802.3

       Most             widely used LAN
              First developed by Digital, Intel and Xerox
              Standardised by IEEE and ISO

       Medium Access                    Control
              CSMA/CD with exponential backoff
              Characteristics
                  Bandwidth: 10 Mbps
                  Two ways delay
                       51.2 microsec on Ethernet/802.3
                        => minimum frame size : 512 bits
                  Cabling
                       10Base5 : (thick) coaxial cable maximum 500 m,100 stations
                       10Base2 : (thin) coaxial 200 m maximum and 30 stations




CNP3/2008.5.                                                             © O. Bonaventure, 2008
Ethernet/802.3


               A                 B             C            D


        Initial      configuration
              bus-shaped network

        Remaining           problems besides CSMA/CD
              What is an Ethernet frame ?
              How does station A sends a frame to station B ?
                  How does station B detects a frame
              How to support broadcast ?
              How to support multicast ?

CNP3/2008.5.                                            © O. Bonaventure, 2008
Ethernet Addresses (2)

       Each    Ethernet adapter has a unique
           Ethernet address
               ensures that two hosts on the same LAN will not
                use the same Ethernet address
       Ethernet Addressing                         format
               48 bits addresses
                  Source Address
           00


                             24 bits OUI                               24 bits
                       (adapter manufacturer)                  (identifier of adapter)

                  Destination address
                       If high order bit is 0, host unicast address
                       If high order bit is 1, host multicast address
                        broadcast address = 111111..111


CNP3/2008.5.                                                                      © O. Bonaventure, 2008
LAN-level multicast

        Principle
              Two types of destination Ethernet addresses
                  Physical addresses
                      identifies one Ethernet adapter
                  Logical addresses
                      identifies a logical group of Ethernet destinations
                                                    48 bits
                                    OUI
                       0 : physical address (unicast)
                       1 : logical address (multicast)

              Transmission of multicast frame
                  sender transmits frame with multicast destination addr.
              Reception of multicast frames
                  Ethernet adapters can be configured to capture frames
                   whose destination address is
                      Their unicast address
                      One of a set of multicast addresses
CNP3/2008.5.                                                                © O. Bonaventure 2008
Ethernet Frames

       DIX       Format
              proposed by Digital, Intel and Xerox

                              Preamble
                              [8 bytes]

                             Destination
                              address

                           Source address

                                Type
                              [2 bytes]

                                Data
                            [46-1500 bytes




                            CRC [32 bits]

CNP3/2008.5.                                           © O. Bonaventure, 2008
Ethernet Frames

       DIX       Format
              proposed by Digital, Intel and Xerox

                              Preamble        Used to mark the beginning of the frame
                              [8 bytes]       Allows the receiver to synchronise its
                                              clock to the senderʼs clock
                             Destination
                              address

                           Source address

                                Type
                              [2 bytes]

                                Data
                            [46-1500 bytes




                            CRC [32 bits]

CNP3/2008.5.                                                      © O. Bonaventure, 2008
Ethernet Frames

       DIX       Format
              proposed by Digital, Intel and Xerox

                              Preamble        Used to mark the beginning of the frame
                              [8 bytes]       Allows the receiver to synchronise its
                                              clock to the senderʼs clock
                             Destination
                              address

                           Source address

                                Type          Indication of the type of packet contained
                              [2 bytes]       inside the frame

                                Data
                            [46-1500 bytes




                            CRC [32 bits]

CNP3/2008.5.                                                        © O. Bonaventure, 2008
Ethernet Frames

       DIX       Format
              proposed by Digital, Intel and Xerox

                              Preamble        Used to mark the beginning of the frame
                              [8 bytes]       Allows the receiver to synchronise its
                                              clock to the senderʼs clock
                             Destination
                              address

                           Source address

                                Type          Indication of the type of packet contained
                              [2 bytes]       inside the frame

                                Data          Upper layer protocol must ensure that
                            [46-1500 bytes    the payload of the Ethernet frame is
                                              at least 46 bytes and at most 1500 bytes

                            CRC [32 bits]

CNP3/2008.5.                                                        © O. Bonaventure, 2008
802.3 Frames



                 Preamble
                  [7 bytes]
               Delimiter[1byte]

                 Destination
                  Address
                  Source
                  Address

                   Length
                  [2 bytes]

                   Data
                and padding
               [ 46- 1500 bytes]


               CRC [32 bits]

CNP3/2008.5.                                      © O. Bonaventure, 2008
802.3 Frames



                 Preamble             Used to mark the beginning of the frame
                  [7 bytes]           Allows the receiver to synchronise its
               Delimiter[1byte]       clock to the senderʼs clock
                 Destination
                  Address
                  Source
                  Address

                   Length
                  [2 bytes]

                   Data
                and padding
               [ 46- 1500 bytes]


               CRC [32 bits]

CNP3/2008.5.                                             © O. Bonaventure, 2008
802.3 Frames

        Ethernet     802.3
              standardised by IEEE

                             Preamble             Used to mark the beginning of the frame
                              [7 bytes]           Allows the receiver to synchronise its
                           Delimiter[1byte]       clock to the senderʼs clock
                             Destination
                              Address
                              Source
                              Address

                               Length
                              [2 bytes]

                               Data
                            and padding
                           [ 46- 1500 bytes]


                           CRC [32 bits]

CNP3/2008.5.                                                         © O. Bonaventure, 2008
802.3 Frames

        Ethernet     802.3
              standardised by IEEE

                             Preamble             Used to mark the beginning of the frame
                              [7 bytes]           Allows the receiver to synchronise its
                           Delimiter[1byte]       clock to the senderʼs clock
                             Destination
                              Address
                              Source
                              Address
                                                  Provides the real length of the network
                               Length             layer packet placed inside the payload.
                              [2 bytes]           802.3 adds padding (bytes set to 0) to
                                                  ensure that the data field of the frame
                               Data               contains at least 46 bytes
                            and padding
                           [ 46- 1500 bytes]


                           CRC [32 bits]

CNP3/2008.5.                                                           © O. Bonaventure, 2008
Ethernet and 802.3 : details
        How   can the receiver identify the type of
           network protocol packet inside the frame ?
              Ethernet : thanks to Type field
              802.3 : no Type field !

        IEEE           standard
              Divide datalink layer in two sublayers
                  Medium Access Control (MAC)
                      lower sublayer responsible for the frame transmission and
                       medium access control (CSMA/CD)
                      interacts with but does not depend from the physical layer
                      example : 802.3
                  Logical Link Control (LLC)
                      higher sublayer responsible for the exchange of frames with the
                       higher layers
                      interacts with the higher layer
                      does not depend from the MAC layer
                      several variants of LLC exist
CNP3/2008.5.                                                              © O. Bonaventure, 2008
802.2 : LLC

       LLC            Type 1
              Unreliable connectionless service
              Addition to 802.3
                  New LLC header allows to identify upper layer protocol
                      similar to Type field of Ethernet DIX


                                                Packet

                                        LLC     Packet          LLC
                        P DA SA L LLC           Packet    CRC   MAC


       LLC            Type 2
              Reliable transmission with acknowledgements
                  An example of a protocol developed by a
                   standardisation body but used by nobody...
CNP3/2008.5.                                                          © O. Bonaventure, 2008
Ethernet Service

       An Ethernet network provides a
        connectionless unreliable service
       Transmission modes
              unicast
              multicast
              broadcast

       Even     if in theory the Ethernet service is
           unreliable, a good Ethernet network should
              deliver frames to their destination with a very hig
               probability of delivery
              not reorder the transmitted frames
                  reordering is obviously impossible on a bus


CNP3/2008.5.                                                     © O. Bonaventure, 2008
Datalink layer

       Point-to         datalink layer
       Local         area networks
              Optimistic Medium access control
                  ALOHA, CSMA, CSMA/CD, CSMA/CA

              Ethernet networks
                  Basics of Ethernet
                  IP over Ethernet
                  Interconnection of Ethernet networks


              WiFi networks
              Deterministic Medium access control
CNP3/2008.5.      Token Ring, FDDI                        © O. Bonaventure, 2008
IPover PPP and
                                                   IP over Ethernet
               IP: 10.0.0.1                                      Ethernet
                              PPP
                                                                            IP: 10.0.1.9
                                    IP: 10.0.0.2   R     IP: 10.0.1.1
                                                                            Eth : B
                                                         Eth : A




                   IP                                                               IP
                 PPP                    PPP              Eth                       Eth
               Modem                  Modem            10base5                  10base5




CNP3/2008.5.                                                                       © O. Bonaventure, 2008
IPover PPP and
                                                                  IP over Ethernet
                  IP: 10.0.0.1                                                  Ethernet
                                     PPP
                                                                                           IP: 10.0.1.9
                                                   IP: 10.0.0.2   R     IP: 10.0.1.1
                                                                                           Eth : B
                                                                        Eth : A




                      IP                                                                           IP
                    PPP                                  PPP            Eth                       Eth
                  Modem                              Modem            10base5                  10base5

    PPP Header                     IP Header                   PPP Trailer

   F Addr Ctrl Protocol          S:10.0.0.1 D:10.0.1.9            CRC F

   0xFF        0x0021 IP
               0x8021 NCP for IP


CNP3/2008.5.                                                                                      © O. Bonaventure, 2008
IPover PPP and
                                                                  IP over Ethernet
                  IP: 10.0.0.1                                                  Ethernet
                                     PPP
                                                                                                  IP: 10.0.1.9
                                                   IP: 10.0.0.2   R     IP: 10.0.1.1
                                                                                                  Eth : B
                                                                        Eth : A




                      IP                                                                                  IP
                    PPP                                  PPP            Eth                              Eth
                  Modem                              Modem            10base5                          10base5

    PPP Header                     IP Header                   PPP Trailer

   F Addr Ctrl Protocol          S:10.0.0.1 D:10.0.1.9            CRC F

                                                               Ethernet header             IP header             Ethernet
   0xFF        0x0021 IP
               0x8021 NCP for IP                            P S:A      D: B     Type   S:10.0.0.1 D:10.0.1.9          CRC

                                                                       0x0800 IP
CNP3/2008.5.                                                                                             © O. Bonaventure, 2008
IP on LANs

       Problems            to be solved
              How to encapsulate IP packets in frames ?
              How to find the LAN address of the IP destination ?
       LAN     efficiently supports broadcast/multicast
           transmission
              When a host needs to find the LAN address of
               another IP host, it broadcasts a request
                  The owner of the destination IP address will reply and
                   provided its LAN address
       LAN     doesnʼt efficiently support broadcast/
           multicast
                  Maintain a server storing IP address:MAC address pairs
                  Each host knows serverʼs MAC address and registers its
                   address pair
                  Each host sends request to server to map IP addresses

CNP3/2008.5.                                                    © O. Bonaventure, 2008
Address Resolution Protocol

     1
               IP: 10.0.1.22        IP: 10.0.1.11         IP: 10.0.1.8   IP: 10.0.1.9
               Eth : A              Eth : E               Eth : C        Eth : B


                     10.0.1.22 needs to send an IP packet to 10.0.1.8




CNP3/2008.5.                                                              © O. Bonaventure, 2008
Address Resolution Protocol

     1
                  IP: 10.0.1.22        IP: 10.0.1.11         IP: 10.0.1.8   IP: 10.0.1.9
                  Eth : A              Eth : E               Eth : C        Eth : B


                        10.0.1.22 needs to send an IP packet to 10.0.1.8


     2
                  IP: 10.0.1.22        IP: 10.0.1.11         IP: 10.0.1.8   IP: 10.0.1.9
                  Eth : A              Eth : E               Eth : C        Eth : B




 ARP : broadcast frame Addr Eth 10.0.1.8 ?




CNP3/2008.5.                                                                 © O. Bonaventure, 2008
Address Resolution Protocol

     1
                  IP: 10.0.1.22        IP: 10.0.1.11         IP: 10.0.1.8   IP: 10.0.1.9
                  Eth : A              Eth : E               Eth : C        Eth : B


                        10.0.1.22 needs to send an IP packet to 10.0.1.8


     2
                  IP: 10.0.1.22        IP: 10.0.1.11         IP: 10.0.1.8   IP: 10.0.1.9
                  Eth : A              Eth : E               Eth : C        Eth : B




 ARP : broadcast frame Addr Eth 10.0.1.8 ?

     3
                   IP: 10.0.1.22       IP: 10.0.1.11         IP: 10.0.1.8   IP: 10.0.1.9
                   Eth : A             Eth : E               Eth : C        Eth : B


               10.0.1.8 replies in an Ethernet frame and A knows the MAC address to send
               its IP packet

CNP3/2008.5.                                                                 © O. Bonaventure, 2008
ARP frame format

                 Preamble
                  [7 bytes]
               Delimiter[1byte]

                 Destination
                  Address
                  Source
                  Address

                Type: 0x806

                   Header

                Sender MAC

                 Sender IP

                Target MAC

                  Target IP

CNP3/2008.5.   CRC [32 bits]                    © O. Bonaventure, 2008
ARP frame format

                 Preamble
                  [7 bytes]
               Delimiter[1byte]

                 Destination
                                  Broadcast : 111...111
                  Address
                  Source
                  Address

                Type: 0x806

                   Header

                Sender MAC

                 Sender IP

                Target MAC

                  Target IP

CNP3/2008.5.   CRC [32 bits]                              © O. Bonaventure, 2008
ARP frame format

                 Preamble
                  [7 bytes]
               Delimiter[1byte]

                 Destination
                                  Broadcast : 111...111
                  Address
                  Source          MAC address of the sender
                  Address

                Type: 0x806

                   Header

                Sender MAC

                 Sender IP

                Target MAC

                  Target IP

CNP3/2008.5.   CRC [32 bits]                                  © O. Bonaventure, 2008
ARP frame format

                 Preamble
                  [7 bytes]
               Delimiter[1byte]

                 Destination
                                  Broadcast : 111...111
                  Address
                  Source          MAC address of the sender
                  Address
                                   Common header for all ARP frames
                Type: 0x806        - Hardware type  Ethernet is 1
                                   - Protocol type , IP is 0x0800.
                   Header
                                   - Hardware length : length of MAC address
                                   - Protocol length : length of network layer
                                   address
                Sender MAC         - Operation : 1 for request, 2 for reply, 3 for
                                   RARP request, and 4 for RARP reply.
                 Sender IP

                Target MAC

                  Target IP

CNP3/2008.5.   CRC [32 bits]                                         © O. Bonaventure, 2008
Optimisations

       When           should a host send ARP requests ?
              Before sending each IP packet ?
                  No, each host/router maintains an ARP table that contains
                   the mapping between IP addresses and Ethernet
                   addresses. An ARP request is only sent when the ARP
                   table is empty

       How    to deal with hosts that change their
           addresses ?
              Expiration timer is associated to each entry in the
               ARP table
                  Line of ARP table is removed upon timer expiration.
                  Some implementations send an ARP request to revalidate
                   it before removing the line
                  Some implementations remember when ARP lines have
                   been used to avoid removing an important entry
CNP3/2008.5.                                                   © O. Bonaventure, 2008
IP over Ethernet : Example

                                                                                  IP: 10.0.1.9/24
                                                            IP: 10.0.1.8/24       Default R: 10.0.1.1
                    IP: 10.0.1.22/24                        Default R: 10.0.1.1
                    Default R: 10.0.1.1                                           Eth : B
                                                            Eth : C               ARP Table
                    Eth : A                                 ARP Table
                    ARP Table                                                     empty
                                                            empty
                    empty



                                          IP: 10.0.1.1/24
                                          Eth : R
                                          ARP Table
                                          empty
                            R

                  Transmission of an IP packet from 10.0.1.22 to 10.0.1.9
                  Transmission of an IP packet from 10.0.1.22 to 10.0.2.9




CNP3/2008.5.                                                                      © O. Bonaventure, 2008
IPv6 over Ethernet
       Neighbour                discovery / address resolution
     1             IPv6: 1080:0:0:0:8:A       IPv6: 1080:0:0:0:8:E        Ipv6: 1080:0:0:0:8:C
                   Eth : A                    Eth : E                     Eth : C


                          1080:0:0:0:8:A wants to send a packet to 1080:0:0:0:8:C


      2
                   IPv6: 1080:0:0:0:8:A     IPv6: 1080:0:0:0:8:E        Ipv6: 1080:0:0:0:8:C
                   Eth : A                  Eth : E                     Eth : C



 Neighbor solicitation: Addr Eth 1080:0:0:0:8:C ? sent to IPv6 multicast address

      3                                        IPv6: 1080:0:0:0:8:E
                     IPv6: 1080:0:0:0:8:A
                     Eth : A                   Eth : E                     Ipv6: 1080:0:0:0:8:C
                                                                           Eth : C


     Neighbor advertisement: 1080:0:0:0:8:C is reachable via Ethernet Add : C

CNP3/2008.5.                                                                             © O. Bonaventure 2008
ICMPv6 Neighbour Discovery
      • Replacement for IPv4ʼs ARP
      • Neighbour solicitation
         • Sent to
                                  Type : 135 Code:0        Checksum
                                              Reserved

                                            Target IPv6 Address




      • Neighbour advertisement
                                  Type : 136 Code:0        Checksum
                                   RSO             Reserved

                                            Target IPv6 Address


                                          Target link layer Address


CNP3/2008.5.                                              © O. Bonaventure 2008
ICMPv6 Neighbour Discovery
      • Replacement for IPv4ʼs ARP
      • Neighbour solicitation
         • Sent to
                                                            Type : 135 Code:0        Checksum
    The IPv6 address for which the link-layer                           Reserved
    (e.g. Ethernet) address is needed.                                Target IPv6 Address
    May also contain an optional field with the link-layer
    (e.g. Ethernet) address of the sender.


      • Neighbour advertisement
                                                            Type : 136 Code:0        Checksum
                                                             RSO             Reserved

                                                                      Target IPv6 Address


                                                                    Target link layer Address


CNP3/2008.5.                                                                        © O. Bonaventure 2008
ICMPv6 Neighbour Discovery
      • Replacement for IPv4ʼs ARP
      • Neighbour solicitation
         • Sent to
                                                            Type : 135 Code:0        Checksum
    The IPv6 address for which the link-layer                           Reserved
    (e.g. Ethernet) address is needed.                                Target IPv6 Address
    May also contain an optional field with the link-layer
    (e.g. Ethernet) address of the sender.


      • Neighbour advertisement
                                                            Type : 136 Code:0        Checksum
                                                             RSO             Reserved

   The IPv6 and link-layer addresses                                  Target IPv6 Address


                                                                    Target link layer Address


CNP3/2008.5.                                                                        © O. Bonaventure 2008
ICMPv6 Neighbour Discovery
      • Replacement for IPv4ʼs ARP
      • Neighbour solicitation
         • Sent to
                                                            Type : 135 Code:0        Checksum
    The IPv6 address for which the link-layer                           Reserved
    (e.g. Ethernet) address is needed.                                Target IPv6 Address
    May also contain an optional field with the link-layer
    (e.g. Ethernet) address of the sender.


      • Neighbour advertisement
   R : true if node is a router
   S : true if answers to a neighbour solicitation          Type : 136 Code:0        Checksum
                                                             RSO             Reserved

   The IPv6 and link-layer addresses                                  Target IPv6 Address


                                                                    Target link layer Address


CNP3/2008.5.                                                                        © O. Bonaventure 2008
IPv6 autoconfiguration

       How           can a node obtain its IPv6 address ?
                  Manual configuration
                  From a server by using DHCPv6 as in IPv4
       • Automatically
               •    Router advertises prefix on LAN by sending ICMPv6
                    messages to “all IPv6 hosts” multicast address
               •    Hosts build their address by concatenating the prefix
                    with their MAC Address converted in 64 bits format




CNP3/2008.5.                                                      © O. Bonaventure 2008
IPv6 autoconfiguration

       How           can a node obtain its IPv6 address ?
                  Manual configuration
                  From a server by using DHCPv6 as in IPv4
       • Automatically
               •    Router advertises prefix on LAN by sending ICMPv6
                    messages to “all IPv6 hosts” multicast address
               •    Hosts build their address by concatenating the prefix
                    with their MAC Address converted in 64 bits format
                              R
                                   Prefix= 2001:6a8:3080:1/64




               Ethernet : 0800:200C:417A
CNP3/2008.5.                                                      © O. Bonaventure 2008
IPv6 autoconfiguration

       How           can a node obtain its IPv6 address ?
                  Manual configuration
                  From a server by using DHCPv6 as in IPv4
       • Automatically
               •    Router advertises prefix on LAN by sending ICMPv6
                    messages to “all IPv6 hosts” multicast address
               •    Hosts build their address by concatenating the prefix
                    with their MAC Address converted in 64 bits format
                               R
                                    Prefix= 2001:6a8:3080:1/64


                           IPv6 address : 2001:6a8:3080:1:M64(800:200C:417A)


               Ethernet : 0800:200C:417A
CNP3/2008.5.                                                               © O. Bonaventure 2008
Router advertisements


     Ver Tclass            Flow Label
      Payload Length 58            255

          Router IPv6 address
              (link local)

                    FF02::1
                  (all nodes)

     Type:134   Code : 0        Checksum
     CurHLim    M O Res    Router lifetime
                 Reachable Time
                Retrans Timer

                 Options




CNP3/2008.5.                                                   © O. Bonaventure 2008
Router advertisements
                                                Maximum hop limit to avoid spoofed packets from
                                                outside LAN
     Ver Tclass            Flow Label
      Payload Length 58            255

          Router IPv6 address
              (link local)

                    FF02::1
                  (all nodes)

     Type:134   Code : 0        Checksum
     CurHLim    M O Res    Router lifetime
                 Reachable Time
                Retrans Timer

                 Options




CNP3/2008.5.                                                                 © O. Bonaventure 2008
Router advertisements
                                                 Maximum hop limit to avoid spoofed packets from
                                                 outside LAN
     Ver Tclass            Flow Label           Value of hop limit to be used by hosts when
      Payload Length 58            255          sending IPv6 packets

          Router IPv6 address
              (link local)

                    FF02::1
                  (all nodes)

     Type:134   Code : 0        Checksum
     CurHLim    M O Res    Router lifetime
                 Reachable Time
                Retrans Timer

                 Options




CNP3/2008.5.                                                                   © O. Bonaventure 2008
Router advertisements
                                                 Maximum hop limit to avoid spoofed packets from
                                                 outside LAN
     Ver Tclass            Flow Label           Value of hop limit to be used by hosts when
      Payload Length 58            255          sending IPv6 packets

          Router IPv6 address                   The lifetime associated with the default router in
              (link local)                      units of seconds. 0 is the router sending the
                                                advertisement is not a default router.
                    FF02::1
                  (all nodes)

     Type:134   Code : 0        Checksum
     CurHLim    M O Res    Router lifetime
                 Reachable Time
                Retrans Timer

                 Options




CNP3/2008.5.                                                                     © O. Bonaventure 2008
Router advertisements
                                                 Maximum hop limit to avoid spoofed packets from
                                                 outside LAN
     Ver Tclass            Flow Label           Value of hop limit to be used by hosts when
      Payload Length 58            255          sending IPv6 packets

          Router IPv6 address                   The lifetime associated with the default router in
              (link local)                      units of seconds. 0 is the router sending the
                                                advertisement is not a default router.
                    FF02::1
                  (all nodes)
                                                The time, in milliseconds, that a node assumes a
     Type:134   Code : 0        Checksum        neighbour is reachable after having received a
     CurHLim    M O Res    Router lifetime      reachability confirmation.
                 Reachable Time
                Retrans Timer                     The time, in milliseconds, between retransmitted
                                                  Neighbor Solicitation messages.
                 Options




CNP3/2008.5.                                                                     © O. Bonaventure 2008
Router advertisements
                                                 Maximum hop limit to avoid spoofed packets from
                                                 outside LAN
     Ver Tclass            Flow Label           Value of hop limit to be used by hosts when
      Payload Length 58            255          sending IPv6 packets

          Router IPv6 address                   The lifetime associated with the default router in
              (link local)                      units of seconds. 0 is the router sending the
                                                advertisement is not a default router.
                    FF02::1
                  (all nodes)
                                                The time, in milliseconds, that a node assumes a
     Type:134   Code : 0        Checksum        neighbour is reachable after having received a
     CurHLim    M O Res    Router lifetime      reachability confirmation.
                 Reachable Time
                Retrans Timer                     The time, in milliseconds, between retransmitted
                                                  Neighbor Solicitation messages.
                 Options
                                                  MTU to be used on the LAN
                                                  Prefixes to be used on the LAN


CNP3/2008.5.                                                                     © O. Bonaventure 2008
Router advertisements options
       • Format of the options   Type       Length        Options
                                             Options (cont.)




       • MTU option              Type : 5   Length:1      Reserved
                                             MTU




       • Prefix option            Type : 3   Length:4 PreLen      L A Res.
                                                Valid Lifetime
                                                Preferred Lifetime
                                                Reserved2
                                                IPv6 prefix




CNP3/2008.5.                                             © O. Bonaventure 2008
Router advertisements options
       • Format of the options                        Type       Length        Options
                                                                  Options (cont.)




       • MTU option                                   Type : 5   Length:1      Reserved
                                                                  MTU




       • Prefix option                                 Type : 3   Length:4 PreLen      L A Res.

  Number of bits in IPv6 prefix that identify subnet                  Valid Lifetime
                                                                     Preferred Lifetime
                                                                     Reserved2
                                                                     IPv6 prefix




CNP3/2008.5.                                                                  © O. Bonaventure 2008
Router advertisements options
       • Format of the options                        Type       Length        Options
                                                                  Options (cont.)




       • MTU option                                   Type : 5   Length:1      Reserved
                                                                  MTU




       • Prefix option                                 Type : 3   Length:4 PreLen      L A Res.

  Number of bits in IPv6 prefix that identify subnet                  Valid Lifetime
                                                                     Preferred Lifetime
                                                                     Reserved2
   The validity period of the prefix in seconds                       IPv6 prefix




CNP3/2008.5.                                                                  © O. Bonaventure 2008
Router advertisements options
       • Format of the options                        Type       Length        Options
                                                                  Options (cont.)




       • MTU option                                   Type : 5   Length:1      Reserved
                                                                  MTU




       • Prefix option                                 Type : 3   Length:4 PreLen      L A Res.

  Number of bits in IPv6 prefix that identify subnet                  Valid Lifetime
                                                                     Preferred Lifetime
                                                                     Reserved2
   The validity period of the prefix in seconds                       IPv6 prefix


   The duration in seconds that addresses generated
   from the prefix via stateless address
   autoconfiguration remain preferred.

CNP3/2008.5.                                                                  © O. Bonaventure 2008
IPv6 autoconfiguration (2)

        What           happens when an endsystem boots ?
              It knows nothing about its current network
                  but needs an IPv6 address to send ICMPv6 messages

                                                   R




                   Ethernet : 0800:200C:417A
                       FE80::M64(800:200C:417A) ))


                  Use Link-local IPv6 address (FE80::/64)
                      Each host, when it boots, has a link-local IPv6 address
                      But another node might have chosen the same address !

CNP3/2008.5.                                                              © O. Bonaventure 2008
IPv6 autoconfiguration (2)

        What           happens when an endsystem boots ?
              It knows nothing about its current network
                  but needs an IPv6 address to send ICMPv6 messages

                                                   R




                                                     ICMPv6 : Neighbour Solicitation
                                                     Sent to multicast address
                                                     Is someone using IPv6 address :
                   Ethernet : 0800:200C:417A         
     FE80::M64(800:200C:417A) ?
                       FE80::M64(800:200C:417A) ))
                                                  Address is valid if nobody answers
                  Use Link-local IPv6 address (FE80::/64)
                      Each host, when it boots, has a link-local IPv6 address
                      But another node might have chosen the same address !

CNP3/2008.5.                                                              © O. Bonaventure 2008
IPv6 autoconfiguration (2)
        How          to obtain the IPv6 prefix of the subnet ?
          • Wait for router advertisements (e.g. 30 seconds)
          • Solicit router advertisement

                                          R




                                              ICMPv6 : Router Solicitation
                                              IPv6 Src: FE80::M64(800:200C:417A)
               Ethernet : 0800:200C:417A
                                              IPv6 Dest: FF02::2
                   FE80::M64(800:200C:417A)




CNP3/2008.5.                                                       © O. Bonaventure 2008
IPv6 autoconfiguration (3)

       Router          will re-advertise prefix
                                              R




               Ethernet : 0800:200C:417A
                   FE80::M64(800:200C:417A)




              IPv6 addresses can be allocated for limited lifetime
                  This allows IPv6 to easily support renumbering
CNP3/2008.5.                                                        © O. Bonaventure 2008
IPv6 autoconfiguration (3)

       Router          will re-advertise prefix
                                              R



                                                  ICMPv6 : Router Advertisement
                                                  IPv6 Src: FE80::M64(EthernetR)
                                                  IPv6 Dest: FF02::1
                                                  IPv6 Prefix = 2001:6a8:1100::/48
               Ethernet : 0800:200C:417A          Prefix lifetime
                   FE80::M64(800:200C:417A)




              IPv6 addresses can be allocated for limited lifetime
                  This allows IPv6 to easily support renumbering
CNP3/2008.5.                                                          © O. Bonaventure 2008
Privacy issues with IPv6
                                 address autoconfiguration
       • Issue
          • Autoconfigured IPv6 addresses contain the MAC
            address of the hosts
               •   MAC addresses are fixed and unique
               •   A laptop/user could be identified by tracking the lower
                   64 bits of its IPv6 addresses

       • How to maintain privacy with IPv6 ?
          • Use DHCPv6 and configure server to never
            reallocate the same IPv6 address
          • Allow hosts to use random host ids in lower 64
            bits of their IPv6 address
               •   algorithms have been implemented to generate such
                   random host ids on nodes with and without stable
                   storage

CNP3/2008.5.                                                      © O. Bonaventure 2008
Datalink layer

       Point-to         datalink layer
       Local         area networks
              Optimistic Medium access control
                  ALOHA, CSMA, CSMA/CD, CSMA/CA

              Ethernet networks
                  Basics of Ethernet
                  IP over Ethernet
                  Interconnection of Ethernet networks


              WiFi networks
              Deterministic Medium access control
CNP3/2008.5.      Token Ring, FDDI                        © O. Bonaventure, 2008
Ethernet today

        The      coaxial cable is not used anymore



        Ethernet      cabling today
              Structured twisted pair cabling
              Optical fiber for some point-to-point links

        Ethernet      organisation
              Not anymore a bus
              Ethernet is now a star-shaped network !


CNP3/2008.5.                                             © O. Bonaventure, 2008
Ethernet with structured cabling
        How   to perform CSMA/CD in a star-shaped
           network ?




                      Hub :
                      receives electrical signal on one port,
                      regenerates this signal and forwards it over all
                      other ports besides the port from which it
                      received it

               Collision domain : set of stations that could be in collision
CNP3/2008.5.                                                   © O. Bonaventure, 2008
Hub and the reference model

       A hub      is a relay operating the physical layer




                Datalink                        Datalink
               Physical                         Physical

               Host A             Hub          Host B




CNP3/2008.5.                                       © O. Bonaventure, 2008
Ethernet with structured cabling (2)

       How        to build a larger Ethernet network ?
              Interconnect hubs together
                                       Hub



                          Hub                               Hub




                                                      Hub

         Issue : maximum 51.2 microsec
                 delay between any pair of stations

CNP3/2008.5.     Collision domain : entire network            © O. Bonaventure, 2008
Ethernet with structured cabling (2)

       How        to build a larger Ethernet network ?
              Interconnect hubs together
                                       Hub



                          Hub                               Hub




                                                      Hub

         Issue : maximum 51.2 microsec
                 delay between any pair of stations

CNP3/2008.5.     Collision domain : entire network            © O. Bonaventure, 2008
Ethernet Switch
     Can         we improve the performance of hubs ?
     Ethernet                switch
              Operates in the datalink layer
              understands MAC address and filters frames based on
               their addresses


                                                       Eth : C
                    Eth : A

                                                   Address         Port
      Src:A Dst:B
                                                   A               West

                                                   B               South

                                       Eth : B     C               East
CNP3/2008.5.                                                     © O. Bonaventure, 2008
Ethernet Switch
     Can         we improve the performance of hubs ?
     Ethernet               switch
              Operates in the datalink layer
              understands MAC address and filters frames based on
               their addresses


                                                      Eth : C
                   Eth : A

                                                  Address         Port

                                                  A               West

                                                  B               South
                 Src:A Dst:B
                                      Eth : B     C               East
CNP3/2008.5.                                                    © O. Bonaventure, 2008
Switch in the reference model

       A switch     is a relay that operates in the
           datalink layer




               Network                        Network
               Datalink                       Datalink
               Physical        Phys. Phys.    Physical

               Host A            Switch      Host B

CNP3/2008.5.                                          © O. Bonaventure, 2008
Port-address table

       How  to build the port-address table used by
        Ethernet switches ?
       Manually
              Works in a lab, but Ethernet must be plug and
               play
       Automatically
              Frame source address allows switch to learn the
               location of hosts
              What happens when a destination address
               cannot be found in the port-address table ?
              But be careful to age the information inside tables
               as some hosts move from one port to another

       How        to forward broadcast frames ?
       How        to forward multicast frames ?
CNP3/2008.5.                                            © O. Bonaventure, 2008
Frame processing

       Basic         operation of an Ethernet switch
               Arrival of frame F on port P
               src=F.Source_Address;
               dst=F.Destination_Address;
               UpdateTable(src, P); // src heard on port P
               if (dst==broadcast) || (dst is multicast)
               {
                  for(Port p!=P)        // forward all ports
                     ForwardFrame(F,p);
               }
               else
               {
                 if(dst isin AddressPortTable)
                 {
                    ForwardFrame(F,AddressPortTable(dst));
                 }
                 else
                 {
                   for(Port p!=P)    // forward all ports
                      ForwardFrame(F,p);
                 }
               }
CNP3/2008.5.                                                   © O. Bonaventure, 2008
Network redundancy
        How   to design networks that survive link and
           node failures ?
               Add redundant switches
                         Address   Port
                         A         West
                         B         South               Eth : C

                         C         East
               Eth : A


    Src:A Dst:C



                                                        Address        Port
                                                        A              West
                         Address   Port                 B              South
                         A         North                C              North
                         B         South     Eth : B
CNP3/2008.5.             C         East                   © O. Bonaventure, 2008
Network redundancy
        How   to design networks that survive link and
           node failures ?
               Add redundant switches
                         Address   Port
                         A         West
                         B         South                  Eth : C

                         C         East     Src:A Dst:C
               Eth : A




                                                           Address        Port
                                                           A              West
                         Address   Port                    B              South
                         A         North                   C              North
                         B         South     Eth : B
CNP3/2008.5.             C         East                      © O. Bonaventure, 2008
Network redundancy (2)

       Does             this always work ?
               Assume all switches have rebooted
                           Address   Port


                                                         Eth : C


               Eth : A


    Src:A Dst:C


                                                         Address        Port


                           Address   Port



                                               Eth : B
CNP3/2008.5.                                                © O. Bonaventure, 2008
Network redundancy (2)

       Does             this always work ?
               Assume all switches have rebooted
                           Address     Port


                                                           Eth : C


               Eth : A



                         Src:A Dst:C

                                                           Address        Port


                           Address     Port



                                                 Eth : B
CNP3/2008.5.                                                  © O. Bonaventure, 2008
How to solve this problem ?




CNP3/2008.5.                       © O. Bonaventure, 2008
How to solve this problem ?

       The       lawyerʼs way
              Add a sticker on all switches to indicate that they
               must only be used in tree shaped networks and
               should never ever be interconnected with loops




CNP3/2008.5.                                             © O. Bonaventure, 2008
How to solve this problem ?

       The       lawyerʼs way
              Add a sticker on all switches to indicate that they
               must only be used in tree shaped networks and
               should never ever be interconnected with loops

       The       computer scientistʼs way
              Define a distributed algorithm that allows
               switches to automatically discover the links
               causing loops and remove them from the
               topology



CNP3/2008.5.                                             © O. Bonaventure, 2008
Principle of the solution

       Build       a spanning tree inside network
              Each switch has a unique identifier
              The switch with the lowest id is the root
              Disable all links that do not belong to spanning
               tree
                                                    Switch 2



                                   Switch 1
         Switch 9


                                                          Switch 44




CNP3/2008.5.                                                   © O. Bonaventure, 2008
                        Switch 7              Switch 22
How to build the spanning tree

       Distributed           algorithm run by switches
       Goals          of the spanning tree protocol
              Elect the root of the spanning tree
                  In practice, this will be the switch with the lowest id
              Compute the distance between each switch and
               the root
              When several switches are attached to the same
               LAN elect one forwarder and disable the others
              determine which ports/links should belong to the
               spanning




CNP3/2008.5.                                                        © O. Bonaventure, 2008
Root and Designated Switches

       Root       switch
              The Root Switch is the root of the spanning tree
              The Root switch may change upon the arrival of
               new switches in the network
                                                   Switch 1
       Designated          switch
              to avoid loops, only
               one switch should
               be responsible for      Switch 9
                                                                Switch 4
               forwarding frames
               from the root on
               any link
              Root switch is always
               designated switch
               for all its links
CNP3/2008.5.                                             © O. Bonaventure, 2008
Root and Designated Switches

       Root       switch
              The Root Switch is the root of the spanning tree
              The Root switch may change upon the arrival of
               new switches in the network
                                                   Switch 1
       Designated          switch
              to avoid loops, only
               one switch should
               be responsible for      Switch 9
                                                                Switch 4
               forwarding frames
               from the root on
               any link
              Root switch is always
               designated switch
               for all its links
CNP3/2008.5.                                             © O. Bonaventure, 2008
The switch identifiers




CNP3/2008.5.                    © O. Bonaventure, 2008
The switch identifiers

       Switch       identifiers must be unique
              The easiest solution is to ask each manufacturer
               to embed a unique Ethernet address on each
               switch




CNP3/2008.5.                                           © O. Bonaventure, 2008
The switch identifiers

       Switch       identifiers must be unique
              The easiest solution is to ask each manufacturer
               to embed a unique Ethernet address on each
               switch

       But     since the switch with the lowest identifier
           is the network root, network operators need
           to influence the selection of the root switch




CNP3/2008.5.                                           © O. Bonaventure, 2008
The switch identifiers

       Switch          identifiers must be unique
              The easiest solution is to ask each manufacturer
               to embed a unique Ethernet address on each
               switch

       But     since the switch with the lowest identifier
           is the network root, network operators need
           to influence the selection of the root switch
       64         bits switch identifier
              Upper 16 bits
                  Priority defined by operator (default value : 32768)
              Lower 48 bits
                  Unique Ethernet address assigned by manufacturer
CNP3/2008.5.                                                    © O. Bonaventure, 2008
The link costs

       Each switch port is attached to a link
       The costs of the links can be configured                on
           each link by the network operator
              Common guideline : Cost = 1000 / bandwidth

       Recommended           values of link costs

               Bandwidth     Recommended       Recommended
                             link cost range   link cost value
               10 Mbps       50-600            100
               100 Mbps      10-60             19
               1000 Mbps     3-10              4
CNP3/2008.5.                                             © O. Bonaventure, 2008
Building the spanning tree

       802.1d           protocol
              802.1d uses Bridge PDUs (BPDUs) containing
                  Root ID : identifier of the current root switch
                  Cost : Cost of the shortest path between the switch
                   transmitting the BPDU and the root switch
                  Transmitting ID : identifier of the switch that transmits
                   the BPDU

              The BPDUs are sent by switches over their
               attached LANs as multicast frames but they are
               never forwarded
                  switches that implement 802.1d listen to a special
                   Ethernet multicast group

CNP3/2008.5.                                                      © O. Bonaventure, 2008
Ordering of BPDUs

        BPDUs          can be strictly ordered
              BPDU11[R=R1,C=C1, T=T1] is better than
               BPDU2 [R=R2,C=C2, T=T2] if
                  R1<R2
                  R1=R2 and C1<C2
                  R1=R2 and C1=C2 and T1<T2


              Example
                   BPDU1                       BPDU2
               R1     C1         T1     R2      C2          T2
               29      15        35     31      12          32
               35      80        39     35      80          40
               35      15        80     35      18          38


CNP3/2008.5.                                           © O. Bonaventure, 2008
Building the spanning tree (2)

       Behaviour               of 802.1d protocol
              The root switch sends regularly BPDUs on all its
               ports
                  R=Root switch id, C=0, T= Root switch id
                  Bootstrap
                      If a switch does not receive BPDUs, it considers itself as root
                       and sends BPDUs
              On each port, a switch parses all the received
               BPDUs and stores the best BPDU received on
               each port
                  Each switch can easily determiner the current root by
                   analysing all the BPDUs stored in its tables
              A switch stops sending BPDUs on a port if it
               received a better BPDU on this port
              802.1d stabilises when a single switch sends a
               BPDU over each LAN
CNP3/2008.5.                                                                © O. Bonaventure, 2008
802.1d port states
          802.1d          port state based on received BPDUs
                  Root port
                   port on which the best 802.1d BPDU was received
                   port used to receive the BPDUs sent by the root form
                    the shortest path
                   A root port does not transmit BPDUs
                   Only one root port on each switch
                  Designated port
                   port(s) used to send switchʼs BPDU upon reception of a
                    BPDU from the root via the Root port
                   Switchʼs BPDU is
                      current root, cost to reach root, switch identifier
                   0, one or more designated ports on each switch
                   a port is designated if the switchʼs BPDU is better than
                    the best BPDU received on this port
                  Blocked port (only receives 802.1d BPDUs)
CNP3/2008.5.                                                                © O. Bonaventure, 2008
802.1d port states (2)
           Example
                  BPDUs received by switch 18
                           Root     Cost           Transmitter
                   port1    12       93             51
                   port2    12       85              47
                   port3    81        0             81
                   port4    15       31             27
                  Root : switch 12
                  port2 is the root port
                  Switchʼs BPDU
                    R=12, C=86, T=18
                  This BPDU is better than the BPDUs received on
                   the other ports. They are thus designated

CNP3/2008.5.                                           © O. Bonaventure, 2008
802.1d port states (3)

       Example
              BPDUs received by switch 92
                       Root        Cost            Transmitter
               port1    81           0              81
               port2    41           19             125
               port3    41           12             315
               port4    41           12             111
               port5    41           13             90
              root : 41
              root port : port4
              Switchʼs BPDU
                  R=41,C=13, T=92
              Port state
                  port1 and port 2 : designated
                  port 3 and port 5 : blocked
CNP3/2008.5.                                            © O. Bonaventure, 2008
Port activity

       A port    can be either active or inactive for
           data frames
              Active port
                  The switch captures Ethernet frames on its active ports
                   and forwards them over other ports (based on its own
                   port/address tables)
                  The switch updates its port/address table based on the
                   frames received on this port
              Inactive port
                  The switch does not listen to frames neither forward
                   frames on this port
       The     port activity is fixed once the spanning
           tree has converged
              Root and designated ports become active
              Blocked ports become inactive
              Duration spanning tree computation, all ports are
CNP3/2008.5.   inactive                                 © O. Bonaventure, 2008
Port states and activity

                               Receive    Transmit
                               BPDUs      BPDUs
                 Blocked          yes         no
                 Root             yes         no
                 Designated       yes        yes


                              Learn        Forward Data
                              Addresses    Frames

               Inactive           no             no
               Active             yes           yes


CNP3/2008.5.                                  © O. Bonaventure, 2008
Example network

       Compute      the spanning tree in this network
           by using 802.1d           Switch 7




                                                      Switch 9
                               Switch 12




                  Assume that 9 boots and then 12
CNP3/2008.5.       and eventually 7 boots                 © O. Bonaventure, 2008
Impact of failures

       What          kind of failures should be considered ?
              Failure (power-off) of the root switch
                  A new root needs to be elected

              Failure of a designated switch
                  Another switch should replace the designated one

              Failure of a link
                  If the network is redundant, a disabled link should be
                   enabled to cope with the failure

              Failure of a link that disconnects the network
                  We now have two different networks and a root switch
                   must be elected in each network

CNP3/2008.5.                                                     © O. Bonaventure, 2008
How to deal with failures ?

       Failure         detection mechanisms
              Root switch sends its BPDU every Hello timer
               and designated switches generate their own
               BPDUs upon reception of this BPDU
                  Default Hello timer is two seconds

              BPDUs stored in the switches age and are
               removed when they timeout

       Failure         notification mechanism
              When a switch detects an important failure, it
               sends a topology change (TC) BPDU to the Root
              Upon reception of a TC BPDU all switches stop
               forwarding data frames and recompute spanning
CNP3/2008.5.
               tree                                    © O. Bonaventure, 2008
Ethernet Evolution

       Networks               require higher bandwidth
       Fast           Ethernet
              Physical layer
                  bandwidth : 100 Mbps
                  twisted pair or optical fiber
                  No coaxial cable anymore

              MAC sublayer
                  CSMA/CD unchanged
                      minimum frame size : 512 bits
                      slot time : 5.12 micro seconds
                  Maximum distance : shorter than Ethernet 10 Mbps
                  Same frame format as 10 Mbps Ethernet



CNP3/2008.5.                                                 © O. Bonaventure, 2008
Ethernet Evolution (2)

       Gigabit            Ethernet
              Physical layer
                   Bandwidth 1 Gbps
                   Optical fiber or twisted pair

              MAC sublayer
                   CSMA/CD still supported
                    How was this achieved ?
                    Two options
                     Increase minimum frame size : not backward compatible with
                       Ethernet
                     Reduce the maximum distance as for FastEthernet : but then
                       networks would have a diameter of 10 m
                    Gigabit CSMA/CD hack
                     minimum frame size is still 512 bits but the sender must
                       continue to send an electrical signal during the equivalent o
                       4096 bits
                   same frame format as Ethernet
                      but extensions allow to transmit Jumbo frames of up to 9KBytes
CNP3/2008.5.                                                             © O. Bonaventure, 2008
The Ethernet zoo

         10BASE5       Thick coaxial cable, 500m

         10BASE2       Thin coaxial cable, 185m

         10BASE-T      Two pairs of category 3+ UTP

         10BASE-F      10 Mb/s over optical fiber

         100BASE-TX    Category 5 UTP or STP, 100 m maximum

         100BASE-FX    Two multimode optical fiber, 2 km maximum

         1000BASE-CX   Two pairs shielded twisted pair, 25m maximum

         1000BASE-SX   Two multimode or single mode optical fibers with lasers

         10 Gbps       optical fiber but also cat 6 twisted pair

         40-100 Gbps   being developed, standard expected in 2010, 40Gbps
                       one meter long for switch backplanes, 10 meters for copper
                       cable and 100 meters for fiber optics
CNP3/2008.5.                                                             © O. Bonaventure, 2008
Full duplex Ethernet

        Observations
              In many networks, Ethernet is a often a point-to-
               point technology
                  host-to-switch
                  switch to switch



                                      S1          S2

                                                  HUB
                                 HUB




              Twisted-pairs and fiber-based physical layers
               allow to send and receive at the same time
CNP3/2008.5.                                                © O. Bonaventure, 2008
Ethernet full duplex (2)

       No    collision is possible on a full duplex
           Ethernet/FastEthernet/GigabitEthernet link
              Disable CSMA/CD on such links

       Advantages
              Improves bandwidth
                  Both endpoints can transmit frames at the same time

              CSMA/CD is disabled
                  No constraint on propagation delay anymore
                      Ethernet network can be as large as we want !

                  No constraint on minimum frame size anymore
                      We do not need the frame extension hack for Gigabit Ethernet!


CNP3/2008.5.                                                             © O. Bonaventure, 2008
Full duplex Ethernet (3)

       Drawback
              If CSMA/CD is disabled, access control is
               disabled and congestion can occur

                       Server
                                      S1                  S2
                                                                       Client



                                FastEthernet (100 Mbps)        Ethernet (10 Mbps)


                   How to solve this problem inside Ethernet ?
                    Add buffers to switches
                     but infinite buffers are impossible and useless anyway
                    Cause collisions (e.g. jamming) to force collisions on the inter-
                     switch link and uplink is server is too fast
                     Drawback : interswitch link could be entirely blocked
                    Develop a new flow control mechanism inside MAC layer
                     Pause frame to slowdown transmission
CNP3/2008.5.                                                                    © O. Bonaventure, 2008
Ethernet flow control
               server
                                                                   Client


                                       S1
                        FastEthernet             Ethernet
                         (100 Mbps)             (10 Mbps)



   100 nsec
                  Frame2 [10000 bits]       Frame1 [10000 bits]
                  Frame3 [10000 bits]
                   PAUSE [2msec]                                   1 microsec

       Sender blocked

                                             Frame2 [10000 bits]

              PAUSE frame indicates how much time the
               upstream should wait before transmitting next frame
CNP3/2008.5.                                                                © O. Bonaventure, 2008
Ethernet flow control
               server
                                                                   Client


                                       S1
                        FastEthernet             Ethernet
                         (100 Mbps)             (10 Mbps)



   100 nsec       Frame1 [10000 bits]
                  Frame2 [10000 bits]       Frame1 [10000 bits]
                  Frame3 [10000 bits]
                   PAUSE [2msec]                                   1 microsec

       Sender blocked

                                             Frame2 [10000 bits]

              PAUSE frame indicates how much time the
               upstream should wait before transmitting next frame
CNP3/2008.5.                                                                © O. Bonaventure, 2008
Virtual LANs
        Allows    to build several logical networks on
           top of a single physical network
                                          Each port on each switch is
                   A           B           associated to a particular VLAN
                                           All the hosts that reside on the same
                                            VLAN can exchange Ethernet
                                            frames
                                           A host on VLAN1 cannot send an
   C               S               F
                                            Ethernet frame towards another
                                            host that belongs to VLAN2
                                           Broadcast and multicast frames are
               D           E                only sent to the members of the
                                            VLAN

               VLAN1 : A,E,F
               VLAN2 : B,C,D
CNP3/2008.5.                                                     © O. Bonaventure, 2008
VLANs in campus networks
        How        to support VLANs in a campus network

                                               Possible solutions
                   A
                                                   Place on each switch a table
                                        B
                                                    that maps each MAC address
                                                    on a VLAN id
                                                       difficult to manage this table

   C               S1          S2           F      Change frame format used on
                                                    inter-switch links to include a
                                                    VLAN identifier
                                                       new header added by first switch
               D                    E                  new header removed by last switch



               VLAN1 : A,E,F
               VLAN2 : B,C,D
CNP3/2008.5.                                                            © O. Bonaventure, 2008
VLAN frame format

       Used        on inter-switch links
                        Destination
                         Address
                         Source
                         Address

                           Type


                         Payload


                      CRC [32 bits]




              Can also be used by trusted hosts (e.g. servers)
CNP3/2008.5.   or routers                               © O. Bonaventure, 2008
VLAN frame format

       Used        on inter-switch links
                        Destination
                         Address
                         Source
                         Address
                          VLAN
                        Protocol Id
                         0x8100

                      Tag Control Info

                           Type


                         Payload


                      CRC [32 bits]

              Can also be used by trusted hosts (e.g. servers)
CNP3/2008.5.   or routers                               © O. Bonaventure, 2008
VLAN frame format

       Used        on inter-switch links
                        Destination
                         Address
                         Source
                         Address
                          VLAN           Identifies the frame as containing VLANtag
                        Protocol Id
                         0x8100

                      Tag Control Info

                           Type


                         Payload


                      CRC [32 bits]

              Can also be used by trusted hosts (e.g. servers)
CNP3/2008.5.   or routers                               © O. Bonaventure, 2008
VLAN frame format

       Used        on inter-switch links
                        Destination
                         Address
                         Source
                         Address
                          VLAN           Identifies the frame as containing VLANtag
                        Protocol Id
                         0x8100            Tag control information contains two types
                                           of information :
                      Tag Control Info
                                           - VLAN identifier (12 bits) : up to 4094
                                           different VLANs can be defined
                           Type            - Priority (3 bits) : indicates the importance
                                           of the frame and can be used by switches
                                           to provide a better service for some frames
                         Payload           (e.g. Voice)

                      CRC [32 bits]

              Can also be used by trusted hosts (e.g. servers)
CNP3/2008.5.   or routers                               © O. Bonaventure, 2008
Datalink layer

       Point-to         datalink layer
       Local         area networks
              Optimistic Medium access control
                  ALOHA, CSMA, CSMA/CD, CSMA/CA

              Ethernet networks
                  Basics of Ethernet
                  IP over Ethernet
                  Interconnection of Ethernet networks


              WiFi networks
              Deterministic Medium access control
CNP3/2008.5.      Token Ring, FDDI                        © O. Bonaventure, 2008
Modes of operation

        Ad    hoc
           or Independent
           Basic Service Set




CNP3/2008.5.                                  © O. Bonaventure, 2008
Modes of operation

        Ad    hoc
           or Independent
           Basic Service Set



         Infrastructure   mode




CNP3/2008.5.                                  © O. Bonaventure, 2008
Modes of operation

        Ad    hoc
           or Independent
           Basic Service Set



         Infrastructure   mode




                                            BSS
               BSS
CNP3/2008.5.                                      © O. Bonaventure, 2008
Modes of operation

        Ad    hoc
           or Independent
           Basic Service Set



         Infrastructure   mode




                                            BSS
               BSS
CNP3/2008.5.                      ESS             © O. Bonaventure, 2008
Modes of operation

        Ad    hoc
           or Independent
           Basic Service Set



         Infrastructure   mode
                                  DS




                                            BSS
               BSS
CNP3/2008.5.                      ESS             © O. Bonaventure, 2008
The WiFi zoo


               Standard   Frequency     Typical      Raw         Range in/out
                                        throughput   bandwidth   (m)

               802 .11    2.4 GHz       0.9 Mbps     2 Mbps      20 / 100


               802 .11a   5 GHz         23 Mbps      54 Mbps     35 / 120


               802 .11b   2.4 GHz       4.3 Mbps     11 Mbps     38 / 140


               802 .11g   2.4 GHz       19 Mbps      54 Mbps     38 / 140


               802 .11n   2.4 / 5 GHz   74 Mbps      up to 600   70 / 250
                                                     Mbps

CNP3/2008.5.                                                       © O. Bonaventure, 2008
WiFi zoo and performance

       Performance     issues with the multiple WiFi
           transmission rates
              802.11, 802.11b and 802.11g operate on 2.4 GHz
               frequency bands
              Many access points are multi-standard




                54 Mbps




CNP3/2008.5.                                        © O. Bonaventure, 2008
WiFi zoo and performance

       Performance     issues with the multiple WiFi
           transmission rates
              802.11, 802.11b and 802.11g operate on 2.4 GHz
               frequency bands
              Many access points are multi-standard




                54 Mbps


                                   Laptop supporting
                                   only 802.11b
CNP3/2008.5.                                           © O. Bonaventure, 2008
WiFi zoo and performance

       Performance     issues with the multiple WiFi
           transmission rates
              802.11, 802.11b and 802.11g operate on 2.4 GHz
               frequency bands
              Many access points are multi-standard




                                 11 Mbps
                54 Mbps


                                   Laptop supporting
                                   only 802.11b
CNP3/2008.5.                                           © O. Bonaventure, 2008
WiFi zoo and performance

       Performance     issues with the multiple WiFi
           transmission rates
              802.11, 802.11b and 802.11g operate on 2.4 GHz
               frequency bands
              Many access points are multi-standard




                                 11 Mbps
                                                       Laptop far away
                54 Mbps


                                   Laptop supporting
                                   only 802.11b
CNP3/2008.5.                                             © O. Bonaventure, 2008
WiFi zoo and performance

       Performance     issues with the multiple WiFi
           transmission rates
              802.11, 802.11b and 802.11g operate on 2.4 GHz
               frequency bands
              Many access points are multi-standard

                                      1 Mbps


                                 11 Mbps
                                                       Laptop far away
                54 Mbps


                                   Laptop supporting
                                   only 802.11b
CNP3/2008.5.                                             © O. Bonaventure, 2008
Practical issues
                          with WLAN deployments
       Home      environment




           A WLAN    can interfere with the neighbourʼs
CNP3/2008.5.   WLAN                             © O. Bonaventure, 2008
Practical issues
                                with WLAN deployments
       Enterprise         networks




              One access points can interfere with many other
CNP3/2008.5.   access points                          © O. Bonaventure, 2008
The WiFi channel frequencies
        WiFi   standards operate on several
           frequencies called channels
              Usually about a dozen channels

        Why         multiple channels ?
              Some channels my be affected by interference
               and have a lower performance
              Some frequencies are reserved for specific
               usage in some countries
              Allows frequency reuse when there are multiple
               WiFi networks in the same area
                  Unfortunately, many home access points operate by
                   default on the same factory set channel which causes
                   interference and reduced bandwidth


CNP3/2008.5.                                                  © O. Bonaventure, 2008
WLAN in enterprise
                                          environments
       What     could be done to improve the
           performance of WLANs ?
              Reduce interference as much as possible
                  Tune channel frequencies
                  Reduce transmission power
                  Similar to techniques used in GSM networks




                  Recent deployments rely on centralised controllers
CNP3/2008.5.       and thin access points                     © O. Bonaventure, 2008
WLAN in enterprise
                                          environments
       What     could be done to improve the
           performance of WLANs ?
              Reduce interference as much as possible
                  Tune channel frequencies
                  Reduce transmission power
                  Similar to techniques used in GSM networks




                  Recent deployments rely on centralised controllers
CNP3/2008.5.       and thin access points                     © O. Bonaventure, 2008
WLAN in enterprise
                                          environments
       What     could be done to improve the
           performance of WLANs ?
              Reduce interference as much as possible
                  Tune channel frequencies
                  Reduce transmission power
                  Similar to techniques used in GSM networks




                  Recent deployments rely on centralised controllers
CNP3/2008.5.       and thin access points                     © O. Bonaventure, 2008
Datalink layer

       Point-to         datalink layer
       Local         area networks
              Optimistic Medium access control
                  ALOHA, CSMA, CSMA/CD, CSMA/CA

              Ethernet networks
                  Basics of Ethernet
                  IP over Ethernet
                  Interconnection of Ethernet networks


              WiFi networks
              Deterministic Medium access control
CNP3/2008.5.      Token Ring, FDDI                        © O. Bonaventure, 2008
Ring networks

                                                             S2
                          S1



                                      unidirectional ring


                                                                  S3
                                Interface

                         S5


                                                        S4
       Problem        to be solved
              How to share fairly ring transmission capacity
               among all devices attached to the ring ?
CNP3/2008.5.                                                      © O. Bonaventure, 2008
Ring networks (2)




CNP3/2008.5.                  © O. Bonaventure, 2008
Ring networks (2)

       How        to share transmission capacity ?
              To avoid collisions, only one station should be
               able to transmit a frame at any time
              The station that has the right to transmit must
               own a special frame called token




CNP3/2008.5.                                             © O. Bonaventure, 2008
Ring networks (2)

       How          to share transmission capacity ?
              To avoid collisions, only one station should be
               able to transmit a frame at any time
              The station that has the right to transmit must
               own a special frame called token

       How          can stations exchange token ?
              Token is a special frame that can be sent over
               the ring network
              A station that needs to transmit a data frame can
                  capture the token and remove it from the ring
                  send one or more data frames
                  send the token back on the ring to allow other stations
                   to capture it and transmit

CNP3/2008.5.                                                     © O. Bonaventure, 2008
Ring networks (3)

       Consequence
              When there are no data frames sent, stations
               should continuously exchange the token
                                                     S1                          S2
       How          to achieve this ?
              A station must relay the
               electrical signal it receives                    Unidirectional
                                                                    ring
               upstream when not                                                        S3
               transmitting                               Interface
                  it introducing a delay of one    S5
                   bit transmission time
              If all stations behave so,                                  S4
               and token is small,
               token will travel permanently
                  If token is not small, increase the delay on the
                   token ring network
CNP3/2008.5.                                                          © O. Bonaventure, 2008
Ring networks (4)

       Data         frame transmission
              A data frame requires a longer transmission time
               than the ring delay

                                             S1              S2

              Sender behaviour
                  Captures token
                  Sends data frame
                  Removes data frame                                S3
                   from ring
                  Sends token               S5

                                                        S4



CNP3/2008.5.                                           © O. Bonaventure, 2008
Ring networks in practice

       Two            types of ring LANs
              Token Ring
                  Invented by IBM
                  Standardised by IEEE/ISO (802.5)
                  Ring build with point-to-point twisted pair links
                      4 Mbps
                      16 Mbps
                      Some work for 100 Mbps Token Ring
              Fiber Distributed Data Interface (FDDI)
                  First data networks built with optical fiber
                  standardised by ANSI
                  100 Mbps
                  up to 200 km and 1000 stations

       Other            ring technologies exist and are used
              SONET/SDH
              DPT
CNP3/2008.5.                                                       © O. Bonaventure, 2008
Token Ring (1)

       Token
              travels permanently on ring when stations are
               idle
              Size 24 bits
              Minimum delay on ring
                  24 bits transmission times
              Actual ring delay
                  Each station introduces a one-bit transmission time
                   delay
                  Physical links have a propagation delay
                  Each ring contains a monitor station that measures
                   delay during ring initialisation and adds delay if needed
       Interfaces
              Two modes of operation
                  Listen : interface adds a one bit transmission delay
                  Transmit : only if station owns the token
CNP3/2008.5.                                                     © O. Bonaventure, 2008
Token Ring (2)
         Frame            format
              Token (24 bits)
                  SD : starting delimiter
                      invalid physical layer symbol with
                       Manchester coding                            1       1    1
                  AC : Access control                             SD AC ED
                  ED : ending de fin
                      invalid physical layer symbol with
                       Manchester coding
              Data frame
    1      1   1        (2or)6   (2 or)6      0... (nolimit)            4        1      1
    SD AC FC            Dest     Source           Data              CRC          ED FS
                  FC : Frame control
                      Allows to distinguish between control frames and data frames
                  FS : Frame status
CNP3/2008.5.                                                                © O. Bonaventure, 2008
Token Ring (3)

                                           Frame transmission
                                                                     S2
                    Delay 1 bit    S1
 Listen mode




                                               Unidirectional Ring

                                                                                 S3
Transmit mode
                                         Interface

                  To     From     S5
                Station Station


                                                                S4
       How        to capture the token ?
              Rely on Token bit of AC field and one bit delay
CNP3/2008.5.                                                         © O. Bonaventure, 2008
Token Ring (4)

       Whatʼs          special about Token Ring
              Can efficiently support acknowledgements
              Frame Status contains two bits : A and C
                  A and C are set to 0 when transmitting a frame
                  When a receiver sees one frame destined to itself, it
                   sets A to 1
                  When a receiver copies one frame destined to itself
                   inside its buffers, it sets C to 1

              Data frame (and FS) return to sender. By
               checking A and C, it knows that :
                  if A=0 and C=0, destination is down
                  if A=1 and C=0, destination is up, but congested
                  if A=1 and C=1, frame was received by destination



CNP3/2008.5.                                                     © O. Bonaventure, 2008
Token Ring (5)

       Issues             with Token Ring
              How to ensure fairness ?
                  A station should not be allowed to transmit indefinitely
                  Token Holding Time
                       Maximum time during which a station can own the token and
                        transmit data frames without releasing the token
                       Default : 10 milliseconds

              How to bootstrap the Token Ring ?
                  Which station sends the first token ?
                  How to ensure that the Ring delay is long enough ?
                  What happens when a station fails ?
                       If it did not own the token, no issue
                       If it owned the token while failing, then
                        Which station will remove the current data frame from the
                            ring ?
                        Which station will send the token on the ring ?
CNP3/2008.5.                                                              © O. Bonaventure, 2008
Token Ring (6)




CNP3/2008.5.                © O. Bonaventure, 2008
Token Ring (6)

       How            to bootstrap a Token Ring ?
              Complex problem
              Main idea
                  One station should send the token
                  The first station on the ring hears nothing and notices
                   that there is a problem. It sends a special frame called
                   CLAIM_TOKEN
                  If it receives the frame back, it becomes the monitor
                      Each station must be able to become monitor




CNP3/2008.5.                                                         © O. Bonaventure, 2008
Token Ring (6)

       How            to bootstrap a Token Ring ?
              Complex problem
              Main idea
                  One station should send the token
                  The first station on the ring hears nothing and notices
                   that there is a problem. It sends a special frame called
                   CLAIM_TOKEN
                  If it receives the frame back, it becomes the monitor
                      Each station must be able to become monitor

       Monitorʼs             responsibilities
              Ensure that token is never lost or corrupted
              Insert an artificial delay of 24 bit transmission
               times on the ring
              Remove orphan and looping frames
              If the monitor fails, the ring must be bootstrapped
               again                                       © O. Bonaventure, 2008
CNP3/2008.5.
Token Ring (7)




CNP3/2008.5.                © O. Bonaventure, 2008
Token Ring (7)

    Token         surveillance
          Monitor checks how often its sees the token
              If there are N stations on the ring, then the monitor should
               see the token at worst every N*THT seconds
              If token is lost, monitor cuts ring, removes electrical signal
               and resend a new token




CNP3/2008.5.                                                      © O. Bonaventure, 2008
Token Ring (7)

    Token         surveillance
          Monitor checks how often its sees the token
              If there are N stations on the ring, then the monitor should
               see the token at worst every N*THT seconds
              If token is lost, monitor cuts ring, removes electrical signal
               and resend a new token
    Orphan           frames
          Frame with invalid coding or incomplete frame
              monitor cuts ring, removes electrical signal and resend a
               new token




CNP3/2008.5.                                                      © O. Bonaventure, 2008
Token Ring (7)

    Token         surveillance
          Monitor checks how often its sees the token
              If there are N stations on the ring, then the monitor should
               see the token at worst every N*THT seconds
              If token is lost, monitor cuts ring, removes electrical signal
               and resend a new token
    Orphan           frames
          Frame with invalid coding or incomplete frame
              monitor cuts ring, removes electrical signal and resend a
               new token
    Looping          frames
          Every time monitor sees a frame, it sets its Monitor
           bit of the AC field to 1
              All stations send their frames with Monitor=0
              If a frame is seen twice by the monitor, it cuts ring,
               removes electrical signal and resend a new token
CNP3/2008.5.                                                      © O. Bonaventure, 2008
FDDI

       Network           topology FDDI
              Single ring like Token Ring
              Two counter rotating rings to deal with failures




                                               S2
                              S1




                                                    S3

                             S5

         Usually, only one ring is used
                                          S4

CNP3/2008.5.                                               © O. Bonaventure, 2008
FDDI

       Network           topology FDDI
              Single ring like Token Ring
              Two counter rotating rings to deal with failures


                                          Failure


                                                    S2
                              S1




                                                         S3

                             S5

         Usually, only one ring is used
                                              S4

CNP3/2008.5.                                                    © O. Bonaventure, 2008
FDDI

       Network           topology FDDI
              Single ring like Token Ring
              Two counter rotating rings to deal with failures

                  Bypass to reroute       Failure
                  around failure

                                                    S2
                              S1




                                                         S3

                             S5

         Usually, only one ring is used
                                              S4

CNP3/2008.5.                                                    © O. Bonaventure, 2008
FDDI (2)

        Medium              access control
              Token based access control
                  A station can only transmit a data frame provided that it
                   owns the token
              Token Holding Time (THT)
                  maximum duration of transmission
                  Token Rotation Time (TRT)
                      maximal delay for a token to rotate around the entire ring
                      TRT ≤ Actives_Stations * THT + Ring_Latency

              When should the Token be released
                  Immediately after removal of the data frame sent
                      as in Token Ring
                  Immediately after transmission of the data transfer,
                   without waiting for it to come back
                      solution chosen for FDDI due to the high bandwidth and long
                       latency of the FDDI ring

CNP3/2008.5.                                                               © O. Bonaventure, 2008
FDDI (3)

       Delay            sensitive service
              How to support two types of frames in FDDI ?
                  normal data frames (asynchronous frames)
                      example : file transfer, email, www
                  delay sensitive data frames (synchronous frames)
                      example : telephone, videoconference


       Solution
              Delay sensitive frames can be supported
               provided that a FDDI ring can bound the
               transmission delay of such a frame
                  synchronous frames should be transmitted earlier than
                   normal frames on each station
                  Since a station can always transmit when it captures
                   the token, a solution should bound the Token Rotation
                   Time to provide strict guarantees to delay sensitive
                   frames
CNP3/2008.5.                                                     © O. Bonaventure, 2008
FDDI (4)

       How            to bound the TRT ?
              Target Token Rotation Time (TTRT)
                   At ring initialisation, all stations propose their expected
                    TTRT and the smallest proposed value is chosen
                   All stations must control their transmissions such that
                    the token rotation time is always smaller than TTRT
                   each station measures the current TRT
                    When a station captures the token, it can send its synchronous
                     frames
                     there is a maximum amount of synchronous frames that can
                         be sent by each station. This maximum is negotiated by using
                         control frames.
                    If after having sent synchronous frames TRT < TTRT, this
                     means that the token is circulating quickly and the station can
                     send asynchronous frames
                    Otherwise the token must be released



CNP3/2008.5.                                                            © O. Bonaventure, 2008
FDDI (5)

       Frame             format
                                   Start of Frame
                                       [8 bits]

                                   Control [8 bits]       Frame type (1 bit)
                                                            synchronous or asynchronous
               48 bits addresses    Destination           Type of addresses
                                                            16 bits or 48 bits
                                                          Protocol Type information
                                       Source               6 bits, similar to Type Ethernet DIX
                                                            special types for control frames and
                                                            token

        Maximum 4478 bytes              Data




                                   CRC [32 bits]
                                   End of Frame
                                      [8 bits]
                                                         Similar to A and C bits in Token Ring
                                   Status [24 bits]
CNP3/2008.5.                                                               © O. Bonaventure, 2008
Interconnection of Token Rings
        How            to interconnect Token Ring networks ?


                       S1                   S2                            S7




                   S5
                                             Bridge/Switch
                                      S4                             S9




              Possible solutions
                  Use the spanning tree designed for Ethernet
CNP3/2008.5.
                  Invent a new protocol                         © O. Bonaventure, 2008
                       solution chosen by IBM for Token Ring
Interconnection of Token Rings (2)
                S1
                                                      S7




               S5

                                                 S9




       Basic        idea
              Use source routing

       Problems
              How to identify the paths
              How to discover the paths ?
CNP3/2008.5.                                    © O. Bonaventure, 2008
Interconnection of Token Rings (3)
                   S1                                     S7

                        LAN1                 LAN5
                                      B3

                  S5
                                                     S9
                                 B6
                                                B1
                                      LAN3
                         B4




        Identification         of paths
              Each LAN has one unique identifier
              Each bridge has one identifier
              Each path is a list of pairs LAN#,bridge#

CNP3/2008.5.                                                   © O. Bonaventure, 2008
Interconnection of Token Rings (4)

                           S1                                        S7

                                LAN1         B3
                                                         LAN5

                           S5

                                        B6                      S9

                                                         B1

                                B4                LAN3


        How         to discover the path ?
              Control frame : all paths explorer
                  Sent by source towards destination
                  Forwarded by all bridges that add their identifier and LAN
                   identifier
                  Destination sends back the ape frame to source by using
                   reverse path
                  Each station caches the recent paths
CNP3/2008.5.                                                          © O. Bonaventure, 2008
Spanning Tree versus
                                  Source Routing
       Spanning         tree          Source    routing
              complexity in              complexity in all
               switches/bridges            stations
              only a subset of the       the entire network is
               network is used             used
              entirely transparent       requires support on
                                           stations
              multicast natively         spanning tree
               supported                   required for multicast
              few control frames         many control frames
               (802.1d)                    can be required



CNP3/2008.5.                                            © O. Bonaventure, 2008

More Related Content

ZIP
4 network.key
ZIP
1 introduction.key
ZIP
3 transport.key
ZIP
2 applications.key
PDF
Energy-Aware Wireless Video Streaming
PDF
Video Streaming over Bluetooth: A Survey
PDF
Microsoft PowerPoint - WirelessCluster_Pres
PPT
Networing basics
4 network.key
1 introduction.key
3 transport.key
2 applications.key
Energy-Aware Wireless Video Streaming
Video Streaming over Bluetooth: A Survey
Microsoft PowerPoint - WirelessCluster_Pres
Networing basics

What's hot (20)

PDF
(Paper) P2P VIDEO BROADCAST BASED ON PER-PEER TRANSCODING AND ITS EVALUATION ...
PPTX
Comparison Static ICIC and Adaptive ICIC on TD-LTE
PDF
Optimal Streaming Protocol for VoD Using Clients' Residual Bandwidth
PDF
Multicasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP Networks
PDF
Ppt multicast routing
PPTX
Digital TV, IPTV
PDF
A feasibility study on vehicle to-infrastructure communication wi fi vs. wimax
PDF
Infocom03 rajiv
PPTX
Long Term Evolution-Advanced
PDF
PLNOG 5: Emil Gągała - ADVANCED VPLS
DOC
[32]
PPT
Multi-Protocol Lambda Switching: The Role of IP Technologies in Controlling a...
PPT
PDF
PDF
Wireless network basics
PDF
Integrated Video Transport Network Multiplexer
PDF
Service Density By Xelerated At Linley Seminar
PDF
PDF
Crsm 6 Crsm 2009 Filip Louagie The Flemish Cognitive Radio Research Cluster
(Paper) P2P VIDEO BROADCAST BASED ON PER-PEER TRANSCODING AND ITS EVALUATION ...
Comparison Static ICIC and Adaptive ICIC on TD-LTE
Optimal Streaming Protocol for VoD Using Clients' Residual Bandwidth
Multicasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP Networks
Ppt multicast routing
Digital TV, IPTV
A feasibility study on vehicle to-infrastructure communication wi fi vs. wimax
Infocom03 rajiv
Long Term Evolution-Advanced
PLNOG 5: Emil Gągała - ADVANCED VPLS
[32]
Multi-Protocol Lambda Switching: The Role of IP Technologies in Controlling a...
Wireless network basics
Integrated Video Transport Network Multiplexer
Service Density By Xelerated At Linley Seminar
Crsm 6 Crsm 2009 Filip Louagie The Flemish Cognitive Radio Research Cluster
Ad

Viewers also liked (19)

PPTX
IBPS CWE Specialist IT Officer – Salary, Job, Work
PPTX
IBPS SO Aspirants Queries
PDF
Chapter5 link layer and la ns
PPT
IBPS Specialist Officers Exam 2014 - Interviewkiller.com
PPTX
New framing-protocols
PDF
Mcq in computer science by timothy j williams
PPT
Chapter 1 - Introduction
PPT
Basic concept of computer network
PDF
MCQ Bank for Computer Fundamantals from mcqSets.com
PPT
HDLC, PPP and SLIP
PPTX
Data link control protocol(1)
DOCX
Multiple choice quiz for introductions to computers
PDF
Unit 4 data link layer
PPTX
Data link layer
PDF
Basic IT Multiple Choice Questions
PDF
Computer Networking Multiple Choice Questions
PPTX
Introduction to computer network
PPT
The Data Link Layer
PDF
State of the Word 2011
IBPS CWE Specialist IT Officer – Salary, Job, Work
IBPS SO Aspirants Queries
Chapter5 link layer and la ns
IBPS Specialist Officers Exam 2014 - Interviewkiller.com
New framing-protocols
Mcq in computer science by timothy j williams
Chapter 1 - Introduction
Basic concept of computer network
MCQ Bank for Computer Fundamantals from mcqSets.com
HDLC, PPP and SLIP
Data link control protocol(1)
Multiple choice quiz for introductions to computers
Unit 4 data link layer
Data link layer
Basic IT Multiple Choice Questions
Computer Networking Multiple Choice Questions
Introduction to computer network
The Data Link Layer
State of the Word 2011
Ad

Similar to 5 data link-lan.key (20)

PDF
Chapter3-DataLinkLayer-EzharulShort2.pdf
PPT
ITE - Chapter 8
PPT
Computers network Chapter 3 The data link layer.ppt
PPT
Q1 On Ch08 Ethernet Switching
PPTX
DLL services from the computer networks.pptx
PPT
Chapter3 frame relay
PDF
Content aware p2 p video streaming with lowlatency
PPTX
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
PDF
An Empirical Evaluation of VoIP Playout Buffer Dimensioning in Skype, Google ...
PPTX
Chapter 2.1.1.pptx
PDF
Networks
PPTX
V5 protocol English
PDF
Chapter 4
PDF
Trill spb-comparison-extract
PDF
Energy Efficient Fragment Recovery Techniques for Low-power and Lossy Networks
PPT
Jaimin chp-3 - data-link layer- 2011 batch
PDF
Yu linux-tsm2004
PPT
Audio/Video Streaming over 802.11
PDF
Automating the Configuration of the FlexRay Communication Cycle
Chapter3-DataLinkLayer-EzharulShort2.pdf
ITE - Chapter 8
Computers network Chapter 3 The data link layer.ppt
Q1 On Ch08 Ethernet Switching
DLL services from the computer networks.pptx
Chapter3 frame relay
Content aware p2 p video streaming with lowlatency
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
An Empirical Evaluation of VoIP Playout Buffer Dimensioning in Skype, Google ...
Chapter 2.1.1.pptx
Networks
V5 protocol English
Chapter 4
Trill spb-comparison-extract
Energy Efficient Fragment Recovery Techniques for Low-power and Lossy Networks
Jaimin chp-3 - data-link layer- 2011 batch
Yu linux-tsm2004
Audio/Video Streaming over 802.11
Automating the Configuration of the FlexRay Communication Cycle

More from Olivier Bonaventure (20)

PPTX
Part3-reliable.pptx
PPTX
Part10-router.pptx
PPTX
Part1-Intro-Apps.pptx
PPTX
Part9-congestion.pptx
PPTX
Part2-Apps-Security.pptx
PPTX
Part11-lan.pptx
PPTX
Part5-tcp-improvements.pptx
PPTX
Part8-ibgp.pptx
PPTX
Part4-reliable-tcp.pptx
PPTX
Part7-routing.pptx
PPTX
Part6-network-routing.pptx
PPTX
Part1-Intro-Apps.pptx
PPTX
Part2-Apps-Security.pptx
PPTX
Part4-reliable-tcp.pptx
PPTX
Part3-reliable.pptx
PPTX
A personal journey towards more reproducible networking research
PPTX
Part 12 : Local Area Networks
PPTX
Part 11 : Interdomain routing with BGP
PPTX
Part 10 : Routing in IP networks and interdomain routing with BGP
PPTX
Part 9 : Congestion control and IPv6
Part3-reliable.pptx
Part10-router.pptx
Part1-Intro-Apps.pptx
Part9-congestion.pptx
Part2-Apps-Security.pptx
Part11-lan.pptx
Part5-tcp-improvements.pptx
Part8-ibgp.pptx
Part4-reliable-tcp.pptx
Part7-routing.pptx
Part6-network-routing.pptx
Part1-Intro-Apps.pptx
Part2-Apps-Security.pptx
Part4-reliable-tcp.pptx
Part3-reliable.pptx
A personal journey towards more reproducible networking research
Part 12 : Local Area Networks
Part 11 : Interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 9 : Congestion control and IPv6

Recently uploaded (20)

PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
HVAC Specification 2024 according to central public works department
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
My India Quiz Book_20210205121199924.pdf
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
Empowerment Technology for Senior High School Guide
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PPTX
Computer Architecture Input Output Memory.pptx
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
International_Financial_Reporting_Standa.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
HVAC Specification 2024 according to central public works department
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Share_Module_2_Power_conflict_and_negotiation.pptx
My India Quiz Book_20210205121199924.pdf
LDMMIA Reiki Yoga Finals Review Spring Summer
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
What if we spent less time fighting change, and more time building what’s rig...
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Paper A Mock Exam 9_ Attempt review.pdf.
Empowerment Technology for Senior High School Guide
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
AI-driven educational solutions for real-life interventions in the Philippine...
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
Computer Architecture Input Output Memory.pptx
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
International_Financial_Reporting_Standa.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc

5 data link-lan.key

  • 1. Computer Networking : Principles, Protocols and Practice Part 5 Datalink Layer and Local Area Network Olivier Bonaventure http://inl.info.ucl.ac.be/ CNP3/2008.5. © O. Bonaventure 2008
  • 2. Datalink layer  Point-to datalink layer  How to transmit and receive frames  Local area networks  Optimistic Medium access control  ALOHA, CSMA, CSMA/CD, CSMA/CA  Ethernet networks  WiFi networks  Deterministic Medium access control  Token Ring, FDDI CNP3/2008.5. © O. Bonaventure, 2008
  • 3. Usage of the physical layer  Service provided by physical layer  Bit transmission between nodes attached to the same physical transmission channel  cable, radio, optical fiber, ...  Better service for computers  Transmission/reception of short messages  Service provided by the datalink layer 2 Datalink Datalink 1 Physical Physical CNP3/2008.5. © O. Bonaventure, 2008
  • 4. Datalink layer  Goals  Provide a reliable transfert of packets although  Physical layer sends/receives bits and not packets  Physical layer service is imperfect  transmission errors  Losses of bits  Creation of bits Packet Datalink Datalink CNP3/2008.5. © O. Bonaventure, 2008
  • 5. Datalink layer  Goals  Provide a reliable transfert of packets although  Physical layer sends/receives bits and not packets  Physical layer service is imperfect  transmission errors  Losses of bits  Creation of bits Packet Packet Datalink Datalink CNP3/2008.5. © O. Bonaventure, 2008
  • 6. Frame delineation  Frame  Unit of information transfer between two entities of the datalink layer  sequence of N bits  Datalink layer usually supports variable-length frames Packet Packet Datalink Frames Datalink Physical Bits Physical  How can the receiver extract the frames from the received bit stream ? CNP3/2008.5. © O. Bonaventure, 2008
  • 7. Frame delineation  Naïve solutions  Use frame size to delineate frames  Insert frame size in frame header  Issue  What happens when errors affect frame payload and frame header ?  Use special character/bitstring to mark beginning/ end of frame  Example  all frames start with #  Issue  What happens when the special character/bitstring appears inside the frame payload ? CNP3/2008.5. © O. Bonaventure, 2008
  • 8. Character stuffing  Character stuffing  Suitable for frames containing an integer number of bytes  'DLE' 'STX' to indicate beginning of frame  'DLE' 'ETX' to indicate end of frame  When transmitting frame, sender replaces 'DLE' by 'DLE' 'DLE' if 'DLE' appears inside the frame  Receiver removes 'DLE' if followed by 'DLE'  Example  Packet : 1 2 3 'DLE' 4  Frame 'DLE' 'STX' 1 2 3 'DLE' 'DLE' 4 'DLE' 'ETX' CNP3/2008.5. © O. Bonaventure, 2008
  • 9. Bit stuffing  Alternative to character stuffing  Suitable for frames composed of n bits  01111110 used as marker at beginning and end of frame  Sender behaviour  If five bits set to ʻ1ʼ must be sent, sender adds a bit set to ʻ0ʼ immediately after the fifth bit set to ʻ1ʼ  Receiver behaviour  Counts the number of successive bits set to 1  6 successive bits set to 1 followed by 0 : marker  5 successive bits set to 1 followed by 0 : remove bit set to 0  Example  Packet : 0110111111111111111110010  Frame 01111110011011111011111011111011001001111110 CNP3/2008.5. © O. Bonaventure, 2008
  • 10. Frame delineation  Co-operation with physical layer  Some physical layers are able to transmit special physical codes that represent neither 0 nor 1  Example : Manchester coding 1 0 1 0 0 1 1 0 InvHInvB  invH (or N times invH) could be used to mark the beginning of a frame and invB (or N times invB) to mark the end of a frame CNP3/2008.5. © O. Bonaventure, 2008
  • 11. Frame delineation in practice  Most datalink protocols use  Character stuffing or bit stuffing  Character stuffing is preferred by software implementations  A length field in the frame header  A checksum or CRC in the header or trailer to detect transmission errors  A receiver frame is considered valid if  the correct delimiter appears at the beginning  the length is correct  the CRC/checksum is valid  the correct delimiter appears at the beginning CNP3/2008.5. © O. Bonaventure, 2008
  • 12. PPP : Point-to-Point Protocol  Goal  Allow the transmission of network layer (IP but also other protocols) packets over serial lines  modems, leased lines, ISDN, ...  Architecture  PPP is composed of three different protocols 1. PPP  transmission of data frames (e.g. IP packets) 2. LCP : Link Control Protocol • Negotiation of some options and authentication (username, password) and end of connection 3. NCP : Network Control Protocol • Negotiation of options related to the network layer protocol used above PPP (ex: IP address, IP address of DNS resolver, ...) CNP3/2008.5. © O. Bonaventure, 2008
  • 13. PPP (2)  PPP frame format Flag Address Control Checksum Flag 01111110 11111111 00000011 Protocol Packet 16bits/32bits 01111110 Identification of the network layer packet transported in the PPP frame  Mechanisms used by PPP  character stuffing for asynchronous lines  bit stuffing for synchronous lines  CRC for error detection  16 bits default but 32 bits CRC can be negotiated  No error correction by default  a reliable protocol can be negotiated  Data compression option  content of PPP frames can be compressed. To be negotiated at beginning of PPP connection CNP3/2008.5. © O. Bonaventure, 2008
  • 14. DataLink layer  Point-to datalink layer  How to transmit and receive frames  Local area networks  Optimistic Medium access control  ALOHA, CSMA, CSMA/CD, CSMA/CA  Ethernet networks  WiFi networks  Deterministic Medium access control  Token Ring, FDDI CNP3/2008.5. © O. Bonaventure, 2008
  • 15. Local area networks  How to efficiently connect N hosts together ?  Ideally we would like to have a single cable on each host while being able to reach all the others  Network topologies  Star-shaped network  Ring-shaped network  Bus-shaped network CNP3/2008.5. © O. Bonaventure, 2008
  • 16. Local area networks  Problems to be solved  How to identify the hosts attached to the LAN ?  The LAN is a shared resource  How to regulate access to this shared resource to provide :  fairness  All hosts should be able to use a fair fraction of the shared resource  performance  The shared resource should be used efficiently CNP3/2008.5. © O. Bonaventure, 2008
  • 17. Static allocation  Time Division Multiplexing A D B C T A B C DA B C D A B C D A B C D A B C D A B C D A B C D DA CNP3/2008.5. © O. Bonaventure, 2008
  • 18. Static allocation  Time Division Multiplexing A D B C T A B C DA B C D A B C D A B C D A B C D A B C D A B C D DA  No suitable for a computer network  Leads to low link utilisation and high delays  Computers generate bursty trafic  A more adaptive access control mechanism is required CNP3/2008.5. © O. Bonaventure, 2008
  • 19. Medium access control  Hypotheses  N stations need to share the same transmission channel  A single transmission channel is available  Definition  Collision  If two stations transmit their frame at the same time, their electrical signal appears on the channel and causes a collision  Options  Frame transmission  A station can transmit at any time  A station can only transmit at specific instants  Listening while transmitting  A station can listen while transmitting  A station cannot listen while transmitting CNP3/2008.5. © O. Bonaventure, 2008
  • 20. Medium access control  How to regulate access to the shared medium ?  Statistical or optimistic solutions  hosts can transmit frames at almost any time  if the low is low, the frames will arrive correctly at destination  if the low is high, frames may collide  distributed algorithm allows to recover from the collisions  Deterministic or pessimistic solutions  Collisions are expensive and need to be avoided Distributed algorithm distributes authorisations to transmit to ensure that a single host is allowed to transmit at any time  avoids collisions when load is high, but may delay transmission when load is low CNP3/2008.5. © O. Bonaventure, 2008
  • 21. DataLink layer  Point-to datalink layer  How to transmit and receive frames  Local area networks  Optimistic Medium access control  ALOHA, CSMA, CSMA/CD, CSMA/CA  Ethernet networks  WiFi networks  Deterministic Medium access control  Token Ring, FDDI CNP3/2008.5. © O. Bonaventure, 2008
  • 22. ALOHA  Problem  terminals need to exchange data with computer but phone lines are costly  Solution  Wireless network  upstream frequency shared by all terminals  terminals do not hear each other  downlink frequency reserved for computer CNP3/2008.5. © O. Bonaventure, 2008
  • 23. ALOHA (3)  How to organise frame transmission ?  If a host is alone, no problem  If two hosts transmit at the same time, a collision will occur and it will be impossible to decode their transmission A B CNP3/2008.5. © O. Bonaventure, 2008
  • 24. ALOHA (3)  How to organise frame transmission ?  If a host is alone, no problem  If two hosts transmit at the same time, a collision will occur and it will be impossible to decode their transmission A B CNP3/2008.5. © O. Bonaventure, 2008
  • 25. ALOHA (3)  How to organise frame transmission ?  If a host is alone, no problem  If two hosts transmit at the same time, a collision will occur and it will be impossible to decode their transmission A B CNP3/2008.5. © O. Bonaventure, 2008
  • 26. ALOHA (3)  How to organise frame transmission ?  If a host is alone, no problem  If two hosts transmit at the same time, a collision will occur and it will be impossible to decode their transmission A B collision CNP3/2008.5. © O. Bonaventure, 2008
  • 27. ALOHA (3)  How to organise frame transmission ?  If a host is alone, no problem  If two hosts transmit at the same time, a collision will occur and it will be impossible to decode their transmission A B collision CNP3/2008.5. © O. Bonaventure, 2008
  • 28. ALOHA (3)  Medium access algorithm  First solution N=1; while ( N<= max) do send frame; wait for ack on return channel or timeout: if ack on return channel exit while; else /* timeout */ /* retransmission is needed */ N=N+1; end do /* too many attempts */ CNP3/2008.5. © O. Bonaventure, 2008
  • 29. ALOHA (4)  Drawback  When two stations enter in collision, they may continue to collide after T0 T3 T3+timeout A B Collision T1 T2 T2+timeout  How to avoid this synchronisation among stations ? CNP3/2008.5. © O. Bonaventure, 2008
  • 30. ALOHA (5)  Improved algorithm  N=1; while ( N<= max) do send frame; wait for ack on return channel or timeout: if ack on return channel exit while; else /* timeout */ /* retransmission is needed */ wait for random time; N=N+1; end do /* too many attempts */ CNP3/2008.5. © O. Bonaventure, 2008
  • 31. Slotted ALOHA  How to improve ALOHA  Idea  Divide time in slots and force stations to only transmit frames at the beginning of slots  requires a common clock heard by all stations  decrease risk of collisions since a slot is either  empty (no frame)  full (a single frame was transmitted)  in collision (more than one frame was transmitted) CNP3/2008.5. © O. Bonaventure, 2008
  • 32. Slotted ALOHA  How to improve ALOHA  Idea  Divide time in slots and force stations to only transmit frames at the beginning of slots  requires a common clock heard by all stations  decrease risk of collisions since a slot is either  empty (no frame)  full (a single frame was transmitted)  in collision (more than one frame was transmitted) A B collision CNP3/2008.5. © O. Bonaventure, 2008
  • 33. Carrier Sense Multiple Access  How to improve slotted Aloha ?  Idea  Stations should be polite  Listens to the transmission channel before transmitting  Wait until the channel becomes free to transmit  Limitations  Politeness is only possible if all stations can listen to the transmission of all stations  true when all stations are attached to the same cable, but not in wireless networks CNP3/2008.5. © O. Bonaventure, 2008
  • 34. CSMA  CSMA  Carrier Sense Multiple Access N=1; while ( N<= max) do wait until channel becomes free; send frame immediately; wait for ack or timeout: if ack received exit while; else /* timeout */ /* retransmission is needed */ N=N+1; end do /* too many attempts */ CNP3/2008.5. © O. Bonaventure, 2008
  • 35. non-persistent CSMA  Idea  Transmitting a frame immediately after the end of the previous one is a very aggressive behaviour  If the channel is free, transmit  Otherwise wait some random time before listening again N=1; while ( N<= max) do listen channel; if channel is empty send frame; wait for ack or timeout if ack received exit while; else /* retransmission is needed */ N=N+1: else wait for random time; end do CNP3/2008.5. © O. Bonaventure, 2008
  • 36. p-persistent CSMA  Tradeoff between CSMA and non-persistent CSMA N=1; while ( N<= max) do listen channel; if channel is empty with probability p send frame; wait for ack or timeout if ack received exit while; else /* retransmission needed */ N=N+1; else wait for random time; end do CNP3/2008.5. © O. Bonaventure, 2008
  • 37. Improvements to CSMA  Problems with CSMA  If one bit of a frame is affected by a collision, the entire frame is lost  Solution  Stop the transmission of a frame as soon as a collision has been detected  How to detect collisions ?  Station listens to channel while transmitting  If there is no collision, it will hear the signal it transmits  If there is a collision, is will hear an incorrect signal  CSMA/CD  Carrier Sense Multiple Access with Collision CNP3/2008.5. Detection © O. Bonaventure, 2008
  • 38. CSMA/CD  Medium access control N=1; while ( N<= max) do wait until channel becomes free; send frame and listen; wait until (end of frame) or (collision) if collision detected stop transmitting; /* after a special jam signal */ else /* no collision detected */ wait for interframe delay; exit while; N=N+1; end do /* too many attempts */ CNP3/2008.5. © O. Bonaventure, 2008
  • 39. CSMA/CD : Example A B CNP3/2008.5. © O. Bonaventure, 2008
  • 40. CSMA/CD : Example A B 1 Start of frame CNP3/2008.5. © O. Bonaventure, 2008
  • 41. CSMA/CD : Example A B 1 Start of frame 2 Frame is propagated on LAN (5 microsecond per kilometer) CNP3/2008.5. © O. Bonaventure, 2008
  • 42. CSMA/CD : Example A B 1 Start of frame 2 Frame is propagated on LAN (5 microsecond per kilometer) 3 Frame stops at left side and first bit reaches B CNP3/2008.5. © O. Bonaventure, 2008
  • 43. CSMA/CD : Example A B 1 Start of frame 2 Frame is propagated on LAN (5 microsecond per kilometer) 3 Frame stops at left side and first bit reaches B 4 Frame leaves the LAN CNP3/2008.5. © O. Bonaventure, 2008
  • 44. CSMA/CD : Collisions A B CNP3/2008.5. © O. Bonaventure, 2008
  • 45. CSMA/CD : Collisions A B 1 Frame starts at A and B almost at the same time CNP3/2008.5. © O. Bonaventure, 2008
  • 46. CSMA/CD : Collisions A B 1 Frame starts at A and B almost at the same time Collision : at this point on the shared medium, it is impossible to decode the signal 2 CNP3/2008.5. © O. Bonaventure, 2008
  • 47. CSMA/CD : Collisions A B 1 Frame starts at A and B almost at the same time Collision : at this point on the shared medium, it is impossible to decode the signal 2 A detects the collision and stops transmitting its frame 3 CNP3/2008.5. © O. Bonaventure, 2008
  • 48. CSMA/CD : Collisions (2)  Advantages  Improves channel utilisation as stations do not transmit corrupted frames  a station can detect whether its frame was sent without collision  implicit acknowledgement if destination is up  when a collision is detected, automatic retransmission  Is it possible for a station to detect all collisions on all its frames ? CNP3/2008.5. © O. Bonaventure, 2008
  • 49. CSMA/CD : Collisions (3) A B CNP3/2008.5. © O. Bonaventure, 2008
  • 50. CSMA/CD : Collisions (3) A B 1 A and B send a small frame almost at the same time CNP3/2008.5. © O. Bonaventure, 2008
  • 51. CSMA/CD : Collisions (3) A B 1 A and B send a small frame almost at the same time 2 The two frame collide in the middle of the medium CNP3/2008.5. © O. Bonaventure, 2008
  • 52. CSMA/CD : Collisions (3) A B 1 A and B send a small frame almost at the same time 2 The two frame collide in the middle of the medium 3 A did not notice any collision B did not notice any collision They both consider that their frames were received correctly CNP3/2008.5. © O. Bonaventure, 2008
  • 53. CSMA/CD : Collisions (4)  How to ensure that all collisions are detected ?  Worst case scenario A B CNP3/2008.5. © O. Bonaventure, 2008
  • 54. CSMA/CD : Collisions (4)  How to ensure that all collisions are detected ?  Worst case scenario A B 1 Start of the frame sent by A CNP3/2008.5. © O. Bonaventure, 2008
  • 55. CSMA/CD : Collisions (4)  How to ensure that all collisions are detected ?  Worst case scenario A B 1 Start of the frame sent by A 2 After τ seconds, Aʼs frame reaches B A time τ−ε, B starts to transmit its own frame B notices the collision immediately and stops transmitting CNP3/2008.5. © O. Bonaventure, 2008
  • 56. CSMA/CD : Collisions (4)  How to ensure that all collisions are detected ?  Worst case scenario A B 1 Start of the frame sent by A 2 After τ seconds, Aʼs frame reaches B A time τ−ε, B starts to transmit its own frame B notices the collision immediately and stops transmitting 3 A detects collision at time τ+τ−ε CNP3/2008.5. © O. Bonaventure, 2008
  • 57. CSMA/CD : Collisions (5)  How can a station ensure that it will be able to detect all the collisions affecting its frames ?  Each frame must be transmitted for at least a duration equal to the two way delay (2∗τ)  As the throughput on a bus is fixed, if the two way delay is fixed, then all frames must be larger than a minimum frame size  Improvement  To ensure that all stations detect collisions, a station that notices a collision should send a jamming signal CNP3/2008.5. © O. Bonaventure, 2008
  • 58. Exponential backoff  How to deal with collisions ?  If the stations that collide retransmit together, a new collision will happen  Solution  Wait some random time after the collision  After collision, time is divided in slots  a slot = time required to send a minimum sized frame  After first collision, wait 0 or 1 slot before retransmitting  After first collision, wait 0, 1,2 or 3 slots before retransmitting  After first collision, wait 0..2i-1 slots before retransmitting CNP3/2008.5. © O. Bonaventure, 2008
  • 59. CSMA/CD with exponential backoff  Medium access control N=1; while ( N<= max) do wait until channel becomes free; send frame and listen; wait until (end of frame) or (collision) if collision detected stop transmitting; /* after a special jam signal */ k = min (10, N); r = random(0, 2k - 1) * slotTime; wait for r time slots; else /* no collision detected */ wait for interframe delay; exit while; N=N+1; end do /* too many attempts */ CNP3/2008.5. © O. Bonaventure, 2008
  • 60. CSMA with Collision Avoidance  Goal  Design a medium access control method suitable for wireless networks  on a wireless network, a sender cannot usually listen to its transmission (and thus CSMA/CD cannot be used)  Improvements to CSMA  Initial delay before transmitting if channel is empty  Extended Inter Frame Space (EIFS)  Minimum delay between two successive frames  Distributed Coordination Function Inter Frame Space (DIFS)  Delay between frame reception and ack transmission  Short Inter Frame Spacing (SIFS, SIFS< DIFS < EIFS) CNP3/2008.5. © O. Bonaventure, 2008
  • 61. CSMA/CA (1)  Sender N=1; while ( N<= max) do if (previous frame corrupted) { wait until channel free during t>=EIFS; } else { wait until endofframe; wait until channel free during t>=DIFS; } send data frame ; wait for ack or timeout: if ack received exit while; else /* timeout retransmission is needed */ N=N+1; end do /* too many attempts */ CNP3/2008.5. © O. Bonaventure, 2008
  • 62. CSMA/CA (2)  Receiver While (true) { Wait for data frame; if not(duplicate) { deliver (frame) } wait during SIFS; send ack (frame) ; } CNP3/2008.5. © O. Bonaventure, 2008
  • 63. CSMA/CA : Example B C A CNP3/2008.5. © O. Bonaventure, 2008
  • 64. CSMA/CA : Example B C A DIFS CNP3/2008.5. © O. Bonaventure, 2008
  • 65. CSMA/CA : Example B C A DIFS Data frame CNP3/2008.5. © O. Bonaventure, 2008
  • 66. CSMA/CA : Example B C A DIFS Data frame SIFS CNP3/2008.5. © O. Bonaventure, 2008
  • 67. CSMA/CA : Example B C A DIFS Data frame SIFS ACK frame CNP3/2008.5. © O. Bonaventure, 2008
  • 68. CSMA/CA : Example B C A DIFS Data frame Busy SIFS ACK frame CNP3/2008.5. © O. Bonaventure, 2008
  • 69. CSMA/CA : Example B C A DIFS Data frame Busy SIFS ACK frame CNP3/2008.5. © O. Bonaventure, 2008
  • 70. CSMA/CA : Example B C A DIFS Data frame Busy SIFS ACK frame DIFS Data frame CNP3/2008.5. © O. Bonaventure, 2008
  • 71. CSMA/CA : Problem B C A CNP3/2008.5. © O. Bonaventure, 2008
  • 72. CSMA/CA : Problem B C A DIFS DIFS CNP3/2008.5. © O. Bonaventure, 2008
  • 73. CSMA/CA : Problem B C A DIFS DIFS Busy Data frame Data frame Busy CNP3/2008.5. © O. Bonaventure, 2008
  • 74. CSMA/CA : Problem B C A DIFS DIFS Busy Data frame Data frame Busy Timeout Timeout CNP3/2008.5. © O. Bonaventure, 2008
  • 75. CSMA/CA : Problem B C A DIFS DIFS Busy Data frame Data frame Busy Timeout Timeout Data frame Data frame Busy CNP3/2008.5. © O. Bonaventure, 2008
  • 76. CSMA/CA First improvement (2)  Sender N=1; while ( N<= max) do if (previous frame corruped) { wait until channel free during t>=EIFS; } else { wait until endofframe; wait until channel free during t>=DIFS; } backoff_time = int(random[0,min(255,7*2N-1)])*T wait(backoff_time) if (channel still free) { send data frame ; wait for ack or timeout: if ack received exit while; else /* timeout retransmission is needed */ N=N+1; } end do CNP3/2008.5. © O. Bonaventure, 2008
  • 77. CSMA/CA : Example 2 A B C CNP3/2008.5. © O. Bonaventure, 2008
  • 78. CSMA/CA : Example 2 A B C DIFS DIFS CNP3/2008.5. © O. Bonaventure, 2008
  • 79. CSMA/CA : Example 2 A B C DIFS DIFS Backoff[0,7] Backoff[0,7] CNP3/2008.5. © O. Bonaventure, 2008
  • 80. CSMA/CA : Example 2 A B C DIFS DIFS Backoff[0,7] Backoff[0,7] Data frame SIFS Ack frame CNP3/2008.5. © O. Bonaventure, 2008
  • 81. CSMA/CA : Example 2 A B C DIFS DIFS Backoff[0,7] Backoff[0,7] Data frame Channel busy! SIFS Busy Ack frame Data frame CNP3/2008.5. © O. Bonaventure, 2008
  • 82. CSMA/CA : Example 2 A B C DIFS DIFS Backoff[0,7] Backoff[0,7] Data frame Channel busy! SIFS Busy Ack frame End of backoff Data frame CNP3/2008.5. © O. Bonaventure, 2008
  • 83. CSMA/CA Hidden station problem  Often occurs in wireless networks B Hears A and C C A Only hears B, not C Hears B, but not A CNP3/2008.5. © O. Bonaventure, 2008
  • 84. CSMA/CA Second improvement  Principle  Allow the sender to “reserve” some air time  Special (short) RTS frame indicates duration  Using a short RTS frame reduces the risk of collisions while transmitting this frame  Allow the receiver to confirm the reservation  Special (short) CTS frame indicates reservation  Using a short CTS frame reduces the risk of collisions while transmitting this frame  The stations that could collide with the transmission will hear at least CTS  Frame contains an indication of transmission time CNP3/2008.5. © O. Bonaventure, 2008
  • 85. CSMA/CA : Example 3 A B C CNP3/2008.5. © O. Bonaventure, 2008
  • 86. CSMA/CA : Example 3 A B C DIFS+Backoff CNP3/2008.5. © O. Bonaventure, 2008
  • 87. CSMA/CA : Example 3 A B C DIFS+Backoff RTS [100 microsec] CNP3/2008.5. © O. Bonaventure, 2008
  • 88. CSMA/CA : Example 3 A B C DIFS+Backoff RTS [100 microsec] SIFS CTS[100microsec] Busy[ 100microsec+ SIFS+ CTS+ SIFS+ ACK ] CNP3/2008.5. © O. Bonaventure, 2008
  • 89. CSMA/CA : Example 3 A B C DIFS+Backoff RTS [100 microsec] SIFS CTS[100microsec] Busy[ 100microsec+ SIFS SIFS+ CTS+ Data [100 microsec] SIFS+ ACK ] SIFS ACK frame CNP3/2008.5. © O. Bonaventure, 2008
  • 90. Datalink layer  Point-to datalink layer  Local area networks  Optimistic Medium access control  ALOHA, CSMA, CSMA/CD, CSMA/CA  Ethernet networks  Basics of Ethernet  IP over Ethernet  Interconnection of Ethernet networks  WiFi networks  Deterministic Medium access control CNP3/2008.5.  Token Ring, FDDI © O. Bonaventure, 2008
  • 91. Ethernet/802.3  Most widely used LAN  First developed by Digital, Intel and Xerox  Standardised by IEEE and ISO  Medium Access Control  CSMA/CD with exponential backoff  Characteristics  Bandwidth: 10 Mbps  Two ways delay  51.2 microsec on Ethernet/802.3  => minimum frame size : 512 bits  Cabling  10Base5 : (thick) coaxial cable maximum 500 m,100 stations  10Base2 : (thin) coaxial 200 m maximum and 30 stations CNP3/2008.5. © O. Bonaventure, 2008
  • 92. Ethernet/802.3 A B C D  Initial configuration  bus-shaped network  Remaining problems besides CSMA/CD  What is an Ethernet frame ?  How does station A sends a frame to station B ?  How does station B detects a frame  How to support broadcast ?  How to support multicast ? CNP3/2008.5. © O. Bonaventure, 2008
  • 93. Ethernet Addresses (2)  Each Ethernet adapter has a unique Ethernet address  ensures that two hosts on the same LAN will not use the same Ethernet address  Ethernet Addressing format  48 bits addresses  Source Address 00 24 bits OUI 24 bits (adapter manufacturer) (identifier of adapter)  Destination address  If high order bit is 0, host unicast address  If high order bit is 1, host multicast address  broadcast address = 111111..111 CNP3/2008.5. © O. Bonaventure, 2008
  • 94. LAN-level multicast  Principle  Two types of destination Ethernet addresses  Physical addresses  identifies one Ethernet adapter  Logical addresses  identifies a logical group of Ethernet destinations 48 bits OUI 0 : physical address (unicast) 1 : logical address (multicast)  Transmission of multicast frame  sender transmits frame with multicast destination addr.  Reception of multicast frames  Ethernet adapters can be configured to capture frames whose destination address is  Their unicast address  One of a set of multicast addresses CNP3/2008.5. © O. Bonaventure 2008
  • 95. Ethernet Frames  DIX Format  proposed by Digital, Intel and Xerox Preamble [8 bytes] Destination address Source address Type [2 bytes] Data [46-1500 bytes CRC [32 bits] CNP3/2008.5. © O. Bonaventure, 2008
  • 96. Ethernet Frames  DIX Format  proposed by Digital, Intel and Xerox Preamble Used to mark the beginning of the frame [8 bytes] Allows the receiver to synchronise its clock to the senderʼs clock Destination address Source address Type [2 bytes] Data [46-1500 bytes CRC [32 bits] CNP3/2008.5. © O. Bonaventure, 2008
  • 97. Ethernet Frames  DIX Format  proposed by Digital, Intel and Xerox Preamble Used to mark the beginning of the frame [8 bytes] Allows the receiver to synchronise its clock to the senderʼs clock Destination address Source address Type Indication of the type of packet contained [2 bytes] inside the frame Data [46-1500 bytes CRC [32 bits] CNP3/2008.5. © O. Bonaventure, 2008
  • 98. Ethernet Frames  DIX Format  proposed by Digital, Intel and Xerox Preamble Used to mark the beginning of the frame [8 bytes] Allows the receiver to synchronise its clock to the senderʼs clock Destination address Source address Type Indication of the type of packet contained [2 bytes] inside the frame Data Upper layer protocol must ensure that [46-1500 bytes the payload of the Ethernet frame is at least 46 bytes and at most 1500 bytes CRC [32 bits] CNP3/2008.5. © O. Bonaventure, 2008
  • 99. 802.3 Frames Preamble [7 bytes] Delimiter[1byte] Destination Address Source Address Length [2 bytes] Data and padding [ 46- 1500 bytes] CRC [32 bits] CNP3/2008.5. © O. Bonaventure, 2008
  • 100. 802.3 Frames Preamble Used to mark the beginning of the frame [7 bytes] Allows the receiver to synchronise its Delimiter[1byte] clock to the senderʼs clock Destination Address Source Address Length [2 bytes] Data and padding [ 46- 1500 bytes] CRC [32 bits] CNP3/2008.5. © O. Bonaventure, 2008
  • 101. 802.3 Frames  Ethernet 802.3  standardised by IEEE Preamble Used to mark the beginning of the frame [7 bytes] Allows the receiver to synchronise its Delimiter[1byte] clock to the senderʼs clock Destination Address Source Address Length [2 bytes] Data and padding [ 46- 1500 bytes] CRC [32 bits] CNP3/2008.5. © O. Bonaventure, 2008
  • 102. 802.3 Frames  Ethernet 802.3  standardised by IEEE Preamble Used to mark the beginning of the frame [7 bytes] Allows the receiver to synchronise its Delimiter[1byte] clock to the senderʼs clock Destination Address Source Address Provides the real length of the network Length layer packet placed inside the payload. [2 bytes] 802.3 adds padding (bytes set to 0) to ensure that the data field of the frame Data contains at least 46 bytes and padding [ 46- 1500 bytes] CRC [32 bits] CNP3/2008.5. © O. Bonaventure, 2008
  • 103. Ethernet and 802.3 : details  How can the receiver identify the type of network protocol packet inside the frame ?  Ethernet : thanks to Type field  802.3 : no Type field !  IEEE standard  Divide datalink layer in two sublayers  Medium Access Control (MAC)  lower sublayer responsible for the frame transmission and medium access control (CSMA/CD)  interacts with but does not depend from the physical layer  example : 802.3  Logical Link Control (LLC)  higher sublayer responsible for the exchange of frames with the higher layers  interacts with the higher layer  does not depend from the MAC layer  several variants of LLC exist CNP3/2008.5. © O. Bonaventure, 2008
  • 104. 802.2 : LLC  LLC Type 1  Unreliable connectionless service  Addition to 802.3  New LLC header allows to identify upper layer protocol  similar to Type field of Ethernet DIX Packet LLC Packet LLC P DA SA L LLC Packet CRC MAC  LLC Type 2  Reliable transmission with acknowledgements  An example of a protocol developed by a standardisation body but used by nobody... CNP3/2008.5. © O. Bonaventure, 2008
  • 105. Ethernet Service  An Ethernet network provides a connectionless unreliable service  Transmission modes  unicast  multicast  broadcast  Even if in theory the Ethernet service is unreliable, a good Ethernet network should  deliver frames to their destination with a very hig probability of delivery  not reorder the transmitted frames  reordering is obviously impossible on a bus CNP3/2008.5. © O. Bonaventure, 2008
  • 106. Datalink layer  Point-to datalink layer  Local area networks  Optimistic Medium access control  ALOHA, CSMA, CSMA/CD, CSMA/CA  Ethernet networks  Basics of Ethernet  IP over Ethernet  Interconnection of Ethernet networks  WiFi networks  Deterministic Medium access control CNP3/2008.5.  Token Ring, FDDI © O. Bonaventure, 2008
  • 107. IPover PPP and IP over Ethernet IP: 10.0.0.1 Ethernet PPP IP: 10.0.1.9 IP: 10.0.0.2 R IP: 10.0.1.1 Eth : B Eth : A IP IP PPP PPP Eth Eth Modem Modem 10base5 10base5 CNP3/2008.5. © O. Bonaventure, 2008
  • 108. IPover PPP and IP over Ethernet IP: 10.0.0.1 Ethernet PPP IP: 10.0.1.9 IP: 10.0.0.2 R IP: 10.0.1.1 Eth : B Eth : A IP IP PPP PPP Eth Eth Modem Modem 10base5 10base5 PPP Header IP Header PPP Trailer F Addr Ctrl Protocol S:10.0.0.1 D:10.0.1.9 CRC F 0xFF 0x0021 IP 0x8021 NCP for IP CNP3/2008.5. © O. Bonaventure, 2008
  • 109. IPover PPP and IP over Ethernet IP: 10.0.0.1 Ethernet PPP IP: 10.0.1.9 IP: 10.0.0.2 R IP: 10.0.1.1 Eth : B Eth : A IP IP PPP PPP Eth Eth Modem Modem 10base5 10base5 PPP Header IP Header PPP Trailer F Addr Ctrl Protocol S:10.0.0.1 D:10.0.1.9 CRC F Ethernet header IP header Ethernet 0xFF 0x0021 IP 0x8021 NCP for IP P S:A D: B Type S:10.0.0.1 D:10.0.1.9 CRC 0x0800 IP CNP3/2008.5. © O. Bonaventure, 2008
  • 110. IP on LANs  Problems to be solved  How to encapsulate IP packets in frames ?  How to find the LAN address of the IP destination ?  LAN efficiently supports broadcast/multicast transmission  When a host needs to find the LAN address of another IP host, it broadcasts a request  The owner of the destination IP address will reply and provided its LAN address  LAN doesnʼt efficiently support broadcast/ multicast  Maintain a server storing IP address:MAC address pairs  Each host knows serverʼs MAC address and registers its address pair  Each host sends request to server to map IP addresses CNP3/2008.5. © O. Bonaventure, 2008
  • 111. Address Resolution Protocol 1 IP: 10.0.1.22 IP: 10.0.1.11 IP: 10.0.1.8 IP: 10.0.1.9 Eth : A Eth : E Eth : C Eth : B 10.0.1.22 needs to send an IP packet to 10.0.1.8 CNP3/2008.5. © O. Bonaventure, 2008
  • 112. Address Resolution Protocol 1 IP: 10.0.1.22 IP: 10.0.1.11 IP: 10.0.1.8 IP: 10.0.1.9 Eth : A Eth : E Eth : C Eth : B 10.0.1.22 needs to send an IP packet to 10.0.1.8 2 IP: 10.0.1.22 IP: 10.0.1.11 IP: 10.0.1.8 IP: 10.0.1.9 Eth : A Eth : E Eth : C Eth : B ARP : broadcast frame Addr Eth 10.0.1.8 ? CNP3/2008.5. © O. Bonaventure, 2008
  • 113. Address Resolution Protocol 1 IP: 10.0.1.22 IP: 10.0.1.11 IP: 10.0.1.8 IP: 10.0.1.9 Eth : A Eth : E Eth : C Eth : B 10.0.1.22 needs to send an IP packet to 10.0.1.8 2 IP: 10.0.1.22 IP: 10.0.1.11 IP: 10.0.1.8 IP: 10.0.1.9 Eth : A Eth : E Eth : C Eth : B ARP : broadcast frame Addr Eth 10.0.1.8 ? 3 IP: 10.0.1.22 IP: 10.0.1.11 IP: 10.0.1.8 IP: 10.0.1.9 Eth : A Eth : E Eth : C Eth : B 10.0.1.8 replies in an Ethernet frame and A knows the MAC address to send its IP packet CNP3/2008.5. © O. Bonaventure, 2008
  • 114. ARP frame format Preamble [7 bytes] Delimiter[1byte] Destination Address Source Address Type: 0x806 Header Sender MAC Sender IP Target MAC Target IP CNP3/2008.5. CRC [32 bits] © O. Bonaventure, 2008
  • 115. ARP frame format Preamble [7 bytes] Delimiter[1byte] Destination Broadcast : 111...111 Address Source Address Type: 0x806 Header Sender MAC Sender IP Target MAC Target IP CNP3/2008.5. CRC [32 bits] © O. Bonaventure, 2008
  • 116. ARP frame format Preamble [7 bytes] Delimiter[1byte] Destination Broadcast : 111...111 Address Source MAC address of the sender Address Type: 0x806 Header Sender MAC Sender IP Target MAC Target IP CNP3/2008.5. CRC [32 bits] © O. Bonaventure, 2008
  • 117. ARP frame format Preamble [7 bytes] Delimiter[1byte] Destination Broadcast : 111...111 Address Source MAC address of the sender Address Common header for all ARP frames Type: 0x806 - Hardware type  Ethernet is 1 - Protocol type , IP is 0x0800. Header - Hardware length : length of MAC address - Protocol length : length of network layer address Sender MAC - Operation : 1 for request, 2 for reply, 3 for RARP request, and 4 for RARP reply. Sender IP Target MAC Target IP CNP3/2008.5. CRC [32 bits] © O. Bonaventure, 2008
  • 118. Optimisations  When should a host send ARP requests ?  Before sending each IP packet ?  No, each host/router maintains an ARP table that contains the mapping between IP addresses and Ethernet addresses. An ARP request is only sent when the ARP table is empty  How to deal with hosts that change their addresses ?  Expiration timer is associated to each entry in the ARP table  Line of ARP table is removed upon timer expiration.  Some implementations send an ARP request to revalidate it before removing the line  Some implementations remember when ARP lines have been used to avoid removing an important entry CNP3/2008.5. © O. Bonaventure, 2008
  • 119. IP over Ethernet : Example IP: 10.0.1.9/24 IP: 10.0.1.8/24 Default R: 10.0.1.1 IP: 10.0.1.22/24 Default R: 10.0.1.1 Default R: 10.0.1.1 Eth : B Eth : C ARP Table Eth : A ARP Table ARP Table empty empty empty IP: 10.0.1.1/24 Eth : R ARP Table empty R  Transmission of an IP packet from 10.0.1.22 to 10.0.1.9  Transmission of an IP packet from 10.0.1.22 to 10.0.2.9 CNP3/2008.5. © O. Bonaventure, 2008
  • 120. IPv6 over Ethernet  Neighbour discovery / address resolution 1 IPv6: 1080:0:0:0:8:A IPv6: 1080:0:0:0:8:E Ipv6: 1080:0:0:0:8:C Eth : A Eth : E Eth : C 1080:0:0:0:8:A wants to send a packet to 1080:0:0:0:8:C 2 IPv6: 1080:0:0:0:8:A IPv6: 1080:0:0:0:8:E Ipv6: 1080:0:0:0:8:C Eth : A Eth : E Eth : C Neighbor solicitation: Addr Eth 1080:0:0:0:8:C ? sent to IPv6 multicast address 3 IPv6: 1080:0:0:0:8:E IPv6: 1080:0:0:0:8:A Eth : A Eth : E Ipv6: 1080:0:0:0:8:C Eth : C Neighbor advertisement: 1080:0:0:0:8:C is reachable via Ethernet Add : C CNP3/2008.5. © O. Bonaventure 2008
  • 121. ICMPv6 Neighbour Discovery • Replacement for IPv4ʼs ARP • Neighbour solicitation • Sent to Type : 135 Code:0 Checksum Reserved Target IPv6 Address • Neighbour advertisement Type : 136 Code:0 Checksum RSO Reserved Target IPv6 Address Target link layer Address CNP3/2008.5. © O. Bonaventure 2008
  • 122. ICMPv6 Neighbour Discovery • Replacement for IPv4ʼs ARP • Neighbour solicitation • Sent to Type : 135 Code:0 Checksum The IPv6 address for which the link-layer Reserved (e.g. Ethernet) address is needed. Target IPv6 Address May also contain an optional field with the link-layer (e.g. Ethernet) address of the sender. • Neighbour advertisement Type : 136 Code:0 Checksum RSO Reserved Target IPv6 Address Target link layer Address CNP3/2008.5. © O. Bonaventure 2008
  • 123. ICMPv6 Neighbour Discovery • Replacement for IPv4ʼs ARP • Neighbour solicitation • Sent to Type : 135 Code:0 Checksum The IPv6 address for which the link-layer Reserved (e.g. Ethernet) address is needed. Target IPv6 Address May also contain an optional field with the link-layer (e.g. Ethernet) address of the sender. • Neighbour advertisement Type : 136 Code:0 Checksum RSO Reserved The IPv6 and link-layer addresses Target IPv6 Address Target link layer Address CNP3/2008.5. © O. Bonaventure 2008
  • 124. ICMPv6 Neighbour Discovery • Replacement for IPv4ʼs ARP • Neighbour solicitation • Sent to Type : 135 Code:0 Checksum The IPv6 address for which the link-layer Reserved (e.g. Ethernet) address is needed. Target IPv6 Address May also contain an optional field with the link-layer (e.g. Ethernet) address of the sender. • Neighbour advertisement R : true if node is a router S : true if answers to a neighbour solicitation Type : 136 Code:0 Checksum RSO Reserved The IPv6 and link-layer addresses Target IPv6 Address Target link layer Address CNP3/2008.5. © O. Bonaventure 2008
  • 125. IPv6 autoconfiguration  How can a node obtain its IPv6 address ?  Manual configuration  From a server by using DHCPv6 as in IPv4 • Automatically • Router advertises prefix on LAN by sending ICMPv6 messages to “all IPv6 hosts” multicast address • Hosts build their address by concatenating the prefix with their MAC Address converted in 64 bits format CNP3/2008.5. © O. Bonaventure 2008
  • 126. IPv6 autoconfiguration  How can a node obtain its IPv6 address ?  Manual configuration  From a server by using DHCPv6 as in IPv4 • Automatically • Router advertises prefix on LAN by sending ICMPv6 messages to “all IPv6 hosts” multicast address • Hosts build their address by concatenating the prefix with their MAC Address converted in 64 bits format R Prefix= 2001:6a8:3080:1/64 Ethernet : 0800:200C:417A CNP3/2008.5. © O. Bonaventure 2008
  • 127. IPv6 autoconfiguration  How can a node obtain its IPv6 address ?  Manual configuration  From a server by using DHCPv6 as in IPv4 • Automatically • Router advertises prefix on LAN by sending ICMPv6 messages to “all IPv6 hosts” multicast address • Hosts build their address by concatenating the prefix with their MAC Address converted in 64 bits format R Prefix= 2001:6a8:3080:1/64 IPv6 address : 2001:6a8:3080:1:M64(800:200C:417A) Ethernet : 0800:200C:417A CNP3/2008.5. © O. Bonaventure 2008
  • 128. Router advertisements Ver Tclass Flow Label Payload Length 58 255 Router IPv6 address (link local) FF02::1 (all nodes) Type:134 Code : 0 Checksum CurHLim M O Res Router lifetime Reachable Time Retrans Timer Options CNP3/2008.5. © O. Bonaventure 2008
  • 129. Router advertisements Maximum hop limit to avoid spoofed packets from outside LAN Ver Tclass Flow Label Payload Length 58 255 Router IPv6 address (link local) FF02::1 (all nodes) Type:134 Code : 0 Checksum CurHLim M O Res Router lifetime Reachable Time Retrans Timer Options CNP3/2008.5. © O. Bonaventure 2008
  • 130. Router advertisements Maximum hop limit to avoid spoofed packets from outside LAN Ver Tclass Flow Label Value of hop limit to be used by hosts when Payload Length 58 255 sending IPv6 packets Router IPv6 address (link local) FF02::1 (all nodes) Type:134 Code : 0 Checksum CurHLim M O Res Router lifetime Reachable Time Retrans Timer Options CNP3/2008.5. © O. Bonaventure 2008
  • 131. Router advertisements Maximum hop limit to avoid spoofed packets from outside LAN Ver Tclass Flow Label Value of hop limit to be used by hosts when Payload Length 58 255 sending IPv6 packets Router IPv6 address The lifetime associated with the default router in (link local) units of seconds. 0 is the router sending the advertisement is not a default router. FF02::1 (all nodes) Type:134 Code : 0 Checksum CurHLim M O Res Router lifetime Reachable Time Retrans Timer Options CNP3/2008.5. © O. Bonaventure 2008
  • 132. Router advertisements Maximum hop limit to avoid spoofed packets from outside LAN Ver Tclass Flow Label Value of hop limit to be used by hosts when Payload Length 58 255 sending IPv6 packets Router IPv6 address The lifetime associated with the default router in (link local) units of seconds. 0 is the router sending the advertisement is not a default router. FF02::1 (all nodes) The time, in milliseconds, that a node assumes a Type:134 Code : 0 Checksum neighbour is reachable after having received a CurHLim M O Res Router lifetime reachability confirmation. Reachable Time Retrans Timer The time, in milliseconds, between retransmitted Neighbor Solicitation messages. Options CNP3/2008.5. © O. Bonaventure 2008
  • 133. Router advertisements Maximum hop limit to avoid spoofed packets from outside LAN Ver Tclass Flow Label Value of hop limit to be used by hosts when Payload Length 58 255 sending IPv6 packets Router IPv6 address The lifetime associated with the default router in (link local) units of seconds. 0 is the router sending the advertisement is not a default router. FF02::1 (all nodes) The time, in milliseconds, that a node assumes a Type:134 Code : 0 Checksum neighbour is reachable after having received a CurHLim M O Res Router lifetime reachability confirmation. Reachable Time Retrans Timer The time, in milliseconds, between retransmitted Neighbor Solicitation messages. Options MTU to be used on the LAN Prefixes to be used on the LAN CNP3/2008.5. © O. Bonaventure 2008
  • 134. Router advertisements options • Format of the options Type Length Options Options (cont.) • MTU option Type : 5 Length:1 Reserved MTU • Prefix option Type : 3 Length:4 PreLen L A Res. Valid Lifetime Preferred Lifetime Reserved2 IPv6 prefix CNP3/2008.5. © O. Bonaventure 2008
  • 135. Router advertisements options • Format of the options Type Length Options Options (cont.) • MTU option Type : 5 Length:1 Reserved MTU • Prefix option Type : 3 Length:4 PreLen L A Res. Number of bits in IPv6 prefix that identify subnet Valid Lifetime Preferred Lifetime Reserved2 IPv6 prefix CNP3/2008.5. © O. Bonaventure 2008
  • 136. Router advertisements options • Format of the options Type Length Options Options (cont.) • MTU option Type : 5 Length:1 Reserved MTU • Prefix option Type : 3 Length:4 PreLen L A Res. Number of bits in IPv6 prefix that identify subnet Valid Lifetime Preferred Lifetime Reserved2 The validity period of the prefix in seconds IPv6 prefix CNP3/2008.5. © O. Bonaventure 2008
  • 137. Router advertisements options • Format of the options Type Length Options Options (cont.) • MTU option Type : 5 Length:1 Reserved MTU • Prefix option Type : 3 Length:4 PreLen L A Res. Number of bits in IPv6 prefix that identify subnet Valid Lifetime Preferred Lifetime Reserved2 The validity period of the prefix in seconds IPv6 prefix The duration in seconds that addresses generated from the prefix via stateless address autoconfiguration remain preferred. CNP3/2008.5. © O. Bonaventure 2008
  • 138. IPv6 autoconfiguration (2)  What happens when an endsystem boots ?  It knows nothing about its current network  but needs an IPv6 address to send ICMPv6 messages R Ethernet : 0800:200C:417A FE80::M64(800:200C:417A) ))  Use Link-local IPv6 address (FE80::/64)  Each host, when it boots, has a link-local IPv6 address  But another node might have chosen the same address ! CNP3/2008.5. © O. Bonaventure 2008
  • 139. IPv6 autoconfiguration (2)  What happens when an endsystem boots ?  It knows nothing about its current network  but needs an IPv6 address to send ICMPv6 messages R ICMPv6 : Neighbour Solicitation Sent to multicast address Is someone using IPv6 address : Ethernet : 0800:200C:417A FE80::M64(800:200C:417A) ? FE80::M64(800:200C:417A) )) Address is valid if nobody answers  Use Link-local IPv6 address (FE80::/64)  Each host, when it boots, has a link-local IPv6 address  But another node might have chosen the same address ! CNP3/2008.5. © O. Bonaventure 2008
  • 140. IPv6 autoconfiguration (2)  How to obtain the IPv6 prefix of the subnet ? • Wait for router advertisements (e.g. 30 seconds) • Solicit router advertisement R ICMPv6 : Router Solicitation IPv6 Src: FE80::M64(800:200C:417A) Ethernet : 0800:200C:417A IPv6 Dest: FF02::2 FE80::M64(800:200C:417A) CNP3/2008.5. © O. Bonaventure 2008
  • 141. IPv6 autoconfiguration (3)  Router will re-advertise prefix R Ethernet : 0800:200C:417A FE80::M64(800:200C:417A)  IPv6 addresses can be allocated for limited lifetime  This allows IPv6 to easily support renumbering CNP3/2008.5. © O. Bonaventure 2008
  • 142. IPv6 autoconfiguration (3)  Router will re-advertise prefix R ICMPv6 : Router Advertisement IPv6 Src: FE80::M64(EthernetR) IPv6 Dest: FF02::1 IPv6 Prefix = 2001:6a8:1100::/48 Ethernet : 0800:200C:417A Prefix lifetime FE80::M64(800:200C:417A)  IPv6 addresses can be allocated for limited lifetime  This allows IPv6 to easily support renumbering CNP3/2008.5. © O. Bonaventure 2008
  • 143. Privacy issues with IPv6 address autoconfiguration • Issue • Autoconfigured IPv6 addresses contain the MAC address of the hosts • MAC addresses are fixed and unique • A laptop/user could be identified by tracking the lower 64 bits of its IPv6 addresses • How to maintain privacy with IPv6 ? • Use DHCPv6 and configure server to never reallocate the same IPv6 address • Allow hosts to use random host ids in lower 64 bits of their IPv6 address • algorithms have been implemented to generate such random host ids on nodes with and without stable storage CNP3/2008.5. © O. Bonaventure 2008
  • 144. Datalink layer  Point-to datalink layer  Local area networks  Optimistic Medium access control  ALOHA, CSMA, CSMA/CD, CSMA/CA  Ethernet networks  Basics of Ethernet  IP over Ethernet  Interconnection of Ethernet networks  WiFi networks  Deterministic Medium access control CNP3/2008.5.  Token Ring, FDDI © O. Bonaventure, 2008
  • 145. Ethernet today  The coaxial cable is not used anymore  Ethernet cabling today  Structured twisted pair cabling  Optical fiber for some point-to-point links  Ethernet organisation  Not anymore a bus  Ethernet is now a star-shaped network ! CNP3/2008.5. © O. Bonaventure, 2008
  • 146. Ethernet with structured cabling  How to perform CSMA/CD in a star-shaped network ? Hub : receives electrical signal on one port, regenerates this signal and forwards it over all other ports besides the port from which it received it Collision domain : set of stations that could be in collision CNP3/2008.5. © O. Bonaventure, 2008
  • 147. Hub and the reference model  A hub is a relay operating the physical layer Datalink Datalink Physical Physical Host A Hub Host B CNP3/2008.5. © O. Bonaventure, 2008
  • 148. Ethernet with structured cabling (2)  How to build a larger Ethernet network ?  Interconnect hubs together Hub Hub Hub Hub Issue : maximum 51.2 microsec delay between any pair of stations CNP3/2008.5. Collision domain : entire network © O. Bonaventure, 2008
  • 149. Ethernet with structured cabling (2)  How to build a larger Ethernet network ?  Interconnect hubs together Hub Hub Hub Hub Issue : maximum 51.2 microsec delay between any pair of stations CNP3/2008.5. Collision domain : entire network © O. Bonaventure, 2008
  • 150. Ethernet Switch  Can we improve the performance of hubs ?  Ethernet switch  Operates in the datalink layer  understands MAC address and filters frames based on their addresses Eth : C Eth : A Address Port Src:A Dst:B A West B South Eth : B C East CNP3/2008.5. © O. Bonaventure, 2008
  • 151. Ethernet Switch  Can we improve the performance of hubs ?  Ethernet switch  Operates in the datalink layer  understands MAC address and filters frames based on their addresses Eth : C Eth : A Address Port A West B South Src:A Dst:B Eth : B C East CNP3/2008.5. © O. Bonaventure, 2008
  • 152. Switch in the reference model  A switch is a relay that operates in the datalink layer Network Network Datalink Datalink Physical Phys. Phys. Physical Host A Switch Host B CNP3/2008.5. © O. Bonaventure, 2008
  • 153. Port-address table  How to build the port-address table used by Ethernet switches ?  Manually  Works in a lab, but Ethernet must be plug and play  Automatically  Frame source address allows switch to learn the location of hosts  What happens when a destination address cannot be found in the port-address table ?  But be careful to age the information inside tables as some hosts move from one port to another  How to forward broadcast frames ?  How to forward multicast frames ? CNP3/2008.5. © O. Bonaventure, 2008
  • 154. Frame processing  Basic operation of an Ethernet switch Arrival of frame F on port P src=F.Source_Address; dst=F.Destination_Address; UpdateTable(src, P); // src heard on port P if (dst==broadcast) || (dst is multicast) { for(Port p!=P) // forward all ports ForwardFrame(F,p); } else { if(dst isin AddressPortTable) { ForwardFrame(F,AddressPortTable(dst)); } else { for(Port p!=P) // forward all ports ForwardFrame(F,p); } } CNP3/2008.5. © O. Bonaventure, 2008
  • 155. Network redundancy  How to design networks that survive link and node failures ?  Add redundant switches Address Port A West B South Eth : C C East Eth : A Src:A Dst:C Address Port A West Address Port B South A North C North B South Eth : B CNP3/2008.5. C East © O. Bonaventure, 2008
  • 156. Network redundancy  How to design networks that survive link and node failures ?  Add redundant switches Address Port A West B South Eth : C C East Src:A Dst:C Eth : A Address Port A West Address Port B South A North C North B South Eth : B CNP3/2008.5. C East © O. Bonaventure, 2008
  • 157. Network redundancy (2)  Does this always work ?  Assume all switches have rebooted Address Port Eth : C Eth : A Src:A Dst:C Address Port Address Port Eth : B CNP3/2008.5. © O. Bonaventure, 2008
  • 158. Network redundancy (2)  Does this always work ?  Assume all switches have rebooted Address Port Eth : C Eth : A Src:A Dst:C Address Port Address Port Eth : B CNP3/2008.5. © O. Bonaventure, 2008
  • 159. How to solve this problem ? CNP3/2008.5. © O. Bonaventure, 2008
  • 160. How to solve this problem ?  The lawyerʼs way  Add a sticker on all switches to indicate that they must only be used in tree shaped networks and should never ever be interconnected with loops CNP3/2008.5. © O. Bonaventure, 2008
  • 161. How to solve this problem ?  The lawyerʼs way  Add a sticker on all switches to indicate that they must only be used in tree shaped networks and should never ever be interconnected with loops  The computer scientistʼs way  Define a distributed algorithm that allows switches to automatically discover the links causing loops and remove them from the topology CNP3/2008.5. © O. Bonaventure, 2008
  • 162. Principle of the solution  Build a spanning tree inside network  Each switch has a unique identifier  The switch with the lowest id is the root  Disable all links that do not belong to spanning tree Switch 2 Switch 1 Switch 9 Switch 44 CNP3/2008.5. © O. Bonaventure, 2008 Switch 7 Switch 22
  • 163. How to build the spanning tree  Distributed algorithm run by switches  Goals of the spanning tree protocol  Elect the root of the spanning tree  In practice, this will be the switch with the lowest id  Compute the distance between each switch and the root  When several switches are attached to the same LAN elect one forwarder and disable the others  determine which ports/links should belong to the spanning CNP3/2008.5. © O. Bonaventure, 2008
  • 164. Root and Designated Switches  Root switch  The Root Switch is the root of the spanning tree  The Root switch may change upon the arrival of new switches in the network Switch 1  Designated switch  to avoid loops, only one switch should be responsible for Switch 9 Switch 4 forwarding frames from the root on any link  Root switch is always designated switch for all its links CNP3/2008.5. © O. Bonaventure, 2008
  • 165. Root and Designated Switches  Root switch  The Root Switch is the root of the spanning tree  The Root switch may change upon the arrival of new switches in the network Switch 1  Designated switch  to avoid loops, only one switch should be responsible for Switch 9 Switch 4 forwarding frames from the root on any link  Root switch is always designated switch for all its links CNP3/2008.5. © O. Bonaventure, 2008
  • 166. The switch identifiers CNP3/2008.5. © O. Bonaventure, 2008
  • 167. The switch identifiers  Switch identifiers must be unique  The easiest solution is to ask each manufacturer to embed a unique Ethernet address on each switch CNP3/2008.5. © O. Bonaventure, 2008
  • 168. The switch identifiers  Switch identifiers must be unique  The easiest solution is to ask each manufacturer to embed a unique Ethernet address on each switch  But since the switch with the lowest identifier is the network root, network operators need to influence the selection of the root switch CNP3/2008.5. © O. Bonaventure, 2008
  • 169. The switch identifiers  Switch identifiers must be unique  The easiest solution is to ask each manufacturer to embed a unique Ethernet address on each switch  But since the switch with the lowest identifier is the network root, network operators need to influence the selection of the root switch  64 bits switch identifier  Upper 16 bits  Priority defined by operator (default value : 32768)  Lower 48 bits  Unique Ethernet address assigned by manufacturer CNP3/2008.5. © O. Bonaventure, 2008
  • 170. The link costs  Each switch port is attached to a link  The costs of the links can be configured on each link by the network operator  Common guideline : Cost = 1000 / bandwidth  Recommended values of link costs Bandwidth Recommended Recommended link cost range link cost value 10 Mbps 50-600 100 100 Mbps 10-60 19 1000 Mbps 3-10 4 CNP3/2008.5. © O. Bonaventure, 2008
  • 171. Building the spanning tree  802.1d protocol  802.1d uses Bridge PDUs (BPDUs) containing  Root ID : identifier of the current root switch  Cost : Cost of the shortest path between the switch transmitting the BPDU and the root switch  Transmitting ID : identifier of the switch that transmits the BPDU  The BPDUs are sent by switches over their attached LANs as multicast frames but they are never forwarded  switches that implement 802.1d listen to a special Ethernet multicast group CNP3/2008.5. © O. Bonaventure, 2008
  • 172. Ordering of BPDUs  BPDUs can be strictly ordered  BPDU11[R=R1,C=C1, T=T1] is better than BPDU2 [R=R2,C=C2, T=T2] if  R1<R2  R1=R2 and C1<C2  R1=R2 and C1=C2 and T1<T2  Example BPDU1 BPDU2 R1 C1 T1 R2 C2 T2 29 15 35 31 12 32 35 80 39 35 80 40 35 15 80 35 18 38 CNP3/2008.5. © O. Bonaventure, 2008
  • 173. Building the spanning tree (2)  Behaviour of 802.1d protocol  The root switch sends regularly BPDUs on all its ports  R=Root switch id, C=0, T= Root switch id  Bootstrap  If a switch does not receive BPDUs, it considers itself as root and sends BPDUs  On each port, a switch parses all the received BPDUs and stores the best BPDU received on each port  Each switch can easily determiner the current root by analysing all the BPDUs stored in its tables  A switch stops sending BPDUs on a port if it received a better BPDU on this port  802.1d stabilises when a single switch sends a BPDU over each LAN CNP3/2008.5. © O. Bonaventure, 2008
  • 174. 802.1d port states  802.1d port state based on received BPDUs  Root port  port on which the best 802.1d BPDU was received  port used to receive the BPDUs sent by the root form the shortest path  A root port does not transmit BPDUs  Only one root port on each switch  Designated port  port(s) used to send switchʼs BPDU upon reception of a BPDU from the root via the Root port  Switchʼs BPDU is  current root, cost to reach root, switch identifier  0, one or more designated ports on each switch  a port is designated if the switchʼs BPDU is better than the best BPDU received on this port  Blocked port (only receives 802.1d BPDUs) CNP3/2008.5. © O. Bonaventure, 2008
  • 175. 802.1d port states (2)  Example  BPDUs received by switch 18 Root Cost Transmitter port1 12 93 51 port2 12 85 47 port3 81 0 81 port4 15 31 27  Root : switch 12  port2 is the root port  Switchʼs BPDU  R=12, C=86, T=18  This BPDU is better than the BPDUs received on the other ports. They are thus designated CNP3/2008.5. © O. Bonaventure, 2008
  • 176. 802.1d port states (3)  Example  BPDUs received by switch 92 Root Cost Transmitter port1 81 0 81 port2 41 19 125 port3 41 12 315 port4 41 12 111 port5 41 13 90  root : 41  root port : port4  Switchʼs BPDU  R=41,C=13, T=92  Port state  port1 and port 2 : designated  port 3 and port 5 : blocked CNP3/2008.5. © O. Bonaventure, 2008
  • 177. Port activity  A port can be either active or inactive for data frames  Active port  The switch captures Ethernet frames on its active ports and forwards them over other ports (based on its own port/address tables)  The switch updates its port/address table based on the frames received on this port  Inactive port  The switch does not listen to frames neither forward frames on this port  The port activity is fixed once the spanning tree has converged  Root and designated ports become active  Blocked ports become inactive  Duration spanning tree computation, all ports are CNP3/2008.5. inactive © O. Bonaventure, 2008
  • 178. Port states and activity Receive Transmit BPDUs BPDUs Blocked yes no Root yes no Designated yes yes Learn Forward Data Addresses Frames Inactive no no Active yes yes CNP3/2008.5. © O. Bonaventure, 2008
  • 179. Example network  Compute the spanning tree in this network by using 802.1d Switch 7 Switch 9 Switch 12  Assume that 9 boots and then 12 CNP3/2008.5. and eventually 7 boots © O. Bonaventure, 2008
  • 180. Impact of failures  What kind of failures should be considered ?  Failure (power-off) of the root switch  A new root needs to be elected  Failure of a designated switch  Another switch should replace the designated one  Failure of a link  If the network is redundant, a disabled link should be enabled to cope with the failure  Failure of a link that disconnects the network  We now have two different networks and a root switch must be elected in each network CNP3/2008.5. © O. Bonaventure, 2008
  • 181. How to deal with failures ?  Failure detection mechanisms  Root switch sends its BPDU every Hello timer and designated switches generate their own BPDUs upon reception of this BPDU  Default Hello timer is two seconds  BPDUs stored in the switches age and are removed when they timeout  Failure notification mechanism  When a switch detects an important failure, it sends a topology change (TC) BPDU to the Root  Upon reception of a TC BPDU all switches stop forwarding data frames and recompute spanning CNP3/2008.5. tree © O. Bonaventure, 2008
  • 182. Ethernet Evolution  Networks require higher bandwidth  Fast Ethernet  Physical layer  bandwidth : 100 Mbps  twisted pair or optical fiber  No coaxial cable anymore  MAC sublayer  CSMA/CD unchanged  minimum frame size : 512 bits  slot time : 5.12 micro seconds  Maximum distance : shorter than Ethernet 10 Mbps  Same frame format as 10 Mbps Ethernet CNP3/2008.5. © O. Bonaventure, 2008
  • 183. Ethernet Evolution (2)  Gigabit Ethernet  Physical layer  Bandwidth 1 Gbps  Optical fiber or twisted pair  MAC sublayer  CSMA/CD still supported  How was this achieved ?  Two options  Increase minimum frame size : not backward compatible with Ethernet  Reduce the maximum distance as for FastEthernet : but then networks would have a diameter of 10 m  Gigabit CSMA/CD hack  minimum frame size is still 512 bits but the sender must continue to send an electrical signal during the equivalent o 4096 bits  same frame format as Ethernet  but extensions allow to transmit Jumbo frames of up to 9KBytes CNP3/2008.5. © O. Bonaventure, 2008
  • 184. The Ethernet zoo 10BASE5 Thick coaxial cable, 500m 10BASE2 Thin coaxial cable, 185m 10BASE-T Two pairs of category 3+ UTP 10BASE-F 10 Mb/s over optical fiber 100BASE-TX Category 5 UTP or STP, 100 m maximum 100BASE-FX Two multimode optical fiber, 2 km maximum 1000BASE-CX Two pairs shielded twisted pair, 25m maximum 1000BASE-SX Two multimode or single mode optical fibers with lasers 10 Gbps optical fiber but also cat 6 twisted pair 40-100 Gbps being developed, standard expected in 2010, 40Gbps one meter long for switch backplanes, 10 meters for copper cable and 100 meters for fiber optics CNP3/2008.5. © O. Bonaventure, 2008
  • 185. Full duplex Ethernet  Observations  In many networks, Ethernet is a often a point-to- point technology  host-to-switch  switch to switch S1 S2 HUB HUB  Twisted-pairs and fiber-based physical layers allow to send and receive at the same time CNP3/2008.5. © O. Bonaventure, 2008
  • 186. Ethernet full duplex (2)  No collision is possible on a full duplex Ethernet/FastEthernet/GigabitEthernet link  Disable CSMA/CD on such links  Advantages  Improves bandwidth  Both endpoints can transmit frames at the same time  CSMA/CD is disabled  No constraint on propagation delay anymore  Ethernet network can be as large as we want !  No constraint on minimum frame size anymore  We do not need the frame extension hack for Gigabit Ethernet! CNP3/2008.5. © O. Bonaventure, 2008
  • 187. Full duplex Ethernet (3)  Drawback  If CSMA/CD is disabled, access control is disabled and congestion can occur Server S1 S2 Client FastEthernet (100 Mbps) Ethernet (10 Mbps)  How to solve this problem inside Ethernet ?  Add buffers to switches  but infinite buffers are impossible and useless anyway  Cause collisions (e.g. jamming) to force collisions on the inter- switch link and uplink is server is too fast  Drawback : interswitch link could be entirely blocked  Develop a new flow control mechanism inside MAC layer  Pause frame to slowdown transmission CNP3/2008.5. © O. Bonaventure, 2008
  • 188. Ethernet flow control server Client S1 FastEthernet Ethernet (100 Mbps) (10 Mbps) 100 nsec Frame2 [10000 bits] Frame1 [10000 bits] Frame3 [10000 bits] PAUSE [2msec] 1 microsec Sender blocked Frame2 [10000 bits]  PAUSE frame indicates how much time the upstream should wait before transmitting next frame CNP3/2008.5. © O. Bonaventure, 2008
  • 189. Ethernet flow control server Client S1 FastEthernet Ethernet (100 Mbps) (10 Mbps) 100 nsec Frame1 [10000 bits] Frame2 [10000 bits] Frame1 [10000 bits] Frame3 [10000 bits] PAUSE [2msec] 1 microsec Sender blocked Frame2 [10000 bits]  PAUSE frame indicates how much time the upstream should wait before transmitting next frame CNP3/2008.5. © O. Bonaventure, 2008
  • 190. Virtual LANs  Allows to build several logical networks on top of a single physical network  Each port on each switch is A B associated to a particular VLAN  All the hosts that reside on the same VLAN can exchange Ethernet frames  A host on VLAN1 cannot send an C S F Ethernet frame towards another host that belongs to VLAN2  Broadcast and multicast frames are D E only sent to the members of the VLAN VLAN1 : A,E,F VLAN2 : B,C,D CNP3/2008.5. © O. Bonaventure, 2008
  • 191. VLANs in campus networks  How to support VLANs in a campus network  Possible solutions A  Place on each switch a table B that maps each MAC address on a VLAN id  difficult to manage this table C S1 S2 F  Change frame format used on inter-switch links to include a VLAN identifier  new header added by first switch D E  new header removed by last switch VLAN1 : A,E,F VLAN2 : B,C,D CNP3/2008.5. © O. Bonaventure, 2008
  • 192. VLAN frame format  Used on inter-switch links Destination Address Source Address Type Payload CRC [32 bits]  Can also be used by trusted hosts (e.g. servers) CNP3/2008.5. or routers © O. Bonaventure, 2008
  • 193. VLAN frame format  Used on inter-switch links Destination Address Source Address VLAN Protocol Id 0x8100 Tag Control Info Type Payload CRC [32 bits]  Can also be used by trusted hosts (e.g. servers) CNP3/2008.5. or routers © O. Bonaventure, 2008
  • 194. VLAN frame format  Used on inter-switch links Destination Address Source Address VLAN Identifies the frame as containing VLANtag Protocol Id 0x8100 Tag Control Info Type Payload CRC [32 bits]  Can also be used by trusted hosts (e.g. servers) CNP3/2008.5. or routers © O. Bonaventure, 2008
  • 195. VLAN frame format  Used on inter-switch links Destination Address Source Address VLAN Identifies the frame as containing VLANtag Protocol Id 0x8100 Tag control information contains two types of information : Tag Control Info - VLAN identifier (12 bits) : up to 4094 different VLANs can be defined Type - Priority (3 bits) : indicates the importance of the frame and can be used by switches to provide a better service for some frames Payload (e.g. Voice) CRC [32 bits]  Can also be used by trusted hosts (e.g. servers) CNP3/2008.5. or routers © O. Bonaventure, 2008
  • 196. Datalink layer  Point-to datalink layer  Local area networks  Optimistic Medium access control  ALOHA, CSMA, CSMA/CD, CSMA/CA  Ethernet networks  Basics of Ethernet  IP over Ethernet  Interconnection of Ethernet networks  WiFi networks  Deterministic Medium access control CNP3/2008.5.  Token Ring, FDDI © O. Bonaventure, 2008
  • 197. Modes of operation  Ad hoc or Independent Basic Service Set CNP3/2008.5. © O. Bonaventure, 2008
  • 198. Modes of operation  Ad hoc or Independent Basic Service Set  Infrastructure mode CNP3/2008.5. © O. Bonaventure, 2008
  • 199. Modes of operation  Ad hoc or Independent Basic Service Set  Infrastructure mode BSS BSS CNP3/2008.5. © O. Bonaventure, 2008
  • 200. Modes of operation  Ad hoc or Independent Basic Service Set  Infrastructure mode BSS BSS CNP3/2008.5. ESS © O. Bonaventure, 2008
  • 201. Modes of operation  Ad hoc or Independent Basic Service Set  Infrastructure mode DS BSS BSS CNP3/2008.5. ESS © O. Bonaventure, 2008
  • 202. The WiFi zoo Standard Frequency Typical Raw Range in/out throughput bandwidth (m) 802 .11 2.4 GHz 0.9 Mbps 2 Mbps 20 / 100 802 .11a 5 GHz 23 Mbps 54 Mbps 35 / 120 802 .11b 2.4 GHz 4.3 Mbps 11 Mbps 38 / 140 802 .11g 2.4 GHz 19 Mbps 54 Mbps 38 / 140 802 .11n 2.4 / 5 GHz 74 Mbps up to 600 70 / 250 Mbps CNP3/2008.5. © O. Bonaventure, 2008
  • 203. WiFi zoo and performance  Performance issues with the multiple WiFi transmission rates  802.11, 802.11b and 802.11g operate on 2.4 GHz frequency bands  Many access points are multi-standard 54 Mbps CNP3/2008.5. © O. Bonaventure, 2008
  • 204. WiFi zoo and performance  Performance issues with the multiple WiFi transmission rates  802.11, 802.11b and 802.11g operate on 2.4 GHz frequency bands  Many access points are multi-standard 54 Mbps Laptop supporting only 802.11b CNP3/2008.5. © O. Bonaventure, 2008
  • 205. WiFi zoo and performance  Performance issues with the multiple WiFi transmission rates  802.11, 802.11b and 802.11g operate on 2.4 GHz frequency bands  Many access points are multi-standard 11 Mbps 54 Mbps Laptop supporting only 802.11b CNP3/2008.5. © O. Bonaventure, 2008
  • 206. WiFi zoo and performance  Performance issues with the multiple WiFi transmission rates  802.11, 802.11b and 802.11g operate on 2.4 GHz frequency bands  Many access points are multi-standard 11 Mbps Laptop far away 54 Mbps Laptop supporting only 802.11b CNP3/2008.5. © O. Bonaventure, 2008
  • 207. WiFi zoo and performance  Performance issues with the multiple WiFi transmission rates  802.11, 802.11b and 802.11g operate on 2.4 GHz frequency bands  Many access points are multi-standard 1 Mbps 11 Mbps Laptop far away 54 Mbps Laptop supporting only 802.11b CNP3/2008.5. © O. Bonaventure, 2008
  • 208. Practical issues with WLAN deployments  Home environment  A WLAN can interfere with the neighbourʼs CNP3/2008.5. WLAN © O. Bonaventure, 2008
  • 209. Practical issues with WLAN deployments  Enterprise networks  One access points can interfere with many other CNP3/2008.5. access points © O. Bonaventure, 2008
  • 210. The WiFi channel frequencies  WiFi standards operate on several frequencies called channels  Usually about a dozen channels  Why multiple channels ?  Some channels my be affected by interference and have a lower performance  Some frequencies are reserved for specific usage in some countries  Allows frequency reuse when there are multiple WiFi networks in the same area  Unfortunately, many home access points operate by default on the same factory set channel which causes interference and reduced bandwidth CNP3/2008.5. © O. Bonaventure, 2008
  • 211. WLAN in enterprise environments  What could be done to improve the performance of WLANs ?  Reduce interference as much as possible  Tune channel frequencies  Reduce transmission power  Similar to techniques used in GSM networks  Recent deployments rely on centralised controllers CNP3/2008.5. and thin access points © O. Bonaventure, 2008
  • 212. WLAN in enterprise environments  What could be done to improve the performance of WLANs ?  Reduce interference as much as possible  Tune channel frequencies  Reduce transmission power  Similar to techniques used in GSM networks  Recent deployments rely on centralised controllers CNP3/2008.5. and thin access points © O. Bonaventure, 2008
  • 213. WLAN in enterprise environments  What could be done to improve the performance of WLANs ?  Reduce interference as much as possible  Tune channel frequencies  Reduce transmission power  Similar to techniques used in GSM networks  Recent deployments rely on centralised controllers CNP3/2008.5. and thin access points © O. Bonaventure, 2008
  • 214. Datalink layer  Point-to datalink layer  Local area networks  Optimistic Medium access control  ALOHA, CSMA, CSMA/CD, CSMA/CA  Ethernet networks  Basics of Ethernet  IP over Ethernet  Interconnection of Ethernet networks  WiFi networks  Deterministic Medium access control CNP3/2008.5.  Token Ring, FDDI © O. Bonaventure, 2008
  • 215. Ring networks S2 S1 unidirectional ring S3 Interface S5 S4  Problem to be solved  How to share fairly ring transmission capacity among all devices attached to the ring ? CNP3/2008.5. © O. Bonaventure, 2008
  • 216. Ring networks (2) CNP3/2008.5. © O. Bonaventure, 2008
  • 217. Ring networks (2)  How to share transmission capacity ?  To avoid collisions, only one station should be able to transmit a frame at any time  The station that has the right to transmit must own a special frame called token CNP3/2008.5. © O. Bonaventure, 2008
  • 218. Ring networks (2)  How to share transmission capacity ?  To avoid collisions, only one station should be able to transmit a frame at any time  The station that has the right to transmit must own a special frame called token  How can stations exchange token ?  Token is a special frame that can be sent over the ring network  A station that needs to transmit a data frame can  capture the token and remove it from the ring  send one or more data frames  send the token back on the ring to allow other stations to capture it and transmit CNP3/2008.5. © O. Bonaventure, 2008
  • 219. Ring networks (3)  Consequence  When there are no data frames sent, stations should continuously exchange the token S1 S2  How to achieve this ?  A station must relay the electrical signal it receives Unidirectional ring upstream when not S3 transmitting Interface  it introducing a delay of one S5 bit transmission time  If all stations behave so, S4 and token is small, token will travel permanently  If token is not small, increase the delay on the token ring network CNP3/2008.5. © O. Bonaventure, 2008
  • 220. Ring networks (4)  Data frame transmission  A data frame requires a longer transmission time than the ring delay S1 S2  Sender behaviour  Captures token  Sends data frame  Removes data frame S3 from ring  Sends token S5 S4 CNP3/2008.5. © O. Bonaventure, 2008
  • 221. Ring networks in practice  Two types of ring LANs  Token Ring  Invented by IBM  Standardised by IEEE/ISO (802.5)  Ring build with point-to-point twisted pair links  4 Mbps  16 Mbps  Some work for 100 Mbps Token Ring  Fiber Distributed Data Interface (FDDI)  First data networks built with optical fiber  standardised by ANSI  100 Mbps  up to 200 km and 1000 stations  Other ring technologies exist and are used  SONET/SDH  DPT CNP3/2008.5. © O. Bonaventure, 2008
  • 222. Token Ring (1)  Token  travels permanently on ring when stations are idle  Size 24 bits  Minimum delay on ring  24 bits transmission times  Actual ring delay  Each station introduces a one-bit transmission time delay  Physical links have a propagation delay  Each ring contains a monitor station that measures delay during ring initialisation and adds delay if needed  Interfaces  Two modes of operation  Listen : interface adds a one bit transmission delay  Transmit : only if station owns the token CNP3/2008.5. © O. Bonaventure, 2008
  • 223. Token Ring (2)  Frame format  Token (24 bits)  SD : starting delimiter  invalid physical layer symbol with Manchester coding 1 1 1  AC : Access control SD AC ED  ED : ending de fin  invalid physical layer symbol with Manchester coding  Data frame 1 1 1 (2or)6 (2 or)6 0... (nolimit) 4 1 1 SD AC FC Dest Source Data CRC ED FS  FC : Frame control  Allows to distinguish between control frames and data frames  FS : Frame status CNP3/2008.5. © O. Bonaventure, 2008
  • 224. Token Ring (3) Frame transmission S2 Delay 1 bit S1 Listen mode Unidirectional Ring S3 Transmit mode Interface To From S5 Station Station S4  How to capture the token ?  Rely on Token bit of AC field and one bit delay CNP3/2008.5. © O. Bonaventure, 2008
  • 225. Token Ring (4)  Whatʼs special about Token Ring  Can efficiently support acknowledgements  Frame Status contains two bits : A and C  A and C are set to 0 when transmitting a frame  When a receiver sees one frame destined to itself, it sets A to 1  When a receiver copies one frame destined to itself inside its buffers, it sets C to 1  Data frame (and FS) return to sender. By checking A and C, it knows that :  if A=0 and C=0, destination is down  if A=1 and C=0, destination is up, but congested  if A=1 and C=1, frame was received by destination CNP3/2008.5. © O. Bonaventure, 2008
  • 226. Token Ring (5)  Issues with Token Ring  How to ensure fairness ?  A station should not be allowed to transmit indefinitely  Token Holding Time  Maximum time during which a station can own the token and transmit data frames without releasing the token  Default : 10 milliseconds  How to bootstrap the Token Ring ?  Which station sends the first token ?  How to ensure that the Ring delay is long enough ?  What happens when a station fails ?  If it did not own the token, no issue  If it owned the token while failing, then  Which station will remove the current data frame from the ring ?  Which station will send the token on the ring ? CNP3/2008.5. © O. Bonaventure, 2008
  • 227. Token Ring (6) CNP3/2008.5. © O. Bonaventure, 2008
  • 228. Token Ring (6)  How to bootstrap a Token Ring ?  Complex problem  Main idea  One station should send the token  The first station on the ring hears nothing and notices that there is a problem. It sends a special frame called CLAIM_TOKEN  If it receives the frame back, it becomes the monitor  Each station must be able to become monitor CNP3/2008.5. © O. Bonaventure, 2008
  • 229. Token Ring (6)  How to bootstrap a Token Ring ?  Complex problem  Main idea  One station should send the token  The first station on the ring hears nothing and notices that there is a problem. It sends a special frame called CLAIM_TOKEN  If it receives the frame back, it becomes the monitor  Each station must be able to become monitor  Monitorʼs responsibilities  Ensure that token is never lost or corrupted  Insert an artificial delay of 24 bit transmission times on the ring  Remove orphan and looping frames  If the monitor fails, the ring must be bootstrapped again © O. Bonaventure, 2008 CNP3/2008.5.
  • 230. Token Ring (7) CNP3/2008.5. © O. Bonaventure, 2008
  • 231. Token Ring (7)  Token surveillance  Monitor checks how often its sees the token  If there are N stations on the ring, then the monitor should see the token at worst every N*THT seconds  If token is lost, monitor cuts ring, removes electrical signal and resend a new token CNP3/2008.5. © O. Bonaventure, 2008
  • 232. Token Ring (7)  Token surveillance  Monitor checks how often its sees the token  If there are N stations on the ring, then the monitor should see the token at worst every N*THT seconds  If token is lost, monitor cuts ring, removes electrical signal and resend a new token  Orphan frames  Frame with invalid coding or incomplete frame  monitor cuts ring, removes electrical signal and resend a new token CNP3/2008.5. © O. Bonaventure, 2008
  • 233. Token Ring (7)  Token surveillance  Monitor checks how often its sees the token  If there are N stations on the ring, then the monitor should see the token at worst every N*THT seconds  If token is lost, monitor cuts ring, removes electrical signal and resend a new token  Orphan frames  Frame with invalid coding or incomplete frame  monitor cuts ring, removes electrical signal and resend a new token  Looping frames  Every time monitor sees a frame, it sets its Monitor bit of the AC field to 1  All stations send their frames with Monitor=0  If a frame is seen twice by the monitor, it cuts ring, removes electrical signal and resend a new token CNP3/2008.5. © O. Bonaventure, 2008
  • 234. FDDI  Network topology FDDI  Single ring like Token Ring  Two counter rotating rings to deal with failures S2 S1 S3 S5 Usually, only one ring is used S4 CNP3/2008.5. © O. Bonaventure, 2008
  • 235. FDDI  Network topology FDDI  Single ring like Token Ring  Two counter rotating rings to deal with failures Failure S2 S1 S3 S5 Usually, only one ring is used S4 CNP3/2008.5. © O. Bonaventure, 2008
  • 236. FDDI  Network topology FDDI  Single ring like Token Ring  Two counter rotating rings to deal with failures Bypass to reroute Failure around failure S2 S1 S3 S5 Usually, only one ring is used S4 CNP3/2008.5. © O. Bonaventure, 2008
  • 237. FDDI (2)  Medium access control  Token based access control  A station can only transmit a data frame provided that it owns the token  Token Holding Time (THT)  maximum duration of transmission  Token Rotation Time (TRT)  maximal delay for a token to rotate around the entire ring  TRT ≤ Actives_Stations * THT + Ring_Latency  When should the Token be released  Immediately after removal of the data frame sent  as in Token Ring  Immediately after transmission of the data transfer, without waiting for it to come back  solution chosen for FDDI due to the high bandwidth and long latency of the FDDI ring CNP3/2008.5. © O. Bonaventure, 2008
  • 238. FDDI (3)  Delay sensitive service  How to support two types of frames in FDDI ?  normal data frames (asynchronous frames)  example : file transfer, email, www  delay sensitive data frames (synchronous frames)  example : telephone, videoconference  Solution  Delay sensitive frames can be supported provided that a FDDI ring can bound the transmission delay of such a frame  synchronous frames should be transmitted earlier than normal frames on each station  Since a station can always transmit when it captures the token, a solution should bound the Token Rotation Time to provide strict guarantees to delay sensitive frames CNP3/2008.5. © O. Bonaventure, 2008
  • 239. FDDI (4)  How to bound the TRT ?  Target Token Rotation Time (TTRT)  At ring initialisation, all stations propose their expected TTRT and the smallest proposed value is chosen  All stations must control their transmissions such that the token rotation time is always smaller than TTRT  each station measures the current TRT  When a station captures the token, it can send its synchronous frames  there is a maximum amount of synchronous frames that can be sent by each station. This maximum is negotiated by using control frames.  If after having sent synchronous frames TRT < TTRT, this means that the token is circulating quickly and the station can send asynchronous frames  Otherwise the token must be released CNP3/2008.5. © O. Bonaventure, 2008
  • 240. FDDI (5)  Frame format Start of Frame [8 bits] Control [8 bits] Frame type (1 bit) synchronous or asynchronous 48 bits addresses Destination Type of addresses 16 bits or 48 bits Protocol Type information Source 6 bits, similar to Type Ethernet DIX special types for control frames and token Maximum 4478 bytes Data CRC [32 bits] End of Frame [8 bits] Similar to A and C bits in Token Ring Status [24 bits] CNP3/2008.5. © O. Bonaventure, 2008
  • 241. Interconnection of Token Rings  How to interconnect Token Ring networks ? S1 S2 S7 S5 Bridge/Switch S4 S9  Possible solutions  Use the spanning tree designed for Ethernet CNP3/2008.5.  Invent a new protocol © O. Bonaventure, 2008  solution chosen by IBM for Token Ring
  • 242. Interconnection of Token Rings (2) S1 S7 S5 S9  Basic idea  Use source routing  Problems  How to identify the paths  How to discover the paths ? CNP3/2008.5. © O. Bonaventure, 2008
  • 243. Interconnection of Token Rings (3) S1 S7 LAN1 LAN5 B3 S5 S9 B6 B1 LAN3 B4  Identification of paths  Each LAN has one unique identifier  Each bridge has one identifier  Each path is a list of pairs LAN#,bridge# CNP3/2008.5. © O. Bonaventure, 2008
  • 244. Interconnection of Token Rings (4) S1 S7 LAN1 B3 LAN5 S5 B6 S9 B1 B4 LAN3  How to discover the path ?  Control frame : all paths explorer  Sent by source towards destination  Forwarded by all bridges that add their identifier and LAN identifier  Destination sends back the ape frame to source by using reverse path  Each station caches the recent paths CNP3/2008.5. © O. Bonaventure, 2008
  • 245. Spanning Tree versus Source Routing  Spanning tree  Source routing  complexity in  complexity in all switches/bridges stations  only a subset of the  the entire network is network is used used  entirely transparent  requires support on stations  multicast natively  spanning tree supported required for multicast  few control frames  many control frames (802.1d) can be required CNP3/2008.5. © O. Bonaventure, 2008

Editor's Notes

  • #2: 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.
  • #20: Packet 1 : 1 2 3 &apos;DLE&apos; 4 Frame 1 : &apos;DLE&apos; &apos;STX&apos; 1 2 3 &apos;DLE&apos; &apos;DLE&apos; 4 &apos;DLE&apos; &apos;ETX&apos; Packet 2 : &apos;DLE&apos; &apos;STX&apos; &apos;DLE&apos; &apos;ETX&apos; Frame 2 : &apos;DLE&apos; &apos;STX&apos; &apos;DLE&apos; &apos;DLE&apos; &apos;STX&apos; &apos;DLE&apos; &apos;DLE&apos; &apos;DLE&apos; &apos;ETX&apos; Packet 3 : &apos;STX&apos; &apos;DLE&apos; Frame 3 : &apos;DLE&apos; &apos;STX&apos; &apos;STX&apos; &apos;DLE&apos; &apos;DLE&apos; &apos;DLE&apos; &apos;ETX&apos; &apos;DLE&apos; &apos;STX&apos; 1 2 3 &apos;DLE&apos; &apos;DLE&apos; 4 &apos;DLE&apos; &apos;ETX&apos; &apos;DLE&apos; &apos;STX&apos; &apos;DLE&apos; &apos;DLE&apos; &apos;STX&apos; &apos;DLE&apos; &apos;DLE&apos; &apos;DLE&apos; &apos;ETX&apos; &apos;DLE&apos; &apos;STX&apos; &apos;STX&apos; &apos;DLE&apos; &apos;DLE&apos; &apos;DLE&apos; &apos;ETX&apos;
  • #24: W. Simpson and Editor. The point-to-point protocol (PPP). Request for Comments 1661, Internet Engineering Task Force, July 1994. W. Simpson and Editor. PPP in HDLC-like framing. Request for Comments 1662, Internet Engineering Task Force, July 1994. There is an older protocol called SLIP
  • #33: ALOHA is discussed in N. Abramson, The ALOHA system &amp;#x2013; another alternative for Computer Communications, Proc. Fall Joint Computer Conference, AFIPCS Conference 1970 N. Abramson, Development of the Alohanet, IEEE Transactions on Information Theory, Vol IT-31, No. 3, pp. 119-123
  • #58: CSMA/CD is described in R. Metcalfe and D. Boggs. Ethernet: Distributed packet-switching for local computer networks. Communications of the ACM, 19(7):395--404, 1976. available from http://www.acm.org/pubs/citations/journals/cacm/1976-19-7/p395-metcalfe/
  • #59: The interframe delay is used to ensure that the electronics of the receiver can be synchronised to the transmitted signal. A typical interframe delay is 9.6&amp;#xB5;sec
  • #77: CSMA/CA is used by 802.11, see LAN/MAN Standards Committee of the IEEE Computer Society. IEEE Standard for Information Technology - Telecommunications and information exchange between systems - local and metropolitan area networks - specific requirements - Part 11 : Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. IEEE, 1999. available from http://standards.ieee.org/getieee802/802.11.html . A short but detailed description of CSMA/CA may be found in M. Schwartz, Mobile Wireless Communications, Cambridge University Press, 2005
  • #98: The value T is defined in the standard, but a detailed discussion of this value is outside the scope of this presentation.
  • #116: LAN/MAN Standards Committee of the IEEE Computer Society. IEEE Standard for Information Technology - Telecommunications and information exchange between systems - local and metropolitan area networks - specific requirements - Part 3 : Carrier Sense multiple access with collision detection (CSMA/CD) access method and physical layer specification. IEEE, 2000. available from http://standards.ieee.org/getieee802/802.3.html
  • #118: Ethernet addresses are usually printed as hexadecimal numbers, e.g. alpha.infonet.fundp.ac.be (at 00:80:C8:FB:21:2B [ether] on eth0 cr1.info.fundp.ac.be at 00:50:BD:D0:E0:00 [ether] on eth0 backus.info.fundp.ac.be at 08:00:20:A6:62:8A [ether] on eth0 inspiron.infonet.fundp.ac.be at 00:50:04:8C:83:70 [ether] on eth0 corneille.info.fundp.ac.be at 00:20:AF:52:44:4B [ether] on eth0 See http://standards.ieee.org/regauth/oui/oui.txt for the list of allocations
  • #120: This is the most widely used format, it is notably used to carry IP packets.
  • #121: This is the most widely used format, it is notably used to carry IP packets.
  • #122: This is the most widely used format, it is notably used to carry IP packets.
  • #133: D. C. Plummer. Ethernet address resolution protocol: Or converting network protocol addresses to 48.bits ethernet address for transmission on ethernet hardware. Request for Comments 826, Internet Engineering Task Force, November 1982.
  • #134: D. C. Plummer. Ethernet address resolution protocol: Or converting network protocol addresses to 48.bits ethernet address for transmission on ethernet hardware. Request for Comments 826, Internet Engineering Task Force, November 1982.
  • #140: The transmission of IPv6 packets over Ethernet is defined in : M. Crawford, Transmission of IPv6 Packets over Ethernet Networks, RFC2464, December 1998 Note that in contrast with ARP used by IPv4, ICMPv6 neighbour solicitation messages are sent to a multicast ethernet address and not to the broadcast ethernet address. This implies that only the IPv6 enabled hosts on the LAN will receive the ICMPv6 message.
  • #141: The ICMPv6 neighbour discovery messages are sent with HopLimit=255 The role of the R, S and O flags is described as follows in RFC4861 R Router flag. When set, the R-bit indicates that the sender is a router. The R-bit is used by Neighbor Unreachability Detection to detect a router that changes to a host. S Solicited flag. When set, the S-bit indicates that the advertisement was sent in response to a Neighbor Solicitation from the Destination address. The S-bit is used as a reachability confirmation for Neighbor Unreachability Detection. It MUST NOT be set in multicast advertisements or in unsolicited unicast advertisements. O Override flag. When set, the O-bit indicates that the advertisement should override an existing cache entry and update the cached link-layer address. When it is not set the advertisement will not update a cached link-layer address though it will update an existing Neighbor Cache entry for which no link-layer address is known. It SHOULD NOT be set in solicited advertisements for anycast addresses and in solicited proxy advertisements. It SHOULD be set in other solicited advertisements and in unsolicited advertisements.
  • #142: The ICMPv6 neighbour discovery messages are sent with HopLimit=255 The role of the R, S and O flags is described as follows in RFC4861 R Router flag. When set, the R-bit indicates that the sender is a router. The R-bit is used by Neighbor Unreachability Detection to detect a router that changes to a host. S Solicited flag. When set, the S-bit indicates that the advertisement was sent in response to a Neighbor Solicitation from the Destination address. The S-bit is used as a reachability confirmation for Neighbor Unreachability Detection. It MUST NOT be set in multicast advertisements or in unsolicited unicast advertisements. O Override flag. When set, the O-bit indicates that the advertisement should override an existing cache entry and update the cached link-layer address. When it is not set the advertisement will not update a cached link-layer address though it will update an existing Neighbor Cache entry for which no link-layer address is known. It SHOULD NOT be set in solicited advertisements for anycast addresses and in solicited proxy advertisements. It SHOULD be set in other solicited advertisements and in unsolicited advertisements.
  • #143: The ICMPv6 neighbour discovery messages are sent with HopLimit=255 The role of the R, S and O flags is described as follows in RFC4861 R Router flag. When set, the R-bit indicates that the sender is a router. The R-bit is used by Neighbor Unreachability Detection to detect a router that changes to a host. S Solicited flag. When set, the S-bit indicates that the advertisement was sent in response to a Neighbor Solicitation from the Destination address. The S-bit is used as a reachability confirmation for Neighbor Unreachability Detection. It MUST NOT be set in multicast advertisements or in unsolicited unicast advertisements. O Override flag. When set, the O-bit indicates that the advertisement should override an existing cache entry and update the cached link-layer address. When it is not set the advertisement will not update a cached link-layer address though it will update an existing Neighbor Cache entry for which no link-layer address is known. It SHOULD NOT be set in solicited advertisements for anycast addresses and in solicited proxy advertisements. It SHOULD be set in other solicited advertisements and in unsolicited advertisements.
  • #144: M 64 (800:200C:417A) is a function that converts a 48 bits MAC address into a 64 bits Interface Identifier. This function is defined in : R. Hinden, S. Deering, IP Version 6 Addressing Architecture, RFC4291, February 2006 The IPv6 autoconfiguration is defined in : S. Thomson, T. Narten, T. Jinmei, IPv6 Stateless Address Autoconfiguration, RFC4862, Sept. 2007
  • #145: M 64 (800:200C:417A) is a function that converts a 48 bits MAC address into a 64 bits Interface Identifier. This function is defined in : R. Hinden, S. Deering, IP Version 6 Addressing Architecture, RFC4291, February 2006 The IPv6 autoconfiguration is defined in : S. Thomson, T. Narten, T. Jinmei, IPv6 Stateless Address Autoconfiguration, RFC4862, Sept. 2007
  • #146: When the M bit is set to true, this indicates that IPv6 addresses should be obtained from DHCPv6 When the O bit is set to true, this indicates that the hosts can obtain additional information (e.g. address of DNS resolver) from DHCPv6 The router advertisements messages can also be sent in unicast in response to solicitations from hosts. A host can obtain a router advertisement by sending a router solicitation which is an ICMPv6 message containing only the router solicitation message (type 133).
  • #147: When the M bit is set to true, this indicates that IPv6 addresses should be obtained from DHCPv6 When the O bit is set to true, this indicates that the hosts can obtain additional information (e.g. address of DNS resolver) from DHCPv6 The router advertisements messages can also be sent in unicast in response to solicitations from hosts. A host can obtain a router advertisement by sending a router solicitation which is an ICMPv6 message containing only the router solicitation message (type 133).
  • #148: When the M bit is set to true, this indicates that IPv6 addresses should be obtained from DHCPv6 When the O bit is set to true, this indicates that the hosts can obtain additional information (e.g. address of DNS resolver) from DHCPv6 The router advertisements messages can also be sent in unicast in response to solicitations from hosts. A host can obtain a router advertisement by sending a router solicitation which is an ICMPv6 message containing only the router solicitation message (type 133).
  • #149: When the M bit is set to true, this indicates that IPv6 addresses should be obtained from DHCPv6 When the O bit is set to true, this indicates that the hosts can obtain additional information (e.g. address of DNS resolver) from DHCPv6 The router advertisements messages can also be sent in unicast in response to solicitations from hosts. A host can obtain a router advertisement by sending a router solicitation which is an ICMPv6 message containing only the router solicitation message (type 133).
  • #150: When the M bit is set to true, this indicates that IPv6 addresses should be obtained from DHCPv6 When the O bit is set to true, this indicates that the hosts can obtain additional information (e.g. address of DNS resolver) from DHCPv6 The router advertisements messages can also be sent in unicast in response to solicitations from hosts. A host can obtain a router advertisement by sending a router solicitation which is an ICMPv6 message containing only the router solicitation message (type 133).
  • #151: The two L and A bits are defined as follows : L 1-bit on-link flag. When set, indicates that this prefix can be used for on-link determination. When not set the advertisement makes no statement about on-link or off-link properties of the prefix. In other words, if the L flag is not set a host MUST NOT conclude that an address derived from the prefix is off-link. That is, it MUST NOT update a previous indication that the address is on-link. A 1-bit autonomous address-configuration flag. When set indicates that this prefix can be used for stateless address configuration. Other options have been defined for the router advertisements. For example, the RDNSS option defined in J. Jeong, S. Park, L. Beloeil, S. Madanapalli, IPv6 Router Advertisement Option for DNS Configuration, RFC 5006, Sept. 2007 allows a router to advertise the IPv6 address of the DNS resolver to be used by hosts on the LAN.
  • #152: The two L and A bits are defined as follows : L 1-bit on-link flag. When set, indicates that this prefix can be used for on-link determination. When not set the advertisement makes no statement about on-link or off-link properties of the prefix. In other words, if the L flag is not set a host MUST NOT conclude that an address derived from the prefix is off-link. That is, it MUST NOT update a previous indication that the address is on-link. A 1-bit autonomous address-configuration flag. When set indicates that this prefix can be used for stateless address configuration. Other options have been defined for the router advertisements. For example, the RDNSS option defined in J. Jeong, S. Park, L. Beloeil, S. Madanapalli, IPv6 Router Advertisement Option for DNS Configuration, RFC 5006, Sept. 2007 allows a router to advertise the IPv6 address of the DNS resolver to be used by hosts on the LAN.
  • #153: The two L and A bits are defined as follows : L 1-bit on-link flag. When set, indicates that this prefix can be used for on-link determination. When not set the advertisement makes no statement about on-link or off-link properties of the prefix. In other words, if the L flag is not set a host MUST NOT conclude that an address derived from the prefix is off-link. That is, it MUST NOT update a previous indication that the address is on-link. A 1-bit autonomous address-configuration flag. When set indicates that this prefix can be used for stateless address configuration. Other options have been defined for the router advertisements. For example, the RDNSS option defined in J. Jeong, S. Park, L. Beloeil, S. Madanapalli, IPv6 Router Advertisement Option for DNS Configuration, RFC 5006, Sept. 2007 allows a router to advertise the IPv6 address of the DNS resolver to be used by hosts on the LAN.
  • #154: This utilisation of ICMPv6 Neighbour solicitation is called Duplicate Address Detection. It is used everytime a host obtains a new IPv6 address and is required to ensure that a hostis not using the same IPv6 address as another host on the same LAN.
  • #156: IPv6 is supposed to easily support renumbering and IPv6 router advertisements are one of the ways to perform this renumbering by allowing hosts to update their IPv6 addresses upon reception of new router advertisement messages. However, in practice renumbering an IPv6 network is not easily because IPv6 addresses are manually encoded in too many configuration files, see e.g. : F. Baker, E. Lear, R. Droms, Procedures for Renumbering an IPv6 Network without a Flag Day, RFC4192, 2005
  • #157: This extension to support privacy-aware IPv6 addresses is defined in T. Narten, R. Draves, S. Krishnan, Privacy Extensions for Stateless Address Autoconfiguration in IPv6, RFC4941, Sept. 2007
  • #163: A good reference on Ethernet switches is R. Seifert, J. Edwards, The All-New Switch Book, Wiley, 2008
  • #164: A good reference on Ethernet switches is R. Seifert, J. Edwards, The All-New Switch Book, Wiley, 2008
  • #201: R. Seifert. Gigabit Ethernet : Technology and Applications for High-Speed LANs. Addison Wesley, 1998. ISBN 0201185539. http://www.ethermanage.com/ethernet/ethernet.html
  • #203: The 10 Gbps zoo is much larger than this, see e.g. http://en.wikipedia.org/wiki/10_gigabit_Ethernet
  • #209: See [IEEE802Q] &quot;IEEE Standards for Local and Metropolitan Area Networks: Virtual Bridged Local Area Networks&quot;, Draft Standard, P802.1Q/D9, February 20, 1998.
  • #219: Source http://en.wikipedia.org/wiki/IEEE_802.11n
  • #226: Example 802.11b channel frequencies Channel Lower frequency Central frequency Upper frequency 12.4012.4122.423 22.4042.4172.428 32.4112.4222.433 42.4162.4272.438 52.4212.4322.443 62.4262.4372.448 72.4312.4422.453 82.4362.4472.458 92.4412.4522.463 102.4462.4572.468 112.4512.4622.473
  • #244: Token Ring is defined in : LAN/MAN Standards Committee of the IEEE Computer Society. IEEE Standard for Information technology--Telecommunications and information exchange between systems--Local and metropolitan area networks--Specific requirements--Part 5: Token Ring Access Method and Physical Layer Specification. IEEE, 1998. available from http://standards.ieee.org/getieee802/802.5.html
  • #254: FDDI is defined in ANSI. Information systems - fiber distributed data interface (FDDI) - token ring media access control (mac). ANSI X3.139-1987 (R1997), 1997
  • #255: FDDI is defined in ANSI. Information systems - fiber distributed data interface (FDDI) - token ring media access control (mac). ANSI X3.139-1987 (R1997), 1997