13 May 2010

Transport Layer, Reliable Connections

The fourth layer of the OSI Reference Model is the transport layer. The transport layer has four main functions:
■ It sets up and maintains a session connection between two devices.
■ It can provide for the reliable or unreliable delivery of data across this connection.
■ It can implement flow control through ready/not ready signals or windowing to ensure one device doesn’t overflow another device with too much data on a connection.
■ It multiplexes connections, allowing multiple applications to simultaneously send and receive data.

The following sections cover these processes.


Reliable Connections
The transport layer can provide reliable and unreliable transfer of data between networking devices. TCP/IP’s Transmission Control Protocol (TCP) is an example of a transport layer protocol that
provides a reliable connection. When implementing a reliable connection, sequence numbers and acknowledgments (ACKs) are used. For example, when information is sent to a destination, the destination will acknowledge to the source what information was received. The destination can examine the sequence numbers to determine if anything was missing, as well as put the data back in the correct order, if it arrived out of order, before passing it on to the upper-layer application. If a segment is missing, the destination can request the source to resend the missing information. With some protocol stacks, the destination might have the source resend all of the information, or parts of the information, including the missing parts.

With reliable connections, before a device can send information to another device, a handshake process must take place to establish the connection. Figure 2-6 shows the steps involved. Let’s assume that this is TCP setting up a reliable IP connection. In this example, PC-A wants to send data reliably to PC-B. Before this can take place, PC-A must set up a reliable connection to PC-B. The two devices go through a threeway handshake to establish the connection. Here are the three steps that occur:

1. The source sends a synchronization (SYN) message to the destination, indicating that the source wants to establish a reliable connection.
2. The destination responds with both an acknowledgment and a synchronization message. The acknowledgment indicates the successful receipt of the source’s SYN message, and the destination’s SYN message indicates that a connection can be set up. Together, these messages are referred to as SYN/ACK; they are sent together in the same data transfer.
3. Upon receiving the SYN/ACK, the source responds with an ACK message. This indicates to the destination that its SYN was received by the source and that the connection is now complete.

Once the three-way handshake has taken place, data can be transferred across the connection. Because the connection was established first, this type of service is referred to as connectionoriented. Remember that this type of connection always goes through a three-way handshake before one device can start sending and receiving information from another.

No comments:

Post a Comment