When you connect three or more devices, you need a dedicated network device to enable communication between these hosts. Switches were introduced to LANs to divide a network into segments.
當你連接三台以上的裝置時,就需要一台專用的網路裝置,才能讓這些主機之間互相通訊。交換器因而被導入 LAN,用來將網路劃分為多個區段。
Historically, when network devices had few network segments, endpoints shared the same media. Before the introduction of switches, end devices were connected to each other by using a legacy device called a hub. The hub is a Layer 1 device that acts as a simple electric repeater, and that puts all the devices that are connected to it on the same media. Network segments that share the same media are known as collision domains because frames may collide with each other. By using the hub, there is only one collision domain that becomes bigger when other devices are added to the network. A network collision occurs when two or more devices connected by a shared medium try to communicate at the same time. In a collision domain, only one device was able to transmit at the time, while other devices had to wait before transmitting to avoid collisions. The total bandwidth was shared across all host devices on shared media. Collisions also decrease network efficiency because host devices had to wait before retransmitting data at another time.
早期,當網路裝置的網路區段很少時,端點會共用相同的傳輸媒介。在交換器問世之前,終端裝置是透過一種稱為集線器(hub)的舊型裝置彼此連接。集線器是一種第 1 層裝置,其作用如同簡單的電子中繼器,會將連接到它的所有裝置放在同一個傳輸媒介上。共用相同傳輸媒介的網路區段稱為碰撞域,因為框架可能會彼此碰撞。使用集線器時,只會有一個碰撞域,而且當網路上加入更多裝置時,這個碰撞域會變得更大。當透過共用媒介連接的兩台以上裝置同時嘗試通訊時,就會發生網路碰撞。在同一個碰撞域中,同一時間只能有一台裝置傳輸,其他裝置必須等待才能傳輸,以避免碰撞。總頻寬會由共用媒介上的所有主機裝置共享。碰撞也會降低網路效率,因為主機裝置必須等待才能在稍後重新傳送資料。
Today switches operating at the link layer divide a network into segments and reduce the number of devices that share the total bandwidth. Each segment, then, results in a new collision-free domain.
如今,運作於鏈結層的交換器會將網路劃分為多個區段,減少共用總頻寬的裝置數量。因此,每個區段都會形成一個新的無碰撞域。
However, switches have additional functionality and can also be a solution for the typical causes of network congestion.
然而,交換器還具備其他功能,也能解決造成網路壅塞的常見原因。
The most common causes of network congestion are as follows:
造成網路壅塞的最常見原因如下:
- Increasingly powerful computer and network technologies: CPUs, buses, and peripherals are consistently becoming faster and more powerful; therefore, they can send more data at higher rates through the network.日益強大的電腦與網路技術:CPU、匯流排與周邊裝置的速度與效能不斷提升,因此能以更高速率透過網路傳送更多資料。
- Increasing volume of network traffic: Network traffic is now more common, as remote resources are used and are even necessary to carry out basic work.網路流量日益增加:由於遠端資源的使用日益普遍,甚至成為執行基本工作所必需,網路流量因而更加常見。
- High-bandwidth applications: Software applications are becoming richer in their functionality and are requiring more bandwidth to process. Applications such as desktop publishing, engineering design, VoD, e-learning, and streaming video all require considerable processing power and speed. This richer functionality puts a large burden on networks to manage the transmission of their files and requires sharing of the applications among users.高頻寬應用程式:軟體應用程式的功能日益豐富,處理時也需要更多頻寬。桌面排版、工程設計、隨選視訊(VoD)、線上學習與串流視訊等應用程式,都需要相當可觀的處理能力與速度。這些更豐富的功能,對網路管理其檔案傳輸帶來很大的負擔,也需要在使用者之間共用這些應用程式。
The main purpose of a switch is to forward frames as fast and as efficiently as possible. When a switch receives a frame on an input interface, it buffers that frame until the switch performs the required processing and is ready to transmit the frame out an exit interface. If switches did not have frame buffers, then the frames would be dropped when the congestion occurs, or the link becomes saturated.
交換器的主要目的,是盡可能快速且有效率地轉送框架。當交換器在輸入介面上收到一個框架時,會先將該框架緩衝,直到完成所需的處理,並準備好從輸出介面傳送出去為止。若交換器沒有框架緩衝區,當發生壅塞或連結達到飽和時,框架就會被丟棄。
Ethernet switches selectively forward individual frames from the source port to the destination port.
乙太網路交換器會選擇性地將個別框架從來源連接埠轉送到目的連接埠。


