1 / 53

Transport layer

Transport layer. Chapter 7 Intro to Routing & Switching. objectives. Upon completion of this chapter, you should be able to: Explain the need for the transport layer. Identify the role of the transport layer as it provides the end-to-end transfer of data between applications.

shad-hansen
Télécharger la présentation

Transport layer

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. Transport layer Chapter 7 Intro to Routing & Switching

  2. objectives • Upon completion of this chapter, you should be able to: • Explain the need for the transport layer. • Identify the role of the transport layer as it provides the end-to-end transfer of data between applications. • Describe the role of two TCP/IP transport layer protocols: TCP and UDP. • Explain the key functions of the transport layer, including reliability, port addressing, and segmentation. • Explain how TCP and UDP each handle key functions. • Identify when it is appropriate to use TCP or UDP and provide examples of applications that use each protocol.

  3. Layer 4 protocols used • Each protocol does its’ own job • IP addresses & routes data • Doesn’t say how it is transported • Different applications use different protocols for transport of the data • How data is sent/exchanged • TCP or UDP

  4. 7.1.1 The transport layer

  5. transport layer introduction • What PDU? • Segments • Simply, the responsibilities: • Ensures end-to-end delivery of data • Establish a session between applications • Segmenting the data • Transport the data • Handling the flow of data • Reassembling the data • Passing the data to the proper application • Retransmit if necessary

  6. transport layer introduction • Protocols • TCP- most common • UDP

  7. Connection-oriented protocol • TCP • Establish a connection 1st, then sends data • 3-way handshake • SYN, SYN-ACK, ACK

  8. Connectionless protocol • UDP • No connection • Doesn’t ensure error-free delivery • Faster than TCP, more efficient for quicker delivery • Live audio/video over Internet or VoIP • TCP would bog it down; incomplete pics or audio; pics wouldn’t coincide with audio

  9. segmentation • Large amounts of data broken into smaller units • Segments • Also consider the MTU of the media • 6000 byte message on a 1500 byte MTU Ethernet • 4 segments • Reassembled at destination • Sequencing • Identifies the segments & helps is re-ordering

  10. Segmentation & reassembly • Words split to send • Dest. reassembles the words • Words may arrive out of order • Sequence #’s help re-order into sentence

  11. Review- q • What is the PDU of the Transport Layer? • Segment • What helps put a TCP segmented message back in order at the destination? • Sequence numbers • Which Layer 4 protocol could deliver data with errors or not be delivered at all? • UDP • How is TCP able to establish a connection? • 3-way handshake

  12. Review- q • When sending a web page, which Layer 4 protocol would be used? • TCP • In the same scenario as above, what would happen if the destination did not receive an ACK after sending data? • It would re-send just that segment • Which layer 4 protocol is able to deliver data quickly? • UDP

  13. 7.1.2 Introducing tcp & udp

  14. Tcp summary • Connection-oriented • Sends acknowledgements • Like tracking a FedEx delivery • Breaks messages into small segments • If sender doesn’t get an ACK of message received, it retransmits • Only portion lost is resent • On receiving host, TCP reassembles data • FTP & HTTP are examples of protocols using TCP

  15. Tcp segment

  16. Tcp conversation SEQUENCE #= 200 SYN SYN-ACK SEQ#= 1450 ACK= 201 ACK SEQ#= 201 ACK= 1451

  17. Tcp sliding window • How much data it can receive

  18. Tcp end the conversation

  19. Tcp summary • Connection-oriented • Guaranteed delivery • 3-way handshake • Segments & sequence # • Acknowledgements • Flow control • Retransmission • Generates more traffic because of all this

  20. Review- q • What significance does the ACK# have? • It’s the next expected byte number • Sequence # received PLUS 1 • When a conversation is ready to end, nothing more is being sent, what flag gets sent? • FIN • What are 2 protocols that use TCP? • HTTP & FTP • Explain flow control. • Adjusting the amount/flow of data being sent/received

  21. 7.2.3 udp

  22. udp • Connectionless • Used for faster transmissions • Low overhead • “Best effort delivery” • Regular mail / no guarantee of delivery • No ACK or retransmission • No error checking* • Used for streaming audio, video, VoIP • DNS, DHCP, TFTP, VoIP, Gaming, SNMP are examples of protocols that use UDP

  23. Udp header

  24. Udp interruptions

  25. Use tcp or udp? • TCP • HTTP • IP • FTP • Telnet • SMTP/POP • DNS • UDP • DHCP • TFTP • SNMP • VoIP • Internet TV/Radio • DNS

  26. Comparing TCP & UDP • Faster • Best effort delivery • No acknowledgements • No retransmit • Connectionless • Slower • Segments • Acknowledgements • Retransmission • Reassembles • Connection-oriented • Flow control UDP TCP

  27. Activity 1

  28. Activity 2

  29. Review- q

  30. TCP-What do you remember? • Which is connection-oriented? • TCP • TCP establishes a connection or a ________ with the destination. • Session • Why is TCP reliable? • Sends acknowledgments of receiving & retransmits missing data • Explain flow control for TCP. • Regulates the flow of data • Protocols used? • HTTP, SMTP, Telnet, FTP

  31. udP-What do you remember? • Speed? • Fast • Connection or connectionless? • Connectionless • Reliability? • Unreliable • No ACK or retransmission • Flow control? • None • Protocols used: • DNS, VoIP, Video Stream, SNMP

  32. Tracking the convo • You have many conversations at the same time • Web • Email • DHCP • VoIP • Video streaming • Transport Layer tracks each one

  33. Many convos, one stream • All of those conversations come out as one stream of data • Example: your streaming video coming in does not take up the entire connection • Multiplexing (sending) • Demultiplexing (receiving) • This is what it does…………………………………

  34. Pass data to application • Sends data to proper application • Your many conversations: • Web  goes to web browser • Email  goes to email program • DHCP  goes to IP config • VoIP  goes to VoIP software • Video streaming  goes to media player • Each protocol has a port # • In the segment to direct to the correct application

  35. Port numbers • All the conversations need to be tracked • Port Number in each segment • Helps identify what service the message is for • Web request, email, DHCP, etc. • Protocols identified by port numbers

  36. Port # example

  37. Port # & communication • Each message sent, has a source & destination port number • Source Port • Randomly generated & placed into segment • Tracks incoming segment • Destination Port • Used to pass data to proper application at destination

  38. Review- q

  39. Port numbers • 1-65,535 • Well-known ports • 1- 1023 • Common applications • Registered ports • 1024- 49,151 • Can be source or destination ports • Used for specific applications like IM • Private ports • 49,152 & above • For source ports

  40. Important port #’s • Destination- tells about service requested • 20 & 21- FTP • 23- Telnet • 25- SMTP • 53- DNS (BOTH TCP & UDP) • 67 & 68- DHCP • 69- TFTP • 80- HTTP • 110- POP3 • 161- SNMP • 443- HTTPS

  41. sockets • The combo of the source & destination IP AND the source & destination port number is known as a socket. • 192.168.1.7:80

  42. Check it! • Check your active connections • Unexplained ones could be threats! • C:\> netstat

  43. activity • 7.1.2.11 • Drag each description to TCP or UDP

  44. Review-

  45. Review-

  46. Sending a message • Web Server to client (you) • Application data broken into TCP segments • Each segment has a header w/ source & dest ports • Segment encapsulates HTTP & HTML data • Encapsulates into a packet w/ IP header • IP header has source & dest IP addresses • IP Packet sent to Ethernet protocol • Encapsulates into frame header & trailer • Source & destination MAC AND error checking • Bits encoded onto the media

  47. Receiving the message • Last process in reverse • Bits received by NIC & decoded • Destination MAC recognized • Ethernet header & trailer removed • Source & dest MAC removed • IP header removed • Source & dest IP removed • TCP header removed • Source & dest ports removed • Web page data passed to HTTP & browser • TCP segment received, reassembled, & page displays

  48. activity • 192.168.5.101 • 80 or TCP or UDP • 01-5A-FF-65-80-DC • 1100101101000010 • DHCP or POP3 or HTTP

  49. Review- 4q

  50. Review- 3q

More Related