WO2017128689A1 - Route ageing processing method and apparatus - Google Patents

Route ageing processing method and apparatus Download PDF

Info

Publication number
WO2017128689A1
WO2017128689A1 PCT/CN2016/093962 CN2016093962W WO2017128689A1 WO 2017128689 A1 WO2017128689 A1 WO 2017128689A1 CN 2016093962 W CN2016093962 W CN 2016093962W WO 2017128689 A1 WO2017128689 A1 WO 2017128689A1
Authority
WO
WIPO (PCT)
Prior art keywords
route
router
aging time
time interval
aging
Prior art date
Application number
PCT/CN2016/093962
Other languages
French (fr)
Chinese (zh)
Inventor
何建军
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017128689A1 publication Critical patent/WO2017128689A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery

Definitions

  • This document relates to, but is not limited to, the field of communications, and in particular, to a route aging processing method and apparatus.
  • Dynamic routing protocols are mainly divided into two types, one is a distance vector routing algorithm, and the other is a link state routing algorithm.
  • each router maintains a routing table that lists the currently known best paths to each target, which are constantly updated through the exchange of information between neighboring routers. This ensures that each router has the best path information to reach each destination.
  • the Routing Information Protocol (RIP) is a routing protocol based on the distance vector routing algorithm, which uses hop count as the measurement standard.
  • RIP exchanges its own routing table with neighboring routers and periodically exchanges information at regular intervals.
  • the router that receives the packet compares the packet with each item in its own RIP routing table, and maintains its own RIP routing table according to the distance vector routing algorithm.
  • Each route in the RIP has a periodic update timer and an aging timer.
  • the time parameters of the above periodic update timer are all set by the routing information protocol.
  • the periodic update timer is used to trigger the update of the RIP router routing table, and sends its own route to the neighbor router in the update interval for the sending interval.
  • the router receives the route update packet sent by the neighboring router, adds the route carried in the route update packet to the local routing table, and sets an aging timer for the route.
  • the aging timer is used to determine whether to aging a route. If the route sent by the neighboring router is received within the aging time interval, the corresponding route aging timer is reset. If the route sent by the neighboring router is not received within the aging time interval, the route is invalid.
  • the neighboring router can be invalidated by placing the route cost value at an infinity value of 16, indicating that the route is unreachable.
  • the route aging interval is greater than the transmission interval, and there is usually a strong association, that is, the aging interval is a multiple of the transmission interval.
  • the route aging interval is at least three times the interval of the transmission interval. To ensure that the route update is lost, the route is still reachable.
  • the route aging time is the way to receive the route It is set by the device, and the time interval for sending the route is set by the router that sends the route.
  • the aging time of the route is independent of the interval of sending the route. Therefore, the setting of the route aging time is unreasonable, resulting in the corresponding route.
  • the embodiment of the invention provides a route aging processing method and device, which can reasonably set the route aging time in the routing information protocol, thereby reducing the oscillating of the corresponding route.
  • the embodiment of the present invention provides a route aging processing method, which is applied to a routing information protocol, and includes: the second router receives a routing update packet that carries the aging time interval value of the route sent by the first router, where the aging time interval value The first router is obtained from the local configuration; the second router sets the aging time of the route according to the aging time interval value.
  • the second router sets the aging time of the route according to the aging time interval value, where the second router determines whether the aging time interval value is 0; if the judgment result is no, and the route in the route update packet needs to be In the case of being added to the routing table of the second router, the second router adds a route to the routing table of the second router, and sets the aging time of the route to the aging time interval value.
  • the route aging processing method further includes: if the result of the determination is yes, and the route sent by the first router exists in the routing table, the second router ages the route.
  • the setting, by the second router, the aging time of the route according to the aging time interval value further includes:
  • the route in the route update packet is added to the routing table of the second router, and The aging time of the route in the route update packet is reset.
  • the embodiment of the invention provides a route aging processing method, which is applied to the routing information protocol, and includes: the first router obtains the aging time interval value of the route from the local configuration; the first router sends the aging time interval value to the second router. Routing update message, wherein the routing update message And indicating that the second router sets the aging time of the route according to the aging time interval value.
  • the route aging processing method further includes: determining, by the first router, whether the aging time interval value carried in the routing update packet is all 0. If the judgment result is yes, the first router does not add a route to the route update message.
  • the embodiment of the present invention provides a route aging processing apparatus, which is applied to a second router and is applied to a routing information protocol, and includes: a receiving module, configured to receive a routing update report of an aging time interval value of a route that is sent by a first router.
  • the aging time interval value is obtained by the first router from the local configuration, and the setting module is configured to set the aging time of the route according to the aging time interval value.
  • the setting module includes: a determining unit, configured to determine whether the aging time interval value is 0; setting the unit, setting the result to be no, and the route in the routing update message needs to be added to the second In the routing table of the router, add the route to the routing table of the second router, and set the aging time of the route to the aging time interval value.
  • the embodiment of the present invention provides a route aging processing apparatus, which is applied to a first router and is applied to a routing information protocol, and includes: an obtaining module, configured to obtain a aging time interval value of a route from a local configuration; and a sending module, configured to Sending, to the second router, a route update packet carrying the aging time interval value, where the route update message is used to indicate that the second router sets the aging time of the route according to the aging time interval value.
  • the route aging processing apparatus further includes: a determining module, configured to determine whether the aging time interval value carried in the routing update message is all 0; if the determination result is yes, no route is added to the route Update the message.
  • a determining module configured to determine whether the aging time interval value carried in the routing update message is all 0; if the determination result is yes, no route is added to the route Update the message.
  • Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
  • the aging interval of the second router route is advertised by the first router.
  • Reasonable time setting in the routing information protocol thereby reducing the fluctuation of the corresponding route, thereby improving the stability of the system.
  • FIG. 1 is a flowchart (1) of a route aging processing method according to an embodiment of the present invention
  • FIG. 2 is a flowchart (2) of a route aging processing method according to an embodiment of the present invention.
  • FIG. 3 is a structural block diagram (1) of a route aging processing apparatus according to an embodiment of the present invention.
  • FIG. 4 is a structural block diagram (1) of a route aging processing apparatus according to an alternative embodiment of the present invention.
  • FIG. 5 is a structural block diagram (2) of a route aging processing apparatus according to an embodiment of the present invention.
  • FIG. 6 is a structural block diagram (2) of a route aging processing apparatus according to an alternative embodiment of the present invention.
  • FIG. 7A is a schematic diagram (1) of a format of a route update message according to an embodiment of the present invention.
  • 7B is a schematic diagram (2) of a format of a route update message according to an embodiment of the present invention.
  • FIG. 8 is a flowchart (3) of a route aging processing method according to an embodiment of the present invention.
  • FIG. 1 is a flowchart (1) of a route aging processing method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps. step:
  • Step S102 The second router receives the routing update packet that is sent by the first router and carries the aging time interval value of the route, where the aging time interval value is obtained by the first router from the local configuration.
  • Step S104 The second router sets an aging time of the route according to the aging time interval value.
  • the first router is used to advertise the aging interval of the second router route, and the time setting is reasonably performed in the routing information protocol, thereby reducing the fluctuation of the corresponding route, thereby improving the stability of the system. Sex.
  • the setting, by the second router, the aging time of the route according to the aging time interval value may include: determining whether the aging time interval value is 0; if the determination result is no, and the route in the route update message needs to be added to the In the case of the routing table of the second router, adding a route to the second In the routing table of the router, set the aging time of the route to the aging interval value. For example, set the aging timer of the route to the aging time interval value.
  • the route in the route update packet does not exist in the routing table of the second router, or the route in the route update packet is better than the existing route in the routing table of the second router, and the route If the existing route is not previously sent by the first router, the second router determines that the route needs to be added to the routing table of the second router, adds the route to the routing table of the second router, and Turn on the aging timer.
  • the second router deletes The existing route.
  • the method may further include:
  • the route is aged.
  • setting the aging time of the route by the second router according to the aging time interval value may include: further including:
  • the routing table of the second router has a route that is sent by the first router (that is, the route that is sent by the first router and is the same as the route in the routing update packet), and the route is updated.
  • the route in the route is added to the routing table of the second router, and the aging time of the route in the route update packet is reset (that is, the aging time of the route in the route update packet is set to the aging time interval value).
  • the first router does not add a corresponding route to the route update packet, and optimizes the sending cost value of the aging related route in the related art to be 16 and carries the route.
  • the routing update message saves bandwidth resources.
  • the method further includes:
  • the second router determines that the routing update message does not carry a route and the aging time interval value is 0. The second router aging all the routes previously advertised by the first router.
  • the process ends.
  • FIG. 2 is a flowchart (2) of a route aging processing method according to an embodiment of the present invention. The method is applied to a routing information protocol. As shown in FIG. 2, the method includes the following steps:
  • Step S202 The first router obtains an aging time interval value of the route from the local configuration.
  • the first router configures the interval for sending routes and the aging interval. You can obtain the aging time interval of the route when you configure the aging time interval.
  • Step S204 The first router sends a route update message carrying the aging time interval value to the second router, where the route update message is used to indicate that the second router sets the aging time of the route according to the aging time interval value.
  • the first router determines whether the aging time interval value carried in the routing update packet is all 0; Next, the first router does not add a route to the route update message.
  • the route update packet does not carry the route, and the route update packet with the route cost value of 16 and carrying the route for the aging-related route in the related art is optimized, which saves the saving. Bandwidth resources.
  • FIG. 3 is a structural block diagram (1) of a route aging processing apparatus according to an embodiment of the present invention.
  • the apparatus is applied to a second router in a routing information protocol.
  • the apparatus includes a receiving module 32 and a setting module 34. A brief description of each module follows.
  • the receiving module 32 is configured to receive, by the first router, a routing update packet that carries an aging time interval value of the route, where the aging time interval value is obtained by the first router from the local configuration;
  • the setting module 34 is configured to set an aging time of the route according to the aging time interval value.
  • the setting module includes:
  • the determining unit 42 is configured to determine whether the aging time interval value is 0;
  • the setting unit 44 is set to be in the judgment result, and the route in the route update message needs to be If the route is added to the routing table of the second router, the route is added to the routing table of the second router, and the aging time of the route is set to the aging time interval value.
  • FIG. 5 is a structural block diagram (2) of a route aging processing apparatus according to an embodiment of the present invention.
  • the apparatus is applied to a first router in a routing information protocol.
  • the apparatus includes an obtaining module 52 and a sending module 54, A brief description of each module follows.
  • the obtaining module 52 is configured to obtain an aging time interval value of the route from the local configuration.
  • the sending module 54 is configured to send, to the second router, a route update message carrying the aging time interval value, where the route update message is used to indicate that the second router sets the aging time of the route according to the aging time interval value.
  • FIG. 6 is a structural block diagram (2) of a route aging processing apparatus according to an alternative embodiment of the present invention. As shown in FIG. 6, the route aging processing apparatus further includes:
  • the determining module 62 is configured to determine whether the aging time interval value carried in the routing update message is all 0. If the determination result is yes, no route is added to the routing update message.
  • module can implement a combination of software and/or hardware for a predetermined function.
  • apparatus described in the above embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and conceivable.
  • Embodiments of the present invention include a process in which a neighbor router (corresponding to the first router in the above, referred to as a neighbor) generates and sends a route update message and a local router (corresponding to the second router in the above) receives and responds to the route update message. .
  • a neighbor router corresponding to the first router in the above, referred to as a neighbor
  • a local router corresponding to the second router in the above
  • the process of generating and sending a routing update message by the neighboring router includes: after the neighboring router enables the routing information protocol on the corresponding interface, the interface starts to periodically send the routing update packet, and the routing update packet carries all the requirements in the local routing table. Advertise the outgoing route. The value of the route aging time interval is obtained. If the route aging time interval is not 0, the route to be sent is added to the routing field of the route update packet, and the route aging time is obtained. The interval value is added to the timeout field used by the route update packet extension. If all the routes aging time interval is 0, all the previously advertised routes are aged out, the timeout field is set to 0, and no route is added. Route update message; added route update The message is sent out.
  • the process of receiving and responding to the route update message by the local router includes: when receiving the route update message sent by the neighbor, determining whether the route update message carries the route, if the route update message If the route is not carried and the value of the timeout field is 0, the local router aging all the routes previously advertised by the neighboring router. If the routing update packet carries the route, it needs to traverse all the routes in the routing update packet one by one. The so-called aging refers to placing the route in an invalid state.
  • each route carried in the route update packet In the case that the timeout value is 0, the route previously advertised by the neighbor router is put into an invalid state. If the timeout value is not 0, it is determined whether the route carried in the route update packet needs to be added to the local routing table. If the route needs to be added to the local routing table and the neighboring router already exists in the local routing table. Route, reset the route aging timer, set the aging time interval to the value carried in the timeout field of the route update packet; if the route needs to be added to the local routing table and the route advertised by the neighboring router does not exist in the local routing table Add the corresponding route to the local routing table, and enable the route aging timer. Set the aging time to the value carried in the timeout field of the route update packet. The corresponding routing update packet sent by the neighboring router is not received in the aging time, and the route previously advertised by the neighboring router is set to be in an invalid state.
  • FIG. 7A is a schematic diagram (1) of a route update message format according to an embodiment of the present invention
  • FIG. 7B is a schematic diagram (2) of a route update message format according to an embodiment of the present invention.
  • the routing update message format used by the current RIP protocol has two bytes of unused fields.
  • the extension uses the unused field as a timeout field for carrying a route aging time interval value.
  • the maximum value of the route aging interval parameter is 65535.
  • the timeout of two bytes can meet the requirements.
  • the value of the timeout field may be 0.
  • the current method is to send a route update message with a route cost of 16 and including all the previously advertised routes, and the embodiment of the present invention takes no route to carry.
  • the scheme of updating the packet with an empty route with a timeout of 0 greatly saves bandwidth resources.
  • FIG. 8 is a flowchart (3) of a route aging processing method according to an embodiment of the present invention, which is a method Applied to the routing information protocol, as shown in FIG. 8, the method includes the following steps:
  • Step S802 receiving a route update message sent by the neighbor
  • Step S804 determining whether the route update message carries a route, if the determination result is yes, step S806 is performed, and if the determination result is no, the process proceeds to step S830;
  • Step S806 traversing the routing entries in the routing update message
  • Step S808 processing a routing entry
  • Step S810 it is determined whether the aging time is 0, if the determination result is YES, step S812 is performed, and if the determination result is no, the process proceeds to step S816;
  • Step S812 it is determined whether the routing table has the neighbor previously advertised route, if the determination result is yes, step S814 is performed, if the determination result is no, the process proceeds to step S828;
  • Step S814 the corresponding route advertised by the neighbor in the routing table is invalid, and the process proceeds to step S828;
  • Step S816 it is determined whether there is a route corresponding to the notification in the routing table, if the determination result is yes, step S818 is performed, and if the determination result is no, the process proceeds to step S826;
  • Step S818, it is determined whether the routing table has the neighbor previously advertised route, if the determination result is yes, the process proceeds to step S824, and if the determination result is negative, step S820 is performed;
  • Step S820 it is determined whether the route needs to be added to the routing table, if the determination result is yes, step S822 is performed, if the determination result is no, the process proceeds to step S828;
  • Step S822 adding a route to the routing table, opening the aging timer of the added route, the timer duration is the aging time interval value carried in the routing update message, and the process proceeds to step S828;
  • Step S824 update the route, reset the aging timer, the duration is the aging time interval value carried in the routing update message, and the process proceeds to step S828;
  • step S826 the route is added to the routing table, and the aging timer of the added route is opened, and the timer duration is the aging time interval value carried in the routing update packet; the process goes to step S828;
  • step S828 it is determined whether the routing entry has not been traversed. If the determination result is yes, the process proceeds to step S808. If the determination result is negative, the route aging processing method is terminated.
  • Step S830 determining whether the aging time interval value is 0, and if the determination result is YES, Step S832 is performed. If the determination result is negative, the route aging processing method is ended.
  • step S832 all the routes advertised by the neighbors in the routing table are invalidated, and the route aging processing method is terminated.
  • the interface After the router is enabled with the RIP protocol on the corresponding interface, the interface starts to send routing update packets periodically.
  • the routing update packet carries all the routes that need to be advertised in the local routing table.
  • the value of the route aging interval is set to be added to the timeout field of the routing update packet extension.
  • the aging interval of the neighboring router is the value of the timeout field. The neighbor keeps the value.
  • the maximum time that the route is valid is the timeout value.
  • route update packet In addition to periodically sending route update messages, it may be necessary to age all previously advertised routes or some of them. If all the previously advertised routes need to be aged, send a route update packet with a value of 0 in the timeout field. If you need to aging some of the routes, set the timeout field in the route update packet carrying the corresponding route to 0 or set the corresponding route cost to 16.
  • the local router receives the route update packet from the neighboring router to determine whether the route update packet carries the route. If the route update packet does not carry the route and the timeout field value is 0, the neighbor router notifies the local router to notify the neighbor previously. All the routes are in the invalid state. If the routes are carried in the routing update packets, the routes carried in the routing update packets are traversed one by one.
  • each route carried in the routing update message one by one. If the value of the timeout field is 0, the neighboring router notifies the local router to invalidate the previously advertised route. If the timeout value is not 0, it is determined whether the route needs to be added to the routing table. If the route is previously available and the newly received route cost is 16, the judgment result is no, and the route is set to an invalid state. If the route is previously available and the newly received route does not have a route preference in the routing table, no processing is performed. The hop count of the previously existing route in the routing table is smaller than the hop count of the newly received route.
  • the route aging timer is reset.
  • the aging timer of the route aging timer is the aging time of the timeout field in the route update packet, and the aging timer of the route restarts. If the route needs to be added to the routing table and The route advertised by the neighboring router does not exist in the routing table. The route is added to the routing table.
  • the route aging timer is set.
  • the aging time interval is set to the value of the timeout field of the route update packet.
  • the route aging timer is reset. .
  • each of the above-described modules or steps of the present invention can be implemented by a general-purpose computing device, which can be centralized on a single computing device or distributed across multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from The steps shown or described are performed sequentially, or they are separately fabricated into a plurality of integrated circuit modules, or a plurality of the modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
  • Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
  • each module/unit in the foregoing embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program in a storage and a memory by a processor. / instruction to achieve its corresponding function.
  • the invention is not limited to any specific form of combination of hardware and software.
  • the above technical solution is reasonably set in the routing information protocol, thereby reducing the fluctuation of the corresponding route, thereby improving the stability of the system.

