首页 > 代码库 > Connection-Oriented and Connectionless Services

Connection-Oriented and Connectionless Services

Two distinct techniques are used in data communications to transfer data. Each has its own advantages and disadvantages. They are the connection-oriented method and the connectionless method:

  • Connection-oriented    Requires a session connection (analogous to a phone call) be established before any data can be sent. This method is often called a "reliable" network service. It can guarantee that data will arrive in the same order. Connection-oriented services set up virtual links between end systems through a network, as shown in Figure 1. Note that the packet on the left is assigned the virtual circuit number 01. As it moves through the network, routers quickly send it through virtual circuit 01.

  • Connectionless    Does not require a session connection between sender and receiver. The sender simply starts sending packets (called datagrams) to the destination. This service does not have the reliability of the connection-oriented method, but it is useful for periodic burst transfers. Neither system must maintain state information for the systems that they send transmission to or receive transmission from. A connectionless network provides minimal services.

Figure 1

Connection-oriented methods may be implemented in the data link layers of the protocol stack and/or in the transport layers of the protocol stack, depending on the physical connections in place and the services required by the systems that are communicating. TCP (Transmission Control Protocol) is a connection-oriented transport protocol, while UDP (User Datagram Protocol) is a connectionless network protocol. Both operate over IP.

The physical, data link, and network layer protocols have been used to implement guaranteed data delivery. For example, X.25 packet-switching networks perform extensive error checking and packet acknowledgment because the services were originally implemented on poor-quality telephone connections. Today, networks are more reliable. It is generally believed that the underlying network should do what it does best, which is deliver data bits as quickly as possible. Therefore, connection-oriented services are now primarily handled in the transport layer by end systems, not the network. This allows lower-layer networks to be optimized for speed.

LANs operate as connectionless systems. A computer attached to a network can start transmitting frames as soon as it has access to the network. It does not need to set up a connection with the destination system ahead of time. However, a transport-level protocol such as TCP may set up a connection-oriented session when necessary.

The Internet is one big connectionless packet network in which all packet deliveries are handled by IP. However, TCP adds connection-oriented services on top of IP. TCP provides all the upper-level connection-oriented session requirements to ensure that data is delivered properly. MPLS is a relatively new connection-oriented networking scheme for IP networks that sets up fast label-switched paths across routed or layer 2 networks.

A WAN service that uses the connection-oriented model is frame relay. The service provider sets up PVCs (permanent virtual circuits) through the network as required or requested by the customer. ATM is another networking technology that uses the connection-oriented virtual circuit approach.


Copyright (c) 2001 Tom Sheldon and Big Sur Multimedia.
All rights reserved under Pan American and International copyright conventions.


两个问题:


1. Can a connection-oriented, reliable message transfer service be provided across a connectionless packet network? Explain. 

Answer:

Yes. To provide a connection-oriented service, the transport layer can establish a logical connection across the connectionless packet network by setting up state information (for example, packet sequence number) at the end systems. During the connection setup, the message is broken into separate packets, and each packet is assigned a sequence number.

Using the sequence numbers, the end-system transport-layer entities can acknowledge received packets, determine and retransmit lost packets, delete duplicate packets, and rearrange out-of-order packets. The original message is reassembled as packets arrive at the receiving end.

For example, TCP provides a connection-oriented reliable transfer service over IP, a connectionless packet transfer service. 

2. Can a connectionless datagram transfer service be provided across a connection-oriented network? 

Answer:

Yes. The connectionless datagram transfer service can be implemented by simply setting up a connection across the network each time a datagram needs to be transferred. Alternatively, all nodes can have permanent connections to a “connectionless server” that has the function of relaying datagrams in connectionless fashion. 







Connection-Oriented and Connectionless Services