当网络10.4.0.0发生故障时,RouterC检测到故障,并停止其E0接口的路由报文。 然而,路由器A和B还没有收到失败的通知。 路由器A仍然认为可以通过路由器B访问10.4.0.0。路由器A的路由表仍然反映出距离为2的网络10.4.0.0的路径。

由于RouterB的路由表指示到网络10.4.0.0的路由,因此RouterC认为路由器B具有通过路由器B的10.4.0.0网络的可行路径。路由器C更新其路由表以反映网络10.4.0.0的路径 跳数为2,如图3-10所示。

图3-10

路由器之间不一致的路由信息

路由器B从Router C接收到一个新的更新(3跳)。 路由器A从RouterB接收新的路由表,检测修改后的网络距离矢量为10.4.0.0,并将自己的距离向量重新计算为10.4.0.0,如图3-11所示。

图3-11

数据不一致继续传播

因为路由器A,B和C的结论是,网络10.4.0.0的最佳路径是通过彼此,路由器A发往网络10.4.0.0的数据包在路由器B和C之间继续反弹,如图3-12所示。

图3-12

路由循环存在错误跳数

继续图3-12中的示例,关于网络10.4.0.0的无效更新继续循环。 在其他一些进程可以停止循环之前,由于网络10.4.0.0关闭,路由器之间的路由器会相应地进行更新。

这种条件称为无穷计算,导致路由协议在设备之间来回连续地增加其度量和路由数据包,尽管目标网络10.4.0.0已经关闭。 当路由协议计数到无穷大时,无效信息导致路由回路存在,如图3-13所示。

无穷计数情形

没有对策来停止此过程,每次路由更新广播到另一个路由器时,跳数的距离矢量递增。因为路由表中的信息不正确,导致数据包通过网络发送。 以下部分介绍了距离矢量路由协议用于防止路由环路无限期运行的对策。

以最大跳数设置排除路由循环

IP数据包通过IP报头中的生存时间(TTL)值具有固有的限制。 换句话说,路由器必须在每次获取数据包时至少将TTL字段减1。 如果TTL值为0,则丢弃该报文。 但是,这不会阻止路由器继续尝试将数据包发送到已关闭的网络。

为了避免长时间的问题,距离矢量协议定义无穷大为一些最大数量。 该数字是指路由度量,例如跳数。

使用这种方法,路由协议允许路由循环,直到度量超过其最大允许值。 图3-14显示了16跳的不可达值。 在度量值超过最大值后,网络10.4.0.0被认为是无法访问的。

图3-14最大跳数

预防路由环路与水平分割

消除路由环路并加快收敛的一种方法是通过称为水平分割的技术。 水平分割规则是从原始更新到来的方向发送关于路由的信息从未有用。 例如,图3-15说明了以下内容:

路由器B可以通过路由器C访问网络10.4.0.0。但是下面的做好毫无意义:路由器B向路由器C通知路由器B可以通过路由器C访问网络10.4.0.0。

如果路由器B通过路由到网络10.4.0.0的路由到路由器A,那么路由器A公布其从网络10.4.0.0到路由器B的距离就是无意义的。

没有替代路径到网络10.4.0.0,路由器B断定网络10.4.0.0是不可访问的。

Split Horizon

Preventing Routing Loops with Route Poisoning

Another operation complementary to split horizon is a technique called route poisoning. Route poisoning attempts to improve convergence time and eliminate routing loops caused by inconsistent updates. With this technique, when a router loses a link, the router advertises the loss of a route to its neighbor device. Route poisoning enables the receiving router to advertise a route back toward the source with a metric higher than the maximum. The advertisement back seems to violate split horizon, but it lets the router know that the update about the down network was received. The router that received the update also sets a table entry that keeps the network state consistent while other routers gradually converge correctly on the topology change. This mechanism allows the router to learn quickly of the down route and to ignore other updates that might be wrong for the hold-down period. This prevents routing loops.