Abstract

A route ageing processing method and apparatus. The route ageing processing method is applied to a routing information protocol, and comprises: a second router receives a route update packet that is sent by a first router and that carries an ageing time interval value of a route, the ageing time interval value being obtained from a local configuration by the first router; and the second router sets ageing time of the route according to the ageing time interval value.

Description

路由老化处理方法及装置Route aging processing method and device 技术领域Technical field
本文涉及但不限于通信领域,具体而言,涉及路由老化处理方法及装置。This document relates to, but is not limited to, the field of communications, and in particular, to a route aging processing method and apparatus.
背景技术Background technique
动态路由协议主要分为两种,一种是距离矢量路由算法,一种是链路状态路由算法。在距离矢量路由算法中,每一台路由器维护一张路由表,表中列举了当前已知的到每个目标的最佳路径,这些路由表通过邻居路由器之间的信息交换而不断被更新,从而保证每台路由器都有到达每个目的地的最佳路径信息。路由信息协议(Routing Information Protocol,简称为RIP)是基于距离矢量路由算法的一种路由协议,利用跳数来作为计量标准。Dynamic routing protocols are mainly divided into two types, one is a distance vector routing algorithm, and the other is a link state routing algorithm. In the distance vector routing algorithm, each router maintains a routing table that lists the currently known best paths to each target, which are constantly updated through the exchange of information between neighboring routers. This ensures that each router has the best path information to reach each destination. The Routing Information Protocol (RIP) is a routing protocol based on the distance vector routing algorithm, which uses hop count as the measurement standard.
RIP和相邻路由器交换自己的路由表,并按照固定的时间间隔周期性的交换信息。当一个RIP更新报文到达时,接收到该报文的路由器将该报文与自己的RIP路由表中的每一项进行比较,并按照距离矢量路由算法对自己的RIP路由表进行维护。RIP exchanges its own routing table with neighboring routers and periodically exchanges information at regular intervals. When a RIP update packet arrives, the router that receives the packet compares the packet with each item in its own RIP routing table, and maintains its own RIP routing table according to the distance vector routing algorithm.
RIP中每个路由具有周期更新定时器和老化定时器。上述周期更新定时器的时间参数都由路由信息协议来设置。该周期更新定时器用来激发RIP路由器路由表的更新,以更新周期为发送时间间隔向邻居路由器发送自己的路由。路由器接收到邻居路由器发送来的路由更新报文,将该路由更新报文中携带的路由添加到本地路由表中,并为该路由设置老化定时器。该老化定时器用来判定是否老化一个路由,在老化时间间隔内收到邻居路由器发送的路由,会重置对应的路由老化定时器。在老化时间间隔内未收到邻居路由器发来的路由,会将该路由设置为无效。可以通过将路由花费值置于无穷大值16,表示该路由不可达,无效该邻居路由器。在一个稳定的系统中,路由老化时间间隔大于发送时间间隔,并通常存在强关联,即老化时间间隔为发送时间间隔的倍数值。一般情况下,路由老化时间间隔至少为发送时间间隔的三倍值,以保证路由更新出现丢失的情况下,该路由仍然可达。Each route in the RIP has a periodic update timer and an aging timer. The time parameters of the above periodic update timer are all set by the routing information protocol. The periodic update timer is used to trigger the update of the RIP router routing table, and sends its own route to the neighbor router in the update interval for the sending interval. The router receives the route update packet sent by the neighboring router, adds the route carried in the route update packet to the local routing table, and sets an aging timer for the route. The aging timer is used to determine whether to aging a route. If the route sent by the neighboring router is received within the aging time interval, the corresponding route aging timer is reset. If the route sent by the neighboring router is not received within the aging time interval, the route is invalid. The neighboring router can be invalidated by placing the route cost value at an infinity value of 16, indicating that the route is unreachable. In a stable system, the route aging interval is greater than the transmission interval, and there is usually a strong association, that is, the aging interval is a multiple of the transmission interval. Generally, the route aging interval is at least three times the interval of the transmission interval. To ensure that the route update is lost, the route is still reachable.
针对相关技术在路由信息协议中,由于路由老化时间是由接收路由的路 由器来设置的,而发送路由的时间间隔是由发送路由的路由器设置的,路由老化时间与发送路由的时间间隔是相互独立的,因此,路由老化时间的设置并不合理,从而导致相应路由出现震荡的问题,还未提出有效的解决方案。For the related technology in the routing information protocol, since the route aging time is the way to receive the route It is set by the device, and the time interval for sending the route is set by the router that sends the route. The aging time of the route is independent of the interval of sending the route. Therefore, the setting of the route aging time is unreasonable, resulting in the corresponding route. There have been turbulence problems and no effective solutions have been proposed.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供了一种路由老化处理方法及装置,能够在路由信息协议中合理设置路由老化时间,从而减少相应路由的震荡。The embodiment of the invention provides a route aging processing method and device, which can reasonably set the route aging time in the routing information protocol, thereby reducing the oscillating of the corresponding route.
本发明实施例提供了一种路由老化处理方法,应用于路由信息协议,包括:第二路由器接收第一路由器发送的携带路由的老化时间间隔值的路由更新报文,其中,该老化时间间隔值是该第一路由器从本地配置中获取的;该第二路由器根据该老化时间间隔值设置路由的老化时间。The embodiment of the present invention provides a route aging processing method, which is applied to a routing information protocol, and includes: the second router receives a routing update packet that carries the aging time interval value of the route sent by the first router, where the aging time interval value The first router is obtained from the local configuration; the second router sets the aging time of the route according to the aging time interval value.
可选地,该第二路由器根据该老化时间间隔值设置路由的老化时间包括:该第二路由器判断该老化时间间隔值是否为0;在判断结果为否,且路由更新报文中的路由需要添加到该第二路由器的路由表中的情况下,该第二路由器添加路由到该第二路由器的路由表中,并将路由的老化时间设置为该老化时间间隔值。Optionally, the second router sets the aging time of the route according to the aging time interval value, where the second router determines whether the aging time interval value is 0; if the judgment result is no, and the route in the route update packet needs to be In the case of being added to the routing table of the second router, the second router adds a route to the routing table of the second router, and sets the aging time of the route to the aging time interval value.
可选地,该路由老化处理方法还包括:在判断结果为是且该路由表中存在该第一路由器发送的路由的情况下,该第二路由器老化该路由。Optionally, the route aging processing method further includes: if the result of the determination is yes, and the route sent by the first router exists in the routing table, the second router ages the route.
可选地,第二路由器根据所述老化时间间隔值设置路由的老化时间还包括:Optionally, the setting, by the second router, the aging time of the route according to the aging time interval value further includes:
在判断结果为否,且所述第二路由器的路由表中存在所述第一路由器先前发送的路由,将所述路由更新报文中的路由添加到所述第二路由器的路由表中,并重置所述路由更新报文中的路由的老化时间。If the result of the determination is no, and the route sent by the first router exists in the routing table of the second router, the route in the route update packet is added to the routing table of the second router, and The aging time of the route in the route update packet is reset.
发明实施例提供了一种路由老化处理方法,应用于路由信息协议,包括:第一路由器从本地配置中获取路由的老化时间间隔值;该第一路由器向第二路由器发送携带该老化时间间隔值的路由更新报文,其中,该路由更新报文 用于指示该第二路由器根据该老化时间间隔值设置路由的老化时间。The embodiment of the invention provides a route aging processing method, which is applied to the routing information protocol, and includes: the first router obtains the aging time interval value of the route from the local configuration; the first router sends the aging time interval value to the second router. Routing update message, wherein the routing update message And indicating that the second router sets the aging time of the route according to the aging time interval value.
可选地,在第一路由器从本地配置中获取路由的老化时间间隔值之后,该路由老化处理方法还包括:该第一路由器判断该路由更新报文中携带的老化时间间隔值是否全部为0;在判断结果为是的情况下,该第一路由器不添加路由到该路由更新报文。Optionally, after the first router obtains the aging time interval value of the route from the local configuration, the route aging processing method further includes: determining, by the first router, whether the aging time interval value carried in the routing update packet is all 0. If the judgment result is yes, the first router does not add a route to the route update message.
本发明实施例提供了一种路由老化处理装置,应用于第二路由器,且应用于路由信息协议,包括:接收模块,设置为接收第一路由器发送的携带路由的老化时间间隔值的路由更新报文,其中,该老化时间间隔值是该第一路由器从本地配置中获取的,设置模块,设置为根据该老化时间间隔值设置该路由的老化时间。The embodiment of the present invention provides a route aging processing apparatus, which is applied to a second router and is applied to a routing information protocol, and includes: a receiving module, configured to receive a routing update report of an aging time interval value of a route that is sent by a first router. The aging time interval value is obtained by the first router from the local configuration, and the setting module is configured to set the aging time of the route according to the aging time interval value.
可选地,该设置模块包括:判断单元,设置为判断该老化时间间隔值是否为0;设置单元,设置为在判断结果为否,且该路由更新报文中的路由需要添加到该第二路由器的路由表中的情况下,添加该路由到该第二路由器的路由表中,并将路由的老化时间设置为该老化时间间隔值。Optionally, the setting module includes: a determining unit, configured to determine whether the aging time interval value is 0; setting the unit, setting the result to be no, and the route in the routing update message needs to be added to the second In the routing table of the router, add the route to the routing table of the second router, and set the aging time of the route to the aging time interval value.
本发明实施例提供了一种路由老化处理装置,应用于第一路由器,且应用于路由信息协议,包括:获取模块,设置为从本地配置中获取路由的老化时间间隔值;发送模块,设置为向第二路由器发送携带该老化时间间隔值的路由更新报文,其中,该路由更新报文用于指示该第二路由器根据该老化时间间隔值设置路由的老化时间。The embodiment of the present invention provides a route aging processing apparatus, which is applied to a first router and is applied to a routing information protocol, and includes: an obtaining module, configured to obtain a aging time interval value of a route from a local configuration; and a sending module, configured to Sending, to the second router, a route update packet carrying the aging time interval value, where the route update message is used to indicate that the second router sets the aging time of the route according to the aging time interval value.
可选地,该路由老化处理装置还包括:判断模块,设置为判断该路由更新报文中携带的老化时间间隔值是否全部为0;在判断结果为是的情况下,不添加路由到该路由更新报文。Optionally, the route aging processing apparatus further includes: a determining module, configured to determine whether the aging time interval value carried in the routing update message is all 0; if the determination result is yes, no route is added to the route Update the message.
本发明实施例还提出了一种计算机可读存储介质,存储有计算机可执行指令,计算机可执行指令用于执行上述描述的任意一个方法。Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
通过本发明实施例,采用第一路由器通告第二路由器路由的老化间隔时间。在路由信息协议中合理的进行时间设置,从而减少了相应路由的震荡,进而提高了系统的稳定性。Through the embodiment of the present invention, the aging interval of the second router route is advertised by the first router. Reasonable time setting in the routing information protocol, thereby reducing the fluctuation of the corresponding route, thereby improving the stability of the system.
在阅读并理解了附图和详细描述后,可以明白其他方面。 Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1是根据本发明实施例的路由老化处理方法的流程图(一);1 is a flowchart (1) of a route aging processing method according to an embodiment of the present invention;
图2是根据本发明实施例的路由老化处理方法的流程图(二);2 is a flowchart (2) of a route aging processing method according to an embodiment of the present invention;
图3是根据本发明实施例的路由老化处理装置的结构框架图(一);3 is a structural block diagram (1) of a route aging processing apparatus according to an embodiment of the present invention;
图4是根据本发明可选实施例的路由老化处理装置的结构框图(一);4 is a structural block diagram (1) of a route aging processing apparatus according to an alternative embodiment of the present invention;
图5是根据本发明实施例的路由老化处理装置的结构框图(二);FIG. 5 is a structural block diagram (2) of a route aging processing apparatus according to an embodiment of the present invention; FIG.
图6是根据本发明可选实施例的路由老化处理装置的结构框图(二);6 is a structural block diagram (2) of a route aging processing apparatus according to an alternative embodiment of the present invention;
图7A是根据本发明实施例的路由更新报文格式的示意图(一);7A is a schematic diagram (1) of a format of a route update message according to an embodiment of the present invention;
图7B是根据本发明实施例的路由更新报文格式的示意图(二);7B is a schematic diagram (2) of a format of a route update message according to an embodiment of the present invention;
图8是根据本发明实施例的路由老化处理方法的流程图(三)。FIG. 8 is a flowchart (3) of a route aging processing method according to an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
在本实施例中提供了一种路由老化处理方法,应用于路由信息协议,图1是根据本发明实施例的路由老化处理方法的流程图(一),如图1所示,该流程包括如下步骤:In this embodiment, a route aging processing method is provided, which is applied to a routing information protocol. FIG. 1 is a flowchart (1) of a route aging processing method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps. step:
步骤S102,第二路由器接收第一路由器发送的携带路由的老化时间间隔值的路由更新报文,其中,该老化时间间隔值是该第一路由器从本地配置中获取的;Step S102: The second router receives the routing update packet that is sent by the first router and carries the aging time interval value of the route, where the aging time interval value is obtained by the first router from the local configuration.
步骤S104,该第二路由器根据该老化时间间隔值设置路由的老化时间。Step S104: The second router sets an aging time of the route according to the aging time interval value.
通过上述步骤,在路由信息协议中,采用第一路由器通告第二路由器路由的老化间隔时间,在路由信息协议中合理的进行了时间设置,从而减少了相应路由的震荡,进而提高了系统的稳定性。Through the above steps, in the routing information protocol, the first router is used to advertise the aging interval of the second router route, and the time setting is reasonably performed in the routing information protocol, thereby reducing the fluctuation of the corresponding route, thereby improving the stability of the system. Sex.
可选地,该第二路由器根据该老化时间间隔值设置路由的老化时间可以包括:判断该老化时间间隔值是否为0;在判断结果为否,且路由更新报文中的路由需要添加到该第二路由器的路由表中的情况下,添加路由到该第二 路由器的路由表中,并将路由的老化时间设置为该老化时间间隔值。例如,将路由的老化定时器设置为老化时间间隔值。Optionally, the setting, by the second router, the aging time of the route according to the aging time interval value may include: determining whether the aging time interval value is 0; if the determination result is no, and the route in the route update message needs to be added to the In the case of the routing table of the second router, adding a route to the second In the routing table of the router, set the aging time of the route to the aging interval value. For example, set the aging timer of the route to the aging time interval value.
可选地,在该路由更新报文中的路由不存在于该第二路由器的路由表中,或者该路由更新报文中的路由优于该第二路由器的路由表中已存在的路由且该已存在的路由不是由该第一路由器先前发送的情况下,该第二路由器确定该路由需要添加到该第二路由器的路由表中,将该路由添加到该第二路由器的路由表中,并且打开该老化定时器。Optionally, the route in the route update packet does not exist in the routing table of the second router, or the route in the route update packet is better than the existing route in the routing table of the second router, and the route If the existing route is not previously sent by the first router, the second router determines that the route needs to be added to the routing table of the second router, adds the route to the routing table of the second router, and Turn on the aging timer.
可选地,在该路由更新报文中的路由优于该第二路由器的路由表中已存在的路由且该已存在的路由不是由该第一路由器先前发送的情况下,该第二路由器删除该已存在的路由。Optionally, if the route in the route update packet is better than the existing route in the routing table of the second router, and the existing route is not previously sent by the first router, the second router deletes The existing route.
可选地,该方法还可以包括:Optionally, the method may further include:
在判断结果为是(即判断出老化时间间隔值为0),且该第二路由器的路由表中存在该第一路由器先前发送的路由的情况下,老化该路由。If the result of the determination is yes (that is, the aging time interval value is 0), and the route previously sent by the first router exists in the routing table of the second router, the route is aged.
可选的,该第二路由器根据该老化时间间隔值设置路由的老化时间可以包括:还包括:Optionally, setting the aging time of the route by the second router according to the aging time interval value may include: further including:
判断结果为否,且该第二路由器的路由表中存在该第一路由器先前发送的路由(即第一路由器先前发送的与路由更新报文中的路由相同的路由),将该路由更新报文中的路由添加到该第二路由器的路由表中,并且重置该路由更新报文中的路由的老化时间(即设置该路由更新报文中的路由的老化时间为老化时间间隔值)。If the result of the determination is no, the routing table of the second router has a route that is sent by the first router (that is, the route that is sent by the first router and is the same as the route in the routing update packet), and the route is updated. The route in the route is added to the routing table of the second router, and the aging time of the route in the route update packet is reset (that is, the aging time of the route in the route update packet is set to the aging time interval value).
可选地,该老化时间间隔值为0的情况下,第一路由器不添加相应的路由到路由更新报文,优化了相关技术中为老化相关路由而采取的发送花费值为16且携带有路由的路由更新报文,节约了带宽资源。Optionally, if the aging time interval value is 0, the first router does not add a corresponding route to the route update packet, and optimizes the sending cost value of the aging related route in the related art to be 16 and carries the route. The routing update message saves bandwidth resources.
可选的,该方法还包括:Optionally, the method further includes:
第二路由器判断出路由更新报文中没有携带路由且老化时间间隔值为0,第二路由器老化第一路由器先前通告的所有路由。The second router determines that the routing update message does not carry a route and the aging time interval value is 0. The second router aging all the routes previously advertised by the first router.
可选的,当第二路由器判断出路由更新报文中没有携带路由且老化时间 间隔值不为0时,结束本流程。Optionally, when the second router determines that the route update packet does not carry the route and the aging time When the interval value is not 0, the process ends.
图2是根据本发明实施例的路由老化处理方法的流程图(二),该方法应用于路由信息协议,如图2所示,该方法包括如下步骤:2 is a flowchart (2) of a route aging processing method according to an embodiment of the present invention. The method is applied to a routing information protocol. As shown in FIG. 2, the method includes the following steps:
步骤S202,第一路由器从本地配置中获取路由的老化时间间隔值;Step S202: The first router obtains an aging time interval value of the route from the local configuration.
本步骤中,第一路由器通过命令配置发送路由的时间间隔和老化时间间隔值,在获取路由的老化时间间隔值时,通过命令配置获取路由的老化时间间隔值。In this step, the first router configures the interval for sending routes and the aging interval. You can obtain the aging time interval of the route when you configure the aging time interval.
步骤S204,该第一路由器向第二路由器发送携带该老化时间间隔值的路由更新报文,其中,该路由更新报文用于指示该第二路由器根据该老化时间间隔值设置路由的老化时间。Step S204: The first router sends a route update message carrying the aging time interval value to the second router, where the route update message is used to indicate that the second router sets the aging time of the route according to the aging time interval value.
可选地,在第一路由器从本地配置中获取路由的老化时间间隔值之后,该第一路由器判断该路由更新报文中携带的老化时间间隔值是否全部为0;在判断结果为是的情况下,该第一路由器不添加路由到该路由更新报文。通过在老化时间间隔值为0的情况下,该路由更新报文不携带路由,优化了相关技术中为老化相关路由而采取的发送花费值为16且携带有路由的路由更新报文,节约了带宽资源。Optionally, after the first router obtains the aging time interval value of the route from the local configuration, the first router determines whether the aging time interval value carried in the routing update packet is all 0; Next, the first router does not add a route to the route update message. When the aging time interval value is 0, the route update packet does not carry the route, and the route update packet with the route cost value of 16 and carrying the route for the aging-related route in the related art is optimized, which saves the saving. Bandwidth resources.
图3是根据本发明实施例的路由老化处理装置的结构框图(一),该装置应用于路由信息协议中的第二路由器,如图3所示,该装置包括接收模块32和设置模块34,下面对每一个模块进行简要说明。3 is a structural block diagram (1) of a route aging processing apparatus according to an embodiment of the present invention. The apparatus is applied to a second router in a routing information protocol. As shown in FIG. 3, the apparatus includes a receiving module 32 and a setting module 34. A brief description of each module follows.
接收模块32,设置为接收第一路由器发送的携带路由的老化时间间隔值的路由更新报文,其中,该老化时间间隔值是该第一路由器从本地配置中获取的;The receiving module 32 is configured to receive, by the first router, a routing update packet that carries an aging time interval value of the route, where the aging time interval value is obtained by the first router from the local configuration;
设置模块34,设置为根据该老化时间间隔值设置该路由的老化时间。The setting module 34 is configured to set an aging time of the route according to the aging time interval value.
图4是根据本发明可选实施例的路由老化处理装置的结构框图(一),如图4所示,该设置模块包括:4 is a structural block diagram (1) of a route aging processing apparatus according to an alternative embodiment of the present invention. As shown in FIG. 4, the setting module includes:
判断单元42,设置为判断该老化时间间隔值是否为0;The determining unit 42 is configured to determine whether the aging time interval value is 0;
设置单元44,设置为在判断结果为否,且该路由更新报文中的路由需要 添加到该第二路由器的路由表中的情况下,添加该路由到该第二路由器的路由表中,并将所述路由的老化时间设置为该老化时间间隔值。The setting unit 44 is set to be in the judgment result, and the route in the route update message needs to be If the route is added to the routing table of the second router, the route is added to the routing table of the second router, and the aging time of the route is set to the aging time interval value.
图5是根据本发明实施例的路由老化处理装置的结构框图(二),该装置应用于路由信息协议中的第一路由器,如图5所示,该装置包括获取模块52和发送模块54,下面对每一个模块进行简要说明。5 is a structural block diagram (2) of a route aging processing apparatus according to an embodiment of the present invention. The apparatus is applied to a first router in a routing information protocol. As shown in FIG. 5, the apparatus includes an obtaining module 52 and a sending module 54, A brief description of each module follows.
获取模块52,设置为从本地配置中获取路由的老化时间间隔值;The obtaining module 52 is configured to obtain an aging time interval value of the route from the local configuration.
发送模块54,设置为向第二路由器发送携带该老化时间间隔值的路由更新报文,其中,该路由更新报文用于指示该第二路由器根据该老化时间间隔值设置路由的老化时间。The sending module 54 is configured to send, to the second router, a route update message carrying the aging time interval value, where the route update message is used to indicate that the second router sets the aging time of the route according to the aging time interval value.
图6是根据本发明可选实施例的路由老化处理装置的结构框图(二),如图6所示,该路由老化处理装置还包括:FIG. 6 is a structural block diagram (2) of a route aging processing apparatus according to an alternative embodiment of the present invention. As shown in FIG. 6, the route aging processing apparatus further includes:
判断模块62,设置为判断该路由更新报文中携带的老化时间间隔值是否全部为0;在判断结果为是的情况下,不添加路由到该路由更新报文。The determining module 62 is configured to determine whether the aging time interval value carried in the routing update message is all 0. If the determination result is yes, no route is added to the routing update message.
术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以上实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。The term "module" can implement a combination of software and/or hardware for a predetermined function. Although the apparatus described in the above embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and conceivable.
下面结合不同的实施例对本发明进行进一步的说明。The invention will now be further described in conjunction with various embodiments.
本发明实施例包括邻居路由器(相当于上文中的第一路由器,简称邻居)生成并发送路由更新报文和本地路由器(相当于上文中的第二路由器)接收并响应路由更新报文两个过程。Embodiments of the present invention include a process in which a neighbor router (corresponding to the first router in the above, referred to as a neighbor) generates and sends a route update message and a local router (corresponding to the second router in the above) receives and responds to the route update message. .
该邻居路由器生成并发送路由更新报文的流程包括:邻居路由器在相应的接口上使能路由信息协议后,接口开始周期性地发送路由更新报文,路由更新报文携带本地路由表中所有需要通告出去的路由。获取本地配置的路由老化时间间隔值;当获取到的路由老化时间间隔值不为0的情况下,将需要发送的路由添加到路由更新报文的路由字段中,且将获取到的路由老化时间间隔值添加到路由更新报文扩展使用的timeout字段中;当获取到的路由老化时间间隔全部为0的情况下,老化掉先前通告的所有路由,设置timeout字段数值为0,并且不添加路由至路由更新报文中;将添加完毕的路由更新 报文发送出去。The process of generating and sending a routing update message by the neighboring router includes: after the neighboring router enables the routing information protocol on the corresponding interface, the interface starts to periodically send the routing update packet, and the routing update packet carries all the requirements in the local routing table. Advertise the outgoing route. The value of the route aging time interval is obtained. If the route aging time interval is not 0, the route to be sent is added to the routing field of the route update packet, and the route aging time is obtained. The interval value is added to the timeout field used by the route update packet extension. If all the routes aging time interval is 0, all the previously advertised routes are aged out, the timeout field is set to 0, and no route is added. Route update message; added route update The message is sent out.
该本地路由器(对应于上文中的第二路由器)接收并响应路由更新报文的流程包括:接收到邻居发来的路由更新报文时,判断路由更新报文是否携带路由,如果路由更新报文没有携带路由并且timeout字段值为0,本地路由器将该邻居路由器先前通告的所有路由老化;如果路由更新报文中携带了路由,需要逐个遍历处理路由更新报文中的所有路由。所谓老化是指将所述路由置于无效状态。The process of receiving and responding to the route update message by the local router (corresponding to the second router in the above) includes: when receiving the route update message sent by the neighbor, determining whether the route update message carries the route, if the route update message If the route is not carried and the value of the timeout field is 0, the local router aging all the routes previously advertised by the neighboring router. If the routing update packet carries the route, it needs to traverse all the routes in the routing update packet one by one. The so-called aging refers to placing the route in an invalid state.
处理路由更新报文中携带的每一个路由。在timeout值为0的情况下,将该邻居路由器先前通告的路由置为无效状态。在timeout值不为0的情况下,判断该路由更新报文携带的路由是否需要添加到本地路由表中,如果该路由需要添加到本地路由表中并且本地路由表中已经存在该邻居路由器先前通告的路由,重置该路由老化定时器,设置老化时间间隔为路由更新报文timeout字段携带的数值;如果该路由需要添加到本地路由表中并且本地路由表中不存在该邻居路由器先前通告的路由,将对应路由添加到本地路由表中,打开路由老化定时器,设置老化时间为路由更新报文timeout字段携带的数值。该老化时间内没有接收到该邻居路由器发来的相应路由更新报文,设置该邻居路由器先前通告的路由为无效状态。Process each route carried in the route update packet. In the case that the timeout value is 0, the route previously advertised by the neighbor router is put into an invalid state. If the timeout value is not 0, it is determined whether the route carried in the route update packet needs to be added to the local routing table. If the route needs to be added to the local routing table and the neighboring router already exists in the local routing table. Route, reset the route aging timer, set the aging time interval to the value carried in the timeout field of the route update packet; if the route needs to be added to the local routing table and the route advertised by the neighboring router does not exist in the local routing table Add the corresponding route to the local routing table, and enable the route aging timer. Set the aging time to the value carried in the timeout field of the route update packet. The corresponding routing update packet sent by the neighboring router is not received in the aging time, and the route previously advertised by the neighboring router is set to be in an invalid state.
图7A是根据本发明实施例的路由更新报文格式的示意图(一),图7B是根据本发明实施例的路由更新报文格式的示意图(二)。FIG. 7A is a schematic diagram (1) of a route update message format according to an embodiment of the present invention, and FIG. 7B is a schematic diagram (2) of a route update message format according to an embodiment of the present invention.
如图7A所示,目前RIP协议使用的路由更新报文格式,其中有两个字节的未使用字段。如图7B所示,扩展使用该未使用字段为timeout字段用于携带路由老化时间间隔值。正常情况下路由老化时间间隔参数设置的最大值为65535,两个字节长度的timeout能够满足需求。可选地,timeout字段的数值可以为0,当接收到timeout值为0的路由更新报文,该路由立刻被无效掉。在需要无效掉先前通告给邻居路由器的所有路由的情况下,现行的作法是发送路由花费值为16且包含所有先前通告路由的路由更新报文,而本发明实施例采取发送没有携带任何路由且timeout为0的空路由更新报文的方案,大大节约了带宽资源。As shown in FIG. 7A, the routing update message format used by the current RIP protocol has two bytes of unused fields. As shown in FIG. 7B, the extension uses the unused field as a timeout field for carrying a route aging time interval value. The maximum value of the route aging interval parameter is 65535. The timeout of two bytes can meet the requirements. Optionally, the value of the timeout field may be 0. When a route update message with a timeout value of 0 is received, the route is immediately invalidated. In the case that all the routes previously advertised to the neighboring routers need to be invalidated, the current method is to send a route update message with a route cost of 16 and including all the previously advertised routes, and the embodiment of the present invention takes no route to carry. The scheme of updating the packet with an empty route with a timeout of 0 greatly saves bandwidth resources.
图8是根据本发明实施例的路由老化处理方法的流程图(三),该方法 应用于路由信息协议,如图8所示,该方法包括如下步骤:FIG. 8 is a flowchart (3) of a route aging processing method according to an embodiment of the present invention, which is a method Applied to the routing information protocol, as shown in FIG. 8, the method includes the following steps:
步骤S802,接收到邻居发来的路由更新报文;Step S802, receiving a route update message sent by the neighbor;
步骤S804,判断路由更新报文中是否携带路由,在判断结果为是的情况下,执行步骤S806,在判断结果为否的情况下,跳转步骤S830;Step S804, determining whether the route update message carries a route, if the determination result is yes, step S806 is performed, and if the determination result is no, the process proceeds to step S830;
步骤S806,遍历路由更新报文中的路由条目;Step S806, traversing the routing entries in the routing update message;
步骤S808,处理路由条目;Step S808, processing a routing entry;
步骤S810,判断老化时间是否为0,在判断结果为是的情况下,执行步骤S812,在判断结果为否的情况下,跳转步骤S816;Step S810, it is determined whether the aging time is 0, if the determination result is YES, step S812 is performed, and if the determination result is no, the process proceeds to step S816;
步骤S812,判断路由表是否存在该邻居先前通告路由,在判断结果为是的情况下,执行步骤S814,在判断结果为否的情况下,跳转步骤S828;Step S812, it is determined whether the routing table has the neighbor previously advertised route, if the determination result is yes, step S814 is performed, if the determination result is no, the process proceeds to step S828;
步骤S814,将路由表中邻居通告的对应路由置为无效,跳转步骤S828;Step S814, the corresponding route advertised by the neighbor in the routing table is invalid, and the process proceeds to step S828;
步骤S816,判断路由表中是否存在对应通告的路由,在判断结果为是的情况下,执行步骤S818,在判断结果为否的情况下,跳转步骤S826;Step S816, it is determined whether there is a route corresponding to the notification in the routing table, if the determination result is yes, step S818 is performed, and if the determination result is no, the process proceeds to step S826;
步骤S818,判断路由表是否存在该邻居先前通告路由,在判断结果为是的情况下,跳转步骤S824,在判断结果为否的情况下,执行步骤S820;Step S818, it is determined whether the routing table has the neighbor previously advertised route, if the determination result is yes, the process proceeds to step S824, and if the determination result is negative, step S820 is performed;
步骤S820,判断是否需要将路由添加到路由表,在判断结果为是的情况下,执行步骤S822,在判断结果为否的情况下,跳转步骤S828;Step S820, it is determined whether the route needs to be added to the routing table, if the determination result is yes, step S822 is performed, if the determination result is no, the process proceeds to step S828;
步骤S822,添加路由至路由表中,打开添加路由的老化定时器,定时器时长为路由更新报文中携带的老化时间间隔值,跳转步骤S828;Step S822, adding a route to the routing table, opening the aging timer of the added route, the timer duration is the aging time interval value carried in the routing update message, and the process proceeds to step S828;
步骤S824,更新路由,重置老化定时器,时长为路由更新报文中携带的老化时间间隔值,跳转步骤S828;Step S824, update the route, reset the aging timer, the duration is the aging time interval value carried in the routing update message, and the process proceeds to step S828;
步骤S826,添加路由至路由表中,打开添加路由的老化定时器,定时器时长为路由更新报文中携带的老化时间间隔值;跳转到步骤S828;In step S826, the route is added to the routing table, and the aging timer of the added route is opened, and the timer duration is the aging time interval value carried in the routing update packet; the process goes to step S828;
步骤S828,判断是否还有未遍历完路由条目,在判断结果为是的情况下,跳转步骤S808,在判断结果为否的情况下,结束路由老化处理方法;In step S828, it is determined whether the routing entry has not been traversed. If the determination result is yes, the process proceeds to step S808. If the determination result is negative, the route aging processing method is terminated.
步骤S830,判断老化时间间隔值是否为0,在判断结果为是的情况下, 执行步骤S832,在判断结果为否的情况下,结束路由老化处理方法;Step S830, determining whether the aging time interval value is 0, and if the determination result is YES, Step S832 is performed. If the determination result is negative, the route aging processing method is ended.
步骤S832,将路由表中邻居通告的所有路由置为无效,结束路由老化处理方法。In step S832, all the routes advertised by the neighbors in the routing table are invalidated, and the route aging processing method is terminated.
路由器在相应的接口上使能RIP协议后,接口开始周期性地发送路由更新报文,其中路由更新报文会携带本地路由表中所有需要通告出去的路由。获取本地配置的路由老化时间间隔值,将获取到的路由老化时间间隔值添加到路由更新报文扩展使用的timeout字段中,通知邻居路由器相应路由的老化时间间隔为timeout字段携带的数值,邻居保持接收到路由有效状态的最长时间为timeout值。After the router is enabled with the RIP protocol on the corresponding interface, the interface starts to send routing update packets periodically. The routing update packet carries all the routes that need to be advertised in the local routing table. The value of the route aging interval is set to be added to the timeout field of the routing update packet extension. The aging interval of the neighboring router is the value of the timeout field. The neighbor keeps the value. The maximum time that the route is valid is the timeout value.
除了周期性发送路由更新报文外,可能需要老化先前通告的所有路由或者其中一部分路由。如果需要老化先前通告的所有路由,发送timeout字段数值为0的不携带任何路由的路由更新报文。如果需要老化其中一部分路由,将携带相应路由的路由更新报文中的timeout字段设置为0或者直接设置对应路由花费值为16。In addition to periodically sending route update messages, it may be necessary to age all previously advertised routes or some of them. If all the previously advertised routes need to be aged, send a route update packet with a value of 0 in the timeout field. If you need to aging some of the routes, set the timeout field in the route update packet carrying the corresponding route to 0 or set the corresponding route cost to 16.
本地路由器接收到邻居路由器发来的路由更新报文,判断路由更新报文是否携带路由,如果路由更新报文没有携带路由并且timeout字段数值为0,说明邻居路由器通知本地路由器将该邻居先前通告的所有路由置为无效状态;如果路由更新报文中携带了路由,需要逐个遍历路由更新报文携带的路由。The local router receives the route update packet from the neighboring router to determine whether the route update packet carries the route. If the route update packet does not carry the route and the timeout field value is 0, the neighbor router notifies the local router to notify the neighbor previously. All the routes are in the invalid state. If the routes are carried in the routing update packets, the routes carried in the routing update packets are traversed one by one.
逐个处理路由更新报文中携带的每一个路由。如果timeout字段数值为0,说明邻居路由器通知本地路由器将先前通告的该路由置为无效;如果timeout值不为0,判断该路由是否需要添加到路由表中。如果先前有该路由并且新接收到的路由花费值为16,判断结果为否,设置该路由为无效状态。如果先前有该路由并且新接收到的路由没有路由表中已存在路由优,不做处理。所谓先前有该路由并且新接收到的路由没有路由表中已存在路由优,是指路由表中先前存在的该路由的跳数小于新接收到的路由的跳数。如果路由表中已经存在该邻居路由器先前通告的路由且新接收到的路由优于已经存在于路由表中的路由,将该路由添加到路由表中,重置该路由老化定时器。所谓重置该路由老化定时器是指,以路由更新报文中timeout字段携带的数值为老化时间,该路由老化定时器重新开始计时。如果该路由需要添加到路由表中并 且路由表中不存在该邻居路由器先前通告的路由,将路由添加到路由表中,打开路由老化定时器,设置老化时间间隔为路由更新报文timeout字段的数值。Process each route carried in the routing update message one by one. If the value of the timeout field is 0, the neighboring router notifies the local router to invalidate the previously advertised route. If the timeout value is not 0, it is determined whether the route needs to be added to the routing table. If the route is previously available and the newly received route cost is 16, the judgment result is no, and the route is set to an invalid state. If the route is previously available and the newly received route does not have a route preference in the routing table, no processing is performed. The hop count of the previously existing route in the routing table is smaller than the hop count of the newly received route. If the route previously advertised by the neighboring router already exists in the routing table and the newly received route is better than the route already existing in the routing table, the route is added to the routing table, and the route aging timer is reset. The aging timer of the route aging timer is the aging time of the timeout field in the route update packet, and the aging timer of the route restarts. If the route needs to be added to the routing table and The route advertised by the neighboring router does not exist in the routing table. The route is added to the routing table. The route aging timer is set. The aging time interval is set to the value of the timeout field of the route update packet.
如果老化时间间隔内没有接收到邻居路由器发来的路由更新,将路由表中的对应路由设置为无效;如果老化时间间隔内再次接收到邻居路由器发来的路由更新,重置该路由老化定时器。If the route update sent by the neighboring router is not received within the aging time interval, the corresponding route in the routing table is set to be invalid. If the route update sent by the neighboring router is received again within the aging time interval, the route aging timer is reset. .
显然,本领域的技术人员应该明白,上述的本发明的每一个模块或每一个步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成多个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that each of the above-described modules or steps of the present invention can be implemented by a general-purpose computing device, which can be centralized on a single computing device or distributed across multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from The steps shown or described are performed sequentially, or they are separately fabricated into a plurality of integrated circuit modules, or a plurality of the modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
本发明实施例还提出了一种计算机可读存储介质,存储有计算机可执行指令,计算机可执行指令用于执行上述描述的任意一个方法。Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储与存储器中的程序/指令来实现其相应功能。本发明不限于任何特定形式的硬件和软件的结合。One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct related hardware, such as a processor, which may be stored in a computer readable storage medium, such as a read only memory, disk or optical disk. Wait. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the foregoing embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program in a storage and a memory by a processor. / instruction to achieve its corresponding function. The invention is not limited to any specific form of combination of hardware and software.
以上所述仅为本发明的可选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有一种或多种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above description is only an alternative embodiment of the present invention, and is not intended to limit the present invention, and one or more modifications and changes may be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
上述技术方案在路由信息协议中合理的进行时间设置,从而减少了相应路由的震荡,进而提高了系统的稳定性。 The above technical solution is reasonably set in the routing information protocol, thereby reducing the fluctuation of the corresponding route, thereby improving the stability of the system.

