Connection-Oriented and Connectionless Services

来源:互联网 发布:自然拼读法软件 编辑:程序博客网 时间:2024/06/03 22:05

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.

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.