路由表,路由,路由规则_路由和路由表简介
路由表,路由,路由規則
路由介紹 (Introduction to Routing )
The process of sending packets from one network to another is called routing. Routing is of two types of static and dynamic. Routes are based on the destination network. Routing is to find the best path for the network from one network to another. The best path is chosen on the basis of metric and administrative distance. Routing is performed by routers. For this routers make routing tables. Now let's understand about routing tables.
從一個網絡向另一個網絡發送數據包的過程稱為路由。 路由有靜態和動態兩種。 路由基于目標網絡。 路由是為了找到從一個網絡到另一個網絡的最佳路徑。 最佳路徑是根據度量標準和管理距離來選擇的。 路由由路由器執行。 為此路由器制作路由表。 現在讓我們了解路由表。
Routers make routing tables that contain the following information's:
路由器制作的路由表包含以下信息:
Destination network and its subnet mask.
目標網絡及其子網掩碼。
There is information about the next hop router to go to Destination network.
有關于下一跳路由器去目的地網絡的信息。
Routing metrics and administrative distance are stored.
存儲路由度量和管理距離。
Routing tables are related to 2 types of protocols:
路由表與兩種協議類型有關:
Routed protocols
路由協議
These are network layer protocols. Routed protocols attach to logical addresses with devices. These protocols are responsible for sending data from one network to another. For example, IP (Internet Protocol) and IPX etc.
這些是網絡層協議。 路由協議附加到設備的邏輯地址。 這些協議負責將數據從一個網絡發送到另一個網絡。 例如,IP(Internet協議)和IPX等。
Routing protocols
路由協議
These protocols build networks, topology and next hop information in routing tables. All these information is created dynamically (automatic). For example, RIP, IGRP, and OSPF etc. Routing protocols are of 2 types.
這些協議在路由表中構建網絡,拓撲和下一跳信息。 所有這些信息都是動態(自動)創建的。 例如,RIP,IGRP和OSPF等。路由協議有2種類型。
To determine the best route to Destination network, the router uses the following 3 elements:
為了確定到達目標網絡的最佳路由,路由器使用以下3個元素:
Prefix-Length
前綴長度
This is the number of bits to identify the network. From this, the most accurate route is determined. The longer the prefix length, the more precise the path is. For example, suppose a packet is going to 10.1.5.0/24 host and the router's routing table has 2 networks given.
這是識別網絡的位數。 由此確定最準確的路線。 前綴長度越長,路徑越精確。 例如,假設有一個數據包到達10.1.5.0/24主機,并且路由器的路由表中有2個網絡。
10.1.5.0/24
10.1.5.0/24
10.0.0.0/8
10.0.0.0/8
So the first network will be selected on this because its prefix length is high. It does not matter what the metric or administrative distance is.
因此將選擇第一個網絡,因為其前綴長度很高。 度量或管理距離是多少都沒有關系。
Metric
公制
The metric router gives the ability to find the best routes under the routing protocol. Distance vector uses the protocols distance as metric and link state protocols use the shortest path first algorithm as the metric used to calculate. The routes which are best metric are added to the routing tables. Even if a routing protocol has 4 routes to go to the same network, even if the metric is the best, it will only be added to the routing table. If more than one route of equal metric is available then correct metric will be selected by loading balance.
公制路由器可以根據路由協議找到最佳路由。 距離向量使用協議距離作為度量標準,而鏈接狀態協議使用最短路徑優先算法作為用于計算的度量標準。 最佳度量標準的路由將添加到路由表中。 即使路由協議有4條路由到達同一網絡,即使該度量標準是最佳的,也只會將其添加到路由表中。 如果有多條相等度量標準的路由可用,則將通過負載平衡選擇正確的度量標準。
Administrative Distance
行政距離
If more than one routing protocol is running on the router, then which protocol is to trust most, it is determined by the administrative distance. The administrative distance at the bottom is the lowest, the same protocol is chosen. Administrative distance is a numerical value that is assigned to dynamic protocols. It is fixed. The protocol whose administrative distance is unknown is never taken in the routing table.
如果路由器上正在運行多個路由協議,那么哪個協議最受信任,取決于管理距離。 底部的管理距離是最低的,選擇了相同的協議。 管理距離是分配給動態協議的數值。 它是固定的。 管理距離未知的協議永遠不會在路由表中使用。
查看路由表 (Viewing Routing Table )
The routing table can be viewed on any router. For this, you need to run show IP route command. You can see it from the user execution mode.
路由表可以在任何路由器上查看。 為此,您需要運行show IP route命令。 您可以從用戶執行模式中看到它。
#Router1 show ip route
#Router1顯示IP路由
When you execute this command, the list of all routers is displayed to you. A label along with all these routers is also shown which is how it is connected to all the current router. The list of all these labels is being given below.
當您執行此命令時,將顯示所有路由器的列表。 還顯示了帶有所有這些路由器的標簽,這是標簽與所有當前路由器的連接方式。 所有這些標簽的列表如下。
C - This label means that the given router is directly connected to the current router.
C-此標簽表示給定的路由器直接連接到當前路由器。
S - This label indicates that the given router has been statically managed.
S-此標簽表示給定的路由器已經過靜態管理。
S * - This is the default route between the router given by the current router.
S * -這是當前路由器給定的路由器之間的默認路由。
D - This label means that the given router is using the EIGRP protocol.
D-此標簽表示給定的路由器正在使用EIGRP協議。
I - This label states that given the router IGRP protocol is being used.
I-此標簽指出使用給定的路由器IGRP協議。
R - It says that the given router is using RIP protocol.
R-表示給定的路由器正在使用RIP協議。
O - this label means that the given router is using OSPF protocol.
O-此標簽表示給定的路由器正在使用OSPF協議。
Clearing Routing Table
清除路由表
If you want to clear all routes from the routing table, you can use the clear command for this. By clearing the Routing table, you can force routing protocols to populate the routing table again.
如果要清除路由表中的所有路由,可以使用clear命令。 通過清除路由表,可以強制路由協議再次填充路由表。
#Router clear ip route
#router清除ip路由
Choosing Best Route
選擇最佳路線
You can follow the procedure given below to choose the best route to any destination router.
您可以按照以下步驟選擇到任何目標路由器的最佳路由。
First of all you will have to match the prefix length of the route with the destination route. You will choose the routes that are most accurate in the prefix length.
首先,您必須將路由的前綴長度與目標路由匹配。 您將選擇前綴長度中最準確的路由。
Now you have to choose the route from which route is the lowest metric.
現在,您必須選擇從哪個路由成為最低度量標準的路由。
If the same metric has more than one route then you will choose the route with the lowest administrative distance and this will be your best route.
如果同一度量標準具有多條路線,則您將選擇管理距離最小的路線,這將是您的最佳路線。
翻譯自: https://www.includehelp.com/computer-networks/introduction-to-routing-and-viewing-routing-table.aspx
路由表,路由,路由規則
總結
以上是生活随笔為你收集整理的路由表,路由,路由规则_路由和路由表简介的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 离散结构和离散数学中文书_在离散数学中对
- 下一篇: kotlin 二进制_Kotlin程序检