Claims (10)

  1. 一种路由老化处理方法,应用于路由信息协议,包括:A route aging processing method is applied to a routing information protocol, including:
    第二路由器接收第一路由器发送的携带路由的老化时间间隔值的路由更新报文,其中,所述老化时间间隔值是所述第一路由器从本地配置中获取的;The second router receives the routing update packet that is sent by the first router and carries the aging time interval value of the route, where the aging time interval value is obtained by the first router from the local configuration;
    所述第二路由器根据所述老化时间间隔值设置路由的老化时间。The second router sets an aging time of the route according to the aging time interval value.
  2. 如权利要求1所述的方法,其中,所述第二路由器根据所述老化时间间隔值设置路由的老化时间包括:The method of claim 1, wherein the aging time of the route set by the second router according to the aging time interval value comprises:
    所述第二路由器判断所述老化时间间隔值是否为0;The second router determines whether the aging time interval value is 0;
    在判断结果为否,且路由更新报文中的路由需要添加到所述第二路由器的路由表中的情况下,所述第二路由器添加路由到所述第二路由器的路由表中,并将所述路由的老化时间设置为所述老化时间间隔值。If the result of the determination is no, and the route in the route update message needs to be added to the routing table of the second router, the second router adds a route to the routing table of the second router, and The aging time of the route is set to the aging time interval value.
  3. 如权利要求2所述的方法,所述方法还包括:The method of claim 2, the method further comprising:
    在判断结果为是且所述路由表中存在所述第一路由器发送的路由的情况下,所述第二路由器老化所述路由。If the result of the determination is yes and the route sent by the first router exists in the routing table, the second router ages the route.
  4. 如权利要求2所述的方法,所述第二路由器根据所述老化时间间隔值设置路由的老化时间还包括:The method of claim 2, wherein the setting, by the second router, the aging time of the route according to the aging time interval value further comprises:
    在判断结果为否,且所述第二路由器的路由表中存在所述第一路由器先前发送的路由,将所述路由更新报文中的路由添加到所述第二路由器的路由表中,并重置所述路由更新报文中的路由的老化时间。If the result of the determination is no, and the route sent by the first router exists in the routing table of the second router, the route in the route update packet is added to the routing table of the second router, and The aging time of the route in the route update packet is reset.
  5. 一种路由老化处理方法,应用于路由信息协议,包括:A route aging processing method is applied to a routing information protocol, including:
    第一路由器从本地配置中获取路由的老化时间间隔值;The first router obtains the aging time interval value of the route from the local configuration.
    所述第一路由器向第二路由器发送携带所述老化时间间隔值的路由更新报文,其中,所述路由更新报文用于指示所述第二路由器根据所述老化时间间隔值设置路由的老化时间。The first router sends a route update packet carrying the aging time interval value to the second router, where the route update message is used to indicate that the second router sets the aging of the route according to the aging time interval value. time.
  6. 如权利要求5所述的方法,所述方法还包括:The method of claim 5, the method further comprising:
    在所述第一路由器从本地配置中获取路由的老化时间间隔值之后, After the first router obtains the aging time interval value of the route from the local configuration,
    所述第一路由器判断所述路由更新报文中携带的老化时间间隔值是否全部为0;The first router determines whether the aging time interval values carried in the route update message are all 0;
    在判断结果为是的情况下,所述第一路由器不添加路由到所述路由更新报文。In the case that the determination result is yes, the first router does not add a route to the route update message.
  7. 一种路由老化处理装置,应用于第二路由器,应用于路由信息协议,包括:A route aging processing device is applied to a second router and is applied to a routing information protocol, including:
    接收模块,设置为接收第一路由器发送的携带路由的老化时间间隔值的路由更新报文,其中,所述老化时间间隔值是所述第一路由器从本地配置中获取的,The receiving module is configured to receive, by the first router, a routing update packet that carries an aging time interval value of the route, where the aging time interval value is obtained by the first router from the local configuration,
    设置模块,设置为根据所述老化时间间隔值设置所述路由的老化时间。The setting module is configured to set an aging time of the route according to the aging time interval value.
  8. 如权利要求7所述的装置,其中,所述设置模块包括:The apparatus of claim 7, wherein the setting module comprises:
    判断单元,设置为判断所述老化时间间隔值是否为0;a determining unit, configured to determine whether the aging time interval value is 0;
    设置单元,设置为在判断结果为否,且所述路由更新报文中的路由需要添加到所述第二路由器的路由表中的情况下,添加所述路由到所述第二路由器的路由表中,并将所述路由的老化时间设置为所述老化时间间隔值。a setting unit, configured to add a routing table of the route to the second router if the result of the determination is no, and the route in the route update message needs to be added to the routing table of the second router And setting an aging time of the route to the aging time interval value.
  9. 一种路由老化处理装置,应用于第一路由器,应用于路由信息协议,包括:A route aging processing device is applied to a first router and is applied to a routing information protocol, including:
    获取模块,设置为从本地配置中获取路由的老化时间间隔值;The obtaining module is set to obtain the aging time interval value of the route from the local configuration.
    发送模块,设置为向第二路由器发送携带所述老化时间间隔值的路由更新报文,其中,所述路由更新报文用于指示所述第二路由器根据所述老化时间间隔值设置路由的老化时间。The sending module is configured to send, to the second router, a route update packet that carries the aging time interval value, where the route update message is used to indicate that the second router sets the aging of the route according to the aging time interval value. time.
  10. 如权利要求9所述的装置,所述装置还包括:The device of claim 9 further comprising:
    判断模块,设置为判断所述路由更新报文中携带的老化时间间隔值是否全部为0;The determining module is configured to determine whether the aging time interval value carried in the routing update message is all 0;
    在判断结果为是的情况下,不添加路由到所述路由更新报文。 If the result of the determination is yes, no route is added to the route update message.
