[go: up one dir, main page]

CN106549866B - Method, network device and system for processing message - Google Patents

Method, network device and system for processing message Download PDF

Info

Publication number
CN106549866B
CN106549866B CN201510609202.0A CN201510609202A CN106549866B CN 106549866 B CN106549866 B CN 106549866B CN 201510609202 A CN201510609202 A CN 201510609202A CN 106549866 B CN106549866 B CN 106549866B
Authority
CN
China
Prior art keywords
network device
packet
message
link
time
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201510609202.0A
Other languages
Chinese (zh)
Other versions
CN106549866A (en
Inventor
张旭东
胡志波
夏冬冬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010323415.8A priority Critical patent/CN111683006B/en
Priority to CN201510609202.0A priority patent/CN106549866B/en
Publication of CN106549866A publication Critical patent/CN106549866A/en
Application granted granted Critical
Publication of CN106549866B publication Critical patent/CN106549866B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/28Routing or path finding of packets in data switching networks using route fault recovery

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a method for updating a route and network equipment thereof, wherein the method comprises the following steps: a first network device receives a first message sent by a second network device, wherein the first message carries state information of a first link, and the aging time carried by the first message reaches the maximum aging time; if the second network device is in an abnormal state, the first network device starts a first timer at the initial moment of receiving a first message, the timing duration of the first timer is a first duration, and after the first timer is overtime, the first message participates in route calculation. The embodiment of the invention can reduce the influence on the routing processing caused by the message which is generated by equipment failure and carries the link state information deletion instruction, and reduce the routing oscillation and the flow loss.

Description

处理报文的方法、网络设备及系统Method, network device and system for processing message

技术领域technical field

本发明涉及通信领域,尤其涉及一种处理报文的方法及其网络设备。The present invention relates to the field of communications, and in particular, to a method for processing a message and a network device thereof.

背景技术Background technique

开放最短路径优先协议(英文:Open Shortest Path First,简写:OSPF) 和中间系统到系统协议(英文:Intermediate System to Intermediate System,简写:IS-IS)属于内部网关协议(英文:Interior Gateway Protocol,简写:IGP),该内部网关协议是一种链路状态协议,它通过设备与设备之间发送 Hello报文逐跳建立邻接关系形成一个网络拓扑,其中每个邻接关系都是双向的而且有度量值的,然后通过发送链路状态发布(英文:Link StateAdvertisement,简写:LSA)或(英文:Link State Protocol Data Unit,简写:LSP)将本地的链路拓扑以及路由信息发送给远端的每台设备,OSPF 或IS-IS使用最短路径优先算法(英文:Shortest Path First,简写:SPF)进行路由计算,计算出到达网络内每个路由的最短路径,从而指导报文转发。Open Shortest Path First (English: Open Shortest Path First, abbreviated: OSPF) and Intermediate System to System Protocol (English: Intermediate System to Intermediate System, abbreviated: IS-IS) belong to Interior Gateway Protocol (English: Interior Gateway Protocol, abbreviated) : IGP), the interior gateway protocol is a link state protocol, which establishes an adjacency relationship hop-by-hop by sending Hello packets between devices to form a network topology, in which each adjacency relationship is bidirectional and has a metric value , and then send the local link topology and routing information to each remote device by sending Link State Advertisement (English: Link StateAdvertisement, abbreviated: LSA) or (English: Link State Protocol Data Unit, abbreviated: LSP) , OSPF or IS-IS use the shortest path first algorithm (English: Shortest Path First, abbreviated: SPF) to perform route calculation, and calculate the shortest path to each route in the network, so as to guide packet forwarding.

OSPF的LSA具有定时刷新和老化的机制,LSA中存在一个age字段,以秒为单位随着时间的流逝而增长。LSA的生成者每隔1800秒(即LSA报文在OSPF协议中的刷新周期)都会将LSA刷新一次,age字段重新从零开始,并且全网洪泛刷新后的LSA,其他设备收到刷新后的LSA,时间就从收到的LSA的age大小开始定时。对于非LSA的生成者的设备,如果LSA的 age到达最大老化时间MaxAge(在OSPF中为3600秒)时,就会从数据库里删除,并且全网通知删除该具有MaxAge的LSA。对于LSA的生成者的设备来说,如果LSA需要删除,只需要将LSA的age设为MaxAge(在OSPF 中为3600秒),全网洪泛该具有MaxAge的LSA,就可以全网删除该条LSA。同理,ISIS协议也有类似机制。The LSA of OSPF has the mechanism of periodic refresh and aging. There is an age field in the LSA, which increases with the passage of time in seconds. The LSA generator will refresh the LSA every 1800 seconds (that is, the refresh period of the LSA packet in the OSPF protocol), the age field will start from zero again, and the whole network will flood the refreshed LSA. The time starts from the age size of the received LSA. For devices other than LSA generators, if the age of the LSA reaches the maximum aging time MaxAge (3600 seconds in OSPF), it will be deleted from the database, and the entire network will notify to delete the LSA with MaxAge. For the device of the LSA generator, if the LSA needs to be deleted, it only needs to set the age of the LSA to MaxAge (3600 seconds in OSPF), and flood the entire network with the LSA with MaxAge, and the entry can be deleted on the entire network. LSA. Similarly, the ISIS protocol has a similar mechanism.

然而,在实际网络通信中,存在可能将LSA或LSP错误删除的情况,例如故障设备生存时间定时器故障导致过快老化LSA或LSP,又例如设备程序上存在错误,导致全网洪泛删除LSA或LSP。However, in actual network communication, there are situations in which LSAs or LSPs may be deleted by mistake. For example, a faulty device's lifetime timer failure causes LSAs or LSPs to age too quickly. For example, there are errors in device programs, which lead to flooding of the entire network to delete LSAs. or LSP.

在现有技术中,当出现错误删除LSA或LSP时,收到删除LSA或LSP 通知的设备会立即删除该LSA或LSP,并且重新计算路由,直到被删除的 LSA或LSP的重新生成时,路由才会恢复,如果故障设备周期性的错误删除LSA或LSP,将会造成路由震荡,从而导致业务流量丢失。In the prior art, when an LSA or LSP is deleted by mistake, the device that receives the notification of deleting the LSA or LSP will delete the LSA or LSP immediately, and recalculate the route until the deleted LSA or LSP is regenerated. If the faulty device periodically deletes the LSA or LSP incorrectly, it will cause route flapping and result in loss of service traffic.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种路由更新的方法,能够减少由于故障引起的路由震荡。The embodiments of the present invention provide a route update method, which can reduce route flapping caused by faults.

第一方面,一种处理报文的方法,包括:第一网络设备接收第二网络设备发送的第一报文,所述第一报文携带第一链路的状态信息,所述第一报文携带的生存时间已达到最大老化时间;若所述第二网络设备处于异常状态,所述第一网络设备在接收第一报文的起始时刻启动第一定时器,所述第一定时器的定时时长为第一时长,在所述第一定时器超时后,所述第一报文参与路由计算。In a first aspect, a method for processing a packet includes: a first network device receives a first packet sent by a second network device, the first packet carries state information of a first link, and the first packet If the second network device is in an abnormal state, the first network device starts a first timer at the start of receiving the first packet, and the first timer The timing duration is the first duration, and after the first timer expires, the first packet participates in the routing calculation.

结合第一方面,在第一方面的第一种可能的实现方式中,在所述第一网络设备接收所述第一报文之前,所述方法还包括:所述第一网络设备接收所述第二网络设备发送的第二报文,所述第二报文携带第二链路的拓扑状态信息,所述第二报文携带的生存时间已到达最大老化时间;根据所述第二报文,确定所述第二网络设备处于异常状态。With reference to the first aspect, in a first possible implementation manner of the first aspect, before the first network device receives the first packet, the method further includes: the first network device receives the first packet A second packet sent by the second network device, the second packet carries the topology state information of the second link, and the lifetime carried in the second packet has reached the maximum aging time; according to the second packet , it is determined that the second network device is in an abnormal state.

结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述第二报文为中间系统到中间系统协议零分片链路状态报文或开放最短路径优先协议路由链路状态发布。In combination with the first possible implementation manner of the first aspect, in the second possible implementation manner of the first aspect, the second packet is an intermediate system-to-intermediate system protocol zero-fragment link state packet or an open The shortest path first protocol route link state advertisement.

结合第一方面的第一或第二种可能的实现方式,在第一方面的第三种可能的实现方式中,根据所述第二报文,确定所述第二网络设备处于异常状态,包括:所述第一网络设备确定所述第二网络设备在第二时长内处于异常状态,其中,所述第二时长以所述第一网络设备接收到所述第二报文的时刻为起始时刻,所述第二时长为所述第二网络设备生成链路状态信息的时间间隔。With reference to the first or second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, determining, according to the second packet, that the second network device is in an abnormal state, including : The first network device determines that the second network device is in an abnormal state for a second duration, where the second duration starts from the moment when the first network device receives the second packet time, and the second duration is a time interval for the second network device to generate link state information.

结合第一方面或第一方面的第一至第三种可能的实现方式,在第一方面的第四种可能的实现方式中,所述方法还包括:当所述第一网络设备在所述第一定时器未超时时收到第三报文,取消所述第一定时器,并采用所述第三报文进行路由计算,其中,所述第三报文携带所述第一链路的状态信息,所述第三报文携带的生存时间未到达最大老化时间。With reference to the first aspect or the first to third possible implementation manners of the first aspect, in a fourth possible implementation manner of the first aspect, the method further includes: when the first network device is in the When the first timer does not expire, a third packet is received, the first timer is cancelled, and the third packet is used to perform route calculation, wherein the third packet carries the information of the first link. Status information, the survival time carried by the third packet has not reached the maximum aging time.

第二方面,提供一种第一网络设备,包括:接收单元,用于接收第二网络设备发送的第一报文,所述第一报文携带第一链路的状态信息,所述第一报文携带的生存时间已达到最大老化时间;处理单元,用于确定若所述第二网络设备处于异常状态,所述第一网络设备在接收第一报文的起始时刻启动第一定时器,所述第一定时器的定时时长为第一时长,在所述第一定时器超时后,所述第一报文参与路由计算。In a second aspect, a first network device is provided, including: a receiving unit configured to receive a first packet sent by a second network device, where the first packet carries state information of a first link, the first packet The survival time carried by the packet has reached the maximum aging time; the processing unit is configured to determine that if the second network device is in an abnormal state, the first network device starts a first timer at the start of receiving the first packet , the timing duration of the first timer is the first duration, and after the first timer expires, the first packet participates in route calculation.

