13 · Exploring the Functions of Routing探索路由的功能

Routing Hierarchy on Internet網際網路上的路由階層

The internet on a global scale is composed of a large number of autonomous systems. An autonomous system, also known as a routing domain, is usually a large collection of routers under a common administration. Typical examples are the internal network of a company and a network of Internet service providers (ISPs). Many entities can have multiple autonomous systems under their common management.

全球規模的網際網路是由大量的自治系統(AS)所組成。自治系統,又稱為路由網域,通常是指在共同管理下的一大群路由器。典型的例子包括公司的內部網路,以及網際網路服務供應商(ISP)的網路。許多組織在其共同管理下可能擁有多個自治系統。

Each autonomous system has the public IP address space that it controls. Each autonomous system has its neighboring autonomous systems to which it connects. To exchange autonomous system information over the internet, BGP is used to run between autonomous systems.

每個自治系統都掌控其擁有的公開 IP 位址空間,並與其相鄰的自治系統相連。為了在網際網路上交換自治系統資訊,各自治系統之間會使用 BGP 運作。

If a company wants to get an autonomous system number, Internet Assigned Numbers Authority (IANA) assigns autonomous system numbers by using a strictly defined process.

若公司想要取得自治系統編號,網際網路號碼分配機構(IANA)會透過嚴格定義的流程來分配自治系統編號。

Each autonomous system consists of several networks interconnected with routers. The routers are crucial in the process of packet forwarding to the right destination. Inside a single autonomous system, there is usually an interior dynamic routing protocol that is running to exchange reachability information between routers.

每個自治系統由多個以路由器互連的網路所組成。路由器在將封包轉送至正確目的地的過程中扮演關鍵角色。在單一自治系統內部,通常會運行內部動態路由協定,用以在路由器之間交換可達性資訊。

Routing protocols facilitate the exchange of routing information between networks, allowing routers to build routing tables dynamically. RIP, EIGRP, and OSPF are examples of interior routing protocols.

路由協定有助於在網路之間交換路由資訊,讓路由器能夠動態建立路由表。RIP、EIGRP 與 OSPF 都是內部路由協定的範例。

Look at the routers in the figure. They are connected to multiple segments. R1 is connected to R2, R3, Network B, and Network C. However, R2 is connected to Network D, neighboring routers R1 and R4, and to a neighbor autonomous system.

請觀察圖中的路由器,它們連接至多個區段。R1 連接至 R2、R3、Network B 與 Network C;而 R2 則連接至 Network D、相鄰路由器 R1 與 R4,以及一個相鄰的自治系統。

In the following example, the IP packet that is received by the R1 router is examined against the routing table. By using routing tables, routers forward the packets to the appropriate next-hop until the packet reaches its destination. Based on the destination IP address in the packet received, the packet is going to exit the router via an interface mapped to the destination IP address in the packet. Routing protocols that calculate the best routes to destinations help ensure that this journey is optimal.

在以下範例中,R1 路由器收到的 IP 封包會與路由表進行比對。路由器藉由路由表,將封包轉送至適當的下一跳,直到封包抵達目的地為止。根據收到封包中的目的地 IP 位址,封包會經由對應到該目的地 IP 位址的介面離開路由器。能計算出最佳路徑的路由協定,有助於確保這段旅程是最佳化的。

Each router makes its decision independently. They do not know what other routers would decide and they do not consult other routers in decision making. The router relies on the information that it has at the moment of decision making.

每台路由器都會獨立做出決策,它們不知道其他路由器會如何決策,也不會在決策過程中徵詢其他路由器。路由器僅依據其在決策當下所擁有的資訊來運作。

Before any static or dynamic routing is configured on a router, the router only knows its own directly connected networks. These networks are all that is displayed in the routing table until static routes are created or dynamic routing is configured. Directly connected (Local) networks are essential for routing decisions.

在路由器上設定任何靜態或動態路由之前,路由器只認識自己直接連接的網路。在建立靜態路由或設定動態路由之前,路由表中顯示的內容僅有這些網路。直接連接(本地)網路對於路由決策而言至關重要。

Each router’s interface is connected to a different network—The router is the border between networks.

每台路由器的介面都連接至不同的網路,路由器就是網路之間的邊界。

When a packet reaches the R3 router, the router checks its own routing table to match the destination IP address with the appropriate destination network ID entry in the routing table. This time, the destination network is directly connected to the router and the packet is delivered directly to the destination.

當封包抵達 R3 路由器時,路由器會檢查自己的路由表,將目的地 IP 位址與路由表中適當的目的地網路 ID 項目進行比對。這一次,目的地網路與該路由器直接連接,因此封包會直接送達目的地。