PCT/CN2016/093962 2016-01-27 2016-08-08 Route ageing processing method and apparatus WO2017128689A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610057531.3A CN107018079A (en) 2016-01-27 2016-01-27 Routing aging processing method and processing device
CN201610057531.3 2016-01-27

Publications (1)

Publication Number Publication Date
WO2017128689A1 true WO2017128689A1 (en) 2017-08-03

Family

ID=59397342

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/093962 WO2017128689A1 (en) 2016-01-27 2016-08-08 Route ageing processing method and apparatus

Country Status (2)

Country Link
CN (1) CN107018079A (en)
WO (1) WO2017128689A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111176811A (en) * 2019-12-27 2020-05-19 国家计算机网络与信息安全管理中心 Device and method for realizing rapid aging of large-batch table entries based on multi-core processor

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109617779B (en) * 2018-12-19 2020-12-18 锐捷网络股份有限公司 Routing table maintenance method and device based on VTEP

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1391862A1 (en) * 2002-08-20 2004-02-25 Telefonaktiebolaget LM Ericsson (publ) Traffic management system based on packet switching technology including packet to object synchronization mechanisms
CN101399824A (en) * 2007-09-29 2009-04-01 华为技术有限公司 Method, system and router realizing elegant restart of route information protocol
US20100002652A1 (en) * 2006-07-28 2010-01-07 Panasonic Corporation Mobile communication method and access router
CN102143549A (en) * 2011-03-23 2011-08-03 西安电子科技大学 Cognitive routing protocol for heterogeneous wireless return network
CN102186145A (en) * 2011-05-04 2011-09-14 西安电子科技大学 Geographical position and speed information based aerial high-speed self-organization routing method
CN103812770A (en) * 2012-11-12 2014-05-21 华为技术有限公司 Cloud service message redirecting method and system and cloud gateway

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102355416B (en) * 2011-09-30 2014-11-05 杭州华三通信技术有限公司 Method for establishing route by linking routing information protocol with bidirectional forwarding detection and equipment
CN102572791B (en) * 2012-03-21 2014-08-20 江苏大学 Routing optimization method for hierarchical mobile Internet protocol version 6 (IPv6)
US9752886B2 (en) * 2013-06-27 2017-09-05 Sap Se Mobile trip planner and live route update system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1391862A1 (en) * 2002-08-20 2004-02-25 Telefonaktiebolaget LM Ericsson (publ) Traffic management system based on packet switching technology including packet to object synchronization mechanisms
US20100002652A1 (en) * 2006-07-28 2010-01-07 Panasonic Corporation Mobile communication method and access router
CN101399824A (en) * 2007-09-29 2009-04-01 华为技术有限公司 Method, system and router realizing elegant restart of route information protocol
CN102143549A (en) * 2011-03-23 2011-08-03 西安电子科技大学 Cognitive routing protocol for heterogeneous wireless return network
CN102186145A (en) * 2011-05-04 2011-09-14 西安电子科技大学 Geographical position and speed information based aerial high-speed self-organization routing method
CN103812770A (en) * 2012-11-12 2014-05-21 华为技术有限公司 Cloud service message redirecting method and system and cloud gateway

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111176811A (en) * 2019-12-27 2020-05-19 国家计算机网络与信息安全管理中心 Device and method for realizing rapid aging of large-batch table entries based on multi-core processor
CN111176811B (en) * 2019-12-27 2022-06-10 国家计算机网络与信息安全管理中心 Device and method for realizing rapid aging of large-batch table entries based on multi-core processor