结合第二方面,在第二方面的第一种可能的实现方式中,所述接收单元,还用于接收所述第二网络设备发送的第二报文,所述第二报文携带第二链路的拓扑状态信息,所述第二报文携带的生存时间已到达最大老化时间;所述处理单元还用于:根据所述第二报文,确定所述第二网络设备处于异常状态。With reference to the second aspect, in a first possible implementation manner of the second aspect, the receiving unit is further configured to receive a second packet sent by the second network device, where the second packet carries the second The topology state information of the link, the lifetime carried by the second packet has reached the maximum aging time; the processing unit is further configured to: determine, according to the second packet, that the second network device is in an abnormal state.

结合第二方面或第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述第二报文为中间系统到中间系统协议零分片链路状态报文或开放最短路径优先协议路由链路状态发布。In combination with the second aspect or the first possible implementation manner of the second aspect, in the second possible implementation manner of the second aspect, the second packet is an intermediate system-to-intermediate system protocol zero fragmentation link state A packet or an Open Shortest Path First protocol route link state is advertised.

结合第二方面的第一或第二种可能的实现方式,在第二方面的三种可能的实现方式中,所述处理单元,还用于确定所述第二网络设备在第二时长内处于异常状态,其中,所述第二时长以所述第一网络设备接收到所述第二报文的时刻为起始时刻,所述第二时长为所述第二网络设备生成链路状态信息的时间间隔。With reference to the first or second possible implementation manner of the second aspect, in three possible implementation manners of the second aspect, the processing unit is further configured to determine that the second network device is in a Abnormal state, wherein the second duration is the time when the first network device receives the second packet, and the second duration is the time when the second network device generates link state information time interval.

结合第二方面或第二方面的第一种至第三种可能的实现方式,在第二方面的第四种可能的实现方式中,所述处理单元,还用于当所述第一网络设备在所述第一定时器未超时时收到第三报文,取消所述第一定时器,并采用所述第三报文进行路由计算,其中,所述第三报文携带所述第一链路的状态信息,所述第三报文携带的生存时间未到达最大老化时间。With reference to the second aspect or the first to third possible implementation manners of the second aspect, in a fourth possible implementation manner of the second aspect, the processing unit is further configured to be used when the first network device When a third packet is received before the first timer expires, the first timer is cancelled, and the third packet is used to perform route calculation, wherein the third packet carries the first Link state information, the survival time carried in the third packet has not reached the maximum aging time.

第三方面,提供一种处理报文的系统,其特征在于,包括前述的第一网络设备和第二网络设备。In a third aspect, a system for processing a message is provided, which is characterized by comprising the aforementioned first network device and second network device.

本发明实施例提供的方法及其网络设备,能够通过判断收到的报文中携带的生存时间是否达到最大老化时间,确定是否立即采用该报文进行路由计算,当发送该报文的网络设备处于异常状态,且该报文中携带的生存时间达到最大老化时间时,暂缓删除该链路的状态信息,确定该报文不是错误删除时,再删除该报文,否则,并根据本地的当前存在的链路的状态信息进行路由计算。因此,可以降低由于错误删除报文导致的路由震荡,从而减少导致业务流量丢失的可能性。The method and the network device thereof provided by the embodiments of the present invention can determine whether to immediately use the message for routing calculation by judging whether the time-to-live carried in the received message reaches the maximum aging time. When the network device that sends the message When it is in an abnormal state and the lifetime carried in the packet reaches the maximum aging time, suspend the deletion of the status information of the link, and delete the packet when it is determined that the packet is not deleted by mistake. The state information of the existing link is used for route calculation. Therefore, route flapping caused by erroneously deleted packets can be reduced, thereby reducing the possibility of service traffic loss.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings that need to be used in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.

图1是本发明实施例的一种处理报文的方法的示意性流程图。FIG. 1 is a schematic flowchart of a method for processing a packet according to an embodiment of the present invention.

图2是本发明另一实施例的一种处理报文的方法的示意性流程图。FIG. 2 is a schematic flowchart of a method for processing a packet according to another embodiment of the present invention.

图3是本发明另一实施例的一种处理报文的方法的示意性流程图。FIG. 3 is a schematic flowchart of a method for processing a packet according to another embodiment of the present invention.

图4是本发明另一实施例的一种处理报文的方法的示意性流程图。FIG. 4 is a schematic flowchart of a method for processing a packet according to another embodiment of the present invention.

图5是本发明实施例的网络设备的示意性框图。FIG. 5 is a schematic block diagram of a network device according to an embodiment of the present invention.

图6是本发明实施例的网络设备的装置的示意性框图。FIG. 6 is a schematic block diagram of an apparatus of a network device according to an embodiment of the present invention.

图7是本发明实施例的一种处理报文的系统的示意性框图。FIG. 7 is a schematic block diagram of a system for processing a message according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.

图1是本发明实施例的一种处理报文的方法的示意性流程图,该方法的执行主体可以为第一网络设备,如图1所示,该方法100包括:FIG. 1 is a schematic flowchart of a method for processing a packet according to an embodiment of the present invention. The execution body of the method may be a first network device. As shown in FIG. 1 , the method 100 includes:

110,第一网络设备接收第二网络设备发送的第一报文,第一报文携带第一链路的状态信息,第一报文携带的生存时间已达到最大老化时间。110. The first network device receives the first packet sent by the second network device, the first packet carries the state information of the first link, and the lifetime carried in the first packet has reached the maximum aging time.

120,若第二网络设备处于异常状态,第一网络设备在接收第一报文的起始时刻启动第一定时器,第一定时器的定时时长为第一时长,在第一定时器超时后,所述第一报文参与路由计算。120. If the second network device is in an abnormal state, the first network device starts a first timer at the start of receiving the first packet, and the timing duration of the first timer is the first duration, and after the first timer expires , the first packet participates in route calculation.

具体地,以OSPF系统为例,在OSPF系统中,网络设备生成的一条LSA 报文(即属于第二网络设备的一条LSA)可以携带该网络设备相应链路的拓扑关系信息或路由信息,即携带该网络设备生成的一条或多条链路的状态信息,该LSA中携带有一个age字段用于表示该LSA的生存时间,该生存时间也可以称之为生成时间,当age字段的生存时间到达最大生存时间MaxAge (在OSPF系统中为3600s)时,将会在本地的数据库中删除。类似地,在 IS-IS系统中,网络设备生成的LSP也携带age字段标识该LSP的生存时间,在LSP中age字段的默认的最大生存时间为1200s,当LSP中age字段的生存时间到达MaxAge时,也会在本地的数据库中删除。因此,当某个网络设备接收一条MaxAge的LSA或LSP时,将会删除本地数据库中的LSA或 LSP。Specifically, taking the OSPF system as an example, in the OSPF system, an LSA packet (that is, an LSA belonging to the second network device) generated by the network device can carry the topology relationship information or routing information of the corresponding link of the network device, that is, Carry the status information of one or more links generated by the network device. The LSA carries an age field to indicate the lifetime of the LSA. The lifetime can also be called the generation time. When the age field is the lifetime When the maximum lifetime MaxAge (in OSPF system is 3600s) is reached, it will be deleted from the local database. Similarly, in the IS-IS system, the LSP generated by the network device also carries the age field to identify the lifetime of the LSP. The default maximum lifetime of the age field in the LSP is 1200s. When the lifetime of the age field in the LSP reaches MaxAge , it will also be deleted in the local database. Therefore, when a network device receives an LSA or LSP of MaxAge, it will delete the LSA or LSP in the local database.

在步骤110中,第一网络设备和第二网络设备是任意两个不同的网络设备,该第一链路的状态信息的是由第二网络设备生成,该第一链路的状态信息的内容为第二网络设备的链路拓扑关系信息或者路由信息,第一报文携带已到达最大老化时间的第一链路的状态信息是指该第一报文中的age字段所指示的生存时间已经达到最大老化时间,例如LSA中的age字段已经达到 3600s或LSP中的age字段已经达到1200s。In step 110, the first network device and the second network device are any two different network devices, the state information of the first link is generated by the second network device, and the content of the state information of the first link is It is the link topology relationship information or routing information of the second network device. The first packet carries the state information of the first link that has reached the maximum aging time, which means that the lifetime indicated by the age field in the first packet has already passed. The maximum aging time is reached. For example, the age field in the LSA has reached 3600s or the age field in the LSP has reached 1200s.

具体地,在步骤120中,若生成第一报文的第二网络设备处于异常状态,第一网络确定在第一时长内具有最大老化时间的第一链路状态不立即参与路由计算,也就是说将维持一段时间不删除该第一链路状态,具体地:第一网络设备上存在第一定时器,该第一定时器的定时时长为第一时长,在第一时长内,该第一报文不参与路由计算,而在第一定时器超时后,第一报文将参与路由计算。Specifically, in step 120, if the second network device that generates the first packet is in an abnormal state, the first network determines that the first link state with the maximum aging time within the first duration does not immediately participate in the routing calculation, that is, It is said that the first link state will not be deleted for a period of time, specifically: there is a first timer on the first network device, and the timing duration of the first timer is the first duration, within the first duration, the first timer The packet does not participate in the routing calculation, but after the first timer expires, the first packet will participate in the routing calculation.

例如,第一网络设备收到第二网络设备生成的LSA的age字段为 MaxAge,那么第一网络设备将维持第一时长内不删除该LSA,在这第一时长内不对具有MaxAge的LSA进行路由计算,当第一定时器超时后,该具有MaxAge的LSA将参与路由计算。For example, if the first network device receives the LSA generated by the second network device and the age field is MaxAge, then the first network device will not delete the LSA for the first time period, and will not route the LSA with MaxAge within the first time period. Calculation, when the first timer expires, the LSA with MaxAge will participate in route calculation.