Figure 3-16 illustrates the following example. When network 10.4.0.0 goes down, Router C poisons its link to network 10.4.0.0 by entering a table entry for that link as having infinite cost (that is, being unreachable). By poisoning its route to network 10.4.0.0, Router C is not susceptible to incorrect updates from neighboring routers, which may still have an outdated entry for network 10.4.0.0.

Route Poisoning

When Router B sees the metric to 10.4.0.0 jump to infinity, it sends an update called a poison reverse to Router C, stating that network 10.4.0.0 is inaccessible, as illustrated in Figure 3-17. This is a specific circumstance overriding split horizon, which occurs to make sure that all routers on that segment have received information about the poisoned route.

Poison Reverse

Route Maintenance Using Hold-Down Timers

Hold-down timers prevent regular update messages from inappropriately reinstating a route that might have gone bad. Hold-downs tell routers to hold any changes that might affect routes for some period of time. The hold-down period is usually calculated to be just greater than the time necessary to update the entire network with a routing change.

Hold-down timers perform route maintenance as follows:

  1. When a router receives an update from a neighbor indicating that a previously accessible network is now inaccessible, the router marks the route as inaccessible and starts a hold-down timer.

  2. If an update arrives from a neighboring router with a better metric than originally recorded for the network, the router marks the network as accessible and removes the hold-down timer.

  3. If at any time before the hold-down timer expires, an update is received from a different neighboring router with a poorer metric, the update is ignored. Ignoring an update with a higher metric when a holddown is in effect enables more time for the knowledge of the change to propagate through the entire network.

  4. During the hold-down period, routes appear in the routing table as "possibly down."

Figure 3-18 illustrates the hold-down timer process.

Hold-Down Timers

Route Maintenance Using Triggered Updates

In the previous examples, routing loops were caused by erroneous information calculated as a result of inconsistent updates, slow convergence, and timing. If routers wait for their regularly scheduled updates before notifying neighboring routers of network catastrophes, serious problems can occur, such as loops or traffic being dropped.

Normally, new routing tables are sent to neighboring routers on a regular basis. A triggered update is a new routing table that is sent immediately, in response to a change. The detecting router immediately sends an update message to adjacent routers, which, in turn, generate triggered updates notifying their adjacent neighbors of the change. This wave propagates throughout the portion of the network that was using the affected link. Figure 3-19 illustrates what takes place when using triggered updates.

Triggered Updates

Triggered updates would be sufficient with a guarantee that the wave of updates reached every appropriate router immediately. However, two problems exist:

  • Packets containing the update message can be dropped or corrupted by some link in the network.

  • The triggered updates do not happen instantaneously. A router that has not yet received the triggered update can issue a regular update at just the wrong time, causing the bad route to be reinserted in a neighbor that had already received the triggered update.

Coupling triggered updates with holddowns is designed to get around these problems.

Route Maintenance Using Hold-Down Timers with Triggered Updates

Because the hold-down rule says that when a route is invalid, no new route with the same or a higher metric will be accepted for the same destination for some period, the triggered update has time to propagate throughout the network.

The troubleshooting solutions presented in the previous sections work together to prevent routing loops in a more complex network design. As depicted in Figure 3-20, the routers have multiple routes to each other. As soon as Router B detects the failure of network 10.4.0.0, Router B removes its route to that network. Router B sends a trigger update to Routers A and D, poisoning the route to network 10.4.0.0 by indicating an infinite metric to that network.

Implementing Multiple Solutions

Routers D and A receive the triggered update and set their own hold-down timers, noting that the 10.4.0.0 network is "possibly down." Routers D and A, in turn, send a triggered update to Router E, indicating the possible inaccessibility of network 10.4.0.0. Router E also sets the route to 10.4.0.0 in holddown. Figure 3-21 depicts the way Routers A, D, and E implement hold-down timers.

Route Fails

