1 / 63

In the Name of God Computer Networks Chapter 6: The Transport Layer

In the Name of God Computer Networks Chapter 6: The Transport Layer. Dr. Shahriar Bijani Shahed University May 2014. References: A . S. Tanenbaum and D. J. Wetherall , Computer Networks (5th Edition ), Pearson Education, the book slides, 2011.

ciel
Download Presentation

In the Name of God Computer Networks Chapter 6: The 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. In the Name of GodComputer NetworksChapter 6: The Transport Layer Dr. ShahriarBijani Shahed University May 2014

  2. References: • A. S. Tanenbaum and D. J. Wetherall, Computer Networks (5th Edition), Pearson Education, the book slides, 2011. • B. A. Forouzan, Introduction to the TransportLayer, TCP/IP Protocol Suite, 5th Edition, McGraw Hill, lecture slides, 2012.

  3. The OSI Model APPLICATION PRESENTATION • TCP/IP SESSION TRANSPORT NETWORK DATA LINK PHYSICAL

  4. The Transport layer duties • Packetizing • Sender side: breaks application messages into segments, passes them to network layer • Transport layer at the receiving host deliver data to the receiving process • Connection control • Connection-oriented • Connectionless • Addressing • Port numbers to identify which network application • Reliability • Flow control • Error Control

  5. PROCESS-TO-PROCESSDELIVERY • The transport layer is responsible for process-to-process delivery: the delivery of a packet, part of a message, from one process to another. Two processes communicate in a client/server relationship, • In Client/Server communication, four entities must be defined: • Sending Node • Local Host IP • Local Process Port number • Receiving Node • Remote host IP • Remote Process ID Port number

  6. Types of data deliveries

  7. Processes communicating across network • Process is an instance of a program in execution. • Processes on two hosts communicate with each other by sending and receiving messages • The process receives messages from, and sends messages into the network through its socket • A socket is the interface between the application layer and the transport layer within a host. • Sockets are the programming interface used to build network applications over the internet. • Programmers can select which transport layer protocol (UDP or TCP) to be used by the application and select few transport-layer parameters (maximum buffer size, Maximum segment size, starting sequence number of segment).

  8. Transport Service • Upper Layer Services • Transport Service Primitives • Berkeley Sockets

  9. Services Provided to the Upper Layers The network, transport, and application layers

  10. Transport Service Primitives (1) The primitives for a simple transport service

  11. Transport Service Primitives (2) Nesting of TPDUs, packets, and frames.

  12. Berkeley Sockets (1) A state diagram for a simple connection management scheme. Transitions labeled in italics are caused by packet arrivals. The solid lines show the client’s state sequence. The dashed lines show the server’s state sequence.

  13. Berkeley Sockets (2) The socket primitives for TCP

  14. Example of Socket Programming: An Internet File Server (1) . . . Client code using sockets

  15. Example of Socket Programming: An Internet File Server (2) . . . . . . Client code using sockets

  16. Example of Socket Programming: An Internet File Server (3) . . . Client code using sockets

  17. Example of Socket Programming: An Internet File Server (4) . . . Server code

  18. Example of Socket Programming: An Internet File Server (5) . . . . . . Server code

  19. Example of Socket Programming: An Internet File Server (6) . . . Server code

  20. Elements of Transport Protocols (1) • Addressing • Connection establishment • Connection release • Error control and flow control • Multiplexing • Crash recovery

  21. Elements of Transport Protocols (2) • Environment of the data link layer. • Environment of the transport layer.

  22. Addressing TSAPs (Transport Service Access Points)= port number NSAPs (Network Service Access Points)

  23. Addressing How a user process in host 1 establishes a connection with a mail server in host 2 via a process server.

  24. Port numbers Transport layer at the receiving host delivers data to the socket There should be a unique identifier for each socket. Socket identifier is called socket address Socket address = IP address & Port number

  25. Port numbers

  26. IP addresses versus port numbers Process-to-Process delivery needs IP address and Port number

  27. IANA ranges Port numbers are 16-bit integers between 0 - 65535 • Well-known: Assigned and controlled by Internet Assigned Numbers AuthorityIANA for example: FTP 20,21, TELNET 23, SMTP 25, HTTP 80

  28. Well-known ports used with UDP

  29. Well-known ports used by TCP

  30. Error control Why we need error control at the transport layer?

  31. Connection Establishment • Establishing a connection sounds easy, but it is actually surprisingly tricky. At first glance, it would seem sufficient for one transport entity to just send a CONNECTION REQUEST TPDU to the destination and wait for a CONNECTION ACCEPTED reply. • The problem occurs when the network can lose, store, and duplicate packets. This behavior causes serious complications. • Restrict packet lifetime • Equipping each host with a time-of-day clock. • Three-way handshake

  32. Connection Establishment Techniques for restricting packet lifetime • Restricted network design. • Putting a hop counter in each packet. • Timestamping each packet.

  33. Connection Establishment (2) • TPDUs may not enter the forbidden region. • The resynchronization problem.

  34. Connection Establishment Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. Normal operation.

  35. Connection Establishment Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. Old duplicate CONNECTION REQUEST appearing out of no-where.

  36. Connection Establishment Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. Duplicate CONNECTION REQUEST and duplicate ACK

  37. Connection Release Sudden disconnection with loss of data

  38. Connection Release Four protocol scenarios for releasing a connection. (a) Normal case of three-way handshake

  39. Connection Release (4) Four protocol scenarios for releasing a connection. (b) Final ACK lost.

  40. Connection Release (5) Four protocol scenarios for releasing a connection. (c) Response lost

  41. Connection Release (6) Four protocol scenarios for releasing a connection. (d) Response lost and subsequent DRs lost.

  42. Multiplexing (a) Multiplexing. (b) Inverse multiplexing.

  43. segment - unit of data exchanged between transport layer entities Demultiplexing: delivering received segments to correct app layer processes M M M M application transport network application transport network application transport network H n Multiplexing/demultiplexing How hosts handle more than one session simultaneously receiver P3 P4 application-layer data segment header P1 P2 segment H t M segment sender B sender A

  44. multiplexing/demultiplexing in the Internet: based on sender, receiver port numbers, IP addresses source, dest port #s in each segment recall: well-known port numbers for specific applications Multiplexing: Multiplexing/demultiplexing gathering data from multiple app processes, enveloping data with header (later used for demultiplexing) 32 bits source port # dest port # other header fields application data (message) TCP/UDP segment format

  45. Source IP: C Dest IP: B source port: x dest. port: 80 Source IP: C Dest IP: B source port: y dest. port: 80 Source IP: A Dest IP: B source port: x dest. port: 80 source port:23 dest. port: x source port: x dest. port: 23 Multiplexing/demultiplexing: examples Web client host C server B host A port use: simple telnet app (Note how port 23 at server must be shared whereas port x at host can be reserved) Web server B Web client host A port use: Web server Q: how does the server know which packets go with which process?

  46. Encapsulation and decapsulation

  47. Multiplexing and demultiplexing

  48. Congestion Control • Desirable bandwidth allocation • Regulating the sending rate

  49. The Internet Transport Layer • The Internet supports two transport layer protocols: • The Transport Control Protocol (TCP) for reliable service • The Unreliable (User) Datagram Protocol (UDP)

  50. Position of UDP in the TCP/IP protocol suite

More Related