具体地,第一定时器设定的第一时长需要由各个网络设备之间的报文接收时间确定,例如,第一时长可以设置为1s、5s、10s,上述数值仅仅是示例性的,本发明不限于此。Specifically, the first duration set by the first timer needs to be determined by the packet reception time between each network device. For example, the first duration can be set to 1s, 5s, or 10s. The above values are only exemplary. The invention is not limited to this.

本发明实施例提供的方法及其网络设备,能够通过判断收到的报文中携带的生存时间是否达到最大老化时间,确定是否立即采用该报文进行路由计算,当发送该报文的网络设备处于异常状态,且该报文中携带的生存时间达到最大老化时间时,暂缓删除该链路的状态信息,确定该报文不是错误删除时,再删除该报文,否则,并根据本地的当前存在的链路的状态信息进行路由计算。因此,可以降低由于错误删除报文导致的路由震荡,从而减少导致业务流量丢失的可能性。The method and the network device thereof provided by the embodiments of the present invention can determine whether to immediately use the message for routing calculation by judging whether the time-to-live carried in the received message reaches the maximum aging time. When the network device that sends the message When it is in an abnormal state and the lifetime carried in the packet reaches the maximum aging time, suspend the deletion of the status information of the link, and delete the packet when it is determined that the packet is not deleted by mistake. The state information of the existing link is used for route calculation. Therefore, route flapping caused by erroneously deleted packets can be reduced, thereby reducing the possibility of service traffic loss.

可选地,作为本发明一个实施例,在所述第一网络设备接收所述第一报文之前,所述方法还包括:所述第一网络设备接收所述第二网络设备发送的第二报文,所述第二报文携带第二链路的拓扑状态信息,所述第二报文携带的生存时间已到达最大老化时间;根据所述第二报文,确定所述第二网络设备处于异常状态。Optionally, as an embodiment of the present invention, before the first network device receives the first packet, the method further includes: receiving, by the first network device, a second message sent by the second network device packet, the second packet carries the topology state information of the second link, and the lifetime carried in the second packet has reached the maximum aging time; according to the second packet, determine the second network device in an abnormal state.

具体地,第二链路的拓扑状态信息是指用于描述拓扑关系信息的链路状态,例如可以为ISIS零分片的LSP或OSPF的Router LSA,而第二报文携带的生存时间已到达最大老化时间是指该第二报文在参与路由计算将被删除,携带第二链路状态的报文可以指MaxAge的ISIS零分片LSP报文或OSPF Router LSA报文。Specifically, the topology state information of the second link refers to the link state used to describe the topology relationship information. For example, it may be an ISIS zero-fragmented LSP or an OSPF Router LSA, and the time-to-live carried in the second packet has reached the The maximum aging time means that the second packet will be deleted when it participates in route calculation, and the packet carrying the second link state can be an ISIS zero-fragmentation LSP packet or an OSPF Router LSA packet with MaxAge.

当第一网络设备收到第二网络设备发送的第二报文后,将确定该第二网络设备处于异常状态,或者说,将生成该第二链路状态的第二网络设备标记为异常状态,也就是触发第一网络设备将第二网络设备的链路状态进入抑制路由计算的特殊状态。应理解,第一报文和第二报文可以为同一条报文,即该第一报文携带的第二链路的拓扑状态信息可以与该第二报文携带的第一链路的状态信息相同,第一报文与第二报文携带的生存时间都达到最大老化时间,也就是说用于将第二网络设备标记为异常状态的触发条件是第一网络设备收到第二网络设备发送的第二报文携带生存时间已到达最大老化时间并且第二报文携带链路状态的拓扑状态信息。After the first network device receives the second packet sent by the second network device, it will determine that the second network device is in an abnormal state, or in other words, mark the second network device that generates the second link state as an abnormal state , that is, triggering the first network device to enter the link state of the second network device into a special state that inhibits route calculation. It should be understood that the first packet and the second packet may be the same packet, that is, the topology state information of the second link carried in the first packet may be the same as the state of the first link carried in the second packet. The information is the same, the survival time carried by the first packet and the second packet has reached the maximum aging time, that is to say, the trigger condition for marking the second network device as abnormal is that the first network device receives the second network device. The sent second packet carries the topology state information of the link state that the time-to-live has reached the maximum aging time and the second packet carries the link state.

可选地,作为本发明一个实施例,第二报文为中间系统到中间系统协议零分片链路状态报文(英文:ISIS零分片)或开放最短路径优先协议路由链路状态发布(英文:OSPFRouter LSA)。Optionally, as an embodiment of the present invention, the second packet is an intermediate system-to-intermediate system protocol zero fragmentation link state packet (English: ISIS zero fragmentation) or an open shortest path first protocol routing link state advertisement ( English: OSPFRouter LSA).

应理解,对于OSPF来说,只要有活跃的区域,Router LSA就会一直存在,不会被生成者删除。同理ISIS的LSP的零分片,只要存在活跃的ISIS进程,就会一直存在,对于其他类型的LSA或者LSP的其他分片,是可能存在,也可能不存在的。当OSPF Router LSA/ISIS零分片全网删除的原因,只能是设备托管,或者各种软件bug或者定时器不准导致的。It should be understood that for OSPF, as long as there are active areas, the Router LSA will always exist and will not be deleted by the generator. Similarly, the zero fragmentation of an ISIS LSP will always exist as long as there is an active ISIS process. For other types of LSAs or other fragments of an LSP, it may or may not exist. When an OSPF Router LSA/ISIS zero fragment is deleted on the entire network, it can only be caused by device hosting, various software bugs, or inaccurate timers.

可选地,作为本发明一个实施例,根据第二报文,确定第二网络设备处于异常状态,包括:第一网络设备确定所述第二网络设备在第二时长内处于异常状态,其中,第二时长以所述第一网络设备接收到第二报文的时刻为起始时刻,第二时长为所述第二网络设备生成链路状态信息的时间间隔。Optionally, as an embodiment of the present invention, determining that the second network device is in an abnormal state according to the second message includes: the first network device determining that the second network device is in an abnormal state within a second time period, wherein, The second duration is a start moment when the first network device receives the second packet, and the second duration is a time interval for the second network device to generate link state information.

具体地,第一网络设备从接收到第二网络设备的第二链路状态的时刻开始之后的第二时长内,将第二链路状态所属的第二网络设备标记为异常状态。也就是说,当第一网络设备在第二时长内接收到任意一条属于该第二网络设备的具有最大老化时间的链路状态时,都需要在第一时长内确定该具有最大老化时间的链路状态不立即参与路由计算,而是启动第一定时器,在第一定时器超时即达到第一时长后,该具有最大老化时间的链路状态才参与路由计算。Specifically, the first network device marks the second network device to which the second link state belongs as an abnormal state within a second time period from the moment when the second link state of the second network device is received. That is to say, when the first network device receives any link status with the maximum aging time belonging to the second network device within the second duration, it needs to determine the link with the maximum aging time within the first duration. The link state does not immediately participate in the route calculation, but starts the first timer. After the first timer expires, that is, the first time period is reached, the link state with the maximum aging time participates in the route calculation.

具体地,第二时长为所述第二网络设备生成链路状态信息的时间间隔,也就是说,第二时长为第二网络设备生成链路状态信息的周期。也就是说,在OSPF时,第二时长可以为LSA的刷新周期,例如1800s等,在ISIS情况下,也可以设为900s,本发明不限于此。Specifically, the second duration is a time interval for the second network device to generate the link state information, that is, the second duration is a cycle for the second network device to generate the link state information. That is to say, in the case of OSPF, the second duration may be the refresh period of the LSA, such as 1800s, etc. In the case of ISIS, it may also be set to 900s, and the present invention is not limited to this.

具体地,设置为第二时长的原因如下:1.如果存在故障设备删除网络设备A的所有链路状态,该删除过程是逐条删除,因此,需要在第二时长内,确定收到属于网络设备A的所有具有最大老化时间的LSP或LSA都进入抑制路由计算过程,即在第一时长内不参与路由计算;2.在第二时长内判断故设备是否还会删除除了网络设备A之外的其它设备的链路状态。因此,只要能够保证上述1、2条件的时长都可以设置为第二时长,例如,第二时长可以设置为2000s、1000s等,本发明不限于此。Specifically, the reasons for setting the second duration are as follows: 1. If a faulty device deletes all link states of network device A, the deletion process is to delete one by one. Therefore, within the second duration, it is necessary to determine that the received data belongs to the network device. All LSPs or LSAs of A with the maximum aging time enter the process of suppressing route calculation, that is, they do not participate in route calculation within the first time period; 2. In the second time period, determine whether the old device will delete all other devices except network device A. Link status of other devices. Therefore, as long as the above conditions 1 and 2 can be guaranteed, the duration can be set to the second duration, for example, the second duration can be set to 2000s, 1000s, etc. The present invention is not limited thereto.

可选地,作为本发明一个实施例,上述方法还包括:当第一网络设备在第一定时器未超时时收到第三报文,取消第一定时器,并采用第三报文进行路由计算,其中,第三报文携带第一链路的状态信息,第三报文携带的生存时间未到达最大老化时间。Optionally, as an embodiment of the present invention, the above method further includes: when the first network device receives a third packet before the first timer expires, cancels the first timer, and uses the third packet for routing calculation, wherein the third packet carries the state information of the first link, and the survival time carried in the third packet does not reach the maximum aging time.

具体地,当第一网络设备在第一时长内收到携带第一链路的状态信息的第三报文,且第三报文携带的生成时间还未达到最大老化时间,立即采用该第三报文进行路由计算,不采用生成时间已经达到最大老化时间的第一链路的状态信息进行路由计算;当第一网络设备在第一时长内未收到上述第三报文时,将携带生成时间已达到最大老化时间的第一报文进行路由计算,也就是说在第一时长后删除上述第一报文。Specifically, when the first network device receives the third packet carrying the state information of the first link within the first duration, and the generation time carried by the third packet has not reached the maximum aging time, the third packet is immediately used. The packet is used for routing calculation, and the state information of the first link whose generation time has reached the maximum aging time is not used for routing calculation; when the first network device does not receive the third packet within the first time period, it will carry the generated The route calculation is performed on the first packet whose time has reached the maximum aging time, that is, the first packet is deleted after the first time period.

