Problem 3 - CRC program

Code

Slow CRC

Problem 4 - Data Link Protoocols on Synchronous Links



a) Yes, the sender needs to number the data frames

    Counterexample:
    Receiver will get duplicate copies.
   I--Sender sends a frame which the receiver gets successfully. Receiver sends an ack which is lost.
          sender will assume packet is lost when it does not get an ack and retransmits . Receiver will accept this frame
           without realising it is a duplicate.

 b)No, the receiver does not need to renumber the acks.
    This is because an ack received at time n+1 could only be an ack for the frame sent at time n.
     Since we transmit at discrete time intervals no confusion with old acks is possible.

c) A simlple protocol is as follows
      Sender waits for 1 time unit for all older acks to die out . It then sends a reset message
      Receiver initializes number when it gets reset and sends back a reset ack .