1.数据报切换:
数据报分组交换是一种分组交换方法,它将每个分组或数据报视为一个单独的实体。每个数据包都通过网络自行路由。它是一种不需要连接的服务。因为连接会话没有特定的通道,所以不需要预留资源。结果,数据包有一个包含所有目的地信息的报头。中间节点评估数据包的报头并选择合适的链接到更接近目的地的不同节点。
2. 虚电路:
虚拟分组交换方法在源和最终目的地之间建立一条路径,通过该路径在整个呼叫中路由所有分组,称为虚拟电路交换。由于连接在用户看来是一个迷恋的物理电路,因此该路径被称为虚拟电路。另一方面,其他通信可能共享同一路径的部分。在数据传输开始之前,源和目的地必须就虚电路路径达成一致。对于决策,两地之间的所有中间节点都将路由条目添加到它们的路由数据库中。附加参数,如最大数据包大小,也在呼叫建立期间在源和目的地之间交换。信息传输完成后,虚电路被清除。
数据报交换和虚电路交换的区别:
Datagram Switching |
Virtual Circuit |
It is connection less service. There is no need for reservation of resources as there is no dedicated path for a connection session. | Virtual circuits are connection-oriented, which means that there is a reservation of resources like buffers, bandwidth, etc. for the time during which the new setup VC is going to be used by a data transfer session. |
All packets are free to use any available path. As a result, intermediate routers calculate routes on the go due to dynamically changing routing tables on routers. | The first sent packet reserves resources at each server along the path. Subsequent packets will follow the same path as the first sent packet for the connection time. |
Data packets reach the destination in random order, which means they need not reach in the order in which they were sent out. | Packets reach in order to the destination as data follows the same path. |
Every packet is free to choose any path, and hence all the packets must be associated with a header containing information about the source and the upper layer data. | All the packets follow the same path and hence a global header is required only for the first packet of connection and other packets will not require it. |
Datagram networks are not as reliable as Virtual Circuits. | Virtual Circuits are highly reliable. |
Efficiency high, delay more | Efficiency low and delay less |
But it is always easy and cost-efficient to implement datagram networks as there is no need of reserving resources and making a dedicated path each time an application has to communicate. | Implementation of virtual circuits is costly as each time a new connection has to be set up with reservation of resources and extra information handling at routers. |
A Datagram based network is a true packet switched network. There is no fixed path for transmitting data. | A virtual circuit network uses a fixed path for a particular session, after which it breaks the connection and another path has to be set up for the next session. |
Widely used in Internet | Used in X.25, ATM(Asynchronous Transfer Mode) |