也可以说,在第一网络设备收到第一报文时刻起的第一时长内,如果收到第三报文,就立即可以判断出之前接收的第一报文是由网络设备错误发出的,因此第一报文将不允许参与路由计算,而是将收到的第报文进行路由计算,以实现路由更新。It can also be said that within the first time period from the moment when the first network device receives the first packet, if it receives the third packet, it can immediately determine that the previously received first packet was sent by the network device in error. , so the first packet will not be allowed to participate in the routing calculation, but will perform routing calculation on the received second packet to implement routing update.

本发明实施例提供的方法及其网络设备,能够通过判断收到的报文中携带的生存时间是否达到最大老化时间,确定是否立即采用该报文进行路由计算,当发送该报文的网络设备处于异常状态,且该报文中携带的生存时间达到最大老化时间时,暂缓删除该链路的状态信息,确定该报文不是错误删除时,再删除该报文,否则,并根据本地的当前存在的链路的状态信息进行路由计算。因此,可以降低由于错误删除报文导致的路由震荡,从而减少导致业务流量丢失的可能性。The method and the network device thereof provided by the embodiments of the present invention can determine whether to immediately use the message for routing calculation by judging whether the time-to-live carried in the received message reaches the maximum aging time. When the network device that sends the message When it is in an abnormal state and the lifetime carried in the packet reaches the maximum aging time, suspend the deletion of the status information of the link, and delete the packet when it is determined that the packet is not deleted by mistake. The state information of the existing link is used for route calculation. Therefore, route flapping caused by erroneously deleted packets can be reduced, thereby reducing the possibility of service traffic loss.

图2是本发明实施例的一种处理报文的方法的示意性流程图。如图2所示,该方法200包括:FIG. 2 is a schematic flowchart of a method for processing a packet according to an embodiment of the present invention. As shown in Figure 2, the method 200 includes:

201,确定网络设备A被本地网络设备标记为异常状态。也就是说在该异常状态下,网络设备A的所有具有最大老化时间的链路状态都进入到抑制路由计算的特殊状态中。201. Determine that the network device A is marked as an abnormal state by the local network device. That is to say, in this abnormal state, all link states of the network device A with the maximum aging time enter into a special state that inhibits route calculation.

202,本地网络设备收到属于网络设备A的生存时间已到达最大老化时间的链路状态。具体地,例如,本地网络设备收到网络设备A发送的 MaxAgeLSP,那么本地设备将快速洪泛该链路状态LSP,以快速触发该LSP 的生成网络设备A重新刷新,当网络设备A的LSP是被错误删除时,网络设备A会生产新的LSP,并向本地网络设备发送该更新后的LSP,以便于本地网络设备根据该更新后的LSP进行路由计算。202, the local network device receives the link status belonging to the network device A whose lifetime has reached the maximum aging time. Specifically, for example, when the local network device receives the MaxAgeLSP sent by the network device A, the local device will quickly flood the link state LSP to quickly trigger the generation of the LSP. The network device A refreshes again. When the LSP of the network device A is When deleted by mistake, the network device A will generate a new LSP, and send the updated LSP to the local network device, so that the local network device can perform route calculation according to the updated LSP.

203,上述具有最大老化时间的链路状态进入路由慢计算状态,也就是说该具有最大老化时间的链路状态在T1时长内不进行路由计算,收到该条链路状态时启动T1定时器。203. The above link state with the maximum aging time enters the slow route calculation state, that is to say, the link state with the maximum aging time does not perform route calculation within the T1 time period, and starts the T1 timer when the link state is received. .

204,当在T1时长内,收到网络设备A更新的链路状态的生成时间未达到最大老化时间时,立即将该生存时间未达到最大老化时间的链路状态替换之前收到的具有最大老化时间的链路状态,并立即参与路由计算,取消 T1定时器。例如,在T1时长内,当本地网络设备收到网络设备A更新的生成时间没有达到最大老化时间的LSP/LSA时,将更新后的LSP/LSA替换之前收到的已达到最大老化时间的LSP或LSA,并立,即将该更新后的LSP 或LSA进行路由计算。204. When the generation time of the link state updated by the network device A has not reached the maximum aging time within the duration of T1, immediately replace the link state whose survival time has not reached the maximum aging time with the previously received link state with the maximum aging time. Time link status, and immediately participate in route calculation, cancel the T1 timer. For example, within the duration of T1, when the local network device receives the LSP/LSA updated by network device A whose generation time has not reached the maximum aging time, the updated LSP/LSA will replace the LSP that has reached the maximum aging time previously received. or LSA, and immediately perform route calculation on the updated LSP or LSA.

205,本地网络设备在T1时长内没有收到网络设备A更新的生存时间未达到最大老化时间的链路状态时,在T1时长后将在步骤202中收到的生成时间已经达到最大老化时间的链路状态参与路由计算,即删除该具有最大老化时间的链路状态。205 , when the local network device does not receive the link status updated by the network device A within the duration of T1 and the survival time has not reached the maximum aging time, after the duration of T1, it will receive in step 202 the generation time that has reached the maximum aging time. The link state participates in route calculation, that is, the link state with the maximum aging time is deleted.

例如,在步骤204和205中,本地网络设备延迟T1时长将生成时间已经达到最大老化时间的链路状态进行路由计算,而等待该链路状态的生成者设备刷新该链路状态。若在T1时长内,本地网络设备收到网络设备A刷新的生成时间未达到最大老化时间的链路状态,那么将最新收到的生成时间未达到最大老化时间的链路状态替换掉之前收到生成时间已达到最大老化时间的链路状态;若在T1时长内,没有收到不具有最大老化时间的链路状态,那么在T1时间后,将删除该条链路状态,将具有最大老化时间的链路状态进行路由计算。也就是说,本地设备在T2时间的延迟路由计算期间,等待 purge报文/flush报文的原始设备刷新该报文以纠正。若在定时器超时前收到刷新LSP/LSA,则进行LSP/LSA合并处理,避免删除路由;若没有收到刷新LSP/LSA,则在定时器超时后再通知路由计算模块,做路由删除处理。For example, in steps 204 and 205, the local network device delays T1 to perform route calculation on the link state whose generation time has reached the maximum aging time, and waits for the generator device of the link state to refresh the link state. If within T1, the local network device receives the link status refreshed by network device A whose generation time has not reached the maximum aging time, it will replace the latest received link status whose generation time has not reached the maximum aging time. Generate a link state whose time has reached the maximum aging time; if no link state without the maximum aging time is received within the T1 time period, the link state will be deleted after T1 time, and the link state will have the maximum aging time The link state is used for route calculation. That is, the local device waits for the purge packet/flush packet to refresh the packet for correction during the delay route calculation at T2 time. If a refreshed LSP/LSA is received before the timer expires, the LSP/LSA merging process will be performed to avoid deleting the route; if the refreshed LSP/LSA is not received, the route calculation module will be notified after the timer expires, and the route will be deleted. .

本发明实施例提供的方法及其网络设备,能够通过判断收到的报文中携带的生存时间是否达到最大老化时间,确定是否立即采用该报文进行路由计算,当发送该报文的网络设备处于异常状态,且该报文中携带的生存时间达到最大老化时间时,暂缓删除该链路的状态信息,确定该报文不是错误删除时,再删除该报文,否则,并根据本地的当前存在的链路的状态信息进行路由计算。因此,可以降低由于错误删除报文导致的路由震荡,从而减少导致业务流量丢失的可能性。The method and the network device thereof provided by the embodiments of the present invention can determine whether to immediately use the message for routing calculation by judging whether the time-to-live carried in the received message reaches the maximum aging time. When the network device that sends the message When it is in an abnormal state and the lifetime carried in the packet reaches the maximum aging time, suspend the deletion of the status information of the link, and delete the packet when it is determined that the packet is not deleted by mistake. The state information of the existing link is used for route calculation. Therefore, route flapping caused by erroneously deleted packets can be reduced, thereby reducing the possibility of service traffic loss.

图3是本法另一实施例的处理报文的方法的示意性流程图,该方法用于本地网络设备确定属于某一网络设备在本地被标记为异常状态。如图3所示,该方法包括:FIG. 3 is a schematic flowchart of a method for processing a packet according to another embodiment of the present method. The method is used by a local network device to determine that a network device belonging to a certain network device is marked as an abnormal state locally. As shown in Figure 3, the method includes:

301,本地网络设备接收到属于网络设备A的链路状态,例如接收到LSA 或LSP。301. The local network device receives the link status belonging to the network device A, for example, receives an LSA or an LSP.

302,本地网络设备判断接收到的链路状态是否为生存时间已到达最大老化时间并且携带网络设备A的拓扑关系的链路状态,例如判断是否为设备A发送的MaxAge ISIS零分片LSP或MaxAge OSPF Router LSA。302, the local network device determines whether the received link state is the link state whose lifetime has reached the maximum aging time and carries the topology relationship of network device A, for example, determines whether it is the MaxAge ISIS zero-fragment LSP or MaxAge sent by device A OSPF Router LSA.

303,判断网络设备A是否被本地标记为异常状态,也即是否被标记为抑制路由计算的特殊状态。303: Determine whether the network device A is marked as an abnormal state locally, that is, whether it is marked as a special state that inhibits route calculation.

304,如果本地设备已经标识网络设备A为异常状态,那么需要在接下来的T2时长继续维持网络设备A为异常状态,具体实现方式可以通过刷新 T2定时器的方式来实现。304. If the local device has identified that the network device A is in an abnormal state, it needs to continue to maintain the network device A in the abnormal state for the next T2 duration. The specific implementation method can be achieved by refreshing the T2 timer.

305,如果本地设备为标记网络设备A为异常状态,那么需要在接下来的T2时长内标记网络设备A为异常状态,并启动T2定时器。305 , if the local device marks the network device A as an abnormal state, then the network device A needs to be marked as an abnormal state in the next T2 time period, and a T2 timer is started.

