Differences between virtual circuits and datagram and Their Applications

Source: Internet
Author: User

TCP features connection-oriented, reliable transmission, error control, and traffic control. TCP data transmission is based on virtual circuits.

 

The communication channel established for connection-oriented sessions is naturally logical and often referred to as virtual circuit. It is concerned with endpoints. Compared with finding an actual physical path on the network, this channel is more concerned with maintaining the connection between the two endpoints. In a network with multiple destination paths, the physical path changes as the data mode changes during the session, but the endpoints (and intermediate nodes) keep track of the path,
**************************************** **

Virtual circuits should refer to virtual circuits with "meaning. There is a circuit that logically seems to be fixed, but in fact it uses different paths with different sessions. That is to say, there is no fixed path. It is flexible in the communication process. The path used and how to perform the operation are created through three-way handshakes. In the process of sending the handshake signal, the sender and receiver are known, and a path is created. This path is a logical circuit. Later transmission will proceed.

 

The connection-oriented session creation process is as follows:
1. The source application requests a connection-oriented communication session.
2. Establish a session (it takes some time, which is one reason to choose a connectionless protocol ).
3. Start data transmission on the logical connection.
4. At the end of transmission, the channel is disconnected.

---------------------------------------------------------------------

The differences between the virtual circuit service and the datagram service are summarized in the following table:

      

Comparison

Virtual circuit

Datagram

Connection Establishment

Required

No

Destination site address

Used only during connection setup. Each group uses a short virtual circuit number.

Each group has the full address of the destination site.

Route Selection

When the virtual circuit connection is established, all groups are connected by the same route

Independent routing for each group

When a router fails

All virtual circuits passing through the faulty router cannot work.

Failed routers may lose groups, and some routes may change.

Group Order

Always arrive at the destination site in the order of sending

The destination site may not be in the sending order

End-to-End error handling

Responsible for Communication Subnet

Host-responsible

End-to-End Traffic Control

Responsible for Communication Subnet

Host-responsible

 

In terms of Communication Subnet resources occupation, the virtual circuit service occupies the storage space of the Node switch, and the datagram service independently selects the path for each complete target address. If a large number of short groups are transmitted, bandwidth is wasted if the data header is much larger than the data header.

From the perspective of time overhead: the virtual circuit service has a connection creation time overhead, which is a waste of transmitting a small number of short groups. The datagram Service determines the destination of the group, each group has an analysis time overhead.

In terms of congestion avoidance, the virtual circuit service can be reserved for the connected resources. Once the group arrives, the required bandwidth and the capacity of the Node switch are available, therefore, there are some advantages to avoid congestion. The datagram service is very difficult.

In terms of robustness, the failure of communication lines is a critical factor for the virtual circuit service, but it is easy for the datagram service to be compensated by adjusting the routing. Therefore, virtual circuit services are more vulnerable.

 

Certificate ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Basic tutorial on computer network

Book http://www.gdou.edu.cn/te/net/index.htm

4.1 http://www.gdou.edu.cn/te/net/net41.htm

4.1 virtual circuit and Datagram

The communication between endpoints is achieved by the communication between nodes in the Communication Subnet. In the OSI model, the network layer is the top layer of the network node, therefore, the network layer will reflect the network services that the Communication Subnet provides to the end system. In group exchange, the virtual circuit and datagram network services provided by the Communication Subnet to the end system, and the operation methods inside the Communication Subnet are also virtual circuit and datagram.

1. virtual circuit operation mode of the Communication Subnet and virtual circuit service provided by the network layer

1. virtual circuit operation mode