Router A and Router D send a poison reverse to Router B, stating that network 10.4.0.0 is inaccessible. Because Router E received a triggered update from Routers A and D, it sends a poison reverse to Routers A and D. Figure 3-22 illustrates the sending of poison reverse updates.

Route Holddown

Routers A, D, and E will remain in holddown until one of the following events occurs:

  • The hold-down timer expires.

  • Another update is received, indicating a new route with a better metric.

  • A flush timer, which is the time a route will be held before being removed, removes the route from the routing table.

During the hold-down period, Routers A, D, and E assume that the network status is unchanged from its original state and attempt to route packets to network 10.4.0.0. Figure 3-23 illustrates Router E attempting to forward a packet to network 10.4.0.0. This packet will reach Router B. However, because Router B has no route to network 10.4.0.0, Router B will drop the packet and return an Internet Control Message Protocol (ICMP) network unreachable message.

Packets During Holddown

When the 10.4.0.0 network comes back up, Router B sends a trigger update to Routers A and D, notifying them that the link is active. After the hold-down timer expires, Routers A and D add route 10.4.0.0 back to the routing table as accessible, as illustrated in Figure 3-24.

Network Up

Routers A and D send Router E a routing update stating that network 10.4.0.0 is up, and Router E updates its routing table after the hold-down timer expires, as illustrated in Figure 3-25.

Network Converges

Link-State and Advanced Distance Vector Protocols

In addition to distance vector–based routing, the second basic algorithm used for routing is the link-state algorithm. Link-state protocols build routing tables based on a topology database. This database is built from link-state packets that are passed between all the routers to describe the state of a network. The shortest path first algorithm uses the database to build the routing table. Figure 3-26 shows the components of a link-state protocol.

Link-State Protocols

Understanding the operation of link-state routing protocols is critical to being able to enable, verify, and troubleshoot their operation.

Link-state-based routing algorithms—also known as shortest path first (SPF) algorithms—maintain a complex database of topology information. Whereas the distance vector algorithm has nonspecific information about distant networks and no knowledge of distant routers, a link-state routing algorithm maintains full knowledge of distant routers and how they interconnect.

Link-state routing uses link-state advertisements (LSA), a topological database, the SPF algorithm, the resulting SPF tree, and, finally, a routing table of paths and ports to each network.

Open Shortest Path First (OSPF) and Intermediate System-to-Intermediate System (IS-IS) are classified as link-state routing protocols. RFC 2328 describes OSPF link-state concepts and operations. Link-state routing protocols collect routing information from all other routers in the network or within a defined area of the internetwork. After all the information is collected, each router, independently of the other routers, calculates its best paths to all destinations in the network. Because each router maintains its own view of the network, it is less likely to propagate incorrect information provided by any one particular neighboring router.

Link-state routing protocols were designed to overcome the limitations of distance vector routing protocols. Link-state routing protocols respond quickly to network changes, send triggered updates only when a network change has occurred, and send periodic updates (known as link-state refreshes) at long intervals, such as every 30 minutes. A hello mechanism determines the reachability of neighbors.

