Presentation is loading. Please wait.

Presentation is loading. Please wait.

4343 X2 – 20071 The Transport Layer Tanenbaum Ch.6.

Similar presentations


Presentation on theme: "4343 X2 – 20071 The Transport Layer Tanenbaum Ch.6."— Presentation transcript:

1 4343 X2 – 20071 The Transport Layer Tanenbaum Ch.6

2 4343 X2 – 20072 Outline Transport Service Elements of Transport Protocols UDP TCP Performance Issues

3 4343 X2 – 20073 Transport Layer Services The goal of the transport layer is to provide efficient, reliable and cost-effective service to users. Users are normally processes in the application layer. The hardware/software that does this work is known as the transport entity.

4 4343 X2 – 20074 Transport Services There are two types of transport services: –connection-oriented –connectionless This is very similar to the network layer. Why bother having two? The answer is subtle – network layer code runs on routers while transport layer code is run on user’s machines.

5 4343 X2 – 20075 Transport QoS The introduction of the Transport Layer is to add an additional layer where the user has some control over the QoS. Users cannot control the QoS in the Network Layer. The Transport Layer can manage connections at the Network Layer, picking up dropped connections and making sure that the application doesn’t have to deal with problems

6 4343 X2 – 20076 Avoiding Different Network Types The Transport Layer is responsible for hiding the underlying Network Layer. This allows people to code for one basic network standard without having to worry about the different underlying networks. This makes the Transport Layer the first layer in the transport service user upper levels, connecting directly to the transport service provider lower levels.

7 4343 X2 – 20077 Transport Layer Primitives The messages sent from one transport entity to another is known as a TPDU (Transport Protocol Data Unit).

8 4343 X2 – 20078 Elements of Transport Protocols Addressing Connection Establishment Connection Release Flow Control and Buffering Multiplexing Crash Recovery

9 4343 X2 – 20079 Transport Protocols The transports protocols resemble the data link protocols from Chapter 3. Both deal with error control, sequencing, flow control, etc. There are differences, mainly associated with the different levels at which they are implemented.

10 4343 X2 – 200710 TP - Addressing Where to we send data? On the Internet, we make connections to ports or AAL-SAPs. The book uses the generic term TSAP (Transport Service Access Point). An IP address is an example of a Network Service Access Point (NSAP).

11 4343 X2 – 200711 Common Ports All ports under 1024 are reserved for system use, although system administrators are able to access and even remap these ports. Applications look for common servers under common ports. These servers often don’t run all the time – an inet deamon starts them when needed.

12 4343 X2 – 200712 TSAPs and NSAPs

13 4343 X2 – 200713 Connection Establishment Although connections seem simple, they are complicated because the network can lose, store and duplicate packets. Delayed duplicate packets can cause serious troubles. –Consider a transaction happening twice instead of once… We need to figure out a way to deal with duplicate packets.

14 4343 X2 – 200714 Avoiding Duplicates We could use throwaway transport addresses. We could give each connection a connection identifier. We could devise a way to kill off old packets in the network. This would make the problem more manageable.

15 4343 X2 – 200715 Connections The three-way handshake was introduced to establish a connection. The first machine sends a CONNECTION REQUEST to host 2 containing a sequence number. Host 2 replies with an ACK acknowledging the sequence number and sending it’s own initial sequence number. Host 1 acknowledges Host 2’s choice of sequence number in the first data packet.

16 4343 X2 – 200716 Connection Release We can release the connection symmetrically or asymmetrically. Asymmetric is just like a telephone – when one person ends the connection, it is broken. Asymmetric release can cause data loss if one side sends data that is not received before the disconnect.

17 4343 X2 – 200717 Connection Release (cont’d) Symmetric – treats the connection like two unidirectional connections, requiring each end of the connection to be released. Unfortunately, determining when the two sides are done is difficult. This problem is known as the two-army problem.

18 4343 X2 – 200718 Connection Release Host 1 sends a Disconnect Request (DR) to Host 2. Host 2 replies with a DR and starts a timer just in case the reply is lost. Host 1 will ACK the DR from Host 2 and release the connection. When the ACK arrives, Host 2 will drop the connection. If the final ACK is lost, the time will take care of the disconnection.

19 4343 X2 – 200719 Connection Release Protocols

20 4343 X2 – 200720 Connection Release Protocols 2

21 4343 X2 – 200721 User Datagram Protocol (UDP) UDP is a connectionless transport protocol used in the Internet. UDP is used to send encapsulated datagrams without having to establish a connection. UDP is described in RFC 768.

22 4343 X2 – 200722 UDP Header 8 bytes followed by the payload. It should be noted that the advantage of UDP over IP packets is the use of the source and destination ports.

23 4343 X2 – 200723 Transmission Control Protocol (TCP) Was designed to provide a reliable end-to- end byte stream. This stream is supposed to work well even over an unreliable network. TCP must dynamically adapt to different networks, delays, packet sizes, etc and must be robust to failures.

24 4343 X2 – 200724 TCP Service Model Service for TCP is obtained using sockets. Sockets have an IP address and a port number. The port number is used to specify where on the machine the data should go. All TCP connections are full duplex and point-to-point.

25 4343 X2 – 200725 TCP Service Model (cont’d) TCP can buffer data at its discretion. A PUSH flag can be set to send the data right away. We can also use the URGENT DATA flag when sending special data, such as hitting the DEL key or the CTRL-C to try and stop a process from continuing.

26 4343 X2 – 200726 TCP Protocol Uses a 20 byte header (lots of overhead) Size is restricted by two things: –the IP payload size (65,515 bytes excluding the header) –the maximum transfer unit (MTU) for the network (usually 1500 bytes)

27 4343 X2 – 200727 TCP Header

28 4343 X2 – 200728 TCP Connection Establishment The three-way handshake is used to establish connections. One side (the server) passively listens for incoming connections The other side (the client) connects to the server with a connection request and sets out the parameters. The server replies with an acknowledgement and the connection is set.

29 4343 X2 – 200729 TCP Connection Establishment

30 4343 X2 – 200730 TCP Connection Release To end a connection, either party can send a TCP segment with the FIN bit set, meaning that it has no more data to transmit. Once the FIN is acknowledged, then data transfer in that direction is shut down. The same must be done to shut down data transfer in the other direction.

31 4343 X2 – 200731 TCP Connection Management Model

32 4343 X2 – 200732 TCP Congestion Control TCP does most of the work in the Internet when it comes to congestion control. TCP is responsible for slowing down the rate of transmitting packets in order to help ease congestion in the network. TCP will adjust the size of the window used to transmit data based on the congestion in the network.

33 4343 X2 – 200733 Congestion

34 4343 X2 – 200734 Congestion Windows Each sender maintains two windows: –a window to tell it how large a packet the receiver can receive –a window to tell it how large a packet the network can handle The sender will choose the smallest of these two sizes to send.


Download ppt "4343 X2 – 20071 The Transport Layer Tanenbaum Ch.6."

Similar presentations


Ads by Google