For data transmission, a logical path must be established between the source and target nodes of the network. Because this logical circuit is not dedicated, it is called a "virtual" circuit. There may be several virtual circuits between each node and any other node to support data transmission between a specific two-end system. Multiple virtual circuits can also serve different processes. The actual paths of these virtual circuits may be the same or different.
Assume that two virtual circuits pass through a node. When a data group arrives, the node can use the following method to determine which virtual circuit the Group belongs to and forward it to the next correct node. Each time an end system establishes a virtual circuit, it selects an unused virtual circuit number and assigns it to the virtual circuit to distinguish it from other virtual circuits in the system. Each transmitted data group must contain not only group numbers, inspection and other control information, but also virtual circuit numbers to distinguish it from other virtual circuit data groups. Each node stores a virtual circuit table, which records information about an opened virtual circuit, including the virtual circuit number, the previous node, and the next node, the information is determined during the establishment of the virtual circuit.
The above-mentioned virtual circuit table method with fixed virtual circuit numbers has some defects, because each end system selects virtual circuit numbers independently, which may lead to duplicate virtual circuit numbers, if two virtual circuits with the same serial number pass through the same node, the error will occur. The solution is to use a "dynamic" virtual circuit number.
"Dynamic" virtual circuit number. It refers to the fact that each node may give different numbers to the same virtual circuit based on the actual situation of the node. The virtual circuit table of each node is also established during the call request process.
When creating a virtual circuit, each item in the virtual circuit table of each node should record two virtual circuit numbers: the virtual circuit number selected by the previous node and the virtual circuit number selected by the current node. In this way, each virtual circuit has a unique virtual circuit number.
Because the data on the virtual circuit is transmitted in two directions, to ensure that the positive and reverse directions between two nodes are not confused, when a node selects a virtual circuit number to replace the virtual circuit number used by the previous node, consider not only the different virtual circuit numbers between the following nodes, consider the differences between the virtual circuit numbers selected when one of the following nodes acts as the previous node of another reverse virtual circuit.

2. virtual circuit Service

Virtual circuit service is a reliable data transmission method provided by the network layer to the transport layer so that all groups arrive at the destination system in order. There is a virtual circuit between two end systems for data exchange.
To establish virtual circuits between end systems, the transport layer of the source system first sends a connection request to the network layer, and the network layer sends a call group to the network node through the virtual circuit network access protocol, the Network Node sends a call group to the network layer of the terminal system, and the network layer sends a connection instruction to the transport layer. Finally, the transport layer of the receiver sends a response to the initiator to establish the virtual circuit. Later, data can be transmitted between two end systems. Data is divided into several groups by the network layer and sent to the Communication Subnet. The Communication Subnet transfers the group to the data receiver.
The above virtual circuit service is a service provided by the network layer to the transport layer, and also a network service provided by the Communication Subnet to the end system. However, the actual operation inside the Communication Subnet that provides the virtual circuit service can be either a virtual circuit or a data packet. Generally, virtual circuit services are provided for networks operated by virtual circuits. connection-oriented network services in OSI are virtual circuit services. In the virtual circuit operation mode, the network layer of the end system is the same as that of the Communication Subnet node. Most public networks such as SNA and transpac use this virtual circuit operation to support virtual circuit service.
A network operated by a datagram can also provide a virtual circuit service, that is, the nodes in the Communication Subnet exchange data in the datagram mode, while the network nodes connected to the end system provide the virtual circuit service to the end system. For the end system, the communication between the network layer and network nodes is still like the situation between network nodes in the virtual circuit operation mode. The virtual circuit is first established, then the data group is exchanged, and the circuit is finally removed. But in fact, each group is divided into several datagram nodes by network nodes, attaching the address, serial number, virtual circuit number, and other information to the destination node. Then, the destination node sorts the data into original groups and sends them to the destination system. Therefore, between the source system and the source network node. The Network Layer Between the destination node and the destination system is switched by virtual circuit operation, while the destination node and the source node are switched by datagram. Although the dual-data exchange in the Communication Subnet is not very reliable, the network nodes at both ends have done a lot of extra work, such as forward sequence and re-transmission, to meet the requirements of the virtual circuit service. For example, in ARPANET, data exchange is used internally, but data packets and virtual circuits can be provided to the end system.

2. the datagram operation mode of the Communication Subnet and the datagram service provided by the network layer

1. datagram Operation Method

In the datagram mode, each group is called a datagram. Several datagram forms the packet or data block to be transmitted at a time. Each datagram carries sufficient information. Its transmission is handled independently. After a node receives a datagram, it finds a proper way out based on the address information in the datagram and the route information stored by the node, and sends the datagram to the next node as it is.
When the end system needs to send a packet, the packet is split into several data packets with serial numbers and address information and sent to the network node in turn. After that, the path of each datagram may be different, because each node selects a route at any time based on network traffic, faults, and other conditions. Because of the different ways, the data packets cannot arrive at the destination node in order, and some data packets may even be lost on the way. During the entire transmission process, you do not need to create a virtual circuit, but you need to select a route for each datagram.

2. datagram Service

