1 / 8

TCP Lab

TCP Lab. Src Port. Dest Port. SequenceNum. Acknowledgement. 0. HdrLen. Flags. Advertised. (4). (6). (6). Window. CheckSum. UrgPtr. options. (variable). data. Overview. Create TCP headers and send through IP Sliding Window. Steps. Get the basic header working

tate-dyer
Télécharger la présentation

TCP Lab

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. TCP Lab

  2. Src Port Dest Port SequenceNum Acknowledgement 0 HdrLen Flags Advertised (4) (6) (6) Window CheckSum UrgPtr options (variable) data Overview • Create TCP headers and send through IP • Sliding Window

  3. Steps • Get the basic header working • Get Stop and Wait to work • Send a packet • If no response in 10 seconds, resend • Add code to allow several segments to be transmitted before ACK

  4. Communications

  5. Yes Yes Ack with sequence=111 means we have received everything before 111 and expect 111 next Segment Structure When the writing thread wakes up, it will notice the acks, slide the window and reuse the structure entries When an acknowledgement arrives, we mark the acknowledgement field in all packets with a lower sequence number. This allows us to recover from lost acknowledgements.

  6. Threads • One thread for each segment (use usleep since it is threadsafe • One thread that looks through a table of semaphores with time stamps • This will cause you fewer headaches.

  7. One Thread wakes up every second Time=23457, resend 90 and 100

  8. Passoff Level Behavior Points Minimal Passoff 1 TCP segment can be sent reliably 8 Points Send window   Send of multiple segments before acknowledge works  3 Points  Receive one segment  You are able to receive a short packet from the server correctly  2 Points  Perfect behavior Passes all tests and correctly acknowledges all long packets 2 Points Passoff

More Related