Route Loops的更多相关文章

  1. Endless looping of packets in TCP/IP networks (Routing Loops)

    How endless looping of packets in a TCP/IP network might occur? Router is a device used to interconn ...

  2. MatterTrack Route Of Network Traffic :: Matter

    Python 1.1 基础 while语句 字符串边缘填充 列出文件夹中的指定文件类型 All Combinations For A List Of Objects Apply Operations ...

  3. Nested Loops join时显示no join predicate原因分析以及解决办法

    本文出处:http://www.cnblogs.com/wy123/p/6238844.html 最近遇到一个存储过程在某些特殊的情况下,效率极其低效, 至于底下到什么程度我现在都没有一个确切的数据, ...

  4. Application Request Route实现IIS Server Farms集群负载详解

    序言 随着公司业务的发展,后台业务就变的越来越多,然而服务器的故障又像月经一样,时不时的汹涌而至,让我们防不胜防.那么后台的高可用,以及服务器的处理能力就要做一个横向扩展的方案,以使后台业务持续的稳定 ...

  5. SQL Tuning 基础概述06 - 表的关联方式:Nested Loops Join,Merge Sort Join & Hash Join

    nested loops join(嵌套循环)   驱动表返回几条结果集,被驱动表访问多少次,有驱动顺序,无须排序,无任何限制. 驱动表限制条件有索引,被驱动表连接条件有索引. hints:use_n ...

  6. .net core 源码解析-mvc route的注册,激活,调用流程(三)

    .net core mvc route的注册,激活,调用流程 mvc的入口是route,当前请求的url匹配到合适的route之后,mvc根据route所指定的controller和action激活c ...

  7. angular路由——ui.route

    angular路由 使用案例 <!DOCTYPE html> <html lang="en"> <head> <meta charset= ...

  8. 如何在ARM中创建Express Route

    很早之前就想试试Azure的express route,但是一直没有找到合适的机会,正好有个客户需要上express route,所以最近先自己研究研究,防止在做poc的时候耗费更多时间,本次场景我们 ...

  9. Python flask @app.route

    转载自 http://python.jobbole.com/80956/ 下面是Flask主页给我们的第一个例子,我们现在就由它入手,深入理解“@app.route()”是如何工作的.         ...

随机推荐

  1. PHP和MySQL.Web开发(原书第4版)学习盲点笔记

    1.浏览器输出中文乱码解决: <?php header("Content-type: text/html; charset=utf-8"); ?> 相当于html中的: ...

  2. LODOP设置同一个任务发送到不同打印机

    前面的博文Lodop打印语句最基本结构介绍(什么是一个任务),一个任务只能有一个打印语句(最后PRINT,PRINTA,PREVIEW等),如果执行多个,LODOP会弹出多次,C-LODOP会提示窗口 ...

  3. Linux清除痕迹

    Linux清除痕迹 第一种方法: 在退出会话前直接执行: #history -r 清除当前会话的命令历史记录 第二种方法: 在vim中执行自己不想让别人看到的命令 随便用vim打开一个文件 :set ...

  4. 35个高级Python知识点总结

    原文地址:https://blog.51cto.com/xvjunjie/2156525 No.1 一切皆对象 众所周知,Java中强调“一切皆对象”,但是Python中的面向对象比Java更加彻底, ...

  5. P1020 【导弹拦截】

    题目连接嘤嘤嘤~~ 这个题目还是比较难的(至少对我来说是酱紫的嘤嘤嘤).. 第一问,看题解好像用的都是DP,但其实可以用二分,求最长不上升子序列,因为只要输出答案,不用输出方案,时间复杂度n leg( ...

  6. Vue双向数据绑定简易实现

    一.vue中的双向数据绑定主要使用到了Object.defineProperty(新版的使用Proxy实现的)对Model层的数据进行getter和setter进行劫持,修改Model层数据的时候,在 ...

  7. Python笔记008函数(2)

    1.        昨日内容回顾: def 函数(): 函数体 return 值 如果不写return,默认返回None.可以单独返回一个值,也能够以元组的形式返回多个值.(不要把print和retu ...

  8. pandas数据结构之Series笔记

    对Series的理解也源于对其相关的代码操作,本次仅贴一些代码来加深理解以及记忆 import pandas as pd import numpy as np s = pd.Series(np.ran ...

  9. go 结构体定义和结构体指针

    结构体一个结构体(`struct`)就是一个字段的集合. 将来要使用它向java .C# 中的class 有相同的地位 struct 可以用来值传递 同时可以通过引用传递参数(地址) java C# ...

  10. 使用Duilib开发Windows软件(1)——HelloWorld

    我使用的是网易版本: https://github.com/netease-im/NIM_Duilib_Framework 时间是2019-11-28,作者最新的提交如下图: 运行官方示例程序 下载完 ...