306,当T2定时器超时后,即网络设备在T2时长内没有再收到该条生成时间已达到最大老化时间并携带网络设备A的拓扑关系的链路状态,那么在本地网络设备上标识网络设备A离开异常状态,即网络设备A的链路状态不需要进入抑制路由计算状态。306. When the T2 timer expires, that is, the network device does not receive the link status that the generation time has reached the maximum aging time and carries the topology relationship of the network device A within the T2 duration, then the network device is identified on the local network device. Device A leaves the abnormal state, that is, the link state of network device A does not need to enter the inhibiting route calculation state.

应理解,设定T2时长的主要目的有以下两个:1.如果存在故障设备删除网络设备A的所有链路状态,该删除过程是逐条删除,因此,需要在第一段时间内,确定收到属于网络设备A的所有具有最大老化时间的LSP或LSA 都进入抑制路由计算过程,即在T1时长内不参与路由计算;2.判断故障设备是否还会删除除了网络设备A之外的其它设备的链路状态。It should be understood that the main purposes of setting the T2 duration are as follows: 1. If a faulty device deletes all the link states of network device A, the deletion process is to delete one by one. All LSPs or LSAs with the maximum aging time belonging to network device A enter the process of inhibiting route calculation, that is, they do not participate in route calculation within T1; 2. Determine whether the faulty device will delete other devices except network device A. link status.

还应理解,如果在T2超时之前,又收到了MaxAge的router LSA/ISIS LSP零分片,需要刷新定时器。在T2定时器超时之前,收到非MaxAge的 router LSA/IsIs零分片的时候,不停止T2定时器。T1定时器和T2定时器不同,当收到非MaxAge的router LSA/IsIs LSP零分片的时候,直接停止T1 定时器,参与路由计算。It should also be understood that if the router LSA/ISIS LSP zero fragment of MaxAge is received again before T2 times out, the timer needs to be refreshed. Before the T2 timer expires, when the router LSA/IsIs zero fragment of non-MaxAge is received, the T2 timer is not stopped. The T1 timer is different from the T2 timer. When the router LSA/IsIs LSP zero fragment of non-MaxAge is received, the T1 timer is stopped directly and participates in the route calculation.

本发明实施例提供的方法及其网络设备,能够通过判断收到的报文中携带的生存时间是否达到最大老化时间,确定是否立即采用该报文进行路由计算,当发送该报文的网络设备处于异常状态,且该报文中携带的生存时间达到最大老化时间时,暂缓删除该链路的状态信息,确定该报文不是错误删除时,再删除该报文,否则,并根据本地的当前存在的链路的状态信息进行路由计算。因此,可以降低由于错误删除报文导致的路由震荡,从而减少导致业务流量丢失的可能性。The method and the network device thereof provided by the embodiments of the present invention can determine whether to immediately use the message for routing calculation by judging whether the time-to-live carried in the received message reaches the maximum aging time. When the network device that sends the message When it is in an abnormal state and the lifetime carried in the packet reaches the maximum aging time, suspend the deletion of the status information of the link, and delete the packet when it is determined that the packet is not deleted by mistake. The state information of the existing link is used for route calculation. Therefore, route flapping caused by erroneously deleted packets can be reduced, thereby reducing the possibility of service traffic loss.

图4是本发明另一实施例的处理报文的方法的示意性流程图。FIG. 4 is a schematic flowchart of a method for processing a packet according to another embodiment of the present invention.

如图4所示,设备之间建立OSPF/ISIS邻居,从测试仪导入路由,路由的路径为测试仪->PE1->PE2->P2->P1->P4->PE3->PE4->测试仪,存在节点故障源。As shown in Figure 4, OSPF/ISIS neighbors are established between devices, and routes are imported from the tester. The route of the route is tester->PE1->PE2->P2->P1->P4->PE3->PE4-> Tester, there is a node failure source.

在现有技术中,故障源定时器故障导致过快老化,比如,当定时器快100 倍时,其他设备的LSA的时间才到36S(小于刷新时间),故障设备的其他设备的LSA已经到达3600S了,他就会全网通知删除所有的来自PE1,PE2, P1,P2,P3,P4,PE3,PE4的LSA。(故障设备自己的LSA不会删除,因为到了18S,就会刷新并通知其他设备),所以,当P4收到自己生成的MaxAge LSA时,会重新生成一遍,但是收到其他的设备的MaxAge LSA,就会立即计算路由,将路由删除,也会全网通知删除这些MaxAge LSA,其他设备类似。所以,路由会删除。只有所有设备都受到各自的最大的MaxAgeLSA时,重新生成这些LSA全网洪泛。路由才会恢复。In the prior art, the fault of the fault source timer causes excessive aging. For example, when the timer is 100 times faster, the time of the LSA of other devices reaches 36S (less than the refresh time), and the LSAs of other devices of the faulty device have already arrived. 3600S, he will notify the whole network to delete all LSAs from PE1, PE2, P1, P2, P3, P4, PE3, PE4. (The LSA of the faulty device will not be deleted, because it will refresh and notify other devices after 18S), so when P4 receives the MaxAge LSA generated by itself, it will regenerate it, but it will receive the MaxAge LSA of other devices. , the route will be calculated immediately, the route will be deleted, and the entire network will be notified to delete these MaxAge LSAs, similar to other devices. So, the route will be deleted. These LSAs are regenerated only when all devices are flooded with their respective maximum MaxAge LSAs. Routing will be restored.

故障源周期性的将PE1,PE2,P1,P2,P3,P4,PE3,PE4上的LSA 删除,假设被删除路由的网络设备A为PE1,故障网络设备B为P4。故障源周期性的删除网络设备A的所有的LSA。The fault source periodically deletes the LSAs on PE1, PE2, P1, P2, P3, P4, PE3, and PE4. It is assumed that the network device A of the deleted route is PE1, and the faulty network device B is P4. The fault source periodically deletes all LSAs of network device A.

作为本发明实施例,对于故障网络设备B而言,故障源定时删除的周期小于将网络设备标记为特殊状态的时长T2时间(OSPF选取的T2就是OSPF 的刷新时间,ISIS选取的是缺省的刷新时间),故障源上的LSA还没有到达 3600S,就会收到其他设备的刷新LSA,时间从零开始计算。就不会出现全网删除的事情。As an embodiment of the present invention, for the faulty network device B, the period of timed deletion of the fault source is less than the time period T2 for marking the network device as a special state (the T2 selected by OSPF is the refresh time of OSPF, and the default selected by ISIS is the time T2). Refresh time), before the LSA on the fault source reaches 3600S, it will receive the refresh LSA of other devices, and the time starts from zero. There will be no network-wide deletion.

作为本发明实施例,对于网络设备A而言,故障源删除的周期小于T1 时间,故障网络设备B删除网络设备A的LSA,删除LSA的顺序是不定的,可能是其他LSA,然后Router LSA,然后又是其他LSA。As an embodiment of the present invention, for network device A, the period for deleting the fault source is less than T1 time, and the faulty network device B deletes the LSA of network device A. The order of deleting LSAs is not fixed. Then there are other LSAs.

当故障设备首先删除网络设备A的其他LSA时,这时候在网络设备B 上,前面的非Router LSA,都不能进入慢计算,路由会删除,因为此时网络设备A还未在网络设备B被标记为特殊状态,只有当网络设备B收到属于网络设备A的MaxAge Router LSA后,网络设备A从收到MaxAge Router LSA的时刻起才被网络设备B标记为特殊状态,在收到MaxAge RouterLSA 之后的T2时长内,属于网络设备A的Router LSA以及随后属于网络设备A 的其他LSA都会进入慢计算,也即在T1时长内不删除该其他LSA。When the faulty device first deletes other LSAs of network device A, at this time, on network device B, the preceding non-Router LSAs cannot enter the slow calculation, and the route will be deleted, because network device A has not been used in network device B at this time. It is marked as a special state. Only after network device B receives the MaxAge Router LSA belonging to network device A, network device A is marked as a special state by network device B from the moment it receives the MaxAge Router LSA. After receiving the MaxAge Router LSA During the T2 time period, the Router LSA belonging to network device A and other LSAs belonging to network device A will enter the slow calculation, that is, the other LSAs will not be deleted during the T1 time period.

具体地,可以将T2时长设置为OSPF的刷新时间,故障源下次周期性的删除LSA时(时间小于T2设备),全网删除设备A的LSA的顺序也可能是首先删除其他LSA、其次是RouterLSA、再次为其他LSA。在网络设备B 上,由于在T2时间内还在标识网络设备A为故障状态,所以所有的flush LSA 都会进入慢计算,即在T1时长内不删除路由。在网络设备收到MaxAgeRouter LSA时,又会将定时器刷新T1的时间,随后接收到的所有flush LSA 都进入了慢计算,从而能够减小路由的震荡。以后的过程按上述过程循环往复,为简洁期间,不在此赘述。Specifically, the T2 duration can be set as the refresh time of OSPF. When the fault source periodically deletes LSAs next time (the time is less than the T2 device), the order of deleting the LSAs of device A on the entire network may also be to delete other LSAs first, followed by RouterLSA, again for other LSAs. On network device B, since network device A is still identified as faulty during T2, all flush LSAs will enter slow computation, that is, routes will not be deleted during T1. When the network device receives the MaxAgeRouter LSA, it will refresh the timer to the time of T1, and all the flush LSAs received subsequently enter the slow calculation, which can reduce the flapping of the route. The subsequent process is repeated according to the above process, and for the sake of brevity, it will not be repeated here.

类似地,本发明实施例的方法也可以在ISIS和其它协议中实施,本发明不限于此。Similarly, the methods of the embodiments of the present invention can also be implemented in ISIS and other protocols, and the present invention is not limited thereto.

本发明实施例提供的方法及其网络设备,能够通过判断收到的报文中携带的生存时间是否达到最大老化时间,确定是否立即采用该报文进行路由计算,当发送该报文的网络设备处于异常状态,且该报文中携带的生存时间达到最大老化时间时,暂缓删除该链路的状态信息,确定该报文不是错误删除时,再删除该报文,否则,并根据本地的当前存在的链路的状态信息进行路由计算。因此,可以降低由于错误删除报文导致的路由震荡,从而减少导致业务流量丢失的可能性。The method and the network device thereof provided by the embodiments of the present invention can determine whether to immediately use the message for routing calculation by judging whether the time-to-live carried in the received message reaches the maximum aging time. When the network device that sends the message When it is in an abnormal state and the lifetime carried in the packet reaches the maximum aging time, suspend the deletion of the status information of the link, and delete the packet when it is determined that the packet is not deleted by mistake. The state information of the existing link is used for route calculation. Therefore, route flapping caused by erroneously deleted packets can be reduced, thereby reducing the possibility of service traffic loss.

