1 / 28

Reliable Transport

Reliable Transport. EE122 TAs Past and Present. Review of Principles. Are people eavesdropping on my postal correspondence during transit?. Would like my mail to be protected by safes, cages, sealed containers, locks and keys Armed guards would be nice too Good or bad idea?.

iden
Download Presentation

Reliable Transport

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Reliable Transport EE122 TAs Past and Present

  2. Review of Principles

  3. Are people eavesdropping on my postal correspondence during transit? • Would like my mail to be protected by safes, cages, sealed containers, locks and keys • Armed guards would be nice too • Good or bad idea? As seen on Amazon

  4. “The most secure USPS® mail (protected by safes, cages, sealed containers, locks and keys).” “650 uniformed Postal Police Officers who are assigned to critical postal facilities throughout the country. The officers provide perimeter security, escort high-value mail shipments, and perform other essential protective functions.” Acceptable for sending US government “Classified” and “Secret“ information

  5. Good or bad idea? • It exists, but so do lolcats • Does this ensure confidentiality? • Can the sender and receiver ensure confidentiality by themselves? • Should all mail be treated super-securely? • As a performance enhancement? • Does it impose a burden on those who do not require that functionality? • Cost • “it is possible that the Registered Mail process could slow the speed at which a mailpiecetravels” • End-to-end arguments not limited to reliable transport • or to computer networks: audits of banks, airline reservation systems, … (see Saltzer, Reed & Clark, 1984)

  6. Once upon a time … • Alice and Bob send their children, Gretel and Hansel, deep into the forest • To return home, they must collect information along the forward path • The Brothers Grimm called this information “fähigkeitbits” • Should they store this info: • themselves? or: • along the forest path (using bread crumbs)? • When can the info be lost?

  7. Fate-Sharing • “An end-to-end protocol design should not rely on the maintenance of state (i.e. information about the state of the end-to-end communication) inside the network. Such state should be maintained only in the endpoints, in such a way that the state can only be destroyed when the endpoint itself breaks” -- RFC 1958 • If you violate fate-sharing, you risk being eaten by a witch

  8. We now return to our regularly scheduled programming

  9. Please, no more jokes about Panda • Panda is embarrassed at being mentioned in homework and section problems • To avoid the attention, he’s gone into hiding far, far away (with no internet) • Kay, feeling partly culpable, sends him care packages (when she’s not busy operating the hotel telephone) • Many other GSIs are equally culpable but don’t care • It takes 5 days for the postal service from Berkeley to Panda’s sanctuary • Worse yet, the postal service is unreliable

  10. Transmitting Care Packages (TCP) v0.1 • Panda notices he’s missing package #5 • He posts Kay a request to resend it (every package is unique) • All is well (eventually) • Later he’s missing package #20 • He posts Kay a request to resend it • Nothing happens • Why? (assume Kay hasn’t abandoned him)

  11. Transmitting Care Packages v0.2 • Panda decides instead to post Kay a thank-you note for each package • From the time Kay sends the first package, how long will it be to receive confirmation? • Assuming Kay has a limited daily send rate (i.e., cannot send x days of packages at once, due to customs etc.), should Kay send more packages in the meantime? • When Kay receives the confirmation, she sends another package • Why might Kay not want to send as much as possible?

  12. What sort of thank-you note? • Panda could send: • “I have received package #1” • “I have received package #2” • “I have received package #3” • or: • “I have received all packages up to #1” (or: “I expect to receive package #2”, but that’s presumptuous) • “I have received all packages up to #2” • “I have received all packages up to #3” • What happens if a care package is lost? • What happens if a thank-you note is lost?

  13. Worksheet

  14. Individual ACKs and Cumulative ACKs • Individual ACK • Acknowledge every packet received • Loss: resend packet when k “subsequent packets” are received • e.g. ACK-7 means the receiver has received packet 7 • Cumulative ACK • Acknowledge that all packets up to (the CACK number – 1) has been received • Loss: resend missing packet upon k “duplicate ACKs” and wait for ACK • e.g. CACK-7 means the receiver has received packets 1, 2, 3, 4, 5, 6, and is expecting (i.e. does not have) packet 7

  15. Question 1 – No Loss, ACK A B 1 Zzz … 1 2 3 4 5 6 7 8 9 10 ACK-1 1 2 1 2 3 4 5 6 7 8 9 10 ACK-2 1 2 3 1 2 3 4 5 6 7 8 9 10 ACK-3 1 2 3 4 1 2 3 4 5 6 7 8 9 10 ACK-4 1 2 3 4

  16. Sliding Window • Ensures the “pipe” is always full (efficiency) • Send W packets • When one gets ACK’ed, send the next one in line • If a packet times out, retransmit

  17. Question 2a – No Loss, Individual ACK A B 1 2 3 1 2 3 4 5 6 7 8 9 10 ACK-1 , ACK-2, ACK-3 1 2 3 4 5 6 1 2 3 4 5 6 7 8 9 10 ACK-4 , ACK-5, ACK-6 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10 ACK-7 , ACK-8, ACK-9 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 ACK-10 1 2 3 4 5 6 7 8 9 10

  18. Question 2b – No Loss, Cumulative ACK A B 1 2 3 1 2 3 4 5 6 7 8 9 10 CACK-2, CACK-3, CACK-4 (i.e., CACK-upto1 ,2,3) 1 2 3 4 5 6 1 2 3 4 5 6 7 8 9 10 CACK-5, CACK-6, CACK-7 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10 CACK-8, CACK-9, CACK-10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 CACK-11 1 2 3 4 5 6 7 8 9 10

  19. Question 3a – Packet Loss, k=1 A B 1 2 3 1 2 3 4 5 6 7 8 9 10 ACK-1, ACK-3 1 3 k=1 2 4 1 2 3 4 5 6 7 8 9 10 ACK-2 , ACK-4 1 2 3 4 567 1 2 3 4 5 6 7 8 9 10 ACK-5 , ACK-6, ACK-7 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 ACK-8, ACK-9, ACK-10 1 2 3 4 5 6 7 8 9 10

  20. Question 3b – Packet Loss, k=2 A B 1 2 3 1 2 3 4 5 6 7 8 9 10 ACK-1, ACK-3 1 3 4 1 2 3 4 5 6 7 8 9 10 ACK-4 1 3 4 k=2 2 1 2 3 4 5 6 7 8 9 10 ACK-2 1 2 3 4 5 6 7 1 2 3 4 5 6 7 8 9 10 ACK-5, ACK-6, ACK-7 1 2 3 4 5 6 7 …

  21. Question 3c (k=2) – Why bother? A B 1 2 3 1 2 3 4 5 6 7 8 9 10 ACK-1, ACK-3 1 2 3 4 1 2 3 4 5 6 7 8 9 10 ACK-2, ACK-4 1 2 3 4 ACK-2 is delayed 5 6 7 1 2 3 4 5 6 7 8 9 10 ACK-5, ACK-6, ACK-7 1 2 3 4 5 6 7 8 9 10 Efficiency vs. timeliness 1 2 3 4 5 6 7 8 9 10 ACK-8, ACK-9, ACK-10 1 2 3 4 5 6 7 8 9 10

  22. The choices for loss with cumulative ACKs are “Send missing packet and optimistically assume that subsequent packets have arrived” and “Send missing packet, and wait for ACK” (Lecture 5). This slide assumes the former. Question 4a – Packet Loss, k=1 A B 1 2 3 1 2 3 4 5 6 7 8 9 10 CACK-2, CACK-2 1 3 k=1 2 4 1 2 3 4 5 6 7 8 9 10 CACK-4, CACK-5 1 2 3 4 567 1 2 3 4 5 6 7 8 9 10 CACK-6, CACK-7, CACK-8 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 CACK-9, CACK-10, CACK-11 1 2 3 4 5 6 7 8 9 10

  23. The choices for loss with cumulative ACKs are “Send missing packet and optimistically assume that subsequent packets have arrived” and “Send missing packet, and wait for ACK” (Lecture 5). This slide assumes the latter. Question 4a – Packet Loss, k=1 A B 1 2 3 1 2 3 4 5 6 7 8 9 10 CACK-2, CACK-2 1 3 k=1 2 1 2 3 4 5 6 7 8 9 10 CACK-4 1 2 3 4 5 6 1 2 3 4 5 6 7 8 9 10 CACK-5, CACK-6, CACK-7 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10 CACK-8, CACK-9, CACK-10 1 2 3 4 5 6 7 8 9 …

  24. Question 4b – Packet Loss, k=2 A B 1 2 3 1 2 3 4 5 6 7 8 9 10 CACK-2, CACK-2 1 3 4 1 2 3 4 5 6 7 8 9 10 CACK-2 1 3 4 k=2 2 1 2 3 4 5 6 7 8 9 10 CACK-5 1 2 3 4 567 1 2 3 4 5 6 7 8 9 10 CACK-6, CACK-7, CACK-8 1 2 3 4 5 6 7 …

  25. Question 5a – Lost ACK, k=1 A B 1 2 3 1 2 3 4 5 6 7 8 9 10 ACK-1, ACK-3 1 2 3 k=1 ACK-2 is lost 2 4 1 2 3 4 5 6 7 8 9 10 ACK-2 , ACK-4 1 2 3 4 567 1 2 3 4 5 6 7 8 9 10 ACK-5 , ACK-6, ACK-7 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 ACK-8, ACK-9, ACK-10 1 2 3 4 5 6 7 8 9 10

  26. Question 5b – Lost CACK, k=1 A B 1 2 3 1 2 3 4 5 6 7 8 9 10 CACK-2, CACK-4 1 2 3 CACK-3 is lost 4 5 6 1 2 3 4 5 6 7 8 9 10 CACK-4, CACK-5, CACK-6 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10 CACK-7, CACK-8, CACK-9 1 2 3 4 5 6 7 8 9 11 packets with Lost ACK vs. 10 packets with Lost CACK 10 1 2 3 4 5 6 7 8 9 10 CACK-10 1 2 3 4 5 6 7 8 9 10

  27. Question 6 – Timeouts A B 1 2 3 1 2 3 4 5 6 7 8 9 10 … 1 2 3 1 2 3 1 2 3 4 5 6 7 8 9 10 ACK-1 , ACK-2, ACK-3 4 5 6 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 ACK-4 , ACK-5, ACK-6 …

  28. N.B. This is an ambiguous protocol. Ignore the specifics other than why it doesn’t work … Question 7 – NAK, k=2 Oh dear, how do we get packet 9 again? A B 1 2 3 1 2 3 4 5 6 7 8 9 10 CACK1, CACK3 1 3 4 5 6 1 2 3 4 5 6 7 8 9 10 CACK4, NAK-2, CACK5, CACK6 1 3 4 5 6 7 2 8 9 1 2 3 4 5 6 7 8 9 10 CACK7, CACK7, CACK8 1 2 3 4 5 6 7 8 10 1 2 3 4 5 6 7 8 9 10 CACK10 1 2 3 4 5 6 7 8 10

More Related