The datagram service is generally provided only by the datagram exchange network. The network layer of the terminal system is consistent with the network layer of the network node in the way of data exchange. When the end system sends data, the network layer attaches the address, serial number, and other information to the data and sends it as a datagram to the network node. The datagram received by the destination system may not arrive in order, data packets may also be lost. The datagram service is similar to the OSI connectionless network service.
The combination of datagram services provided by the virtual circuit switching network is not common. It is conceivable that there is a special situation:
The network layer of an end system has already constructed a service for processing data packets. when it needs to be incorporated into a network operated by a virtual circuit, the network node needs to perform some conversion. When the end system sends a data report with the complete address information to the network node, if the number of data packets sent to the same address is large enough, then, the network node can create a virtual circuit for the datagram and the target node, and all the datagram with the same address are transmitted on the virtual circuit. After a period of time, this virtual circuit can be removed when data packets with the same address are not sent. Therefore, this datagram service has the communication quality of the virtual circuit service, but it is neither economical nor efficient.

Iii. Features of two operation modes and two Network Services

1. Features of the two methods
Virtual circuit group switching is suitable for a long period of data exchange between the end systems, especially in the case of frequent interactive sessions, but each time the data is transmitted is very short, the overhead of the address information in each group is not required, but the overhead of maintaining the virtual circuit table is required for each network node. Therefore, we need to weigh the two factors, and consider that it is not appropriate if the number of circuit establishment and removal is too frequent.
Datagram eliminates the call establishment process and is simpler and more flexible than virtual circuits when the number of packets transmitted by group is small. Each datagram can temporarily select a less crowded link based on the traffic in the network, unlike each group in the virtual circuit must be transmitted according to the path when the connection is established. Each node has no additional overhead, but each group must be routed to each node, which affects the transmission speed.
The virtual circuit provides a reliable communication function to ensure that each group arrives correctly and the group remains in the original order. In addition, the traffic of two data endpoints can be controlled. When the receiver cannot receive data, it can notify the sender to suspend the sending group, but the virtual circuit has a fatal weakness, that is, when a node or a link fails completely, all virtual circuits passing through the node or link will be damaged. In the datagram mode, the impact of such a fault is much smaller. When the above fault occurs, only groups cached on the node may be lost, other groups can bypass the fault zone to reach the destination, or be shelved until the fault is repaired before transmission. However, data packets do not guarantee that the data groups arrive in order, and data loss is not immediately discovered.

2. Features of the two Network Services
The essential difference between the virtual circuit service and the datagram service is: whether the communication functions such as sequential control, error control, and traffic control are handed over to the Communication Subnet or completed by the end system itself.
The virtual circuit service ensures data delivery in sequence to the end system, eliminating the overhead of the end system in order control. However, when the system itself does not care about the order of data, this function becomes redundant, but affects the overall efficiency of unordered data exchange.
The virtual circuit Service provides error-free data transmission to the end system. However, when the end system only requires fast data transmission and does not care about the loss of individual data blocks, the error control provided by the virtual circuit service is unnecessary. On the contrary, some end systems require high data transmission quality. The error control provided by the virtual circuit service cannot meet the requirements, and the end system still needs to implement more strict error control by itself, at this time, the work done by the virtual circuit service is a little redundant. However, in this case, the virtual circuit service, after all, shares part of the work for the end system to a certain extent, and plays a role in reducing the error probability.
The traffic control provided by the virtual circuit service is sometimes not suitable for the end system, for example, when the data exchange rate is required to be as high as possible. Because the virtual circuit service always transmits data in a fixed path, and does not flexibly take shortcuts. In addition, the traffic control itself may limit the switching rate.
The virtual circuit Service provides reliable data transmission and convenient inbound interfaces. However, the establishment and removal of circuits in the virtual circuit service will affect the communication efficiency in interactive applications.
The above mainly analyzes the advantages and disadvantages of the virtual circuit service, and supplements the advantages and disadvantages of the datagram service.
It can be seen that the two services have both advantages and disadvantages. The selection of the two depends on the application background. That is, network users require only data transmission for the Communication Subnet, so they do not have to worry about it ", we still hope that the Communication Subnet can provide more reliable services to relieve our burden. Some people compare the virtual circuit service to a bus and the datagram service to a taxi. To some extent, this metaphor shows the characteristics of the two services.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.