DOC PREVIEW
Berkeley ELENG 122 - Transport Protocols

This preview shows page 1-2-17-18-19-35-36 out of 36 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

TOC Transport Protocols Why Overview UDP TCP Summary TOC Transport Why IP provides a weak but efficient service model best effort Packets can be delayed dropped reordered duplicated Packets have limited size why IP packets are addressed to a host How to decide which application gets which packets How should hosts send into the network Too fast is bad too slow is not efficient TOC Transport Why Overview Basic Features Illustration Ports UDP TCP Headers TOC Transport Overview Basic Features Can provide more reliability in order delivery at most once delivery Supports messages of arbitrary length Provide a way to decide which packets go to which applications multiplexing demultiplexing Govern when hosts should send data TOC Transport Overview Basic Features Illustration ports HTTP RA DNS Application p1 p2 p1 p2 p3 p1 Transport IP A B A B p1 p2 UDP Not reliable TCP Ordered reliable well paced TOC Transport Overview Illustration C p2 Ports Need to decide which application gets which packets Solution map each socket to a port Client must know server s port Separate 16 bit port address space for UDP and TCP src IP src port dst IP dst port uniquely identifies TCP connection Well known ports 0 1023 everyone agrees which services run on these ports e g ssh 22 http 80 on UNIX must be root to gain access to these ports why ephemeral ports most 1024 65535 given to clients e g chatclient gets one of these TOC Transport Overview Ports UDP User Datagram Protocol minimalist transport protocol same best effort service model as IP messages of up to 64KB provides multiplexing demultiplexing to IP does not provide congestion control advantage over TCP does not increase end to end delay over IP application example video audio streaming TOC Transport Overview UDP TCP Transmission Control Protocol reliable in order and at most once delivery messages can be of arbitrary length provides multiplexing demultiplexing to IP provides congestion control and avoidance increases end to end delay over IP e g file transfer chat TOC Transport Overview TCP Headers IP header used for IP routing fragmentation error detection we study that when we explore IP UDP header used for multiplexing demultiplexing error detection TCP header used for multiplexing demultiplexing flow and congestion control IP Sender Receiver data Application Application TCP UDP data TCP UDP TCP UDP TCP UDP data IP TOC Transport Overview Headers IP data TCP UDP data IP TCP UDP data UDP Service Send datagram from IPa Port 1 to IPb Port 2 Service is unreliable but error detection possible Header 0 16 Source port UDP length 31 Destination port UDP checksum Payload variable UDP length is UDP packet length including UDP header and payload but not IP header Optional UDP checksum is over UDP packet Why have UDP checksum in addition to IP checksum Why not have just the UDP checksum Why is the UDP checksum optional TOC Transport UDP TCP Service Steps 3 Way Handshake State Diagram 1 State Diagram 2 Header Sliding Window Protocol TOC Transport TCP Service Start a connection Reliable byte stream delivery from IPa TCP Port 1 to IPb TCP Port 2 Indication if connection fails Reset Terminate connection TOC Transport TCP Service Steps SYN k 3 way handshake SYN n ACK k 1 DATA k 1 ACK n 1 ACK k n 1 data exchange FIN close FIN ACK FIN FIN ACK TOC Transport TCP Steps close 3WH Description Rationale TOC Transport TCP 3WH Description Goal agree on a set of parameters the start sequence number for each side Starting sequence numbers are random Server Client initiator Active connect Open SYN Seq listen Num x qNum e S K C A SYN and ACK Ac k x 1 k c A d n ya Passive Open accept y 1 allocate buffer space TOC Transport TCP 3WH Description Rationale Three way handshake adds 1 RTT delay Why congestion control SYN 40 byte acts as cheap probe Protects against delayed packets from other connection would confuse receiver TOC Transport TCP 3WH Rationale State Diagram 1 Closed A SYN B SYN sent Established Data ACK SYN ACK ACK FIN Wait 1 Established Listen SYN received FIN Timed Wait Closed FIN Wait 2 1 FIN FIN ack Last Ack Close Wait 1 A waits in case B retransmits FIN and A must ack again TOC Transport TCP State Diagram 1 FIN ack Closed State Diagram 2 TOC Transport TCP State Diagram 2 Header 0 4 10 16 31 Destination port Source port Sequence number Acknowledgement HdrLen Flags Advertised window Checksum Urgent pointer Options variable Payload variable Sequence number acknowledgement and advertised window used by sliding window based flow control Flags SYN FIN establishing terminating a TCP connection ACK set when Acknowledgement field is valid URG urgent data Urgent Pointer says where non urgent data starts PUSH don t wait to fill segment RESET abort connection TOC Transport TCP Header Sliding Window Protocol Objectives Stop Wait Go Back n TOC Transport TCP SWP Objectives Retransmit missing packets Numbering of packets and ACKs Do this efficiently Keep transmitting whenever possible Detect missing ACKs and retransmit quickly TOC Transport TCP SWP Objectives Stop Wait Send wait for ack If timeout retransmit else repeat TRANS DATA Receiver Sender RTT ACK Time TOC Transport TCP SWP S W Inefficient if TRANS RTT Go Back n GBN Definition Illustration without errors Illustration with errors Sliding window rules Sliding window example Observations Round Trip Timing The question of ACKs TOC Transport TCP SWP GBN Definition Transmit up to n unacknowledged packets If timeout for ACK k retransmit k k 1 TOC Transport TCP SWP GBN Definition Example without errors n 9 packets in one RTT instead of 1 Fully efficient Time TOC Transport TCP SWP GBN No Errors Example with errors 1 2 3 Window Window size size 33 packets packets 4 5 6 Timeout Packet 5 7 5 6 7 Sender TOC Transport TCP SWP GBN Errors Time Receiver Sliding Window Rules window collection of adjacent sequence numbers the size of the collection is the window size Let A be the last ack d packet of sender without gap then window of sender A 1 A 2 A n Sender can send packets in its window Let B be the last received packet without gap by receiver then window of receiver B 1 B n Receiver can accept out of sequence if in window TOC Transport TCP SWP GBN Rules Sliding Window Example 12345678 12345678 1 2 3 4 5 6 7 5 6 7 Last ACKed without gap Last received without gap TOC Transport TCP SWP GBN SW Ex Observations With sliding windows it is possible to fully utilize a link provided the window size is large enough Throughput is w RTT Stop Wait is


View Full Document

Berkeley ELENG 122 - Transport Protocols

Documents in this Course
Lecture 6

Lecture 6

22 pages

Wireless

Wireless

16 pages

Links

Links

21 pages

Ethernet

Ethernet

10 pages

routing

routing

11 pages

Links

Links

7 pages

Switches

Switches

30 pages

Multicast

Multicast

36 pages

Switches

Switches

18 pages

Security

Security

16 pages

Switches

Switches

18 pages

Lecture 1

Lecture 1

56 pages

OPNET

OPNET

5 pages

Lecture 4

Lecture 4

16 pages

Ethernet

Ethernet

65 pages

Models

Models

30 pages

TCP

TCP

16 pages

Wireless

Wireless

48 pages

Load more
Download Transport Protocols
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Transport Protocols and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Transport Protocols and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?