图5是本发明实施例的一种第一网络设备的示意性框图。如图5所述,该第一网络设备500包括:FIG. 5 is a schematic block diagram of a first network device according to an embodiment of the present invention. As shown in FIG. 5, the first network device 500 includes:

接收单元510,用于接收单元用于接收第二网络设备发送的第一报文,第一报文携带第一链路的状态信息,第一报文携带的生存时间已达到最大老化时间。The receiving unit 510 is configured to receive the first packet sent by the second network device, where the first packet carries the state information of the first link, and the lifetime carried by the first packet has reached the maximum aging time.

处理单元520,用于确定若所述第二网络设备处于异常状态,第一网络设备在接收第一报文的起始时刻启动第一定时器,所述第一定时器的定时时长为第一时长,在所述第一定时器超时后,所述第一报文参与路由计算。The processing unit 520 is configured to determine that if the second network device is in an abnormal state, the first network device starts a first timer at the start of receiving the first packet, and the timing duration of the first timer is the first The duration, after the first timer expires, the first packet participates in route calculation.

本发明实施例提供的方法及其网络设备,能够通过判断收到的报文中携带的生存时间是否达到最大老化时间,确定是否立即采用该报文进行路由计算,当发送该报文的网络设备处于异常状态,且该报文中携带的生存时间达到最大老化时间时,暂缓删除该链路的状态信息,确定该报文不是错误删除时,再删除该报文,否则,并根据本地的当前存在的链路的状态信息进行路由计算。因此,可以降低由于错误删除报文导致的路由震荡,从而减少导致业务流量丢失的可能性。The method and the network device thereof provided by the embodiments of the present invention can determine whether to immediately use the message for routing calculation by judging whether the time-to-live carried in the received message reaches the maximum aging time. When the network device that sends the message When it is in an abnormal state and the lifetime carried in the packet reaches the maximum aging time, suspend the deletion of the status information of the link, and delete the packet when it is determined that the packet is not deleted by mistake. The state information of the existing link is used for route calculation. Therefore, route flapping caused by erroneously deleted packets can be reduced, thereby reducing the possibility of service traffic loss.

可选地,作为本发明一个实施例,接收单元510还用于:接收所述第二网络设备发送的第二报文,第二报文携带第二链路的拓扑状态信息,第二报文携带的生存时间已到达最大老化时间;处理单元520,还用于根据第二报文,确定第二网络设备处于异常状态。Optionally, as an embodiment of the present invention, the receiving unit 510 is further configured to: receive a second packet sent by the second network device, where the second packet carries topology state information of the second link, and the second packet The carried survival time has reached the maximum aging time; the processing unit 520 is further configured to determine, according to the second packet, that the second network device is in an abnormal state.

可选地,作为本发明一个实施例,第二报文为中间系统到中间系统协议零分片链路状态报文或开放最短路径优先协议路由链路状态发布。Optionally, as an embodiment of the present invention, the second packet is an intermediate system-to-intermediate system protocol zero-fragment link state packet or an open shortest path first protocol routing link state advertisement.

可选地,作为本发明一个实施例,处理单元520,还用于确定第二网络设备在第二时长内处于异常状态,其中,第二时长以第一网络设备接收到第二报文的时刻为起始时刻,第二时长为第二网络设备生成链路状态信息的时间间隔。Optionally, as an embodiment of the present invention, the processing unit 520 is further configured to determine that the second network device is in an abnormal state for a second duration, where the second duration is the moment when the first network device receives the second packet is the starting moment, and the second duration is the time interval for the second network device to generate the link state information.

可选地,作为本发明一个实施例,所述处理单元520,还用于当第一网络设备500在第一定时器未超时时收到第三报文,取消第一定时器,并采用第三报文进行路由计算,其中,第三报文携带第一链路的状态信息,第三报文携带的生存时间未到达最大老化时间。Optionally, as an embodiment of the present invention, the processing unit 520 is further configured to cancel the first timer when the first network device 500 receives the third packet before the first timer expires, and use the first timer. Route calculation is performed on three packets, wherein the third packet carries the state information of the first link, and the survival time carried in the third packet does not reach the maximum aging time.

应理解,根据本发明实施例的第一网络设备500可对应于本发明实施例的用于处理报文的方法的执行主体,并且第一网络设备500中的各个模块的上述和其它操作和/或功能分别为了实现图1至图4中的各个方法的相应流程,为了简洁,在此不再赘述。例如,第一网络设备500可以为图1实施例中的第一网络设备,可以为图2所示的实施例中的网络设备A,还可以为图3所示实施例中的本地网络设备或图4所示实施例中的网络设备B。It should be understood that the first network device 500 according to the embodiment of the present invention may correspond to the execution body of the method for processing a packet according to the embodiment of the present invention, and the above and other operations and/or the above and/or other operations of the modules in the first network device 500 The or functions are respectively in order to implement the corresponding processes of the respective methods in FIG. 1 to FIG. 4 , and are not repeated here for the sake of brevity. For example, the first network device 500 may be the first network device in the embodiment shown in FIG. 1 , may be the network device A in the embodiment shown in FIG. 2 , or may be the local network device in the embodiment shown in FIG. 3 or The network device B in the embodiment shown in FIG. 4 .

本发明实施例提供的方法及其网络设备,能够通过判断收到的报文中携带的生存时间是否达到最大老化时间,确定是否立即采用该报文进行路由计算,当发送该报文的网络设备处于异常状态,且该报文中携带的生存时间达到最大老化时间时,暂缓删除该链路的状态信息,确定该报文不是错误删除时,再删除该报文,否则,并根据本地的当前存在的链路的状态信息进行路由计算。因此,可以降低由于错误删除报文导致的路由震荡,从而减少导致业务流量丢失的可能性。The method and the network device thereof provided by the embodiments of the present invention can determine whether to immediately use the message for routing calculation by judging whether the time-to-live carried in the received message reaches the maximum aging time. When the network device that sends the message When it is in an abnormal state and the lifetime carried in the packet reaches the maximum aging time, suspend the deletion of the status information of the link, and delete the packet when it is determined that the packet is not deleted by mistake. The state information of the existing link is used for route calculation. Therefore, route flapping caused by erroneously deleted packets can be reduced, thereby reducing the possibility of service traffic loss.

图6是本发明实施例的装置的示意性框图。如图6所示,本发明实施例还提供了一种第一网络设备600,该第一网络设备600包括处理器601、存储器602、总线系统603、接收器604。其中,处理器601、存储器602和接收器604通过总线系统603相连,该存储器602用于存储指令,该处理器601 用于执行该存储器602存储的指令,并控制该接收器604接收信息。其中,FIG. 6 is a schematic block diagram of an apparatus according to an embodiment of the present invention. As shown in FIG. 6 , an embodiment of the present invention further provides a first network device 600 , where the first network device 600 includes a processor 601 , a memory 602 , a bus system 603 , and a receiver 604 . The processor 601, the memory 602 and the receiver 604 are connected through a bus system 603, the memory 602 is used for storing instructions, the processor 601 is used for executing the instructions stored in the memory 602, and controls the receiver 604 to receive information. in,

该接收器604,用于接收第二网络设备发送的第一报文,第一报文携带第一链路的状态信息,第一报文携带的生存时间已达到最大老化时间;The receiver 604 is configured to receive a first packet sent by the second network device, where the first packet carries state information of the first link, and the survival time carried in the first packet has reached the maximum aging time;

该处理器601,用于确定若所述第二网络设备处于异常状态,所述网络设备在接收第一报文的起始时刻启动第一定时器,所述第一定时器的定时时长为第一时长,在所述第一定时器超时后,所述第一报文参与路由计算。The processor 601 is configured to determine that if the second network device is in an abnormal state, the network device starts a first timer at the start of receiving the first packet, and the timing of the first timer is the first timer. For a period of time, after the first timer expires, the first packet participates in route calculation.

本发明实施例提供的方法及其网络设备,能够通过判断收到的报文中携带的生存时间是否达到最大老化时间,确定是否立即采用该报文进行路由计算,当发送该报文的网络设备处于异常状态,且该报文中携带的生存时间达到最大老化时间时,暂缓删除该链路的状态信息,确定该报文不是错误删除时,再删除该报文,否则,并根据本地的当前存在的链路的状态信息进行路由计算。因此,可以降低由于错误删除报文导致的路由震荡,从而减少导致业务流量丢失的可能性。The method and the network device thereof provided by the embodiments of the present invention can determine whether to immediately use the message for routing calculation by judging whether the time-to-live carried in the received message reaches the maximum aging time. When the network device that sends the message When it is in an abnormal state and the lifetime carried in the packet reaches the maximum aging time, suspend the deletion of the status information of the link, and delete the packet when it is determined that the packet is not deleted by mistake. The state information of the existing link is used for route calculation. Therefore, route flapping caused by erroneously deleted packets can be reduced, thereby reducing the possibility of service traffic loss.

应理解,在本发明实施例中,该处理器601可以是中央处理单元(CentralProcessing Unit,简称为CPU),该处理器601还可以是其他通用处理器、数字信号处理器(英文:Digital Signal Processing,简写:DSP)、专用集成电路(英文:ApplicationSpecific Integrated Circuit,简写:ASIC)、现成可编程门阵列(英文:Field-Programmable Gate Array,简写:FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in this embodiment of the present invention, the processor 601 may be a central processing unit (Central Processing Unit, CPU for short), and the processor 601 may also be other general-purpose processors, digital signal processors (English: Digital Signal Processing) , Abbreviation: DSP), Application Specific Integrated Circuit (English: ApplicationSpecific Integrated Circuit, Abbreviation: ASIC), Off-the-shelf Programmable Gate Array (English: Field-Programmable Gate Array, Abbreviation: FPGA) or other programmable logic devices, discrete gates or transistors Logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

