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

路由表,路由,路由规则

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

路由表,路由,路由规则

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/380676.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

PetShop之ASP.NET缓存(转载)

《解剖PetShop》系列之四 四 PetShop之ASP.NET缓存 如果对微型计算机硬件系统有足够的了解,那么我们对于Cache这个名词一定是耳熟能详的。在CPU以及主板的芯片中,都引入了这种名为高速缓冲存 储器(Cache)的技术。因为Cache的存取速…

php代码审计步骤,php代码审计(一)-----调试函数

本篇文章给大家分享的内容是调试函数,有兴趣的朋友可以看一下,也可以给有需要帮助的同学一点参考两种最基本的输出方法echo和print/***echo 是一个语言结构,有无括号均可使用:echo 或 echo()*///打印字符串echo "hello"…

XML+Application来编写计数器(一)

1)网站总共访问人数计数器 这种计数器我们可以使用XML来实现&#xff0c;打开windows的记事本在其中录入以下数据另存为count.xml。 <MyCount> <AllCount>0</AllCount> <MaxCount>0</MaxCount> </MyCount> 其中AllCount标签是记录web页面访…

使用python学线性代数_最简单的神经网络简介| 使用Python的线性代数

使用python学线性代数A neural network is a powerful tool often utilized in Machine Learning because neural networks are fundamentally very mathematical. We will use our basics of Linear Algebra and NumPy to understand the foundation of Machine Learning usin…

php七天登录,十天学会php之第七天

十天学会php之第七天推荐查看本文HTML版本学习目的&#xff1a;学会SESSION的使用SESSION的作用很多&#xff0c;最多用的就是站点内页面间变量传递。在页面开始我们要session_start();开启SESSION&#xff1b;然后就可以使用SESSION变量了&#xff0c;比如说要赋值就是…

电脑安装了mysql,但找不到mysql服务

首先找到mysql的bin文件目录&#xff0c;我的是在&#xff1a;C:\Program Files\mysql-5.7.27-winx64\bin 然后找到下图内容&#xff0c;右键以管理者身份运行 然后cd 到mysql的bin目录 在输入mysqld -install 服务就重启好了

Item 34. Restricting Heap Allocation

Item 34. Restricting Heap Allocation1、什么情况下要限制堆分配&#xff1f;假如一个句柄对象&#xff08;"handle" object &#xff09;维护了一个体对象&#xff08;"body" object&#xff09;的引用数量&#xff0c;就需要确保对象的析构函数调用。局…

Web Service 缓存

由于微软的Web service实现是基于Asp.net,所以会出现缓存也就在情理之中了.主要有2中缓存:输出缓存和数据缓存.由于Web Service的缓存管理与asp.net基本是一样的,就不说他的原理,主要说一下在Web service中是如何实现的. 输出缓存 实现方法是在WebMethod这个特性里面加一个属性…

在JavaScript中使用示例继续语句

JavaScript继续声明 (JavaScript continue statement) continue is a keyword in JavaScript, it is used with the looping statements to continue the loops iteration. continue是JavaScript中的关键字&#xff0c;它与循环语句一起使用以继续循环的迭代。 When a continu…

php title限制字数,dedecms:title解决字数限制的两种方法

织梦title字数怎样限制呢&#xff1f;相信对织梦cms熟悉的朋友来说&#xff0c;这真不是一个问题。当然了&#xff0c;有些方法并不能通用&#xff0c;在特殊情况下&#xff0c;是没有效果的哦。好了&#xff0c;别的不说了&#xff0c;给大家贴两种常用的方法吧。织梦cms限制t…

win10安装masm32 SDK并运行一个小程序

建议在安装之前&#xff0c;先装一下notepad编辑器&#xff08;其他也行)&#xff0c;Visual C 首先我们到官网下载masm32&#xff08;http://www.masm32.com/&#xff09;&#xff0c;到了官网后&#xff0c;点击download就行了。 随便点一个就可以了。 将zip文件解压&#…

怎样改进数据库的查询性能?

数据库的查询功能&#xff0c;其性能终究是有限的。即使我们对数据库进行了最优配置&#xff0c;对数据表设计再三斟酌&#xff0c;然而一旦面临海量数据&#xff0c;且返回结果集较大的时候&#xff0c;常规的查询语句就无能为力了。一般说来&#xff0c;当返回的结果集超过总…

MySQL Show命令的使用

MySQL Show命令的使用 show tables或show tables from database_name; 解释&#xff1a;显示当前数据库中所有表的名称 show databases; 解释&#xff1a;显示mysql中所有数据库的名称 show processlist; 解释&#xff1a;显示系统中正在运行的所有进程&#xff0c;也就是当前正…

Python | Lambda和map()与示例

The map() function is used to apply the function to all items of an iterable collection like list, tuple etc and it returns the list of the result after performing the functionality defined in the applied function. map()函数用于将函数应用于可迭代集合的所有…

win10系统,在安装masm32的时候出现DELETE operation of EXE file has failed 解决方案

在安装之前&#xff0c;要将所有的像360安全管家、火绒等安全类软件关闭 官网在介绍安装masm32时说到&#xff1a; MASM32 SDK是开发软件&#xff0c;必须安装在属性配置的计算机上&#xff0c;否则由于安全或操作系统设置&#xff0c;可能会阻止安装完全安装。您不应该尝试在计…

matlab figure 嵌套,操作Matlab的Figure窗口(一)

以前&#xff0c;我和很多人一样&#xff0c;总是将数据保存到mat文件中。后来突然发现&#xff0c;如果数据量不大的话&#xff0c;直接将Figure窗口中的图形保存为fig文件是更好的选择。fig文件与一般的图像文件不同&#xff0c;并不是由图像的像素构成&#xff0c;它包含了当…

令人兴奋的好消息(2005-6-7)

从今天起&#xff08;也可能是昨天&#xff09;用Google也可以搜到我的Blog了&#xff0c;很高兴&#xff0c;以后流量会更大的拉我测了一下Google搜索关键字及排名搜“乖狗狗” 排名&#xff1a;第八搜“誓言不会融化的那个夏天” 排名&#xff1a;第一搜“Using NameSpace …

struts2自定义拦截器一——模拟登陆权限验证

1、http://localhost:8083/struts2/user.jsp 表示用户已登陆&#xff0c;存放session对象 2、http://localhost:8083/struts2/quit.jsp 表示用户已退出&#xff0c;移除session对象 3、http://localhost:8083/struts2/login/addUIHelloWorld.do 如果session存在则往下执行&…

c语言中fflush函数z_带有示例的C语言fflush()函数

c语言中fflush函数zC中的fflush()函数 (fflush() function in C) Prototype: 原型&#xff1a; int fflush(FILE *filename);Parameters: 参数&#xff1a; FILE *filenameReturn type: 0 or EOF 返回类型&#xff1a; 0或EOF Use of function: 使用功能&#xff1a; When …

masm32使用nmake工具

nmake.exe如果你安装了Visual C你可以在bin文件目录下找到&#xff0c;然后复制到masm32的bin目录下,如果没有安装visual C就百度下一个吧&#xff01; 使nmake之前&#xff0c;我们的.obj和.res文件都创建好了,在工程建一个文件Makefile&#xff0c;不需要后缀 里面内容填&am…