05 · Exploring the Functions of Networking探索網路的功能

Common Usage of Computer Network電腦網路的常見用途

Computer networks are built with one primary purpose—To enable communication.

建置電腦網路的首要目的只有一個:實現通訊。

There are multiple types of communication, depending on who the participants are:

依參與者的不同,通訊可分為多種類型:

  • Communication between human beings, for example, two students communicating over a chat application on their phones to coordinate school work.人與人之間的通訊,例如兩名學生透過手機上的聊天應用程式溝通,以協調學校作業。
  • Communication between network machines, for example, a humidity sensor communicating with a database to send the latest data.網路機器之間的通訊,例如濕度感測器與資料庫通訊,以傳送最新的資料。
  • Communication between humans and machines, for example, when someone purchases movie tickets online.人與機器之間的通訊,例如有人在線上購買電影票。

All these communication types have something in common, that is, they all use the computer network to transfer data between communicating parties. The computer network is agnostic to who is communicating over it, as long as the communication follows well-defined standards and protocols.

這些通訊類型有一個共同點:它們都使用電腦網路在通訊雙方之間傳輸資料。只要通訊遵循定義明確的標準與通訊協定,電腦網路並不在意是誰在其上通訊。

Understanding What Happens During Communication

了解通訊過程中發生的事

Let us consider a scenario in which two users, Alice and Bob, wish to communicate with each other, for instance, by chatting over their laptops. When users try to communicate with each other by using a computer, they do so by using an application. If Alice wishes to chat with Bob, she uses a chat application. The application acts as a go-between between the user and the computer network. The user does not have to know anything about how their message travels the network. The application accepts inputs from the user and transforms them. This transformation must happen because the rules of communication require that. The transformation helps ensure that the user’s input is digitalized. Digitalization means that information is represented by a series of ones and zeros or bits in a specific order. The series of bits can be very long. Each digit is 1 bit of data. So, if you have a series of 1 gigabit, this means that there are 1 billion digits in the series.

假設有兩位使用者 Alice 與 Bob 想彼此通訊,例如透過筆記型電腦聊天。當使用者嘗試用電腦彼此通訊時,他們是透過應用程式來進行的。如果 Alice 想與 Bob 聊天,她會使用聊天應用程式。應用程式扮演使用者與電腦網路之間的中介角色。使用者完全不需要知道訊息如何在網路上傳送。應用程式接受使用者的輸入並加以轉換。之所以必須轉換,是因為通訊規則有此要求。這種轉換有助於確保使用者的輸入被數位化。數位化意指資訊以一連串按特定順序排列的 1 與 0(也就是位元)來表示。這串位元可能非常長。每一個數字就是 1 位元的資料。因此,如果你有一串 1 gigabit 的資料,代表這串資料中有 10 億個數字。

As a practical example, you can think of the series of bits as a queue of people who want to use a service in a distant location. The service takes clients as they arrive on a first-come, first-served basis. To get to the destination, people may take the train, so they queue. Because their place in the queue is important, they need to maintain it, so they can reassemble the queue once they arrive at the location.

舉一個實際的例子,你可以把這串位元想成一群要去遠處使用某項服務的人所排成的隊伍。該服務依照先到先服務的原則接待客戶。為了到達目的地,這些人可能要搭火車,所以他們排隊。由於他們在隊伍中的位置很重要,必須保持住,才能在抵達目的地後重新排回原本的隊伍。

The next step is for people to start boarding the train. To board the train efficiently, people group into smaller groups, which then board onto specific train carriages, while maintaining the queue order. It is important to note here that not all carriages are the same—Some might have a priority treatment and accept only select people.

下一步是大家開始上火車。為了有效率地上車,大家分成較小的群組,再分別登上特定的車廂,同時維持隊伍的順序。這裡要注意的是,並非所有車廂都一樣,有些車廂可能享有優先待遇,而且只接受特定的人。