该存储器602可以包括只读存储器和随机存取存储器,并向处理器601 提供指令和数据。存储器602的一部分还可以包括非易失性随机存取存储器。例如,存储器602还可以存储设备类型的信息。The memory 602 may include read only memory and random access memory, and provides instructions and data to the processor 601 . A portion of memory 602 may also include non-volatile random access memory. For example, memory 602 may also store device type information.

该总线系统603除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线系统603。In addition to the data bus, the bus system 603 may also include a power bus, a control bus, a status signal bus, and the like. However, for the sake of clarity, the various buses are labeled as bus system 603 in the figure.

在实现过程中,上述方法的各步骤可以通过处理器601中的硬件的集成逻辑电路或者软件形式的指令完成。结合本发明实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器602,处理器601读取存储器602中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。In the implementation process, each step of the above-mentioned method may be completed by an integrated logic circuit of hardware in the processor 601 or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present invention may be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602, and completes the steps of the above method in combination with its hardware. To avoid repetition, detailed description is omitted here.

可选地,作为本发明一个实施例,上述接收器604还用于:接收第二网络设备发送的第二报文,第二报文携带第二链路的拓扑状态信息,第二报文携带的生存时间已到达最大老化时间;处理器601用于:根据第二报文,确定第二网络设备处于异常状态。Optionally, as an embodiment of the present invention, the above-mentioned receiver 604 is further configured to: receive a second packet sent by the second network device, where the second packet carries the topology state information of the second link, and the second packet carries The lifetime has reached the maximum aging time; the processor 601 is configured to: determine, according to the second packet, that the second network device is in an abnormal state.

可选地,作为本发明一个实施例,上述第二报文为中间系统到中间系统协议零分片链路状态报文或开放最短路径优先协议路由链路状态发布。Optionally, as an embodiment of the present invention, the above-mentioned second message is an intermediate system-to-intermediate system protocol zero-fragment link state message or an open shortest path first protocol routing link state advertisement.

可选地,作为本发明一个实施例,上述处理器601还用于:确定第二网络设备在第二时长内处于异常状态,其中,第二时长以第一网络设备600网络设备接收到第二报文的时刻为起始时刻,第二时长为所述第二网络设备生成链路状态信息的时间间隔。Optionally, as an embodiment of the present invention, the above-mentioned processor 601 is further configured to: determine that the second network device is in an abnormal state within a second time period, wherein the second time period is the first network device 600 network device to receive the second The moment of the message is the start moment, and the second duration is the time interval for the second network device to generate the link state information.

可选地,作为本发明一个实施例,上述处理器601还用于:当第一网络设备600在第一定时器未超时时收到第三报文,取消第一定时器,并采用第三报文进行路由计算,其中,第三报文携带第一链路的状态信息,第三报文携带的生存时间未到达最大老化时间。Optionally, as an embodiment of the present invention, the above-mentioned processor 601 is further configured to: when the first network device 600 receives a third packet before the first timer expires, cancel the first timer, and use the third The packet performs route calculation, wherein the third packet carries the state information of the first link, and the survival time carried by the third packet does not reach the maximum aging time.

应理解,根据本发明实施例的网络设备600可对应于本发明实施例的用于处理报文的方法的执行主体,并且网络设备600中的各个模块的上述和其它操作和/或功能分别为了实现图1至图4中的各个方法的相应流程,为了简洁,在此不再赘述。例如,第一网络设备600可以为图1实施例中的第一网络设备,可以为图2所示的实施例中的网络设备A,还可以为图3所示实施例中的本地网络设备、图4所示实施例中的网络设备B或者图5实施例中所示的第一网络设备。It should be understood that the network device 600 according to the embodiment of the present invention may correspond to the execution body of the method for processing a packet according to the embodiment of the present invention, and the above and other operations and/or functions of each module in the network device 600 are for the purpose of For the sake of brevity, the corresponding processes for implementing the respective methods in FIG. 1 to FIG. 4 are not repeated here. For example, the first network device 600 may be the first network device in the embodiment shown in FIG. 1 , may be the network device A in the embodiment shown in FIG. 2 , or may be the local network device in the embodiment shown in FIG. 3 , The network device B in the embodiment shown in FIG. 4 or the first network device shown in the embodiment of FIG. 5 .

本发明实施例提供的方法及其网络设备,能够通过判断收到的报文中携带的生存时间是否达到最大老化时间,确定是否立即采用该报文进行路由计算,当发送该报文的网络设备处于异常状态,且该报文中携带的生存时间达到最大老化时间时,暂缓删除该链路的状态信息,确定该报文不是错误删除时,再删除该报文,否则,并根据本地的当前存在的链路的状态信息进行路由计算。因此,可以降低由于错误删除报文导致的路由震荡,从而减少导致业务流量丢失的可能性。The method and the network device thereof provided by the embodiments of the present invention can determine whether to immediately use the message for routing calculation by judging whether the time-to-live carried in the received message reaches the maximum aging time. When the network device that sends the message When it is in an abnormal state and the lifetime carried in the packet reaches the maximum aging time, suspend the deletion of the status information of the link, and delete the packet when it is determined that the packet is not deleted by mistake. The state information of the existing link is used for route calculation. Therefore, route flapping caused by erroneously deleted packets can be reduced, thereby reducing the possibility of service traffic loss.

根据本发明实施例的处理报文的系统可包括前述网络设备和第二网络设备。The system for processing a message according to the embodiment of the present invention may include the foregoing network device and the second network device.

图7是本发明实施例的一种报文处理系统,该报文处理系统700包括:第一网络设备701和第二网络设备702,其中,FIG. 7 is a packet processing system according to an embodiment of the present invention. The packet processing system 700 includes: a first network device 701 and a second network device 702, wherein,

第一网络设备701,用于接收第二网络设备702发送的第一报文,第一报文携带第一链路的状态信息,第一报文携带的生存时间已达到最大老化时间;用于确定若第二网络设备720处于异常状态,第一网络设备701在接收第一报文的起始时刻启动第一定时器,第一定时器的定时时长为第一时长,在所述第一定时器超时后,第一报文参与路由计算。The first network device 701 is configured to receive a first packet sent by the second network device 702, where the first packet carries the state information of the first link, and the survival time carried in the first packet has reached the maximum aging time; It is determined that if the second network device 720 is in an abnormal state, the first network device 701 starts a first timer at the start of receiving the first packet, and the timing duration of the first timer is the first duration, and at the first timing After the timer times out, the first packet participates in route calculation.

第二网络设备702,用于生成第一报文,并向第一网络设备701发送所述第一报文。The second network device 702 is configured to generate a first packet and send the first packet to the first network device 701 .

可选地,作为本发明一个实施例,第二网络设备702还用于生成第二报文,并行第一网络设备701发送所述第二报文,以便于第一网络设备701根据第二报文确定第一网络设备701为异常状态。Optionally, as an embodiment of the present invention, the second network device 702 is further configured to generate a second packet, and the first network device 701 sends the second packet in parallel, so that the first network device 701 can send the second packet according to the second packet. The article determines that the first network device 701 is in an abnormal state.

在具体实施例中,第一网络设备701可以为图1中的第一网络设备,第二网络设备702为图1中的第二网络设备。第一网络设备701可以为图2所示实施例中的第一网络设备,第二网络设备702可以为图2所示实施例中的第二网络设备。第一网络设备701可以为图3所示实施例中的本地网络设备,第二网络设备702可以为图3所示实施例中的网络设备A。第一网络设备701 可以为图4所示实施例中的网络设备B,第二网络设备702可以为图4所示实施例中的网络设备A。或者第一网络设备701可以为图5所示实施例中的第一网络设备500或图6所示实施例中的第一网络设备600,与第一网络设备701相关的具体内容可以参考前述任一实施例,此处不在赘述。第二网络设备702可以为图5所示实施例中的第二网络设备,或者为图6所示实施例中的第二网络设备,与第二网络设备702相关的具体内容可以参考前述任一实施例,此处不在赘述。In a specific embodiment, the first network device 701 may be the first network device in FIG. 1 , and the second network device 702 may be the second network device in FIG. 1 . The first network device 701 may be the first network device in the embodiment shown in FIG. 2 , and the second network device 702 may be the second network device in the embodiment shown in FIG. 2 . The first network device 701 may be the local network device in the embodiment shown in FIG. 3 , and the second network device 702 may be the network device A in the embodiment shown in FIG. 3 . The first network device 701 may be the network device B in the embodiment shown in FIG. 4 , and the second network device 702 may be the network device A in the embodiment shown in FIG. 4 . Alternatively, the first network device 701 may be the first network device 500 in the embodiment shown in FIG. 5 or the first network device 600 in the embodiment shown in FIG. An embodiment is not repeated here. The second network device 702 may be the second network device in the embodiment shown in FIG. 5 , or the second network device in the embodiment shown in FIG. 6 , and the specific content related to the second network device 702 may refer to any one of the foregoing Embodiments are not repeated here.

本发明实施例提供的方法及其网络设备,能够通过判断收到的报文中携带的生存时间是否达到最大老化时间,确定是否立即采用该报文进行路由计算,当发送该报文的网络设备处于异常状态,且该报文中携带的生存时间达到最大老化时间时,暂缓删除该链路的状态信息,确定该报文不是错误删除时,再删除该报文,否则,并根据本地的当前存在的链路的状态信息进行路由计算。因此,可以降低由于错误删除报文导致的路由震荡,从而减少导致业务流量丢失的可能性。The method and the network device thereof provided by the embodiments of the present invention can determine whether to immediately use the message for routing calculation by judging whether the time-to-live carried in the received message reaches the maximum aging time. When the network device that sends the message When it is in an abnormal state and the lifetime carried in the packet reaches the maximum aging time, suspend the deletion of the status information of the link, and delete the packet when it is determined that the packet is not deleted by mistake. The state information of the existing link is used for route calculation. Therefore, route flapping caused by erroneously deleted packets can be reduced, thereby reducing the possibility of service traffic loss.

