路由表,路由,路由规则_路由和路由表简介
路由表,路由,路由規(guī)則
路由介紹 (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.
從一個(gè)網(wǎng)絡(luò)向另一個(gè)網(wǎng)絡(luò)發(fā)送數(shù)據(jù)包的過(guò)程稱為路由。 路由有靜態(tài)和動(dòng)態(tài)兩種。 路由基于目標(biāo)網(wǎng)絡(luò)。 路由是為了找到從一個(gè)網(wǎng)絡(luò)到另一個(gè)網(wǎng)絡(luò)的最佳路徑。 最佳路徑是根據(jù)度量標(biāo)準(zhǔn)和管理距離來(lái)選擇的。 路由由路由器執(zhí)行。 為此路由器制作路由表。 現(xiàn)在讓我們了解路由表。
Routers make routing tables that contain the following information's:
路由器制作的路由表包含以下信息:
Destination network and its subnet mask.
目標(biāo)網(wǎng)絡(luò)及其子網(wǎng)掩碼。
There is information about the next hop router to go to Destination network.
有關(guān)于下一跳路由器去目的地網(wǎng)絡(luò)的信息。
Routing metrics and administrative distance are stored.
存儲(chǔ)路由度量和管理距離。
Routing tables are related to 2 types of protocols:
路由表與兩種協(xié)議類型有關(guān):
Routed protocols
路由協(xié)議
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.
這些是網(wǎng)絡(luò)層協(xié)議。 路由協(xié)議附加到設(shè)備的邏輯地址。 這些協(xié)議負(fù)責(zé)將數(shù)據(jù)從一個(gè)網(wǎng)絡(luò)發(fā)送到另一個(gè)網(wǎng)絡(luò)。 例如,IP(Internet協(xié)議)和IPX等。
Routing protocols
路由協(xié)議
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.
這些協(xié)議在路由表中構(gòu)建網(wǎng)絡(luò),拓?fù)浜拖乱惶畔ⅰ?所有這些信息都是動(dòng)態(tài)(自動(dòng))創(chuàng)建的。 例如,RIP,IGRP和OSPF等。路由協(xié)議有2種類型。
To determine the best route to Destination network, the router uses the following 3 elements:
為了確定到達(dá)目標(biāo)網(wǎng)絡(luò)的最佳路由,路由器使用以下3個(gè)元素:
Prefix-Length
前綴長(zhǎng)度
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.
這是識(shí)別網(wǎng)絡(luò)的位數(shù)。 由此確定最準(zhǔn)確的路線。 前綴長(zhǎng)度越長(zhǎng),路徑越精確。 例如,假設(shè)有一個(gè)數(shù)據(jù)包到達(dá)10.1.5.0/24主機(jī),并且路由器的路由表中有2個(gè)網(wǎng)絡(luò)。
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.
因此將選擇第一個(gè)網(wǎng)絡(luò),因?yàn)槠淝熬Y長(zhǎng)度很高。 度量或管理距離是多少都沒(méi)有關(guān)系。
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.
公制路由器可以根據(jù)路由協(xié)議找到最佳路由。 距離向量使用協(xié)議距離作為度量標(biāo)準(zhǔn),而鏈接狀態(tài)協(xié)議使用最短路徑優(yōu)先算法作為用于計(jì)算的度量標(biāo)準(zhǔn)。 最佳度量標(biāo)準(zhǔn)的路由將添加到路由表中。 即使路由協(xié)議有4條路由到達(dá)同一網(wǎng)絡(luò),即使該度量標(biāo)準(zhǔn)是最佳的,也只會(huì)將其添加到路由表中。 如果有多條相等度量標(biāo)準(zhǔn)的路由可用,則將通過(guò)負(fù)載平衡選擇正確的度量標(biāo)準(zhǔn)。
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.
如果路由器上正在運(yùn)行多個(gè)路由協(xié)議,那么哪個(gè)協(xié)議最受信任,取決于管理距離。 底部的管理距離是最低的,選擇了相同的協(xié)議。 管理距離是分配給動(dòng)態(tài)協(xié)議的數(shù)值。 它是固定的。 管理距離未知的協(xié)議永遠(yuǎn)不會(huì)在路由表中使用。
查看路由表 (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.
路由表可以在任何路由器上查看。 為此,您需要運(yùn)行show IP route命令。 您可以從用戶執(zhí)行模式中看到它。
#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.
當(dāng)您執(zhí)行此命令時(shí),將顯示所有路由器的列表。 還顯示了帶有所有這些路由器的標(biāo)簽,這是標(biāo)簽與所有當(dāng)前路由器的連接方式。 所有這些標(biāo)簽的列表如下。
C - This label means that the given router is directly connected to the current router.
C-此標(biāo)簽表示給定的路由器直接連接到當(dāng)前路由器。
S - This label indicates that the given router has been statically managed.
S-此標(biāo)簽表示給定的路由器已經(jīng)過(guò)靜態(tài)管理。
S * - This is the default route between the router given by the current router.
S * -這是當(dāng)前路由器給定的路由器之間的默認(rèn)路由。
D - This label means that the given router is using the EIGRP protocol.
D-此標(biāo)簽表示給定的路由器正在使用EIGRP協(xié)議。
I - This label states that given the router IGRP protocol is being used.
I-此標(biāo)簽指出使用給定的路由器IGRP協(xié)議。
R - It says that the given router is using RIP protocol.
R-表示給定的路由器正在使用RIP協(xié)議。
O - this label means that the given router is using OSPF protocol.
O-此標(biāo)簽表示給定的路由器正在使用OSPF協(xié)議。
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命令。 通過(guò)清除路由表,可以強(qiáng)制路由協(xié)議再次填充路由表。
#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.
您可以按照以下步驟選擇到任何目標(biāo)路由器的最佳路由。
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.
首先,您必須將路由的前綴長(zhǎng)度與目標(biāo)路由匹配。 您將選擇前綴長(zhǎng)度中最準(zhǔn)確的路由。
Now you have to choose the route from which route is the lowest metric.
現(xiàn)在,您必須選擇從哪個(gè)路由成為最低度量標(biāo)準(zhǔn)的路由。
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.
如果同一度量標(biāo)準(zhǔn)具有多條路線,則您將選擇管理距離最小的路線,這將是您的最佳路線。
翻譯自: https://www.includehelp.com/computer-networks/introduction-to-routing-and-viewing-routing-table.aspx
路由表,路由,路由規(guī)則
總結(jié)
以上是生活随笔為你收集整理的路由表,路由,路由规则_路由和路由表简介的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 离散结构和离散数学中文书_在离散数学中对
- 下一篇: 袁大头一个多少钱啊?