阅读 67

分组交换与电路交换的区别,电路交换和分组交换有何异同

分组交换和电路交换区别

In this tutorial you will learn about difference between circuit switching and packet switching i.e. circuit vs packet switching.

在本教程中,您将了解电路交换和数据包交换之间的区别,即电路与数据包交换。

What is Switching?

什么是切换?

In network communication sender sends a message and receiver receives it. But both sender and receiver may lies in different networks with very much far distance. To reach message from sender to receiver it must pass through different devices, different networks. So message must be exchanged between different intermediate networks to reach destination. This mechanism is called switching.

在网络通信中,发送方发送消息,接收方接收消息。 但是发送者和接收者都可能位于距离非常远的不同网络中。 为了从发送者到接收者到达消息,它必须通过不同的设备,不同的网络。 因此,必须在不同的中间网络之间交换消息才能到达目的地。 这种机制称为交换。

There are different types of switching like Circuit switching, Packet switching and Message switching.

有不同类型的交换,例如电路交换,分组交换和消息交换。

Circuit Switching

电路切换

This is connection oriented system. In circuit switching method, for each and every communication/connection there is a dedicated path between sender and destination. All data regarding that communication flow in that same path only. For example connecting one telephone to other telephone through a long wire for communication.

这是面向连接的系统。 在电路交换方法中,对于每个通讯/连接,在发送方和目的地之间都有一条专用路径。 有关该通信的所有数据仅在同一路径中流动。 例如,通过长线将一个电话连接到另一电话以进行通信。

Packet Switching

分组交换

Total message is broken into different segments, these segments independently choose optimal path and individually reach destination. At destination based on information which is on each segment, destination will re-arrange all these segments to get original message.

总消息分为不同的部分,这些部分分别选择最佳路径并分别到达目的地。 在目的地基于每个分段上的信息,目的地将重新排列所有这些分段以获取原始消息。

There are again two types of packet switching.

分组交换又有两种类型。

Virtual circuits: This is connection oriented packet switching on which some buffer reserved for communication. Example: Phone call

虚拟电路:这是面向连接的数据包交换,在其上保留了一些用于通信的缓冲区。 示例:电话

Datagram: This is connection less packet switching. No buffer required. Example: Video calling communication like skype, Viber.

数据报:这是较少连接的数据包交换。 不需要缓冲区。 示例:视频通话通讯,例如Skype,Viber。

Image Source

图片来源

电路交换和分组交换之间的区别 (Difference between Circuit Switching and Packet Switching) Circuit SwitchingPacket SwitchingDone at physical layer.Done at network layer.Direct physical connection between sender and receiver.No direct physical connection between sender and receiver.Since pre-defined path is there, there are 3 different stages like Connection establishment, Data transfer, Teardown/connection closing.No specific path for transferring data so only Data transfer takes place directly.Total message goes at once. So no header (extra information to recognize) is required.Since message gets segmented into different pieces, headers are required to identify at destination side.Data will go as it is in same order.Different parts of data reached to destination. So there is chance that out of order will occur so data will be swapped.Data processed only once at source/sender side.At each intermediate network, data will be processed including source.If data is big, circuit switching is usefulIf data is small, packet switching is usefulGuarantee that total message will be received with same order. So more reliable communication.There is possibility that one of data packet may lose. So not reliable communication.Requires more resources even for less communication.Requires less resources.Main disadvantage is if at any place connection is lost, entire communication must be restarted.The main advantage over circuit switching is, if one path is lost only the packets which are on that only will be restarted. But not entire data packets. 电路切换 分组交换 在物理层完成。 在网络层完成。 发送方和接收方之间的直接物理连接。 发送方和接收方之间没有直接的物理连接。 由于存在预定义的路径,因此存在3个不同的阶段,例如连接建立,数据传输,拆除/连接关闭。 没有用于传输数据的特定路径,因此仅直接进行数据传输。 总消息一次发送。 因此,不需要标题(要识别的其他信息)。 由于消息被分为不同的部分,因此需要标头在目标端进行标识。 数据将以相同的顺序进行。 数据的不同部分到达目的地。 因此,有可能发生乱序,因此将交换数据。 数据在源/发送方仅处理一次。 在每个中间网络,将处理包括源在内的数据。 如果数据很大,电路切换很有用 如果数据很小,则数据包交换很有用 确保将以相同的顺序接收总消息。 这样通讯更加可靠。 数据包之一可能会丢失。 因此通讯不可靠。 即使减少通信量也需要更多资源。 需要更少的资源。 主要缺点是,如果在任何地方失去连接,则必须重新启动整个通信。 优于电路交换的主要优点是,如果一条路径丢失,则仅该路径上的数据包将被重新启动。 但不是整个数据包。

Comment below if you have queries related to above tutorial for circuit switching vs packet switching.

如果您对上述电路交换和数据包交换教程有疑问,请在下面评论。

翻译自: https://www.thecrazyprogrammer.com/2018/01/circuit-switching-vs-packet-switching.html

分组交换和电路交换区别


文章分类
代码人生
版权声明:本站是系统测试站点,无实际运营。本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 XXXXXXo@163.com 举报,一经查实,本站将立刻删除。
相关推荐