本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和单元,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art can realize that, in combination with the method steps and units described in the embodiments disclosed herein, they can be implemented in electronic hardware, computer software, or a combination of the two. Interchangeability, the steps and components of the various embodiments have been generally described in terms of functions in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods of implementing the described functionality for each particular application, but such implementations should not be considered beyond the scope of the present invention.

结合本文中所公开的实施例描述的方法或步骤可以用硬件、处理器执行的软件程序,或者二者的结合来实施。软件程序可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The methods or steps described in connection with the embodiments disclosed herein may be implemented in hardware, a software program executed by a processor, or a combination of the two. The software program can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or anywhere in the art. in any other known form of storage medium.

尽管通过参考附图并结合优选实施例的方式对本发明进行了详细描述,但本发明并不限于此。在不脱离本发明的精神和实质的前提下,本领域普通技术人员可以对本发明的实施例进行各种等效的修改或替换,而这些修改或替换都应在本发明的涵盖范围内。Although the present invention has been described in detail in conjunction with the preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, those of ordinary skill in the art can make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions should all fall within the scope of the present invention.

Claims (11)

1. A method for processing a packet, comprising:
the method comprises the steps that first network equipment receives a first message sent by second network equipment, wherein the first message carries state information of a first link, and the survival time carried by the first message reaches the maximum aging time;
if the second network device is in an abnormal state, the first network device starts a first timer at the initial moment of receiving a first message, the timing duration of the first timer is a first duration, and after the first timer is overtime, the first message participates in route calculation.
2. The method of claim 1, wherein prior to the first network device receiving the first packet, the method further comprises:
the first network equipment receives a second message sent by the second network equipment, the second message carries topology state information of a second link, and the time-to-live carried by the second message reaches the maximum aging time;
and determining that the second network equipment is in an abnormal state according to the second message.
3. The method of claim 2, wherein the second packet is an intermediate system to intermediate system ISIS protocol zero-fragmentation link state packet or an open shortest path first OSPF protocol routing link state issue packet.
4. The method according to claim 2 or 3, wherein determining that the second network device is in an abnormal state according to the second packet comprises:
and the first network equipment determines that the second network equipment is in an abnormal state within a second time length, wherein the second time length takes the time when the first network equipment receives the second message as an initial time, and the second time length is a time interval for the second network equipment to generate link state information.
5. The method according to any one of claims 1 to 3, further comprising:
and when the first network equipment receives a third message when the first timer is not overtime, canceling the first timer, and performing routing calculation by adopting the third message, wherein the third message carries the state information of the first link, and the survival time carried by the third message does not reach the maximum aging time.
6. A first network device, comprising:
a receiving unit, configured to receive a first packet sent by a second network device, where the first packet carries state information of a first link, and a lifetime carried by the first packet reaches a maximum aging time;
and the processing unit is used for determining that the first network equipment starts a first timer at the initial moment of receiving the first message if the second network equipment is in an abnormal state, wherein the timing duration of the first timer is a first duration, and the first message participates in route calculation after the first timer is overtime.
7. The first network device of claim 6,
the receiving unit is further configured to receive a second packet sent by the second network device, where the second packet carries topology state information of a second link, and a lifetime carried by the second packet reaches a maximum aging time;
the processing unit is further configured to determine that the second network device is in an abnormal state according to the second packet.
8. The first network device of claim 7, wherein the second packet is an intermediate system to intermediate system ISIS protocol zero-fragmentation link state packet or an Open Shortest Path First (OSPF) protocol routing link state issue packet.
9. The first network device according to claim 7 or 8, wherein the processing unit is further configured to determine that the second network device is in an abnormal state within a second duration, where the second duration takes a time when the first network device receives the second packet as a starting time, and the second duration is a time interval when the second network device generates link state information.
10. The first network device according to any one of claims 6 to 8, wherein the processing unit is further configured to, when the first network device does not time out at the first timer, receive a third packet, cancel the first timer, and perform routing calculation using the third packet, where the third packet carries state information of the first link, and a lifetime carried by the third packet does not reach a maximum aging time.
11. A system for processing messages, comprising a first network device and a second network device according to any one of claims 6 to 10.
CN201510609202.0A 2015-09-22 2015-09-22 Method, network device and system for processing message Active CN106549866B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010323415.8A CN111683006B (en) 2015-09-22 2015-09-22 Methods for processing messages and network equipment thereof
CN201510609202.0A CN106549866B (en) 2015-09-22 2015-09-22 Method, network device and system for processing message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510609202.0A CN106549866B (en) 2015-09-22 2015-09-22 Method, network device and system for processing message

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202010323415.8A Division CN111683006B (en) 2015-09-22 2015-09-22 Methods for processing messages and network equipment thereof

Publications (2)

Publication Number Publication Date
CN106549866A CN106549866A (en) 2017-03-29
CN106549866B true CN106549866B (en) 2020-04-28

Family

ID=58365466

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202010323415.8A Active CN111683006B (en) 2015-09-22 2015-09-22 Methods for processing messages and network equipment thereof
CN201510609202.0A Active CN106549866B (en) 2015-09-22 2015-09-22 Method, network device and system for processing message

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202010323415.8A Active CN111683006B (en) 2015-09-22 2015-09-22 Methods for processing messages and network equipment thereof

Country Status (1)

Country Link
CN (2) CN111683006B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259358B (en) 2017-05-24 2020-12-04 新华三技术有限公司 Route publishing method and device
CN110932921B (en) 2018-09-19 2022-10-11 华为技术有限公司 Method for determining route oscillation information and related equipment thereof
CN110336728B (en) * 2019-07-26 2021-08-06 新华三大数据技术有限公司 Message processing method, node equipment, electronic equipment and readable storage medium
CN110266587B (en) * 2019-08-14 2019-12-13 华为技术有限公司 Method and device for processing link state information
CN113709804A (en) * 2020-05-22 2021-11-26 维沃移动通信有限公司 Data transmission method, terminal equipment and network equipment
CN115334136B (en) * 2022-07-05 2024-02-02 北京天融信网络安全技术有限公司 Connection aging control method, system, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1741505A (en) * 2005-09-19 2006-03-01 杭州华为三康技术有限公司 Method for group transmitting static group backup and method of group transmitting message retransmission
CN102035716A (en) * 2009-09-29 2011-04-27 中国移动通信集团公司 Routing updating method and system and router
US8374095B2 (en) * 2009-03-23 2013-02-12 Cisco Technology, Inc. Connection verification for MPLS label switched paths and pseudowires
CN103095590A (en) * 2013-01-05 2013-05-08 杭州华三通信技术有限公司 Method and network device for suppressing link status message periodical refreshing and aging
WO2013077090A1 (en) * 2011-11-21 2013-05-30 三菱電機株式会社 Ad hoc network system and communication device
CN104579718A (en) * 2013-10-10 2015-04-29 杭州迪普科技有限公司 Device and method for optimizing ARP aging mechanism

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101562531B (en) * 2008-04-15 2012-08-15 中国移动通信集团公司 Method and system for processing network fault and router
CN101841453B (en) * 2009-03-20 2012-09-05 华为技术有限公司 Method and system for processing network error source and network node
US8339942B2 (en) * 2009-10-15 2012-12-25 Telefonaktiebolaget L M Ericsson (Publ) RSVP-TE graceful restart under fast re-route conditions
CN102023926B (en) * 2010-12-08 2013-12-11 杭州华三通信技术有限公司 Method and device for data overtime aging processing
CN102739462B (en) * 2011-04-08 2014-12-31 中国移动通信集团公司 Test message sending method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1741505A (en) * 2005-09-19 2006-03-01 杭州华为三康技术有限公司 Method for group transmitting static group backup and method of group transmitting message retransmission
US8374095B2 (en) * 2009-03-23 2013-02-12 Cisco Technology, Inc. Connection verification for MPLS label switched paths and pseudowires
CN102035716A (en) * 2009-09-29 2011-04-27 中国移动通信集团公司 Routing updating method and system and router
WO2013077090A1 (en) * 2011-11-21 2013-05-30 三菱電機株式会社 Ad hoc network system and communication device
CN103095590A (en) * 2013-01-05 2013-05-08 杭州华三通信技术有限公司 Method and network device for suppressing link status message periodical refreshing and aging
CN104579718A (en) * 2013-10-10 2015-04-29 杭州迪普科技有限公司 Device and method for optimizing ARP aging mechanism

Also Published As

Publication number Publication date
CN111683006A (en) 2020-09-18
CN106549866A (en) 2017-03-29
CN111683006B (en) 2023-12-08

Similar Documents

Publication Publication Date Title
CN106549866B (en) Method, network device and system for processing message
US9838246B1 (en) Micro-loop prevention using source packet routing
US9036642B2 (en) Point-to point based multicast label distribution protocol local protection solution
CN110086711B (en) Flow back-switching method and device, electronic equipment and readable storage medium
US9755962B2 (en) Reducing link state protocol traffic during graceful restart
JP7528289B2 (en) System and method for handling IGP flooding topology inconsistencies - Patents.com
CN107347032A (en) Message forwarding method and device
CN103688498A (en) Methods and network elements operable to specify and determine complete sets of link state messages for link state routing protocols
US9699073B2 (en) System and method for reducing traffic loss while using loop free alternate routes for multicast only fast reroute (MoFRR)
CN105471736B (en) Tunnel signal degradation notification and switching method and device
WO2016123904A1 (en) Routing convergence method, device and virtual private network system
CN106789673B (en) Link state synchronization method and device
CN107086924B (en) Message transmission method and device
CN102316029B (en) Fast rerouting method and routing equipment
US8699376B2 (en) Method and system for de-synchronizing link state message refreshes
CN106411729B (en) Method and device for realizing link state notification processing
EP3661134B1 (en) Intermediate system to intermediate system routing protocol based notification method and apparatus
WO2020124601A1 (en) Method and router for segment routing with adjacency segment protection
US12513074B2 (en) System and method for abstracting an IGP zone
US9258221B2 (en) System and method for rapid protection of RSVP based LSP
CN115277528B (en) Traffic scheduling method and device
CN113709042B (en) Tunnel state recovery method and device in RSVP GR process
CN111107006B (en) Routing management method and device
CN101621416B (en) Method and device for determining protection type
WO2023039747A1 (en) Method and apparatus for designated router seamless switchover

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant