1 / 20

Chapter 6

Chapter 6. The Transport Layer. The Transport Service. Services provided to the Upper Layers. Quality of Service Transport service primitives Services provided to upper layer Provide efficient reliable and cost effective services to processes in the application layer

katen
Download Presentation

Chapter 6

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. Chapter 6 The Transport Layer

  2. The Transport Service • Services provided to the Upper Layers. • Quality of Service • Transport service primitives • Services provided to upper layer • Provide efficient reliable and cost effective services to processes in the application layer • Transport entity does the work (could exist in OS, in a user process or a library pkg.) next slide • Connection oriented and connectionless (but this is also in the network layer). Why do we need transport layer at all? See two slides from this one.

  3. The Transport Service • Services provided to upper layer TPDU = Transport protocol data unit

  4. The Transport Service • Why two distinct layers? • Network layer is part of communication subnet and is run by the carrier (for WAN’s). • What if network layer is unreliable, loses packets or crashes? • Users have no control over subnet and cannot poor service problems • Need to put a layer on top of network layer that improves the quality of service. • Lost pkts + bad data can be detected and compensated for by the trans. Layer.

  5. The Transport Service • Why two distinct layers? • App programs can be written using standard primitives and have them work on a wide variety of networks - ignoring subnet interfaces and poor transmission • Isolates upper layers from imperfections of subnet • Bottom 4 layers are transport service provider • Upper layers are called transport service user

  6. The Transport Service • Quality of Service • Bridges gap between a possibly unreliable network layer and what the transport users want • Connection establishment delay, connection establishment failure probability, throughput, transit delay, residual error ratio, protection, priority, resilience • Connection establishment delay amt. Of time elapsing between a transport connection being requested and its confirmation being recd. • Connection establishment failure probability is the prob. Of a conn. Not being estd. Withing the max. establishment delay time.

  7. The Transport Service • Quality of Service • Throughput parameter measures the number of bytes of user data transferred per second, measured over some time interval. • Transit delay measures the time between a mess. Being sent by the transport user on the source machine and its being recd. By the transport user on the destination machine. • Residual error ratio measures the number of lost of garbled messages as a fraction of total sent • Protection transport user can specify protection against wiretappers.

  8. The Transport Service • Quality of Service • Throughput parameter measures the number of bytes of user data transferred per second, measured over some time interval. • Transit delay measures the time between a mess. Being sent by the transport user on the source machine and its being recd. By the transport user on the destination machine. • Residual error ratio measures the number of lost of garbled messages as a fraction of total sent • Protection transport user can specify protection against wiretappers.

  9. The Transport Service • Quality of Service • Priority indicate some connections are more impt than others - in case of congestion make sure that the higher-priority connections get serviced before the low priority ones. • Resilience probability of the transport layer itself spontaneously terminating a connection due to internal problems or congestion.

  10. The Transport Service Primitive TPDU sent Meaning LISTEN (none) Block until some process tries to connect CONNECT CONNECTION REQ. Actively attempt to establish a connection SEND DATA Send information RECEIVE (none) Block until a DATA TPDU arrives DISCONNECT DISCONNECTION REQ. This side wants to release connection • Transport service primitives • TSP allows users of the transport layer to access transport service. 1 2 3 4 5 1 Server executes a LISTEN. Server blocks until client shows up. 2 Client executes CONNECT. Transport layer blocks client, sends pkt. to server. CONN. REQ. TPDU sent to server. Transport entity checks if server is blocked on a LISTEN. If so, sends CONN. ACCEPTED TPDU to client. On recpt. by client, client is unblocked. 3,4 Can use SEND/RECEIVE now. Blocking is used. 5 Asymmetric DISCONNECT - either party can issue a DISCONN. primitive. Symmetric - one side does DISC means no more data from that side, but it is willing to recv. data from other side. Connection released when both do DISC.

  11. Bezerkely sockets • Sockets Primitive Meaning S E R V E R SOCKET Create a new communication end point. Alloc. table space. Success returns a file descriptor (FD). BIND Attach a local address to a socket. After address binding, remote clients can connect. LISTEN Announce readiness to accept conns; give queue size. Nonblocking. ACCEPT Block caller until conn attempt comes. Spawn socket+new FD. Listen on orig. sock. C L I E N T CONNECT Actively attempt to establish conn (1). Blocks caller. On completion, unblocked. SEND Send some data over the connection RECEIVE Receive data from the connection CLOSE Release the connection. It is symmetric. 1 Client must first use SOCKET primitive.

  12. Establishing a connection • Three way handshake (Normal Operation) • Host 1 chooses seq number = x and sends CONNECTION REQUEST (CR) to host 2. • Host 2 replies with CONNECTION ACCEPTED (ACK) acknowledging x and announcing its own seq = y • Host 1 acks host 2 choice of initial seq number (y) in the first set of data that it sends. • Three way handshake (Old Duplicate) • First TPDU is a delayed CR (arrives at host 2 without 1 knowing) • 2 responds by sending an ACK

  13. Releasing a connection • Releasing a connection • Two ways - asymmetric and symmetric • Asymmetric - hang up the phone. Symmetric each party hangs up - each connection is unidirectional. Connection is established. H1 sends 1 TPDU. It sends another, but H2 sends a disconnect request (DR) and connection is lost and data remain in limbo.

  14. FINAL ACK LOST NORMAL RESPONSE LOST & SUBSEQ. DR’s LOST RESPONSE LOST

  15. Releasing a connection • Read paragraphs 1, 2, 3 on page 502 on your own. • Ignore 6.2.4, 6.2.5, 6.2.6, • Ignore section 6.3

  16. TCP and UDP • TCP (Transmission Control Protocol) • Connection oriented (UDP - User Datagram Protocol is connectionless). • Designed to dynamically adapt to properties of the internetwork since different topologies, bandwidths, delays & packet sizes exist on the internetwork. • Need to distinguish between TCP transport entity (softw.) & TCP proto. (rules). Clear from the context. • TCP Service Model • Service is obtained by having sender and receiver create sockets. Sockets have IP address of host as well as a 16 bit number (port) associated with it.

  17. TCP and UDP • TCP Service Model • Service is obtained by having sender and receiver create sockets. Sockets have IP address of host as well as a 16 bit number (port) associated with it. • More than one conn. can terminate in same socket. • Port numbers < 1024 are well known ports - e.g., FTP is port 21, Telnet 23. • TCP is full dup. & point-to-point (no broad or multi) • Byte stream not message stream. e.g., user writes 4x512 bytes to TCP stream. Receiver may get it as 2048 bytes, 2x1024 bytes, 4x512 bytes.

  18. TCP Segment Header

  19. TCP Segment Header • Fixed format 20byte header. • Source port/dest. Port (1024 and above) • Seq number • Acknowledgement # is not the last byte correctly received but the next byte expected • TCP Header length - how many 32 bit words are contained in the TCP header.

More Related