Wednesday, November 13, 2013

Chapter 3 HW Continued

P7. ACK packets do not need sequence numbers because the rdt3.0 can tell right away if duplicate ACKs have already gone through. The reason we don’t have sequence numbers is because we simply don’t need them. The duplicate ACK is ignored when sent through from the rdt3.0 sender because it does not need it.
P8. The rdt3.0 FSM receiver is the same as the rdt2.2 one.
P10. A timer would have to be added where the value of it is greater than the RTT propagation delay. A timeout event would also have to be added to wait for the ACK or NAK1 as well as wait for the ACK or NAK0. If the timeout event then occurs, the most recent transmitted packet is retransmitted. These modifications will work because if the timeout is caused by a lost packet or lost ACK, then the retransmission is sent to the receiver.
P16. Yes, this would cause the sender to send a lot of pipelined data into the channel. There are potential problems that can arise. For example, if data segments are lost, then the sender of the rdt3.0 won’t re-send them.
P24. A) True. If there is a sender that has a window size of 3, and sends packets 1, 2, and 3 at t0, at t1 the receiver ACKs 1, 2, and 3. At t2, the sender times out and resends 1, 2, and 3. Then at t3, the receiver will receive the duplicates and ACK 1, 2, and 3. At t4, the sender receives the ACKs that t1 sent and moves the window to 4, 5, 6. The finally at t5, the sender receives the ACKs 1, 2, and 3 sent at t2. These ACKs would then be outside the window of 4, 5, 6.
B) True, same reason as A).
C) True
D) True, a window size of 1 eliminates the possibility of out of order packets so the alternating bit protocol and the GBN would essentially be the same.
P26) A) The maximum size file that can be sent is the number of bytes representable by the total number of possible sequence numbers (2^32) which is about 4.19 GB.
B) 2^32/536 = 8,012,999
Next, the number of segments is 66 bytes of header that get added each segment making a total of 528,857,934 bytes of header. The total number of bytes if 2^32 + 528,857,934 = 4.824 * 10^9 bytes. Then considering the 155mbps link, the transmission would take 249 seconds.

Chapter 3 HW

P3. The sum of the first two numbers is 01010101
                                                            01110000
                                                          =11000101
The after adding the 3rd number          +11001100
                                                             10010001

So 1's compliment will then be 01101110. UDP takes 1's compliment over the sum because at the recieving end, all the bits should be zero when there are no errors. To detect errors the check sum looks for zeros. A checksum of 1111 means there is no error in the packet. 1-bit errors can't be undetected but in some cases a 2-bit error can be undetected.

P4.a)     00110100
           +01101001
             10011101 -- So 1's compliment is 01100010

b)     11011010
      +01100101
        00111111 -- So 1's compliment is 11000000 

c)     If the first 0 is changed to 1 and the second byte (1) is changed to 0, then 1's compliment stays the same and the error is undetected.    
                                                           11110101
                                                         +00101001
                                                           11100000
       
P5. The UDP checksum cannot be certain that there are no errors. Checksum is designed to look for single errors and can be easily thrown off or tricked by 2 or more errors. For example. The binary of 2 and 5 are 010 and 101. But if 2 errors occurred where the binary was changed to 011 and 100, which is 3 and 4, the total would still equal 7. In this case the error goes undetected although the packet was changed. If only one of the binary's changed then the error would be easily detected.

P6.