Computer network series-what is circuit switching and packet switching?

Source: Internet
Author: User

First, let's look at the concept of the next grouping. The so-called grouping is to divide a packet into smaller packets. For example, for a 10GB packet, it is not always a one-time delivery of the past bar, but it is divided into a number of small packets sent past. Structure diagram for each block of data:

File headers are typically descriptive data, such as source and destination addresses, data types, and so on. The data part is what is really going to be communicated to the object

Circuit switching

The so-called Exchange , refers to the server and the data exchange between the server. There are several ways to exchange data, and circuit switching is one of them.

If we want to communicate between A and B, let's assume that a should make a phone call with E. When the phone number of a input e, start dialing, then the first thing the server will do is to find e according to E's phone number, because a path to E has multiple, will be based on an algorithm to find E, set up a path, and then the data transmission.

Let's assume the chosen path is a→d-→e.

In the process of finding a path to E and establishing a session, we call it the first phase of circuit switching-establishing a connection. After a and e in the process of the call will always occupy the path , the process of data transmission is called the second phase of circuit switching-data transmission.

The third phase of the circuit exchange, which is the final phase, releases the connection. A and B as long as one side hangs up the phone, it starts releasing the connection.
Transmission Example diagram:

In this process, the new connection will take a certain amount of extra time (imagine you are dialing the word when you call), releasing the connection also costs some extra time.

So, in the process of telephone exchange, does the data need to be grouped for transmission?
Answer is not, because in the process of telephone exchange, A and B two people always occupy a communication circuit, they each say a word, will be acquired in real time, so the data is not grouped.
From this, it can be seen that the way the circuit exchange, in the transmission of data is more efficient, real-time , as long as a to send out the data, E can immediately receive, which is why our telephone communications using the circuit switching method.
But because of this path has been occupied, if the process of occupation a and E in silence do not speak, then it will be a great waste of this path. Therefore, the mode of connection of the circuit resources utilization is relatively low.
And, if you have a super-short time on the phone, it's even harder to spend more time on a new connection than the time of the call.

A little summary.

Three stages of the circuit connection:
1, establish the connection.
2, data transmission.
3, release the connection.
1. Fast and efficient transmission speed.
2, real-time.
1. Low utilization of resources.
2, the new connection needs to occupy a certain time, even longer than the call time.

Packet switching

From the name grouping Word, we can know that this way the packet is divided into smaller packets for transmission. The data transmission process of packet switching is different from that of circuit exchange, and packet switching takes the mechanism of storage and forwarding transmission . Below we still use a to e transmission data as an example to explain.

If a is to send a packet p to E, but the packet is a bit large, it needs to be divided into three groups, such as P1,P2,P3 three smaller packets.
At this point A to e transmission data does not need to create a new connection to the process, that is, do not need to find a path to E. And a directly to the small packet to the nearby router, and then a is not, for example, a put P1 to B, this time a is not to tube P1, when B received P1 this complete small packet, b and then dropped to E.

But a does not always throw the rest of the packets to B, it is possible to throw the other packets P2 to C, then P3 to D, then C and D in the forward drop to E. These are uncertain and will be based on some sort of algorithm of choosing a router.
Here is a keyword store , that is, B must receive the full P1 packet before forwarding, it is not difficult to understand, because the P1 packet contains the address of E, if not the full packet, B also do not know who to send AH.
Example diagram:

From the circuit switching mechanism we can see some of the following problems:
Since a packet is dropped to B, it doesn't matter when B will forward the P1, no one knows, and maybe B will be around a few circles to send E is also possible. Because the mechanism of circuit switching is not real-time in data transmission.

Also, there is a good chance that many routers will throw packets to B, this time will cause communication congestion , then may P1 can only wait for B to send.

Because the capacity of the B router is limited, if too many packets are dropped to it, it may not fit, and there may be a packet loss scenario.

Furthermore, since the P1,P2,P3 packet has a header, it contains some information about a and e, and of course other information. It can be said that these file headers have a lot of duplicate data, so the packet exchange sends the data with a lot of duplicate useless data .

Of course, packet switching also includes the disadvantage of delay , because B must receive a complete P1 to forward the P1, because there is a delay in the process of accepting the storage, the delay also becomes the transmission delay , of course, there is propagation delay and processing delay , and so on. The so-called processing delay is every time you have to check the file header of the packet and decide who to transfer the packet to.

Say the circuit exchange of so many shortcomings, that must have merit?
In fact, the above shortcomings, in fact, is not a major problem. The main advantage of circuit switching is that the design is simple and the resource utilization is high .

Summarize the next group Exchange

Packet switching uses a mechanism for transferring small packets to and from the packet storage .
Some of the main drawbacks:
1, does not have the real-time sex.
2, there is delay.
3, will cause communication congestion.
4, there is useless duplication of data.
5, there will be a packet loss situation.
Fatal Advantages:
1, simple design.
2, the resource utilization is very high.

The choice of communication in life

The characteristics of the two switching transmissions determine that our usual telephone communication uses the circuit exchange, such as the Internet, such as this does not require real-time communication with packet switching.
That's why you call when it's urgent, because it's more real time. Like these, sometimes you send a message, maybe the network is not good, or too many people use it at the same time, maybe your message will be received by the other party.

Some people here might say, why do packet exchanges divide packets into small ones to store and forward them? is a big packet sent past bad?
If you have a packet 100GB, that b this router will have to be able to save 100GB capacity, but the probability of sending 100GB is very few, the router is designed to 100GB is not a waste? This is one of the reasons why a small packet is to be divided up.

Of course, there is a way of message Exchange , that is, a whole packet storage and forwarding, but this way of using less, then this is not detailed deployment.

Take a picture of three switching transmissions:


P style= "margin:0px 0px 1.2em!important; font-size:16px; Line-height:1.75em; Padding-right:0.5em; Padding-left:0.5em "> Focus on the public my number: Bitter code farmers , get more original articles, background reply gift pack send you a special resource package. And thanks for introducing the article to more people who need it.

Related Article

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: and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: