路由表,路由,路由规则_路由和路由表简介

路由表,路由,路由规则

路由介绍 (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:

路由表与两种协议类型有关:

  1. 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等。

  2. 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种类型。

    1. Distance vector距离矢量
    2. Link state链接状态

To determine the best route to Destination network, the router uses the following 3 elements:

为了确定到达目标网络的最佳路由,路由器使用以下3个元素:

  1. 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.

    因此将选择第一个网络,因为其前缀长度很高。 度量或管理距离是多少都没有关系。

  2. 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条路由到达同一网络,即使该度量标准是最佳的,也只会将其添加到路由表中。 如果有多条相等度量标准的路由可用,则将通过负载平衡选择正确的度量标准。

  3. 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

路由表,路由,路由规则

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值