15 · Exploring the Packet Delivery Process探索封包傳遞流程

Layer 3 Addressing第 3 層定址

You will now examine where OSI Layer 3 (corresponding to the TCP/IP Internet layer) devices and addressing fit into the host-to-host communications model.

現在你將檢視 OSI 第 3 層(對應 TCP/IP 網際網路層)的裝置與定址在主機對主機通訊模型中所扮演的角色。

Layer 3 provides connectivity and path selection between two host systems located on geographically separated networks. At the boundary of each local network, an intermediary network device, usually, a router, de-encapsulates the frame to read the destination address contained in the packet's header (the Layer 3 protocol data unit [PDU]). Routers use the network identifier portion of this address to determine which path to use to reach the destination host. Once the path is determined, the router encapsulates the packet in a new frame and sends it toward the destination end device.

第 3 層在位於地理上分離的網路中的兩個主機系統之間提供連線與路徑選擇。在每個本地網路的邊界,中介網路裝置(通常是路由器)會將框架解封裝,以讀取封包標頭(第 3 層協定資料單元〔PDU〕)中所包含的目的位址。路由器會使用此位址中的網路識別碼部分,判斷要使用哪條路徑到達目的主機。一旦決定路徑後,路由器會將封包封裝到新的框架中,並將其傳送至目的終端裝置。

Layer 3 addresses must include identifiers that enable intermediary network devices to locate the networks that different hosts belong to. In the TCP/IP protocol suite, every IP host address contains information about the network where the host is located.

第 3 層位址必須包含識別碼,讓中介網路裝置能夠找出不同主機所屬的網路。在 TCP/IP 協定套組中,每個 IP 主機位址都包含該主機所在網路的相關資訊。

Intermediary devices that connect networks are routers. The role of the router is to select paths and direct packets toward a destination. This process is known as routing. A router uses a list of paths located in a routing table to determine where to send data.

連接網路的中介裝置為路由器。路由器的角色是選擇路徑並將封包導向目的地,此流程稱為路由。路由器使用路由表中的路徑清單,判斷資料應傳送至何處。

Routing Table

路由表

192.168.3.0/24
192.168.3.0/24
Interface Gi0/0
Interface Gi0/0
192.168.4.0/24
192.168.4.0/24
Interface Gi0/1
Interface Gi0/1

Layer 3 addresses are assigned to end devices such as hosts and network devices that provide Layer 3 functions. The router has its own Layer 3 address on each interface. Each network device that provides a Layer 3 function maintains a routing table.

第 3 層位址會指派給終端裝置(如主機)以及提供第 3 層功能的網路裝置。路由器在每個介面上都有自己的第 3 層位址。每個提供第 3 層功能的網路裝置都會維護一個路由表。

As seen in the example, the two router interfaces belong to different networks. The left interface and the directly connected PC belong to the 192.168.3.0/24 network, while the right interface and the directly connected PC belong to the 192.168.4.0/24 network. For devices in different IP networks, a Layer 3 device is needed to route traffic between them.

如範例所示,這兩個路由器介面屬於不同的網路。左側介面與直接連接的電腦屬於 192.168.3.0/24 網路,而右側介面與直接連接的電腦則屬於 192.168.4.0/24 網路。對於位於不同 IP 網路中的裝置,需要一個第 3 層裝置來在它們之間路由流量。

Which device is at the local network boundary de-encapsulating frames?哪個裝置位於本地網路邊界,負責將框架解封裝?