A computer network works similarly. Instead of boarding people into carriages, the application and computer’s operating system breaks down the large series of bits into smaller groups and prepare them for transmission over the computer network. This preparation can include adding different tags, such as priority tags, which indicate special handling requirements. Once they are correctly prepared, the user’s computer transmits them as a digital signal. In the train analogy, all the carriages of a train are chained. In the computer networks, the carriages, that is, the groups of bits are not chained to one another, which means that different groups can also arrive in a different order. However, some mechanisms put them back into the original sequence.

電腦網路的運作方式與此類似。應用程式與電腦的作業系統不是把人送上車廂,而是把一長串位元切成較小的群組,並準備好在電腦網路上傳輸。這項準備工作可能包括加上不同的標籤,例如優先權標籤,用來表示特殊的處理需求。準備妥當之後,使用者的電腦就把它們以數位訊號送出。在火車的比喻中,一列火車的所有車廂是連在一起的。在電腦網路中,車廂(也就是位元群組)並沒有彼此相連,這代表不同的群組也可能以不同的順序到達。不過,有一些機制會把它們重新排回原本的順序。

On the path to their destination, the groups of bits encounter different network devices that help them steer and navigate through the network. Most commonly, the first device is a network switch, which works similarly to a train junction, steering the carriages down the right path.

在前往目的地的路上,這些位元群組會遇到不同的網路裝置,協助它們在網路中導引與穿行。最常見的情況是,第一個裝置是網路交換器,其作用類似火車的轉轍點,把車廂導向正確的路線。

Usually, the second on the path is a network router, which is similar to a train stop, where passengers might have to switch carriages or trains to continue their journey towards the destination. This means that there are multiple different paths to the same destination. Each group of bits can take its own path. How these paths are chosen depends on many different characteristics, such as the quality of the path, how congested it is, are there rules that determine which group is allowed where, for instance, allowing only groups with special tags on a certain path, and so on.

路途上的第二個裝置通常是網路路由器,類似火車的停靠站,乘客可能要在這裡換車廂或換車,才能繼續前往目的地。這代表通往同一個目的地有多條不同的路徑。每個位元群組都可以走自己的路徑。這些路徑如何選擇取決於許多不同的特性,例如路徑的品質、擁塞程度、是否有規則決定哪個群組可以走哪裡(例如某條路徑只允許帶有特殊標籤的群組通過)等等。

Once the groups of bits reach the desired destination, there is one last step to reassemble the queue in the same order as it was before crossing the computer network. The reason for this is so protocols can convert bits back to original data, that is displayed by the application.

當位元群組抵達目的地後,還有最後一個步驟:把隊伍重新排回穿越電腦網路之前的相同順序。這麼做的原因是,通訊協定才能把位元轉換回原始資料,再由應用程式顯示出來。

In the scenario, the desired destination is Bob’s computer, wherever Bob is located. More specifically, the destination is the chat application on Bob’s computer. For Alice to have a successful, real-time chat with Bob, many things must happen. Bob’s computer has to be powered on, connected to the network, and it must have the chat application running. Also, the complete voyage of the series of bits that Alice’s application created, must happen without issues. The computer network is resilient and the protocols that govern its functioning foresee many issues and provide solutions. All with the goal for the communication to succeed. As evident from our daily activities, network communication is successful most of the time.

在這個情境中,目的地是 Bob 的電腦,不論 Bob 身在何處。更精確地說,目的地是 Bob 電腦上的聊天應用程式。要讓 Alice 與 Bob 順利進行即時聊天,必須發生許多事情。Bob 的電腦必須開機、連上網路,並且正在執行聊天應用程式。此外,Alice 的應用程式所產生的那串位元,其整段旅程都必須順利無誤。電腦網路具有韌性,而規範其運作的通訊協定也預見了許多問題並提供了解決方案,一切都是為了讓通訊成功。從我們的日常活動可以看出,網路通訊在大多數時候都是成功的。

A user is trying to communicate with a service that is available on the network. Which of the following acts as an interface between the user and the computer network?某位使用者正嘗試與網路上提供的一項服務通訊。下列何者扮演使用者與電腦網路之間的介面?