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
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
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
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
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
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
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
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
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SummaryTOC–TransportWhy?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 efficientTOC–Transport –Why?OverviewBasic FeaturesIllustrationPortsUDPTCPHeadersTOC–Transport –OverviewBasic 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 dataTOC–Transport –Overview –Basic FeaturesIllustrationIPTransportABC[A | B | p1 | p2 | …]p1 p2 p1 p2 p3 p1 p2portsApplicationHTTPDNSRAUDP: Not reliableTCP: Ordered, reliable, well-pacedTOC–Transport –Overview –IllustrationPorts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 theseTOC–Transport –Overview –PortsUDP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 –UDPTCP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, chatTOC–Transport –Overview –TCPHeaders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 IPTCP UDPdataTCP/UDPdataTCP/UDPIPApplicationSenderdataIPTCP UDPApplicationReceiverdataTCP/UDPdataTCP/UDPIPdataTOC–Transport –Overview –HeadersUDPService:Send datagram from (IPa, Port 1) to (IPb, Port 2)Service is unreliable, but error detection possibleHeader:Source portDestination port016 31UDP length UDP checksumPayload (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 –UDPTCPServiceSteps3-Way HandshakeState Diagram: 1State Diagram: 2HeaderSliding Window ProtocolTOC–Transport –TCPServiceStart a connectionReliable byte stream deliveryfrom (IPa, TCP Port 1) to (IPb, TCP Port 2)Indication if connection fails: ResetTerminate connectionTOC–Transport –TCP –ServiceSYN kSYN n; ACK k+1DATA k+1; ACK n+1ACK k+n+1data exchangeFINFIN ACK½ closeFINFIN ACK½ closeSteps3-way handshakeTOC–Transport –TCP –Steps3WHDescriptionRationaleTOC–Transport –TCP –3WHDescriptionGoal: agree on a set of parameters: the start sequence number for each sideStarting sequence numbers are random.Client (initiator)ServerSYN, SeqNum= xSYN and ACK, SeqNum= y and Ack= x + 1ACK, Ack= y + 1ActiveOpenPassiveOpenconnect() listen()accept()allocatebuffer spaceTOC–Transport –TCP –3WH -DescriptionRationale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 -RationaleState Diagram 1ABSYNSYN + ACKData + ACKACK…FINFIN.ackFINFIN.ackListenSYN receivedEstablishedClose WaitLast AckClosedClosedSYN sentEstablishedFIN Wait-1FIN Wait-2Timed WaitClosed(1)(1): A waits in case B retransmits FIN and A must ack againTOC–Transport –TCP –State Diagram 1State Diagram 2TOC–Transport –TCP –State Diagram 2Header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 connectionSource portDestination portOptions (variable)Sequence numberAcknowledgementAdvertised windowChecksum Urgent pointerFlagsHdrLen0 4 10 16 31Payload (variable)TOC–Transport –TCP –HeaderSliding Window ProtocolObjectivesStop & WaitGo-Back-nTOC–Transport –TCP –SWPObjectivesRetransmit missing packetsNumbering of packets and ACKsDo this efficientlyKeep transmitting whenever possibleDetect missing ACKs and retransmit quicklyTOC–Transport –TCP –SWP –ObjectivesStop & Wait ACKDATATimeSenderReceiverRTTSend; wait for ackIf timeout, retransmit; else repeatInefficient ifTRANS << RTTInefficient ifTRANS << RTTTRANSTOC–Transport –TCP –SWP –S&WGo-Back-n (GBN)DefinitionIllustration without errorsIllustration with errorsSliding window rulesSliding window exampleObservationsRound-Trip TimingThe question of ACKsTOC–Transport –TCP –SWP –GBNDefinitionTransmit up to n unacknowledged packetsIf timeout for ACK(k), retransmit k, k+1, …TOC–Transport –TCP –SWP –GBN –DefinitionExample without errorsTimen = 9 packets in one RTT instead of 1 Fully efficientTOC–Transport –TCP –SWP –GBN –No ErrorsExample with errorsTimeWindow size = 3 packetsWindow size = 3 packetsSender Receiver1234567TimeoutPacket 5567TOC–Transport –TCP –SWP –GBN –ErrorsSliding 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,


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 2 2 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?