The Transport Layer and UDP

Transport Layer

The transport layer is one of the 7 layers of the OSI model. It’s purpose is to provide robust end-to-end service to to the upper layers and is responsible for end-to-end delivery of the message. Therefore, the transport layer must consider addressing, reliability, flow control and multiplexing in order to accomplish it’s main goals.

Reliable delivery is not a compulsory service for the transport layer, however since this layer is expected to be responsible for delivering the messages from end-to-end, it only makes sense to implement reliable delivery at this layer. Reliable delivery is provided by using error control, sequence control, loss control and duplication control.

Sequence control is very important because messages not arriving in order can cause very important information to be lost or even overwritten. For example, when one process relies on another, the order in which messages arrive will influence the final result meaning that sequence errors will lead to errors in the application. This is similar to the complexities encountered when working with databases or other applications that are multi-threaded. Consider performing a mathematical calculation. If one process retrieves the stored value to be used in the calculation just before the second process updates that value, then even if that value is updated, the first process is unfortunately using the incorrect value for its calculation.

Of course, if sequence control is an important issue, obviously so it loss control! If messages are not even received, the complexity in dealing with such is far more complex than worrying about putting messages back in order which can be accomplished by the use of sequence numbers. If messages are being lost after transmission over a network, it is not necessary to somehow make sure the lost messages are re-sent in a timely fashion. All this must be accomplished in a way such that performance of the system and entire network is not compromised.

Duplication control is important to consider as well because as the speed of networks continue to increase, it becomes possible for different messages to be identified as duplicated and discarded. Similarly, if a packet can become corrupted or erroneous, it is possible then for the sequence number of a real message to be incorrect and cause a duplicate. Also it is entirely possible for a duplicate message to be sent by the sender itself, and therefore this duplicate should be detected to avoid errors.

Flow control is yet another important component of transport to consider. Imagine all these messages that are being delivered over a network, some coming from very high-speed users, others from slower users possibly still using a dial-up connection. Without flow control, a slower user could quickly become completely flooded with messages and suddenly be unable to do anything. Flow control therefore establishes window sizes to try and make sure the network or users do not run into this problem.

Multiplexing refers to the process where multiple messages are combined into a single signal. Demultiplexing is the reverse process of taking a single signal and splitting it into multiple messages. The transport layer performs a multiplexing (to data link layer)/demultiplexing(from data link layer) function with respect to the interface between itself and the layers below it.

With regard to the transport layer, a connection is not necessarily required since messages can be sent by UDP which is connectionless. Therefore, a connection is only required when a connection-oriented transport protocol is being used. If using a connection-oriented transport protocol, then it is important to consider the complexities involved with connection establishment and connection release. Establishing a connection is a rather straight-forward concept. A connection request is sent, and then the sender waits for an acknowledgment confirming the connection. However, problems can occur when duplicate or expired connection requests or acknowledgments show up!

UDP – User Datagram Protocol

UDP is a way of sending data over a network, however unlike TCP, ordering and reliability is not part of the protocol. Because this reduces a significant amount of overhead, UDP is actually faster and more efficient than TCP. However, for applications that require reliable or guaranteed delivery, UDP will not be acceptable. There is also no flow control or congestion control. UDP can have optional error detection, but does not have any method for recovery. Unlike TCP, UDP is compatible with packet broadcasting which is the sending of a message to everyone on a network

  • http://webdesign-maryland.com Maryland Web Design

    I must know where you got your layout from im trying to start my own blog and yours is the coolest.

  • http://unusualsquare.com/ Unusual Square Marketing

    Wow, this is really interesting post. Brilliant way to explain transport layers and UDP’s.