1 / 86

Introduction to Transport Layer in Networking

This article provides an introduction to the transport layer in networking, including its services, elements of transport protocol, UDP, TCP, congestion control, and quality of service. It also explains the functions of the transport layer, addressing mechanism, packetizing issues, and multiplexing/demultiplexing services.

angelod
Download Presentation

Introduction to Transport Layer in Networking

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. welcome

  2. Transport Layer

  3. Transport Layer • Introduction of Transport Layer • The Transport Layer Services • Elements of transport protocol • UDP • Principal of Reliable Data transfer • TCP • TCP Congestion Control • Congestion Control • Quality of Service • Performance

  4. Introduction of Transport layer • The transport layer is the core of the Internet model.The application layer programs interact with each other using the services of the transport layer. • Lists the functiom of a transport layer.

  5. Transport layer functions : • This layer breaks message into packets. • It performance error recovery if the lower layer are not adequately error free. • Function of flow control if not done • Function of multiplexing and demultiplexing sessions together.

  6. OBJECTIVES: • To define process-to-process communication at the transport layer and compare it with host-to-host communication at the network layer. • To discuss the addressing mechanism at the transport layer, to discuss port numbers, and to define the range of port numbers used for different purposes. • To explain the packetizing issue at the transport layer: encapsulation and decapsulation of messages. • To discuss multiplexing (many-to-one) and demultiplexing (one-to-many) services provided by the transport layer.

  7. Transport Layer Service

  8. The Transport Service Services Provided to the Upper Layers Transport Service Primitives Berkeley Sockets

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

  10. Why the transport layer ? 1. The network layer exists on end hosts and routers in the network. The end-user cannot control what is in the network. So the end-user establishes another layer, only at end hosts, to provide a transport service that is more reliable than the underlying network service. 2. While the network layer deals with only a few transport entities, the transport layer allows several concurrent applications to use the transport service. 3. It provides a common interface to application writers, regardless of the underlying network layer. In essence, an application writer can write code once using the transport layer primitive and use it on different networks (but with the same transport layer).

  11. Transport Service Primitives The primitives for a simple transport service.

  12. Transport Service Primitives The nesting of TPDUs, packets, and frames.

  13. Berkeley Sockets The socket primitives for TCP.

  14. Transport Protocol Both data link layer and transport layer do error control, flow control, sequencing. The differences are: 1. Storage capacity in subnet. Frames must arrive sequentially, TPDUs can arrive in any sequence. 2. Frames are delivered to hosts, TPDUs need to be delivered to users, so per user addressing and flow control within the hosts is necessary. (a) Environment of the data link layer. (b) Environment of the transport layer.

  15. Transport Layer • Introduction of Transport Layer • The Transport Layer Services • Elements of transport protocol • UDP • Principal of Reliable Data transfer • TCP • TCP Congestion Control • Congestion Control • Quality of Service • Performance

  16. Elements of Transport Protocol • Addressing • Connection Establishment • Multiplexing and Demultiplexing • Flow Control and Buffering • Crash Recovery

  17. Addressing • TSAP = transport service access point • Internet: IP address + local port • ATM: AAL-SAPs • Each station having only one transport entity, so a transport entity identification is not needed. • The Address should include a designation of the type of transport protocol e.g. TCP,UDP.

  18. Connection Establishment How a user process in host 1 establishes a connection with a time-of-day server in host 2. How a user process in host 1 establishes a connection with a time-of-day server in host 2.

  19. The Connection establishment serves three main purpose • It allows each end to assure that the other exists. • It allows negotiation of optional parameter like maximum segment size. • It triggers allocation of transport entity resources like buffer space.

  20. Establishing a connection • Tomlinson – three-way-handshake

  21. Flow Control and Buffering • Flow control is implemented using modified form of sliding window protocol.The window size is variable and is controlled by the receiver. • The receiver sends a credit allocation to the sender. • If the receiver cannot guarantee that every incoming TPDU wil be accepted, the sender will have to buffer anyway.

  22. Flow control and buffering • Buffer organization

  23. Multiplexing and Demultiplexing • Multiplexing : many-to-one services provided by the transport layer “The Dividing flows of Data from the application into one or many packets” • Demultiplexing : one-to-many services provided by the transport layer “ Allocating each communication flow a unique identifier”

  24. Multiplexing • Upward: reduce number of network connections to reduce cost • Downward: increase bandwidth to avoid per connection limits

  25. Crash recovery • If the host server & router are subject to crashes, the recovery from these crashes makes some problem. • When the server crash while receiving data from client, the outstanding TPDU is lost. TO recover the data, when the server comes back up, its tables are reinitialized, so it no longer knows precisely where it was. • The server send a broadcast TPDU to all the other host, Just crashed and requesting that its clients inform it for the status of all open connections. • Client can be in one of two states: TPDU outstanding or no TPDU outstanding Recovery from a layer N crash can only be done by layer N+1 and only if the higher layer retains enough status information.

  26. Transport Layer • Introduction of Transport Layer • The Transport Layer Services • Elements of transport protocol • UDP • Principal of Reliable Data transfer • TCP • TCP Congestion Control • Congestion Control • Quality of Service • Performance

  27. User Datagram Protocol • UDP is simple, datagram-oriented, transport layer protocol. This protocol is used in place of TCP • UDP is connectionless protocol provides no reliability or flow control mechanisms.It also has no error recovery procedures.

  28. Internet Transport Protocols • Datagram messaging service (UDP) • No-frills extension of “best-effort” IP • Reliable, in-order delivery (TCP) • Connection set-up • Discarding of corrupted packets • Retransmission of lost packets • Flow control • Congestion control (next lecture) • Other services not available • Delay guarantees • Bandwidth guarantees

  29. UDP: User Datagram Protocol [RFC 768] “no frills,” “bare bones” Internet transport protocol “best effort” service, UDP segments may be: lost delivered out of order to app connectionless: no handshaking between UDP sender, receiver each UDP segment handled independently of others Why is there a UDP? no connection establishment (which can add delay) simple: no connection state at sender, receiver small segment header no congestion control: UDP can blast away as fast as desired

  30. Introduction to UDP The UDP header.

  31. Remote Procedure Call Steps in making a remote procedure call. The stubs are shaded.

  32. Internet Checksum Example Note When adding numbers, a carryout from the most significant bit needs to be added to the result Example: add two 16-bit integers 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 wraparound sum checksum

  33. Transport Layer • Introduction of Transport Layer • The Transport Layer Services • Elements of transport protocol • UDP • Principal of Reliable Data transfer • TCP • TCP Congestion Control • Congestion Control • Quality of Service • Performance

  34. Principal of Reliable Data Transfer • Reliable data transfer means, data received without loss or corrupt. All the packets are delivered in the order in which they were sent. • The Complexity of the reliable data transfer protocol determined by characteristics of unreliable channel.

  35. Principles of Reliable data transfer important in app., transport, link layers top-10 list of important networking topics! characteristics of unreliable channel will determine complexity of reliable data transfer protocol (rdt)

  36. Principles of Reliable data transfer important in app., transport, link layers important networking topics! characteristics of unreliable channel will determine complexity of reliable data transfer protocol (rdt)

  37. Principles of Reliable data transfer important in app., transport, link layers important networking topics! characteristics of unreliable channel will determine complexity of reliable data transfer protocol (rdt) Transport Layer

  38. Reliable data transfer: getting started rdt_send():called from above, (e.g., by app.). Passed data to deliver to receiver upper layer deliver_data():called by rdt to deliver data to upper udt_send():called by rdt, to transfer packet over unreliable channel to receiver rdt_rcv():called when packet arrives on rcv-side of channel send side receive side

  39. Reliable data transfer: getting started We’ll: incrementally develop sender, receiver sides of reliable data transfer protocol (rdt) consider only unidirectional data transfer but control info will flow on both directions! use finite state machines (FSM) to specify sender, receiver event state 1 state 2 actions event causing state transition actions taken on state transition state: when in this “state” next state uniquely determined by next event

  40. Transport Layer • Introduction of Transport Layer • The Transport Layer Services • Elements of transport protocol • UDP • Principal of Reliable Data transfer • TCP • TCP Congestion Control • Congestion Control • Quality of Service • Performance

  41. The Internet Transport Protocols: TCP • Introduction of TCP • Features of TCP • The TCP Service Model • The TCP Protocol • The TCP Segment Header • TCP Connection Establishment • TCP Connection Release • TCP Connection Management Modeling • TCP Transmission Policy

  42. Introduction of TCP • The Transmission Control Protocol (TCP) is a critically important part of the TCP/IP suite. • The Transmission Control Protocol (TCP) is the connection oriented protocol whereas User Data Protocol (UDP) is connectionless protocol. Both are internet protocols used in the transport layer. • The TCP provides reliable Transmission of data in IP environment. • TCP offers reliability by providing connection-oriented , end-to-end reliable packet delivery through an internetwork.

  43. Features of TCP • TCP is a process-to-process protocal. • TCP uses port numbers. • It is connection oriented protocol. • It uses flow and error control mechanisms. • TCP is a reliable protocol.

  44. full duplex data: bi-directional data flow in same connection MSS: maximum segment size connection-oriented: handshaking (exchange of control msgs) init’s sender, receiver state (e.g., buffer size) before data exchange flow controlled: sender will not overwhelm receiver point-to-point: one sender, one receiver(not multicast) reliable, in-order byte steam: no “message boundaries” In App layer, we need delimiters. pipelined: TCP congestion and flow control set window size send & receive buffers TCP: Models RFCs: 793, 1122, 1323, 2018, 2581 (The 800 lbs gorilla in the transport stack! PAY ATTENTION!!)

  45. TCP protocol • Three-way handshake to set up connections • Every byte has its own 32-bit sequence number • Wrap around • 32-bit Acks; window size in bytes • Segment = unit of data exchange • 20-byte header + options + data • Limits for size • 64Kbyte • MTU, agreed upon for each direction • Data from consecutive writes may be accumulated in a single segment • Fragmentation possible • Sliding window protocol

  46. TCP header • source & destination ports (16 bit) • sequence number (32 bit) • Acknowledgement number (32 bit) • Header length (4 bits) in 32-bit words • 6 flags (1 bit) • window size (16 bit): number of bytes the sender is allowed to send starting at byte acknowledged • checksum (16 bit) • urgent pointer (16 bit) : byte position of urgent data

  47. 32 bits source port # dest port # sequence number acknowledgement number head len not used Receive window U A P R S F checksum Urg data pnter Options (variable length) application data (variable length) TCP segment structure URG: urgent data (generally not used) counting by “bytes” of data (not segments!) ACK: ACK # valid PSH: push data now (generally not used) # bytes rcvr willing to accept RST, SYN, FIN: connection estab (setup, teardown commands) Due to this field we have a variable length header Internet checksum (as in UDP)

  48. Establishing a connection • Problem: delayed duplicates! • Scenario: • Correct bank transaction • connect • data transfer • disconnect • Problem: same packets are received in same order a second time! Recognized?

  49. Establishing a connection • Connection establishment in a TCP session is initialized through a three-way handshake.To establish the connection, one side pasively waits for an incoming connection by executing the LISTEN and ACCEPT primitives, either specifying a specific source. • connection identifier • Never reused! • Maintain state in hosts • Satisfactory solutions

  50. TCP Connection Establishment (a)TCP connection establishment in the normal case. (b) Call collision. 6-31

More Related