Also Published As

Publication number Publication date
CN107018079A (en) 2017-08-04

Similar Documents

Publication Publication Date Title
JP6518747B2 (en) Neighbor discovery to support sleepy nodes
CN106375231B (en) A kind of flow switching method, equipment and system
US10659344B2 (en) Information transmission method, apparatus and system
US8934496B2 (en) Reactive and proactive routing protocol interoperation in low power and lossy networks
CN102130834B (en) Internet protocol (IP) routing method and router
US8310931B2 (en) Discovering network topology from routing information
EP2648375B1 (en) Method and device for establishing router neighbor
US8291112B2 (en) Selective a priori reactive routing
US20120039186A1 (en) Method and apparatus to reduce cumulative effect of dynamic metric advertisement in smart grid/sensor networks
JP2016105611A (en) Topology discovery in hybrid network
US20150334000A1 (en) Border gateway protocol (bgp) routes advertisement
EP3058776B1 (en) Topology discovery based on sctp/x2 snooping
US9584400B2 (en) Method and apparatus for selecting a router in an infinite link network
EP3058777B1 (en) Topology discovery based on explicit signaling
EP3157211B1 (en) Isis-based flooding method and device
US9081567B1 (en) Method and apparatus to control routing convergence during node reboot by entering a freeze state that inhibits routing convergence during the reboot process
WO2017128689A1 (en) Route ageing processing method and apparatus
Cuong et al. MAR-AODV: innovative routing algorithm in MANET based on mobile agent
CN106911549B (en) Data message processing method and device
WO2017152585A1 (en) Method and device for message exchange between routers
JP2015099985A (en) Node device, control program, radio communication system and data communication method
US20190334814A1 (en) Path establishment method and device, and network node
US10680900B2 (en) BGP logical topology generation method, and device
JP5664768B2 (en) Node, link forming method and link forming program
WO2015131617A1 (en) Flow table processing method, device, openflow controller and openflow switch

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16887567

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16887567

Country of ref document: EP

Kind code of ref document: A1