18 · Configuring Static Routing設定靜態路由

When to Use Static Routing何時該使用靜態路由

Static routes are best suited for small networks, such as LANs, where routes rarely change. If routes change, you need to manually update to reflect the new data transmission paths.

靜態路由最適合用於路由很少變動的小型網路,例如 LAN。若路由發生變化,你必須手動更新,以反映新的資料傳輸路徑。

Usestatic routes In these situations:

在下列情況使用靜態路由:

  • In a small network that requires only simple routing在只需要簡單路由的小型網路中
  • In a hub-and-spoke network topology在軸輻式(hub-and-spoke)網路拓樸中
  • When you want to create a quick ad hoc route當你想要快速建立臨時路由時
  • Common use is a default static route常見用途是預設靜態路由

Do not usestatic routes In these situations:

不應在下列情況使用靜態路由:

  • In a large network在大型網路中
  • When the network is expected to scale當網路預期會擴充規模時

Some of the advantages of using static routes include:

使用靜態路由的一些優點包括:

  • Conserving router resources: Static routing does not consume network bandwidth and the CPU resources of the router. When you use a routing protocol, the traffic between routers adds some overhead as the routers exchange routing updates about remote networks. Depending on the size of the network, a router requires some CPU cycles to compute the best way to remote networks.節省路由器資源:靜態路由不會消耗網路頻寬與路由器的 CPU 資源。當你使用路由協定時,路由器之間交換遠端網路的路由更新,會為流量增加一些額外負擔。依網路規模不同,路由器需要耗費一些 CPU 週期,計算前往遠端網路的最佳路徑。
  • Simple to configure in a small network: Static routes are commonly used in small networks that have few routers. Many small networks are designed as stub networks (a network that is accessed by a single link); for these types of networks, static routes are the most appropriate solution. Also, most of these networks are designed in a hub-and-spoke topology, where you can use default routes for branches that are pointing to the hub router, which is the gateway to other networks.在小型網路中設定簡單:靜態路由常用於路由器數量不多的小型網路。許多小型網路被設計成末端網路(stub network,僅透過單一鏈路連接的網路),對於這類網路而言,靜態路由是最合適的解決方案。此外,這類網路大多採用軸輻式拓樸設計,你可以為指向中樞路由器(連往其他網路的閘道)的分支設定預設路由。
  • Security: Sometimes, you may want to define static routes to control the data transmission paths that are used by your data. This option may be useful in highly secure environments.安全性:有時你可能想透過定義靜態路由來控制資料使用的傳輸路徑,這在高度安全的環境中會很有用。

Here are some disadvantages of using static routes:

以下是使用靜態路由的一些缺點:

  • Scalability: Static routing might be appropriate for networks that have fewer than four or five routers. Dynamic routing is more appropriate for large networks to reduce the probability of errors in a routing configuration. If planned, designed and implemented correctly, the network can be expanded very easily to meet future demands. Using dynamic instead of static routing helps the expansion process of the network and does not require significant redesign of the existing network infrastructure from scratch.可擴充性:靜態路由可能適合路由器少於四、五台的網路。對於大型網路,動態路由更為合適,可降低路由設定出錯的機率。若規劃、設計與實作得當,網路可以很輕易地擴充以因應未來需求。使用動態路由而非靜態路由,有助於網路的擴充過程,且不需要從頭大幅重新設計現有的網路基礎架構。
  • Accuracy: If your network changes and you do not update the static routes, your router does not have accurate knowledge of your network. Not having accurate knowledge of your network can result in lost or delayed data transmissions.準確性:如果你的網路發生變化,而你沒有更新靜態路由,路由器就不會擁有準確的網路資訊。缺乏準確的網路資訊,可能導致資料傳輸遺失或延遲。
  • High maintenance: When the number of routers increases, the number of static routes also increases. In large networks, adding even one router with only one new network means that in addition to configuring the newly added router with static routes to other networks, you must configure all existing routers in the network with static routes to the new network.維護成本高:當路由器數量增加時,靜態路由的數量也會隨之增加。在大型網路中,即使只新增一台路由器和一個新網路,除了要在新加入的路由器上設定通往其他網路的靜態路由外,還必須在網路中所有現有的路由器上,設定通往這個新網路的靜態路由。
What is the main advantage of static routes?靜態路由的主要優點是什麼?