WO2011150832A1 - Method, system and edge switch device for route convergence - Google Patents

Method, system and edge switch device for route convergence Download PDF

Info

Publication number
WO2011150832A1
WO2011150832A1 PCT/CN2011/075016 CN2011075016W WO2011150832A1 WO 2011150832 A1 WO2011150832 A1 WO 2011150832A1 CN 2011075016 W CN2011075016 W CN 2011075016W WO 2011150832 A1 WO2011150832 A1 WO 2011150832A1
Authority
WO
WIPO (PCT)
Prior art keywords
neighbor
sent
routing information
route
notification message
Prior art date
Application number
PCT/CN2011/075016
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 WO2011150832A1 publication Critical patent/WO2011150832A1/en

Links

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
    • H04L45/033Topology update or discovery by updating distance vector protocols

Definitions

  • the present invention relates to the field of computer network technologies, and in particular, to a route convergence method, system, and edge switching device. Background technique
  • Border Gateway is a necessary protocol for operators to deploy on the boundary of a virtual private network (VPN).
  • the routers that run BGP are used as edge devices (PEs). Prov i der Edge ).
  • PE can be classified into an edge switching device (SPE, Swi tch PE), 0 SPE both side edges of a user equipment (UPE, User-end PE) and the network edge device (NPE, Network PE) are UPE or NPE.
  • the UPE is in the lower layer of the VPN.
  • the NPE is in the upper layer of the VPN.
  • the SPE is in the middle of the network.
  • the SPE is in the middle of the link layer and the transition layer.
  • the NPE is used to store the routing information of the NPE, and then forwards the traffic sent by the UPE to different interfaces. Routing, which plays a role in routing.
  • the existing VPN protection can guarantee millisecond switching, switch to another standby SPE or switch to another protection link.
  • the SPE is faulty, the local routing table of the UPE and the NPE needs to be re-established.
  • the process of re-establishing the routing table is called route convergence.
  • the route convergence between the UPE and the NPE on the SPE is inconsistent. For example, the NPE on the aggregation side has a slow convergence rate because of the large number of routes. The UPE on the access side has a faster convergence rate because the number of routes is smaller.
  • the critical route refers to Pre-configured routes that can guide critical services, such as default routes and aggregation routes. After receiving these critical routes, the UPE sends the traffic of the network segment corresponding to the default route or the aggregation route to the SPE. At this time, the NPE side The convergence has not been completed yet.
  • the SPE only receives some detailed routes sent by the NPE. There may be no network traffic corresponding to the critical route or the aggregation route. All the detailed routes can only discard this traffic, causing traffic black holes.
  • the restart of the BGP protocol will result in the re-establishment of the peer relationship and the interruption of the traffic forwarding.
  • a method for avoiding traffic forwarding interruption is Graceful Restart (GR).
  • the device with the GR function is called the GR Restarter.
  • the device adjacent to the GR Restarter is called the GR Helper.
  • the GR Helper itself must be GR-capable to assist the GR Restarter in GR.
  • An OPEN message in the BGP protocol is used for a routing device to establish a neighbor relationship with another routing device.
  • the routing device in BGP has the GR capability, which is mainly represented by the type length value (TLV, Type-Length-Value) defined in the BGP Open Message Extension field sent by the routing device.
  • the extension field has a length of 4 bits. Restart Flags, where 1 bit is used, and the remaining 3 bits are reserved.
  • the routing device negotiates the GR capability.
  • the GR Helper detects that the GR Restarter is restarted, the GR Restarter does not delete the routing and forwarding entries related to the GR Restarter. Instead, it waits for the BGP connection to be reestablished, and the timer starts timing. Before the timer expires, the GR Restarter and GR Helper re-establish the connection and complete the BGP route update. In this way, the traffic forwarding is not interrupted, and the BGP flapping is limited to the neighbors connected to the GR Restarter device and does not spread to the entire routing domain.
  • conditional default routes can be used to partially resolve traffic black holes. If the SPE detects the local route A or route B or the route C or the route D, or the route A and the route B and the route C and the route D, the SPE advertises the default route to the UPE. After receiving the default route, the UPE takes all the network segments. The traffic is sent to the SPE, so that the SPE can forward the traffic sent by the UPE to the corresponding device according to the route A or B or C or D, and the rest of the traffic will be discarded; that is, if the local routing table exists to satisfy the "or", " With the conditional route, the default route is issued to the specified neighbor.
  • Embodiments of the present invention provide a route convergence method, system, and switching edge device.
  • a route convergence method includes:
  • the edge switching device determines whether the first neighbor has completed route convergence.
  • the routing information is sent to the second neighbor.
  • the two sides of the edge switching device are the user edge device and the network edge device, and one of the first neighbor and the second neighbor is the user edge device and the other is the network side. Edge device.
  • An edge switching device including:
  • a determining module configured to determine whether the first neighbor has completed route convergence
  • the routing information sending module is configured to: when the determining module determines that the first neighbor has completed the route convergence, sends the routing information to the second neighbor, where the two sides of the edge switching device are the user edge device and the network edge device, the first neighbor and One of the second neighbors is a user side edge device and the other is a network side edge device.
  • a route convergence system including:
  • the edge switching device and the first neighbor are The edge switching device and the first neighbor;
  • the first neighbor is configured to send a detail route to the edge switching device, and receive a session connection message sent by the edge switching device, where the session connection message carries an extension field, where the extension field indicates that the edge switching device requires the first neighbor to complete the initial in each address family. Returning the notification message after the update; if the first neighbor can parse the extension field, send a support notification message to the edge switching device, the support notification message indicating that the first neighbor has the ability to return after each address family completes the initial update. Notification message.
  • the switching edge device determines whether the first neighbor completes the route convergence, so as to determine whether the condition for triggering the route advertisement is already available, and if yes, sends the routing information to the second neighbor, so that if the second neighbor receives After routing information, when the traffic is sent to the switching edge device, the switching edge device can forward the traffic to the corresponding device, thus avoiding traffic black holes.
  • FIG. 1 is a schematic flowchart of a route convergence method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a route convergence method according to an embodiment of the present invention.
  • 3A is a simplified schematic diagram of a switching edge device according to an embodiment of the present invention.
  • 3B is a simplified schematic diagram of a switching edge device according to an embodiment of the present invention
  • 4A is a simplified schematic diagram of a switching edge device according to an embodiment of the present invention
  • 4B is a simplified schematic diagram of a switching edge device according to an embodiment of the present invention.
  • FIG. 5 is a simplified schematic diagram of a route convergence system according to an embodiment of the present invention. detailed description
  • the embodiment of the invention provides a route convergence method.
  • the embodiment of the invention further provides a corresponding system and a switching edge device. The details are described below separately.
  • the first neighbor and the second neighbor are neighbors on both sides of the SPE.
  • a first embodiment of a route convergence method in an embodiment of the present invention includes:
  • the SPE determines whether the first neighbor has completed the route convergence. When it is determined that the first neighbor completes the route convergence, step S02 is performed;
  • the specific judgment method can be:
  • the SPE restarts After the SPE restarts, it receives the routing information sent by the first neighbor and counts the number of routes. The number of routes that are sent by the first neighbor before the SPE restarts is compared with the number of the statistics. Whether the ratio of the number of routes sent by the first neighbor before the pre-save or SPE restart reaches a preset ratio.
  • the SPE is triggered to send routing information to the second neighbor.
  • the two sides of the edge switching device are the UPE and the NPE respectively, and the first neighbor and the second neighbor are the UPE in the network, and the other is the NPE, that is, when the first neighbor is the UPE, and the second neighbor is the NPE. Conversely, when the first neighbor is an NPE, the second neighbor is a UPE.
  • the SPE determines whether the first neighbor completes the route convergence, and determines whether the condition for triggering the route advertisement is already available. If yes, the routing information is sent to the second neighbor, so that if the second neighbor receives the routing information, When the traffic is sent to the SPE, the SPE can forward the traffic to the corresponding device to avoid blackholes.
  • a second embodiment of a route convergence method includes: 201.
  • the SPE sends a session connection message to the first neighbor.
  • the SPE sends a session connection message to the first neighbor, where the session connection message includes an extension field, which indicates that the first neighbor is required to return a notification message after each address family completes the initial update, that is, the first neighbor completes in each address family.
  • the initial update after sending an update message to the SPE, returns to the notification message.
  • the extension field can look like this:
  • the SPE uses the second bit of the Restart Label field in the GR extended TLV to indicate that the SPE wants the first neighbor to always return a message after the initial update is completed for each address family.
  • the routing information database ends (End-of- RIB, E0R) message, that is, the SPE needs to be able to identify the TLV of the GR; the structure of the restart tag field in the TLV is as shown in Table 1:
  • the length of the restart tag field is 4 bits, from bit 0 to bit 3, where bit 0 has been used, and bit 1 to bit 3 are reserved bits.
  • the second bit which is the bit 1 bit as the basis for negotiation, as shown in Table 2:
  • the first neighbor may support the GR; or the first neighbor may not support the GR, but needs to be able to identify the TLV, and cannot ignore the second bit.
  • E bit That is to say, the first neighbor can parse the E bit as long as it has the ability to send the E0R message, and ignore the E bit if the E0R message is not sent.
  • the SPE can also use the BGP 0PE to add a TLV, negotiate the extended capability field, or use other reserved fields in the BGP packet to negotiate the basis. Description.
  • the SPE determines whether the support notification message sent by the first neighbor is received, and the message indicates that the first neighbor has the ability to return the notification message after each address family completes the initial update, that is, the first neighbor is in each The address family completes the initial update, sends an update message to the SPE, and then returns a notification message.
  • the session connection message received by the first neighbor uses the extended bit 1 of the carried TLV as the E bit as an example, and the first neighbor receives the SPE. After the session connection message is sent, if the first neighbor can resolve the E bit of the session connection message, that is, the ability to return a support notification message, a support notification message is sent to the SPE, and the notification message may be an E0R message or other message;
  • the notification message as the E0R message as an example
  • the first neighbor receives the session connection message sent by the SPE
  • the message supporting the E0R is sent to the SPE
  • Parsing the E bit carried in the session connection message that is, if there is no E0R capability, the message supporting the E0R will not be sent to the SPE;
  • the support notification message may be a message carrying E bits, or a message carrying other identifiers negotiated at both ends;
  • the SPE sends a session connection message carrying the extended field to the first neighbor. If the first neighbor returns a support notification message, the message indicates that the first neighbor has the ability to return a notification message after each address family completes the initial update, indicating that the SPE and the first The neighbor negotiation succeeds. If the first neighbor does not return the support notification message, the SPE and the first neighbor negotiation are unsuccessful.
  • the timer 2 starts timing
  • the routing information is sent to the second neighbor
  • BGP uses the address family (Addres s Family) to distinguish between different network layer protocols (for example, extensions to IPv6, VPN, etc.);
  • the initial update UPDATE is completed in each address family.
  • a notification message is sent to the SPE.
  • the notification message may be an E0R message
  • the SPE does not receive the notification message sent by the first neighbor, it is determined whether the timer 1 times out.
  • timer 4 starts timing
  • the timer 1 After the timer 1 expires, that is, after the T1 time, if the SPE has not received the notification message sent by the first neighbor, it is not sure whether the first neighbor has completed the route convergence, but has timed out, the timer 4 starts counting;
  • the routing information is sent to the second neighbor, that is, after waiting for a secure time T4, the routing information is sent to the second neighbor.
  • the SPE determines whether the timer 1 times out.
  • timer 3 starts timing
  • the timer 3 starts counting.
  • the routing information is sent to the second neighbor, that is, after waiting for a secure time T3, the routing information is sent to the second neighbor.
  • the preset times T1, ⁇ 2, ⁇ 3, ⁇ 4 may be the same time, or different times may be set according to requirements, and the timer 2, the timer 3, and the timer 4 may be the same timer, or may be respectively Set different timers.
  • the routing information sent by the SPE to the second neighbor is the routing information optimized by the routing policy, and the routing policy is one of the following policies:
  • IGP Inter-Gateway Protocol
  • the above routing strategy may select one of the policies for optimal filtering of routing information.
  • the SPE can support a fine routing policy when the route is advertised. That is, you can specify which part of the route is triggered.
  • the SPE receives the routing information sent by the first neighbor, and then filters the routing information through the input policy machine for one round of filtering.
  • the filtered routing information is saved to the local device. When it is about to be released, it will be saved to the local routing information to be advertised and then optimized according to the routing policy. For example, route aggregation and condition matching array selection, specify which part of the route to be advertised, and finally The routing information after the array selection is distributed to the second neighbor through the output policy machine. For example, the first neighbor sends a total of 10000 routes.
  • the 1000 routes are saved to the local storage.
  • the memory is saved in the memory.
  • the 1000 routes are read out, and the route is aggregated.
  • the number of the routes is 100.
  • the aggregated routes are matched and filtered. That is, the SPE can specify a part of the routes and publish them when the publishing conditions are met. For example, specify The 10 routes are advertised.
  • the 10 routes are 1 to 10
  • the output policy machine specifies 50 routes to be advertised.
  • the 50 routes are 1 to 50 respectively.
  • the SPE takes the initiative.
  • the number of routes triggered is 10, and the 10 routes are 1 to 10, respectively.
  • the other routes that are not actively triggered are advertised according to the original process. They do not need to wait for the condition to arrive, and are not subject to the trigger condition.
  • the SPE When the SPE sends the routing information to the second neighbor, the SPE supports the route aggregation.
  • the route can be advertised.
  • the routing information is sent to all the second neighbors that have been established.
  • the second neighbor established after the timeout of the route is advertised according to the process of issuing the normal route.
  • the SPE detects the first neighbor.
  • the route revocation message is sent to the second neighbor, and the route that has been actively triggered is revoked. If the revocation is not performed, the preferred route of the first neighbor still exists on the SPE side to avoid the traffic black hole.
  • the active four-pin routing can be performed only when all the first neighbors are disconnected or a predetermined threshold is reached;
  • the connection between different neighbors and the SPE is likely to have a sequential relationship.
  • the neighbor A first establishes a neighbor with the SPE to complete the route convergence and sends back the E0R message.
  • the neighbor B waits for a predetermined time T2 after receiving the E0R message of the neighbor B. And sending a routing message to the second neighbor.
  • the first neighbor of the SPE when the first neighbor of the SPE is more than one neighbor, there may be a neighbor supporting E0R and a neighbor not supporting E0R. Then, at the SPE end, in an address family, the E0R sent by all the neighbors that have established the connection and supports the E0R can be triggered to trigger the advertisement of the route. You can also set a reception in all or part of the address family of the SPE.
  • the threshold of the neighbor E0R message that is, in a certain address family, when the number of E0R messages sent by the neighbors reaches the set threshold, the route is triggered.
  • the two sides of the edge switching device are the UPE and the NPE respectively, and the first neighbor and the second neighbor are the UPE in the network, and the other is the NPE, that is, when the first neighbor is the UPE, and the second neighbor is the NPE. Conversely, when the first neighbor is an NPE, the second neighbor is a UPE.
  • the SPE firstly negotiates with the first neighbor to determine that the first neighbor returns an E0R message when the route convergence is complete, so that the SPE determines the route convergence of the first neighbor according to the received E0R message, when the first neighbor
  • the routing information is sent to the second neighbor, so that if the second neighbor receives the routing information and then sends the traffic to the SPE, the SPE can forward the traffic to the corresponding device.
  • the routing information to be sent is preferred, and the preferred routing information is sent to the second neighbor, which may be based on the local route convergence of the first neighbor.
  • the traffic sent by the second neighbor is better forwarded and controlled; when there are multiple second neighbors or the first neighbor, the routing information can be well controlled according to the preset threshold; and at the first When the neighbor disconnects, there is also a corresponding countermeasure.
  • a third embodiment of an edge switching device includes:
  • the determining module 301 is configured to determine whether the first neighbor has completed route convergence.
  • the routing information sending module 302 is configured to send routing information to the second neighbor when the determining module 301 determines that the first neighbor has completed route convergence.
  • the first neighbor and the second neighbor are UPEs in the network, and the other is an NPE.
  • the determining module 301 includes:
  • the storage unit 301 a is configured to save the number of routes, where the number of routes is the number of routes sent by the edge neighbor received by the edge switching device before the edge switching device restarts;
  • the receiving unit 301 b is configured to receive the routing information sent by the first neighbor after the edge switching device restarts;
  • a statistical unit 301 c is configured to count the number of routes received by the receiving unit
  • the determining unit 301 d is configured to compare the number of routes pre-stored by the storage unit 301 a with the number of routes counted by the statistical unit 301 c, and determine whether the ratio of the number of pre-stored routes to the number of statistical routes reaches a preset value.
  • the ratio of the pre-stored routes is the number of routes sent by the first neighbor that are pre-stored locally before the edge switching device restarts.
  • the routing information sending module 302 is specifically configured to:
  • the routing information is sent to the second neighbor after the preset time T3, wherein the support notification message indicates that the support is completed in each address family.
  • the initial update it has the ability to return a notification message, that is, the first neighbor completes the initial update in each address family, sends an update message to the SPE, and then returns the notification message;
  • the timing starts after the end of the time T1, and the routing information is sent to the second neighbor after the preset time T4, wherein the notification message is supported.
  • the support notification message sent by the first neighbor is not received, after the preset time T2 Sending routing information to the second neighbor, the support notification message is capable of returning a notification message after indicating that each address family completes the initial update;
  • the preset times T1, ⁇ 2, ⁇ 3, ⁇ 4 may be the same time, or different times may be set according to requirements, and the timer 2, the timer 3, and the timer 4 may be the same timer, or may be respectively Set different timers.
  • the routing information sending module 302 includes:
  • the route optimization array selection unit 302a is configured to optimize the route information to be sent according to a preset routing policy
  • the sending unit 302b is configured to send, to the second neighbor, a route that is optimized by the route optimization matrix selection unit;
  • the routing policy is specifically:
  • IGP Inter-Gateway Protocol
  • the above routing strategy may select one of the policies for optimal filtering of routing information.
  • the two sides of the edge switching device are the UPE and the NPE respectively, and the first neighbor and the second neighbor are the UPE in the network, and the other is the NPE, that is, when the first neighbor is the UPE, and the second neighbor is the NPE. Conversely, when the first neighbor is an NPE, the second neighbor is a UPE.
  • the first neighbor sends an E0R message
  • the SPE completes the route convergence judgment, so as to determine whether the first neighbor has completed the convergence task of triggering the route advertisement condition, and if it is determined that the first neighbor has completed the route convergence,
  • the second neighbor sends routing information, such that if After receiving the routing information, the second neighbor sends the traffic to the SPE.
  • the SPE can forward the traffic to the corresponding device to avoid blackholes.
  • a fourth embodiment of an edge switching device includes:
  • the session connection message sending module 401 is configured to send a session connection message to the first neighbor, where the session connection message includes an extension field that requires the first neighbor to return an announcement message after each address family completes the initial update, and the SPE waits for the notification message.
  • the determining module 402 is configured to determine whether the first neighbor has completed the preset route convergence value, and the routing information sending module 403 is configured to: when the determining module 402 determines that the first neighbor has completed the route convergence, send the routing information to the second neighbor;
  • the determining module 402 includes:
  • the first determining unit 402a is configured to determine whether a support notification message sent by the first neighbor is received, and the message is capable of returning a notification message after the initial update is completed in each address family, that is, the first neighbor is in each An address family completes the initial update, sends an update message to the SPE, and then returns a notification message;
  • the second determining unit 402b is configured to, at the first determining unit 402a, determine to receive the support notification message sent by the first neighbor, where the message indicates that it is capable of returning a notification message after each address family completes the initial update. And determining whether the notification message sent by the first neighbor is received within the time T1 waiting for the notification message;
  • the routing information sending module 403 is specifically configured to:
  • the message is to indicate that the support notification message is returned after each address family completes the initial update, and then starts timing after receiving the notification message.
  • the timing starts after the end of the time T1, and the routing information is sent to the second neighbor after the preset time T4;
  • the routing information is sent to the second neighbor after the preset time T2, and the support notification message indicates that the first neighbor supports returning after each address family completes the initial update.
  • a notification message that is, the first neighbor is in each address family In the initial update, after sending an update message to the SPE, return to the notification message;
  • the preset times T1, ⁇ 2, ⁇ 3, ⁇ 4 may be the same time, or different times may be set according to requirements, and the timer 2, the timer 3, and the timer 4 may be the same timer, or may be respectively Set different timers.
  • the routing information sending module 403 includes:
  • the route optimization array unit 403a is configured to optimize the route information to be sent according to a preset routing policy
  • a sending unit 403b configured to send, to the second neighbor, a route that is optimized by the route optimization matrix selection unit;
  • the routing policy is specifically:
  • IGP Inter-Gateway Protocol
  • the above routing strategy may select one of the policies for optimal filtering of routing information.
  • the two sides of the edge switching device are the UPE and the NPE respectively, and the first neighbor and the second neighbor are the UPE in the network, and the other is the NPE, that is, when the first neighbor is the UPE, and the second neighbor is the NPE. Conversely, when the first neighbor is an NPE, the second neighbor is a UPE.
  • the SPE first negotiates with the first neighbor, so that the first neighbor returns a notification message when the route convergence is completed, and the SPE determines the route convergence of the first neighbor according to the received notification message, when the first neighbor When the convergence of the preset route convergence value is completed, the routing information is sent to the second neighbor. Then, if the second neighbor receives the routing information, the traffic is sent to the SPE.
  • the SPE can forward traffic to the corresponding device to avoid traffic black holes.
  • a fifth embodiment of a route convergence system in this embodiment includes:
  • the first neighbor 502 is configured to send a detailed route to the SPE, and receive a session connection message sent by the SPE, where the session connection message carries an extension field, where the extension field indicates that the edge switching device 501 requests the first neighbor 502 to complete the initial in each address family.
  • the notification message is returned, that is, the first neighbor 501 completes the initial update in each address family, sends an update message to the SPE, and then returns the notification message; if the extension field can be parsed, the support notification message is sent to the SPE.
  • the support notification message indicates that the first neighbor has the ability to return a notification message after each address family completes the initial update.
  • the two sides of the edge switching device are the UPE and the NPE respectively, and the first neighbor and the second neighbor are the UPE in the network, and the other is the NPE, that is, when the first neighbor is the UPE, and the second neighbor is the NPE. Conversely, when the first neighbor is an NPE, the second neighbor is a UPE.
  • the first neighbor sends an E0R message, and the SPE completes the route convergence judgment, so as to determine whether the first neighbor has completed the convergence task of triggering the route advertisement condition, and if it is determined that the first neighbor has completed the route convergence,
  • the second neighbor sends the routing information. If the second neighbor receives the routing information and sends the traffic to the SPE, the SPE can forward the traffic to the corresponding device to avoid blackholes.
  • the program can be stored in a computer readable storage medium.
  • the storage medium can include: Read-only memory (ROM, Read On ly Memory), random access memory (RAM, Random Acces s Memory), disk or optical disk.

Abstract

The embodiments of the present invention disclose a method for route convergence, and also provide a corresponding system and edge switch device. In the technical solution of the present invention, the edge switch device judges whether a first neighbor has completed the route convergence or not, then determines whether the requirement for triggering route distribution is met or not, and sends route information to a second neighbor if the requirement is met. A user-end edge device and a network-end edge device are respectively located on each side of the edge switch device, wherein either of the first neighbor and the second neighbor is the user-end edge device and the other one is the network-end edge device. Then, when the second neighbor transmits traffic flow to the edge switch device after receiving the route information, the edge switch device can forward the traffic flow to the corresponding device, so that the generation of a traffic black hole can be avoided.

Description

一种路由收敛方法、 ***以及边缘交换设备  Route convergence method, system and edge switching device
本申请要求于 2010 年 10 月 29 日提交中国专利局、 申请号为 201010529030. 3、发明名称为"一种路由收敛方法、 ***以及边缘交换设备" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域 This application claims the priority of the Chinese Patent Application entitled "A Route Convergence Method, System and Edge Switching Device" submitted by the Chinese Patent Office on October 29, 2010, with the application number of 201010529030. The citations are incorporated herein by reference. Technical field
本发明涉及计算机网络技术领域, 具体涉及一种路由收敛方法、 *** 以及边缘交换设备。 背景技术  The present invention relates to the field of computer network technologies, and in particular, to a route convergence method, system, and edge switching device. Background technique
边界网关协议(BGP , Border Ga teway Protoco l )是运营商在虚拟专 用网 (VPN , Vi r tua l Pr iva te Network ) 边界部署的必要协议, 通常运行 BGP协议的路由器均作为边缘设备(PE , Prov i der Edge )。 PE可分为边缘 交换设备(SPE , Swi tch PE ), 用户侧边缘设备(UPE , User-end PE )和网 络侧边缘设备(NPE , Network PE )0 SPE的两侧分别是 UPE和 NPE。 UPE处 于 VPN的下层, NPE处于 VPN的上层, SPE处于两者之间, 是两者的中间联 系层和过渡层, 主要用于保存 NPE的路由信息, 然后将 UPE发送的流量转 发到各个不同的路由, 起到路由承上启下的作用。 当 SPE 出现故障时, 已 有的 VPN保护手段能保证毫秒级切换, 切换到另一个备用的 SPE或者切换 到另一条保护链路上。 当 SPE故障恢复时, UPE和 NPE本地的路由表需要重 新建立, 路由表重新建立的过程叫路由收敛。 SPE两侧的 UPE和 NPE的路 由收敛不一致, 例如: 一般来说, 汇聚侧的 NPE 因为路由数量巨大, 收敛 速度较慢, 接入侧的 UPE因为路由数量较少, 收敛速度较快。 因为 UPE侧 收敛速度快, SPE在接收到 NPE发送的明细路由时, UPE已经收敛好了, SPE 接收到 NPE发送的一部分明细路由时, 可能已经向 UPE侧发布了一些关键 路由, 关键路由是指预先设定的能够引导关键业务的路由, 例如默认路由 和汇聚路由, UPE收到这些关键路由后,便把默认路由或者汇聚路由对应的 网段的流量都发送给 SPE , 而这时, NPE侧的收敛还没有完成, SPE只收到 NPE发送的部分明细路由,可能没有关键路由或者汇聚路由对应的网段流量 的所有明细路由, 只能丟弃该流量, 从而引起流量黑洞。 Border Gateway (BGP) is a necessary protocol for operators to deploy on the boundary of a virtual private network (VPN). The routers that run BGP are used as edge devices (PEs). Prov i der Edge ). PE can be classified into an edge switching device (SPE, Swi tch PE), 0 SPE both side edges of a user equipment (UPE, User-end PE) and the network edge device (NPE, Network PE) are UPE or NPE. The UPE is in the lower layer of the VPN. The NPE is in the upper layer of the VPN. The SPE is in the middle of the network. The SPE is in the middle of the link layer and the transition layer. The NPE is used to store the routing information of the NPE, and then forwards the traffic sent by the UPE to different interfaces. Routing, which plays a role in routing. When the SPE fails, the existing VPN protection can guarantee millisecond switching, switch to another standby SPE or switch to another protection link. When the SPE is faulty, the local routing table of the UPE and the NPE needs to be re-established. The process of re-establishing the routing table is called route convergence. The route convergence between the UPE and the NPE on the SPE is inconsistent. For example, the NPE on the aggregation side has a slow convergence rate because of the large number of routes. The UPE on the access side has a faster convergence rate because the number of routes is smaller. Because the convergence of the UPE is fast, the UPE has already converged when the SPE receives the detailed route sent by the NPE. When the SPE receives a part of the detailed route sent by the NPE, the SPE may have issued some key routes to the UPE. The critical route refers to Pre-configured routes that can guide critical services, such as default routes and aggregation routes. After receiving these critical routes, the UPE sends the traffic of the network segment corresponding to the default route or the aggregation route to the SPE. At this time, the NPE side The convergence has not been completed yet. The SPE only receives some detailed routes sent by the NPE. There may be no network traffic corresponding to the critical route or the aggregation route. All the detailed routes can only discard this traffic, causing traffic black holes.
BGP协议的重启会导致对等体关系重新建立和流量转发中断,此时一种 能避免流量转发中断的方法是平滑重启 (GR, Graceful Restart )。 具备 GR 功能的设备叫 GR重启设备 (GR Restarter ), 与 GR Restarter相邻的设备 叫 GR邻居(GR Helper )。 GR Helper本身必须是具备 GR能力的, 这样才能 协助 GR Restarter进行 GR。  The restart of the BGP protocol will result in the re-establishment of the peer relationship and the interruption of the traffic forwarding. In this case, a method for avoiding traffic forwarding interruption is Graceful Restart (GR). The device with the GR function is called the GR Restarter. The device adjacent to the GR Restarter is called the GR Helper. The GR Helper itself must be GR-capable to assist the GR Restarter in GR.
BGP协议中的打开(OPEN)消息用于一个路由设备建立和另一个路由设 备的邻居关系。 BGP中的路由设备是否具备 GR能力, 主要体现在路由设备 发送的 BGP 的 Open 消息扩展字段中定义的类型长度值 ( TLV , Type-Length-Value), 该扩展字段中有一个长度是 4 比特的重启标志位 (Restart Flags ), 其中使用 1比特, 剩余的 3比特是预留的。  An OPEN message in the BGP protocol is used for a routing device to establish a neighbor relationship with another routing device. Whether the routing device in BGP has the GR capability, which is mainly represented by the type length value (TLV, Type-Length-Value) defined in the BGP Open Message Extension field sent by the routing device. The extension field has a length of 4 bits. Restart Flags, where 1 bit is used, and the remaining 3 bits are reserved.
在 BGP会话建立时, 路由设备间协商 GR能力, 当 GR Helper检查到 GR Restarter发生重启时, 不删除和 GR Restarter相关的路由和转发表项, 而是等待重建 BGP 连接, 并且定时器开始计时。 在定时器超时前, GR Restarter和 GR Helper重新建立连接, 并完成 BGP路由更新。 这样既可以 保证流量转发不中断, 也可以让 BGP协议的震荡仅限于和 GR Restarter设 备相连的邻居之间, 不会扩散到整个路由域。  When a BGP session is established, the routing device negotiates the GR capability. When the GR Helper detects that the GR Restarter is restarted, the GR Restarter does not delete the routing and forwarding entries related to the GR Restarter. Instead, it waits for the BGP connection to be reestablished, and the timer starts timing. Before the timer expires, the GR Restarter and GR Helper re-establish the connection and complete the BGP route update. In this way, the traffic forwarding is not interrupted, and the BGP flapping is limited to the neighbors connected to the GR Restarter device and does not spread to the entire routing domain.
在现有技术中, 针对流量黑洞, 可以利用条件默认路由来部分解决流 量黑洞。 SPE如果检测到本地存在路由 A或路由 B或路由 C或路由 D, 或者 路由 A和路由 B和路由 C和路由 D时, 发布默认路由给 UPE, UPE收到默认 路由后,便把所有网段的流量发送给 SPE, 这样 SPE就能将 UPE发送的流量 按路由 A或 B或 C或 D转发到相应的设备, 其余流量则会丟弃; 即如果本 地路由表中存在满足 "或"、 "与" 条件判断的路由, 则向指定的邻居发布 默认路由。  In the prior art, for traffic black holes, conditional default routes can be used to partially resolve traffic black holes. If the SPE detects the local route A or route B or the route C or the route D, or the route A and the route B and the route C and the route D, the SPE advertises the default route to the UPE. After receiving the default route, the UPE takes all the network segments. The traffic is sent to the SPE, so that the SPE can forward the traffic sent by the UPE to the corresponding device according to the route A or B or C or D, and the rest of the traffic will be discarded; that is, if the local routing table exists to satisfy the "or", " With the conditional route, the default route is issued to the specified neighbor.
上述现有技术中通过检测本地是否存在预先设定的路由, 若存在, 则 发送默认路由给 SPE, 这种方法能解决预先设置的路由的流量黑洞,但还是 不能很好地解决流量黑洞问题。 发明内容  In the above prior art, the presence of a preset route is detected by the local device. If yes, the default route is sent to the SPE. This method can solve the traffic black hole of the preset route, but the traffic black hole problem cannot be solved well. Summary of the invention
本发明实施例提供一种路由收敛方法、 ***以及交换边缘设备。 一种路由收敛方法, 包括: Embodiments of the present invention provide a route convergence method, system, and switching edge device. A route convergence method includes:
边缘交换设备判断第一邻居是否已经完成路由收敛;  The edge switching device determines whether the first neighbor has completed route convergence.
若是, 则向第二邻居发送路由信息, 边缘交换设备的两侧分别为用户 侧边缘设备和网络侧边缘设备, 第一邻居和第二邻居中的一个是用户侧边 缘设备而另一个是网络侧边缘设备。  If yes, the routing information is sent to the second neighbor. The two sides of the edge switching device are the user edge device and the network edge device, and one of the first neighbor and the second neighbor is the user edge device and the other is the network side. Edge device.
一种边缘交换设备, 包括:  An edge switching device, including:
判断模块, 用于判断第一邻居是否已经完成路由收敛;  a determining module, configured to determine whether the first neighbor has completed route convergence;
路由信息发送模块, 用于当判断模块判断第一邻居已经完成路由收敛 时, 向第二邻居发送路由信息, 边缘交换设备的两侧分别为用户侧边缘设 备和网络侧边缘设备, 第一邻居和第二邻居中的一个是用户侧边缘设备而 另一个是网络侧边缘设备。  The routing information sending module is configured to: when the determining module determines that the first neighbor has completed the route convergence, sends the routing information to the second neighbor, where the two sides of the edge switching device are the user edge device and the network edge device, the first neighbor and One of the second neighbors is a user side edge device and the other is a network side edge device.
一种路由收敛***, 包括:  A route convergence system, including:
上述边缘交换设备和第一邻居;  The edge switching device and the first neighbor;
第一邻居用于, 向边缘交换设备发送明细路由; 接收边缘交换设备发 送的会话连接消息, 该会话连接消息携带扩展字段, 该扩展字段表示边缘 交换设备要求第一邻居在每一个地址族完成初始的更新后返回通报消息; 如果第一邻居能够对扩展字段进行解析, 则向边缘交换设备发送支持通报 消息, 该支持通报消息为表明第一邻居在每一个地址族完成初始的更新后 有能力返回通报消息。  The first neighbor is configured to send a detail route to the edge switching device, and receive a session connection message sent by the edge switching device, where the session connection message carries an extension field, where the extension field indicates that the edge switching device requires the first neighbor to complete the initial in each address family. Returning the notification message after the update; if the first neighbor can parse the extension field, send a support notification message to the edge switching device, the support notification message indicating that the first neighbor has the ability to return after each address family completes the initial update. Notification message.
本发明实施例中, 交换边缘设备判断第一邻居是否完成路由收敛, 从 而确定触发路由发布的条件是否已经具备, 如果已经具备, 则向第二邻居 发送路由信息, 这样, 如果第二邻居收到路由信息后, 将流量发送到交换 边缘设备时, 交换边缘设备就可以将流量转发到相应的设备, 从而避免产 生流量黑洞。 附图说明  In the embodiment of the present invention, the switching edge device determines whether the first neighbor completes the route convergence, so as to determine whether the condition for triggering the route advertisement is already available, and if yes, sends the routing information to the second neighbor, so that if the second neighbor receives After routing information, when the traffic is sent to the switching edge device, the switching edge device can forward the traffic to the corresponding device, thus avoiding traffic black holes. DRAWINGS
图 1是本发明实施例路由收敛方法流程示意图;  1 is a schematic flowchart of a route convergence method according to an embodiment of the present invention;
图 2是本发明实施例路由收敛方法流程示意图;  2 is a schematic flowchart of a route convergence method according to an embodiment of the present invention;
图 3A是本发明实施例交换边缘设备的简化示意图;  3A is a simplified schematic diagram of a switching edge device according to an embodiment of the present invention;
图 3B是本发明实施例交换边缘设备的简化示意图; 图 4A是本发明实施例交换边缘设备的简化示意图; 3B is a simplified schematic diagram of a switching edge device according to an embodiment of the present invention; 4A is a simplified schematic diagram of a switching edge device according to an embodiment of the present invention;
图 4B是本发明实施例交换边缘设备的简化示意图;  4B is a simplified schematic diagram of a switching edge device according to an embodiment of the present invention;
图 5是本发明实施例路由收敛***的简化示意图。 具体实施方式  FIG. 5 is a simplified schematic diagram of a route convergence system according to an embodiment of the present invention. detailed description
本发明实施例提供一种路由收敛方法, 本发明实施例还提供相应的系 统和交换边缘设备。 以下分别进行详细说明。  The embodiment of the invention provides a route convergence method. The embodiment of the invention further provides a corresponding system and a switching edge device. The details are described below separately.
实施例中第一邻居和第二邻居分别为 SPE两侧的邻居。  In the embodiment, the first neighbor and the second neighbor are neighbors on both sides of the SPE.
请参阅图 1 , 本发明实施例中一种路由收敛方法第一实施例包括: Referring to FIG. 1 , a first embodiment of a route convergence method in an embodiment of the present invention includes:
1 01、 判断第一邻居是否已经完成路由收敛; 1 01. Determine whether the first neighbor has completed route convergence.
SPE判断第一邻居是否已经完成路由收敛, 当判断得出第一邻居完成路 由收敛时, 执行步骤 1 02 ;  The SPE determines whether the first neighbor has completed the route convergence. When it is determined that the first neighbor completes the route convergence, step S02 is performed;
举例来说, 具体的判断方法可以是:  For example, the specific judgment method can be:
SPE重启后接收第一邻居发送的路由信息, 并统计路由的数量; 根据预先保存的或者 SPE重启前由第一邻居发送的路由的数量与统计 的路由的数量进行比较, 判断统计的路由的数量与预先保存的或者 SPE重启 前由第一邻居发送的路由的数量的比值是否达到预先设置的比值。  After the SPE restarts, it receives the routing information sent by the first neighbor and counts the number of routes. The number of routes that are sent by the first neighbor before the SPE restarts is compared with the number of the statistics. Whether the ratio of the number of routes sent by the first neighbor before the pre-save or SPE restart reaches a preset ratio.
判断第一邻居是否已经完成路由收敛的方法很多, 以上只是本实施例 中例举的一种方法, 不应视为对本发明的限制。  There are many methods for determining whether the first neighbor has completed route convergence. The above is only one method exemplified in the embodiment, and should not be construed as limiting the present invention.
1 02、 向第二邻居发送路由信息;  1 02. Send routing information to the second neighbor.
当步骤 1 01判断得出第一邻居完成路由收敛时, 触发 SPE向第二邻居发 送路由信息。  When the first neighbor determines that the first neighbor completes the route convergence, the SPE is triggered to send routing information to the second neighbor.
在本实施例中, 边缘交换设备的两侧分别为 UPE和 NPE , 第一邻居和第 二邻居在网络中一个是 UPE,另一个是 NPE , 即第一邻居为 UPE时, 第二邻居 为 NPE , 反之, 第一邻居为 NPE时, 第二邻居为 UPE。  In this embodiment, the two sides of the edge switching device are the UPE and the NPE respectively, and the first neighbor and the second neighbor are the UPE in the network, and the other is the NPE, that is, when the first neighbor is the UPE, and the second neighbor is the NPE. Conversely, when the first neighbor is an NPE, the second neighbor is a UPE.
本实施例中, SPE判断第一邻居是否完成路由收敛, 从而确定触发路由 发布的条件是否已经具备, 如果已经具备, 则向第二邻居发送路由信息, 这样, 如果第二邻居收到路由信息后, 将流量发送到 SPE时, SPE就可以将 流量转发到相应的设备, 从而避免产生流量黑洞。  In this embodiment, the SPE determines whether the first neighbor completes the route convergence, and determines whether the condition for triggering the route advertisement is already available. If yes, the routing information is sent to the second neighbor, so that if the second neighbor receives the routing information, When the traffic is sent to the SPE, the SPE can forward the traffic to the corresponding device to avoid blackholes.
请参阅图 2 , 本发明实施例中一种路由收敛方法第二实施例包括: 201、 SPE向第一邻居发送会话连接消息; Referring to FIG. 2, a second embodiment of a route convergence method according to an embodiment of the present invention includes: 201. The SPE sends a session connection message to the first neighbor.
SPE向第一邻居发送会话连接消息, 该会话连接消息包括扩展字段, 该 扩展字段表明要求第一邻居在每一个地址族完成初始的更新后返回通报消 息, 即第一邻居在每一个地址族完成初始的更新, 发送更新消息给 SPE后, 再返回通报消息。 举例来说, 该扩展字段可以如下所示:  The SPE sends a session connection message to the first neighbor, where the session connection message includes an extension field, which indicates that the first neighbor is required to return a notification message after each address family completes the initial update, that is, the first neighbor completes in each address family. The initial update, after sending an update message to the SPE, returns to the notification message. For example, the extension field can look like this:
SPE利用 GR扩展的 TLV中的重启标签字段的第 2比特, 来说明 SPE希望第 一邻居在每一个地址族完成初始的更新后, 总是返回通 消息, 例如路由 信息库结束(End-of-RIB , E0R ) 消息, 即 SPE需要能够识别 GR的 TLV ; TLV 中的重启标签字段结构如表 1所示: The SPE uses the second bit of the Restart Label field in the GR extended TLV to indicate that the SPE wants the first neighbor to always return a message after the initial update is completed for each address family. For example, the routing information database ends (End-of- RIB, E0R) message, that is, the SPE needs to be able to identify the TLV of the GR; the structure of the restart tag field in the TLV is as shown in Table 1:
Figure imgf000007_0001
Figure imgf000007_0003
Figure imgf000007_0001
Figure imgf000007_0003
在表 1中, 示意了 TLV中的重启标签字段结构, 重启标签字段长度为 4个 比特, 从比特 0到比特 3 , 其中比特 0位已经被使用了, 比特 1至比特 3是保留 的比特位, 我们可以利用其中的第二比特, 也就是比特 1位来作为协商的依 据, 如表 2所示: In Table 1, the structure of the restart tag field in the TLV is illustrated. The length of the restart tag field is 4 bits, from bit 0 to bit 3, where bit 0 has been used, and bit 1 to bit 3 are reserved bits. , we can use the second bit, which is the bit 1 bit as the basis for negotiation, as shown in Table 2:
Figure imgf000007_0002
Figure imgf000007_0004
Figure imgf000007_0002
Figure imgf000007_0004
在表 2中, 示意了利用了第二比特后的 TLV中的重启标签字段结构, 第 一邻居可以支持 GR; 或者第一邻居可以不支持 GR , 但是需要能识别 TLV , 并 且不能忽略第二比特的 E比特。 也就是说, 第一邻居只要有能力发送 E0R消 息便可以去解析 E比特, 如果没有发送 E0R消息的能力则忽略 E比特;  In Table 2, the restart tag field structure in the TLV after the second bit is utilized, the first neighbor may support the GR; or the first neighbor may not support the GR, but needs to be able to identify the TLV, and cannot ignore the second bit. E bit. That is to say, the first neighbor can parse the E bit as long as it has the ability to send the E0R message, and ignore the E bit if the E0R message is not sent.
再举例来说, SPE还可以利用 BGP 0PE财艮文中新增一种 TLV , 通过协商 该扩展能力字段, 或者利用 BGP报文中其他的预留字段做协商的依据等等, 此处不做展开说明。  For example, the SPE can also use the BGP 0PE to add a TLV, negotiate the extended capability field, or use other reserved fields in the BGP packet to negotiate the basis. Description.
202、 判断是否收到第一邻居返回的支持通报消息;  202. Determine whether a support notification message returned by the first neighbor is received.
SPE判断是否收到第一邻居发送的支持通报消息, 该消息表明第一邻居 在每个地址族完成初始的更新后有能力返回通报消息, 即第一邻居在每一 个地址族完成初始的更新, 发送更新消息给 SPE后, 再返回通报消息; 以第一邻居接收的会话连接消息利用携带的 TLV中扩展的比特 1位为 E 比特为例, 第一邻居接收 SPE发送的会话连接消息后, 如果第一邻居能够解 析会话连接消息的 E比特, 即有能力返回一个支持通报消息, 则发送一个支 持通报消息给 SPE , 通报消息可以是 E0R消息或者其他消息; The SPE determines whether the support notification message sent by the first neighbor is received, and the message indicates that the first neighbor has the ability to return the notification message after each address family completes the initial update, that is, the first neighbor is in each The address family completes the initial update, sends an update message to the SPE, and then returns a notification message. The session connection message received by the first neighbor uses the extended bit 1 of the carried TLV as the E bit as an example, and the first neighbor receives the SPE. After the session connection message is sent, if the first neighbor can resolve the E bit of the session connection message, that is, the ability to return a support notification message, a support notification message is sent to the SPE, and the notification message may be an E0R message or other message;
以通报消息为 E0R消息为例, 第一邻居接收 SPE发送的会话连接消息后, 如果有解析会话连接消息携带的 E比特的能力, 即有 E0R能力, 则发送支持 E0R的消息给 SPE; 如果不能解析会话连接消息携带的的 E比特, 即没有 E0R 能力, 则不会发送支持 E0R的消息给 SPE;  Taking the notification message as the E0R message as an example, after the first neighbor receives the session connection message sent by the SPE, if there is the capability of parsing the E bit carried in the session connection message, that is, the E0R capability is available, the message supporting the E0R is sent to the SPE; Parsing the E bit carried in the session connection message, that is, if there is no E0R capability, the message supporting the E0R will not be sent to the SPE;
举例来说, 支持通报消息可以是携带 E比特的消息, 也可以是两端协商 好的携带其他标识的消息;  For example, the support notification message may be a message carrying E bits, or a message carrying other identifiers negotiated at both ends;
SPE向第一邻居发送携带扩展字段的会话连接消息, 如果第一邻居返回 支持通报消息, 该消息表明第一邻居在每个地址族完成初始的更新后有能 力返回通报消息, 说明 SPE和第一邻居协商成功; 如果第一邻居没有返回支 持通报消息, 则说明 SPE和第一邻居协商不成功;  The SPE sends a session connection message carrying the extended field to the first neighbor. If the first neighbor returns a support notification message, the message indicates that the first neighbor has the ability to return a notification message after each address family completes the initial update, indicating that the SPE and the first The neighbor negotiation succeeds. If the first neighbor does not return the support notification message, the SPE and the first neighbor negotiation are unsuccessful.
203、 如果协商不成功, 定时器 2开始计时;  203. If the negotiation is unsuccessful, the timer 2 starts to be timed;
如果 SPE没有收到第一邻居发送的支持通报消息, 即协商不成功, 则定 时器 2开始计时;  If the SPE does not receive the support notification message sent by the first neighbor, that is, the negotiation is unsuccessful, the timer 2 starts timing;
204、 判断定时器 2是否超时;  204. Determine whether the timer 2 times out.
205、 向第二邻居发送路由信息;  205. Send routing information to the second neighbor.
如果定时器 2超时, 即在等待预定的安全时间 T2后, 向第二邻居发送路 由信息;  If the timer 2 times out, that is, after waiting for the predetermined security time T2, the routing information is sent to the second neighbor;
206、 如果协商成功, 定时器 1开始计时;  206. If the negotiation is successful, the timer 1 starts to be timed;
如果 SPE收到第一邻居发送的支持通报消息, 即协商成功, 则定时器 1 开始计时;  If the SPE receives the support notification message sent by the first neighbor, that is, the negotiation succeeds, the timer 1 starts to count;
207、 判断是否收到第一邻居发送的通报消息;  207. Determine whether the notification message sent by the first neighbor is received.
BGP 采用地址族(Addres s Fami ly ) 来区分不同的网络层协议(例如 对 IPv6、 VPN的扩展等);  BGP uses the address family (Addres s Family) to distinguish between different network layer protocols (for example, extensions to IPv6, VPN, etc.);
第一邻居与 SPE协商成功后, 在每一个地址族完成初始的更新 UPDATE 后, 即在发送相应地址族的更新消息给 SPE后, 再发送一个通报消息给 SPE , 举例来说, 该通报消息可以是 E0R消息; After the first neighbor negotiates successfully with the SPE, the initial update UPDATE is completed in each address family. After the update message of the corresponding address family is sent to the SPE, a notification message is sent to the SPE. For example, the notification message may be an E0R message;
208、 判断定时器 1是否超时;  208. Determine whether the timer 1 times out.
如果 SPE没有收到第一邻居发送的通报消息, 再判断定时器 1是否超时; If the SPE does not receive the notification message sent by the first neighbor, it is determined whether the timer 1 times out.
209、 定时器 4开始计时; 209, timer 4 starts timing;
在定时器 1超时后, 即经过 T1时间后, 如果 SPE还没有收到第一邻居发 送的通报消息, 即不确定第一邻居是否已经完成路由收敛, 但是已经超时, 则定时器 4开始计时;  After the timer 1 expires, that is, after the T1 time, if the SPE has not received the notification message sent by the first neighbor, it is not sure whether the first neighbor has completed the route convergence, but has timed out, the timer 4 starts counting;
210、 判断定时器 4是否超时;  210. Determine whether the timer 4 times out.
211、 向第二邻居发送路由信息;  211. Send routing information to the second neighbor.
如果定时器 4超时, 则向第二邻居发送路由信息, 即等待一个安全的时 间 T4后向第二邻居发送路由信息;  If the timer 4 times out, the routing information is sent to the second neighbor, that is, after waiting for a secure time T4, the routing information is sent to the second neighbor.
212、 判断定时器 1是否超时;  212. Determine whether the timer 1 times out.
如果 SPE收到第一邻居发送的相应地址族的通报消息, 再判断定时器 1 是否超时;  If the SPE receives the notification message of the corresponding address family sent by the first neighbor, it determines whether the timer 1 times out.
213、 定时器 3开始计时;  213, timer 3 starts timing;
如果在定时器 1超时前, 如果 SPE收到第一邻居发送的相应地址族的通 消息, 则定时器 3开始计时;  If the SPE receives the communication message of the corresponding address family sent by the first neighbor before the timer 1 times out, the timer 3 starts counting.
215、 判断定时器 3是否超时;  215. Determine whether the timer 3 times out.
216、 向第二邻居发送路由信息;  216. Send routing information to the second neighbor.
如果定时器 3超时, 则向第二邻居发送路由信息, 即等待一个安全的时 间 T 3后向第二邻居发送路由信息。  If the timer 3 times out, the routing information is sent to the second neighbor, that is, after waiting for a secure time T3, the routing information is sent to the second neighbor.
预先设定的时间 Tl、 Τ2、 Τ3、 Τ4可以是相同的时间, 也可以根据需要 设定不同的时间, 定时器 2、 定时器 3以及定时器 4可以为同一个定时器, 也 可以为分别设置的不同的定时器。  The preset times T1, Τ2, Τ3, Τ4 may be the same time, or different times may be set according to requirements, and the timer 2, the timer 3, and the timer 4 may be the same timer, or may be respectively Set different timers.
举例来说, SPE向第二邻居发送的路由信息为经路由策略优化筛选后的 路由信息, 该路由策略为下述策略中的一种:  For example, the routing information sent by the SPE to the second neighbor is the routing information optimized by the routing policy, and the routing policy is one of the following policies:
a、 先对待发送的路由信息进行内部网关协议( IGP, Inter ior Ga teway Protocol ) 的迭代优选, 然后对迭代优选后的路由信息进行路由聚合, 再 对聚合后的路由信息进行条件匹配筛选; a. Iteratively prefers the routing information to be sent to the Inter-Gateway Protocol (IGP), and then performs route aggregation on the iteratively preferred routing information. Perform condition matching screening on the aggregated routing information;
b、 先对待发送的路由信息进行 IGP迭代优选, 然后对迭代优选后的路 由信息进行路由聚合;  b. Perform IGP iteration optimization on the routing information to be sent first, and then perform route aggregation on the iterative preferred routing information;
c、 先对待发送的路由信息进行 IGP迭代优选, 然后对迭代优选后的路 由信息进行条件匹配筛选;  c. Perform IGP iteration optimization on the routing information to be sent first, and then perform condition matching screening on the iterative preferred routing information;
d、 先对待发送的路由信息进行路由聚合, 再对聚合后的路由信息进行 条件匹配筛选;  d. Perform route aggregation on the routing information to be sent, and perform condition matching screening on the aggregated routing information.
e、 对待发送的路由信息进行 IGP迭代优选;  e. It is preferred to perform IGP iteration on the routing information to be sent;
f、 对待发送的路由信息进行路由聚合;  f. Route aggregation of the routing information to be sent;
g、 对待发送的路由信息进行条件匹配筛选;  g. Perform condition matching screening on the routing information to be sent;
以上路由策略可选择其中一种策略进行路由信息的优化筛选。 例如, SPE在路由发布时可以支持精细的路由策略, 即可以指定触发哪一部分路 由, 具体的: 首先, 接收第一邻居发送的路由信息, 将该路由信息经过输 入策略机进行一轮过滤, 然后将过滤后的路由信息保存到本地, 在即将发 布时, 将保存到本地待发布的路由信息再根据路由策略进行优化陣选, 例 如路由聚合和条件匹配陣选, 指定发布哪一部分路由, 最后将陣选后的路 由信息通过输出策略机发布到第二邻居。 例如, 第一邻居一共发送了 10000 条路由, 在经过输入策略机过滤后, 剩下 1000条路由, 将该 1000条路由保 存到本地存储器, 在触发路由发布的条件到达时, 将存储器中保存的 1000 条路由读取出来, 再进行路由聚合, 聚合后的路由为 100条, 再将聚合后的 路由进行条件匹配筛选, 即 SPE可以指定其中的一部分路由, 在发布条件满 足时进行发布; 例如指定了其中的 10条路由进行发布, 该 10条路由分别为 第 1至 10条, 输出策略机指定发布的路由有 50条, 该 50条路由分别为第 1至 50条, 那么此时, SPE主动触发的路由为 10条, 该 10条路由分别为第 1至 10 条, 而其余非主动触发的路由按照原有的流程发布, 无需等待条件到达, 不受触发条件的限制。  The above routing strategy may select one of the policies for optimal filtering of routing information. For example, the SPE can support a fine routing policy when the route is advertised. That is, you can specify which part of the route is triggered. Specifically, the SPE receives the routing information sent by the first neighbor, and then filters the routing information through the input policy machine for one round of filtering. The filtered routing information is saved to the local device. When it is about to be released, it will be saved to the local routing information to be advertised and then optimized according to the routing policy. For example, route aggregation and condition matching array selection, specify which part of the route to be advertised, and finally The routing information after the array selection is distributed to the second neighbor through the output policy machine. For example, the first neighbor sends a total of 10000 routes. After filtering by the input policy machine, there are 1000 routes left, and the 1000 routes are saved to the local storage. When the condition for triggering the route advertisement arrives, the memory is saved in the memory. The 1000 routes are read out, and the route is aggregated. The number of the routes is 100. Then, the aggregated routes are matched and filtered. That is, the SPE can specify a part of the routes and publish them when the publishing conditions are met. For example, specify The 10 routes are advertised. The 10 routes are 1 to 10, and the output policy machine specifies 50 routes to be advertised. The 50 routes are 1 to 50 respectively. Then, the SPE takes the initiative. The number of routes triggered is 10, and the 10 routes are 1 to 10, respectively. The other routes that are not actively triggered are advertised according to the original process. They do not need to wait for the condition to arrive, and are not subject to the trigger condition.
SPE在向第二邻居发送路由信息时, 支持路由聚合, 此时, 在路由聚合 时, 也能对路由的发布进行控制, 例如发布聚合路由或者发布聚合路由与 部分明细路由或者发布聚合路由与全部明细路由等。  When the SPE sends the routing information to the second neighbor, the SPE supports the route aggregation. In this case, the route can be advertised. For example, the advertised aggregate route or the advertised aggregate route and the partial detail route or the advertised route and all Detailed routing, etc.
当第二邻居有多个但是因为建立连接时间先后的问题, 在向第二邻居 发送路由信息时, 应向所有已经建立的第二邻居发送路由信息, 对于晚于 路由触发时间点后建立的第二邻居, 则按照正常路由发布的流程进行发布; 当 SPE检测到有第一邻居断开连接时, 发送路由撤销消息给第二邻居, 对已经主动触发的路由进行撤销; 如果不主动进行撤销, 则需要保证 SPE这 侧仍然存在第一邻居的优选路由, 以避免出现流量黑洞; 优选的, 当第一 邻居有多个时, 可以等待全部第一邻居断开或者达到一个预定的门限值时, 才进行主动 4款销路由; When there are multiple second neighbors but because of the problem of establishing connection time, in the second neighbor When the routing information is sent, the routing information is sent to all the second neighbors that have been established. The second neighbor established after the timeout of the route is advertised according to the process of issuing the normal route. When the SPE detects the first neighbor. When the connection is disconnected, the route revocation message is sent to the second neighbor, and the route that has been actively triggered is revoked. If the revocation is not performed, the preferred route of the first neighbor still exists on the SPE side to avoid the traffic black hole. Preferably, when there are multiple first neighbors, the active four-pin routing can be performed only when all the first neighbors are disconnected or a predetermined threshold is reached;
举例来说, 当 SPE的第一邻居多于一个邻居时, 不同邻居与 SPE建立连 接很可能有先后关系。 为了避免这种先后关系影响到收敛的判断, 可以在 SPE本地预设一个定时器 TO , 在 TO超时前接收邻居发送的支持 E0R的消息。 例如邻居 A先与 SPE建立邻居, 完成路由收敛并发回 E0R消息; 在 TO时间内, 邻居 B再与 SPE建立邻居, 则应该等到接收到邻居 B的 E0R消息后, 继续等待 一个预定的时间 T2后, 再向第二邻居发送路由消息。  For example, when the first neighbor of the SPE is more than one neighbor, the connection between different neighbors and the SPE is likely to have a sequential relationship. To prevent this sequence from affecting the convergence judgment, you can preset a timer TO in the SPE to receive the E0R message sent by the neighbor before the TO timeout. For example, the neighbor A first establishes a neighbor with the SPE to complete the route convergence and sends back the E0R message. After the neighbor B establishes a neighbor relationship with the SPE, the neighbor B waits for a predetermined time T2 after receiving the E0R message of the neighbor B. And sending a routing message to the second neighbor.
再举例来说, 当 SPE的第一邻居多于一个邻居时, 可能存在支持 E0R的 邻居和不支持 E0R的邻居。 那么在 SPE这端, 在某个地址族内, 可以等待收 到所有已建立连接并且支持 E0R的邻居发送的 E0R时才触发路由的发布; 也 可以在 SPE端所有或者部分地址族中设置一个接收邻居 E0R消息的门限, 即 在某个地址族内, 当收到的邻居发送的 E0R消息的数量达到设置的门限时, 则触发路由的发布。  For example, when the first neighbor of the SPE is more than one neighbor, there may be a neighbor supporting E0R and a neighbor not supporting E0R. Then, at the SPE end, in an address family, the E0R sent by all the neighbors that have established the connection and supports the E0R can be triggered to trigger the advertisement of the route. You can also set a reception in all or part of the address family of the SPE. The threshold of the neighbor E0R message, that is, in a certain address family, when the number of E0R messages sent by the neighbors reaches the set threshold, the route is triggered.
在本实施例中, 边缘交换设备的两侧分别为 UPE和 NPE , 第一邻居和第 二邻居在网络中一个是 UPE,另一个是 NPE , 即第一邻居为 UPE时, 第二邻居 为 NPE , 反之, 第一邻居为 NPE时, 第二邻居为 UPE。  In this embodiment, the two sides of the edge switching device are the UPE and the NPE respectively, and the first neighbor and the second neighbor are the UPE in the network, and the other is the NPE, that is, when the first neighbor is the UPE, and the second neighbor is the NPE. Conversely, when the first neighbor is an NPE, the second neighbor is a UPE.
本实施例中, SPE首先通过和第一邻居协商, 达成第一邻居在路由收敛 完成时返回 E0R消息, 从而 SPE根据接收的 E0R消息对第一邻居的路由收敛情 况进行判断, 当第一邻居的收敛完成预设的路由收敛值时, 再向第二邻居 发送路由信息, 这样,如果第二邻居收到路由信息后,将流量发送到 SPE时, SPE就可以将流量转发到相应的设备, 从而避免产生流量黑洞; 并且, 在向 第二邻居发送路由信息时, 再对待发送的路由信息进行优选, 将优选的路 由信息发送给第二邻居, 可以根据本地掌握的第一邻居的路由收敛情况, 对第二邻居发送的流量进行更好的转发和控制; 在第二邻居或者第一邻居 有多个时, 也能根据预先设置的门限值对路由信息进行很好的控制; 并且 在第一邻居断开连接时, 也有相应的应对策略。 In this embodiment, the SPE firstly negotiates with the first neighbor to determine that the first neighbor returns an E0R message when the route convergence is complete, so that the SPE determines the route convergence of the first neighbor according to the received E0R message, when the first neighbor When the convergence of the preset route convergence value is completed, the routing information is sent to the second neighbor, so that if the second neighbor receives the routing information and then sends the traffic to the SPE, the SPE can forward the traffic to the corresponding device. If the routing information is sent to the second neighbor, the routing information to be sent is preferred, and the preferred routing information is sent to the second neighbor, which may be based on the local route convergence of the first neighbor. The traffic sent by the second neighbor is better forwarded and controlled; when there are multiple second neighbors or the first neighbor, the routing information can be well controlled according to the preset threshold; and at the first When the neighbor disconnects, there is also a corresponding countermeasure.
请参阅图 3A、 图 3B , 本发明实施例中一种边缘交换设备第三实施例包 括:  Referring to FIG. 3A and FIG. 3B, a third embodiment of an edge switching device according to an embodiment of the present invention includes:
判断模块 301, 用于判断第一邻居是否已经完成路由收敛;  The determining module 301 is configured to determine whether the first neighbor has completed route convergence.
路由信息发送模块 302 , 用于当判断模块 301判断第一邻居已经完成路 由收敛时, 向第二邻居发送路由信息, 第一邻居和第二邻居在网络中一个 是 UPE,另一个是 NPE。  The routing information sending module 302 is configured to send routing information to the second neighbor when the determining module 301 determines that the first neighbor has completed route convergence. The first neighbor and the second neighbor are UPEs in the network, and the other is an NPE.
举例来说, 如图 3B , 判断模块 301包括:  For example, as shown in FIG. 3B, the determining module 301 includes:
存储单元 301 a , 用于保存路由的数量, 该路由的数量为在本边缘交换 设备重启前本边缘交换设备接收的由第一邻居发送的路由的数量;  The storage unit 301 a is configured to save the number of routes, where the number of routes is the number of routes sent by the edge neighbor received by the edge switching device before the edge switching device restarts;
接收单元 301 b , 用于在本边缘交换设备重启后接收第一邻居发送的路 由信息;  The receiving unit 301 b is configured to receive the routing information sent by the first neighbor after the edge switching device restarts;
统计单元 301 c , 用于统计接收单元接收的路由的数量;  a statistical unit 301 c is configured to count the number of routes received by the receiving unit;
判断单元 301 d , 用于根据存储单元 301 a预先保存的路由的数量与统计 单元 301 c统计的路由的数量进行比较, 判断预先保存的路由的数量与统计 的路由的数量的比值是否达到预先设置的比值, 预先保存的路由的数量为 本边缘交换设备重启前预先保存在本地的由第一邻居发送的路由的数量。  The determining unit 301 d is configured to compare the number of routes pre-stored by the storage unit 301 a with the number of routes counted by the statistical unit 301 c, and determine whether the ratio of the number of pre-stored routes to the number of statistical routes reaches a preset value. The ratio of the pre-stored routes is the number of routes sent by the first neighbor that are pre-stored locally before the edge switching device restarts.
路由信息发送模块 302具体用于:  The routing information sending module 302 is specifically configured to:
当在等待通报消息的时间 T1内收到第一邻居发送的支持通报消息后, 在预先设定的时间 T3后向第二邻居发送路由信息, 其中支持通报消息为表 明支持在每一个地址族完成初始的更新后有能力返回一个通报消息, 即第 一邻居在每一个地址族完成初始的更新, 发送更新消息给 SPE后, 再返回通 报消息;  After receiving the support notification message sent by the first neighbor within the time T1 waiting for the notification message, the routing information is sent to the second neighbor after the preset time T3, wherein the support notification message indicates that the support is completed in each address family. After the initial update, it has the ability to return a notification message, that is, the first neighbor completes the initial update in each address family, sends an update message to the SPE, and then returns the notification message;
当在等待通报消息的时间 T1内没有收到第一邻居发送的支持通报消 息, 则在时间 T1结束后开始计时, 在预先设定的时间 T4后向第二邻居发送 路由信息, 其中支持通报消息为表明支持在每一个地址族完成初始的更新 后有能力返回一个通 消息;  When the support notification message sent by the first neighbor is not received within the time T1 waiting for the notification message, the timing starts after the end of the time T1, and the routing information is sent to the second neighbor after the preset time T4, wherein the notification message is supported. To indicate support for returning a pass message after each address family completes the initial update;
当没有收到第一邻居发送的支持通报消息时, 在预先设定的时间 T2后 向第二邻居发送路由信息, 该支持通报消息为表明支持在每一个地址族完 成初始的更新后有能力返回一个通报消息; When the support notification message sent by the first neighbor is not received, after the preset time T2 Sending routing information to the second neighbor, the support notification message is capable of returning a notification message after indicating that each address family completes the initial update;
预先设定的时间 Tl、 Τ2、 Τ3、 Τ4可以是相同的时间, 也可以根据需要 设定不同的时间, 定时器 2、 定时器 3以及定时器 4可以为同一个定时器, 也 可以为分别设置的不同的定时器。  The preset times T1, Τ2, Τ3, Τ4 may be the same time, or different times may be set according to requirements, and the timer 2, the timer 3, and the timer 4 may be the same timer, or may be respectively Set different timers.
举例来说, 如图 3Β, 路由信息发送模块 302包括:  For example, as shown in FIG. 3A, the routing information sending module 302 includes:
路由优化陣选单元 302a , 用于根据预先设置的路由策略将待发送的路 由信息进行优化筛选;  The route optimization array selection unit 302a is configured to optimize the route information to be sent according to a preset routing policy;
发送单元 302b , 用于向第二邻居发送经路由优化陣选单元优化陣选后 的路由;  The sending unit 302b is configured to send, to the second neighbor, a route that is optimized by the route optimization matrix selection unit;
其中, 路由策略具体为:  The routing policy is specifically:
a、 先对待发送的路由信息进行内部网关协议( IGP, Inter ior Ga teway Protocol ) 的迭代优选, 然后对迭代优选后的路由信息进行路由聚合, 再 对聚合后的路由信息进行条件匹配筛选;  a. Iteratively optimizes the routing information of the Inter-Gateway Protocol (IGP), and then performs route aggregation on the iteratively preferred routing information, and then performs condition matching screening on the aggregated routing information.
b、 先对待发送的路由信息进行 IGP迭代优选, 然后对迭代优选后的路 由信息进行路由聚合;  b. Perform IGP iteration optimization on the routing information to be sent first, and then perform route aggregation on the iterative preferred routing information;
c、 先对待发送的路由信息进行 IGP迭代优选, 然后对迭代优选后的路 由信息进行条件匹配筛选;  c. Perform IGP iteration optimization on the routing information to be sent first, and then perform condition matching screening on the iterative preferred routing information;
d、 先对待发送的路由信息进行路由聚合, 再对聚合后的路由信息进行 条件匹配筛选;  d. Perform route aggregation on the routing information to be sent, and perform condition matching screening on the aggregated routing information.
e、 对待发送的路由信息进行 IGP迭代优选;  e. It is preferred to perform IGP iteration on the routing information to be sent;
f、 对待发送的路由信息进行路由聚合;  f. Route aggregation of the routing information to be sent;
g、 对待发送的路由信息进行条件匹配筛选;  g. Perform condition matching screening on the routing information to be sent;
以上路由策略可选择其中一种策略进行路由信息的优化筛选。  The above routing strategy may select one of the policies for optimal filtering of routing information.
在本实施例中, 边缘交换设备的两侧分别为 UPE和 NPE , 第一邻居和第 二邻居在网络中一个是 UPE,另一个是 NPE , 即第一邻居为 UPE时, 第二邻居 为 NPE, 反之, 第一邻居为 NPE时, 第二邻居为 UPE。  In this embodiment, the two sides of the edge switching device are the UPE and the NPE respectively, and the first neighbor and the second neighbor are the UPE in the network, and the other is the NPE, that is, when the first neighbor is the UPE, and the second neighbor is the NPE. Conversely, when the first neighbor is an NPE, the second neighbor is a UPE.
在本实施例中, 第一邻居发送 E0R消息, 由 SPE完成路由收敛判断, 从 而确定第一邻居是否已经完成触发路由发布条件的收敛任务, 如果判断得 出第一邻居已经完成路由收敛, 再向第二邻居发送路由信息, 这样, 如果 第二邻居收到路由信息后, 将流量发送到 SPE , SPE就可以将流量转发到相 应的设备, 从而避免产生流量黑洞。 In this embodiment, the first neighbor sends an E0R message, and the SPE completes the route convergence judgment, so as to determine whether the first neighbor has completed the convergence task of triggering the route advertisement condition, and if it is determined that the first neighbor has completed the route convergence, The second neighbor sends routing information, such that if After receiving the routing information, the second neighbor sends the traffic to the SPE. The SPE can forward the traffic to the corresponding device to avoid blackholes.
请参阅图 4A , 图 4B , 本发明又一实施例中的一种边缘交换设备第四实 施例包括:  Referring to FIG. 4A and FIG. 4B, a fourth embodiment of an edge switching device according to still another embodiment of the present invention includes:
会话连接消息发送模块 401 , 用于向第一邻居发送会话连接消息, 该会 话连接消息包括要求第一邻居在每一个地址族完成初始的更新后返回一个 通报消息的扩展字段, 以及 SPE等待通报消息的时间 T1;  The session connection message sending module 401 is configured to send a session connection message to the first neighbor, where the session connection message includes an extension field that requires the first neighbor to return an announcement message after each address family completes the initial update, and the SPE waits for the notification message. Time T1;
判断模块 402 , 用于判断第一邻居是否已经完成预设的路由收敛值; 路由信息发送模块 403 , 用于当判断模块 402判断第一邻居已经完成路 由收敛时, 向第二邻居发送路由信息;  The determining module 402 is configured to determine whether the first neighbor has completed the preset route convergence value, and the routing information sending module 403 is configured to: when the determining module 402 determines that the first neighbor has completed the route convergence, send the routing information to the second neighbor;
举例来说, 如图 4B , 判断模块 402包括:  For example, as shown in FIG. 4B, the determining module 402 includes:
第一判断单元 402a , 用于判断是否收到第一邻居发送的支持通报消息, 该消息为表明支持在每一个地址族完成初始的更新的后有能力返回一个通 报消息, 即第一邻居在每一个地址族完成初始的更新, 发送更新消息给 SPE 后, 再返回通报消息;  The first determining unit 402a is configured to determine whether a support notification message sent by the first neighbor is received, and the message is capable of returning a notification message after the initial update is completed in each address family, that is, the first neighbor is in each An address family completes the initial update, sends an update message to the SPE, and then returns a notification message;
第二判断单元 402b , 用于在第一判断单元 402a判断收到第一邻居发送 的支持通报消息, 该消息为表明支持在每一个地址族完成初始的更新的后 有能力返回一个通报消息时, 再判断在等待通报消息的时间 T1内是否收到 第一邻居发送的通报消息;  The second determining unit 402b is configured to, at the first determining unit 402a, determine to receive the support notification message sent by the first neighbor, where the message indicates that it is capable of returning a notification message after each address family completes the initial update. And determining whether the notification message sent by the first neighbor is received within the time T1 waiting for the notification message;
路由信息发送模块 403具体用于:  The routing information sending module 403 is specifically configured to:
当在等待通报消息的时间 T1内收到第一邻居发送的支持通报消息, 该 消息为表明支持在每一个地址族完成初始的更新的后返回通报消息, 则在 接收到通报消息后开始计时, 在预先设定的时间 T3后向第二邻居发送路由 信息;  Receiving the support notification message sent by the first neighbor during the time T1 waiting for the notification message, the message is to indicate that the support notification message is returned after each address family completes the initial update, and then starts timing after receiving the notification message. Sending routing information to the second neighbor after the preset time T3;
当在等待通报消息的时间 T1内没有收到第一邻居发送的支持通报消 息, 则在时间 T1结束后开始计时, 在预先设定的时间 T4后向第二邻居发送 路由信息;  When the support notification message sent by the first neighbor is not received within the time T1 waiting for the notification message, the timing starts after the end of the time T1, and the routing information is sent to the second neighbor after the preset time T4;
当没有收到第一邻居发送的支持通报消息时, 在预先设定的时间 T2后 向第二邻居发送路由信息, 该支持通报消息表明第一邻居支持在每一个地 址族完成初始的更新后返回一个通报消息, 即第一邻居在每一个地址族完 成初始的更新, 发送更新消息给 SPE后, 再返回通报消息; When the support notification message sent by the first neighbor is not received, the routing information is sent to the second neighbor after the preset time T2, and the support notification message indicates that the first neighbor supports returning after each address family completes the initial update. a notification message, that is, the first neighbor is in each address family In the initial update, after sending an update message to the SPE, return to the notification message;
预先设定的时间 Tl、 Τ2、 Τ3、 Τ4可以是相同的时间, 也可以根据需要 设定不同的时间, 定时器 2、 定时器 3以及定时器 4可以为同一个定时器, 也 可以为分别设置的不同的定时器。  The preset times T1, Τ2, Τ3, Τ4 may be the same time, or different times may be set according to requirements, and the timer 2, the timer 3, and the timer 4 may be the same timer, or may be respectively Set different timers.
举例来说, 如图 4Β, 路由信息发送模块 403包括:  For example, as shown in FIG. 4, the routing information sending module 403 includes:
路由优化陣选单元 403a , 用于根据预先设置的路由策略将待发送的路 由信息进行优化筛选;  The route optimization array unit 403a is configured to optimize the route information to be sent according to a preset routing policy;
发送单元 403b , 用于向第二邻居发送经路由优化陣选单元优化陣选后 的路由;  a sending unit 403b, configured to send, to the second neighbor, a route that is optimized by the route optimization matrix selection unit;
其中, 路由策略具体为:  The routing policy is specifically:
a、 先对待发送的路由信息进行内部网关协议( IGP, Inter ior Ga teway Protocol ) 的迭代优选, 然后对迭代优选后的路由信息进行路由聚合, 再 对聚合后的路由信息进行条件匹配筛选;  a. Iteratively optimizes the routing information of the Inter-Gateway Protocol (IGP), and then performs route aggregation on the iteratively preferred routing information, and then performs condition matching screening on the aggregated routing information.
b、 先对待发送的路由信息进行 IGP迭代优选, 然后对迭代优选后的路 由信息进行路由聚合;  b. Perform IGP iteration optimization on the routing information to be sent first, and then perform route aggregation on the iterative preferred routing information;
c、 先对待发送的路由信息进行 IGP迭代优选, 然后对迭代优选后的路 由信息进行条件匹配筛选;  c. Perform IGP iteration optimization on the routing information to be sent first, and then perform condition matching screening on the iterative preferred routing information;
d、 先对待发送的路由信息进行路由聚合, 再对聚合后的路由信息进行 条件匹配筛选;  d. Perform route aggregation on the routing information to be sent, and perform condition matching screening on the aggregated routing information.
e、 对待发送的路由信息进行 IGP迭代优选;  e. It is preferred to perform IGP iteration on the routing information to be sent;
f、 对待发送的路由信息进行路由聚合;  f. Route aggregation of the routing information to be sent;
g、 对待发送的路由信息进行条件匹配筛选;  g. Perform condition matching screening on the routing information to be sent;
以上路由策略可选择其中一种策略进行路由信息的优化筛选。  The above routing strategy may select one of the policies for optimal filtering of routing information.
在本实施例中, 边缘交换设备的两侧分别为 UPE和 NPE , 第一邻居和第 二邻居在网络中一个是 UPE,另一个是 NPE , 即第一邻居为 UPE时, 第二邻居 为 NPE, 反之, 第一邻居为 NPE时, 第二邻居为 UPE。  In this embodiment, the two sides of the edge switching device are the UPE and the NPE respectively, and the first neighbor and the second neighbor are the UPE in the network, and the other is the NPE, that is, when the first neighbor is the UPE, and the second neighbor is the NPE. Conversely, when the first neighbor is an NPE, the second neighbor is a UPE.
在本实施例中, SPE首先通过和第一邻居协商, 使得第一邻居在路由收 敛完成时返回通报消息, SPE根据接收的通报消息对第一邻居的路由收敛情 况进行判断, 当第一邻居的收敛完成预设的路由收敛值时, 再向第二邻居 发送路由信息, 这样, 如果第二邻居收到路由信息后, 将流量发送到 SPE, SPE就可以将流量转发到相应的设备, 从而避免产生流量黑洞。 In this embodiment, the SPE first negotiates with the first neighbor, so that the first neighbor returns a notification message when the route convergence is completed, and the SPE determines the route convergence of the first neighbor according to the received notification message, when the first neighbor When the convergence of the preset route convergence value is completed, the routing information is sent to the second neighbor. Then, if the second neighbor receives the routing information, the traffic is sent to the SPE. The SPE can forward traffic to the corresponding device to avoid traffic black holes.
请参阅图 5 , 本实施例中一种路由收敛***第五实施例包括:  Referring to FIG. 5, a fifth embodiment of a route convergence system in this embodiment includes:
上述实施例中的边缘交换设备 501 , 以及第一邻居 502;  The edge switching device 501 in the above embodiment, and the first neighbor 502;
其中第一邻居 502用于, 向 SPE发送明细路由; 接收 SPE发送的会话连接 消息, 该会话连接消息携带扩展字段, 该扩展字段表示边缘交换设备 501要 求第一邻居 502在每一个地址族完成初始的更新后返回通报消息, 即第一邻 居 501在每一个地址族完成初始的更新, 发送更新消息给 SPE后, 再返回通 报消息; 如果能够对扩展字段进行解析, 则向 SPE发送支持通报消息, 该支 持通报消息表明第一邻居有能力在每一个地址族完成初始的更新后返回一 个通报消息。  The first neighbor 502 is configured to send a detailed route to the SPE, and receive a session connection message sent by the SPE, where the session connection message carries an extension field, where the extension field indicates that the edge switching device 501 requests the first neighbor 502 to complete the initial in each address family. After the update, the notification message is returned, that is, the first neighbor 501 completes the initial update in each address family, sends an update message to the SPE, and then returns the notification message; if the extension field can be parsed, the support notification message is sent to the SPE. The support notification message indicates that the first neighbor has the ability to return a notification message after each address family completes the initial update.
在本实施例中, 边缘交换设备的两侧分别为 UPE和 NPE , 第一邻居和第 二邻居在网络中一个是 UPE,另一个是 NPE , 即第一邻居为 UPE时, 第二邻居 为 NPE , 反之, 第一邻居为 NPE时, 第二邻居为 UPE。  In this embodiment, the two sides of the edge switching device are the UPE and the NPE respectively, and the first neighbor and the second neighbor are the UPE in the network, and the other is the NPE, that is, when the first neighbor is the UPE, and the second neighbor is the NPE. Conversely, when the first neighbor is an NPE, the second neighbor is a UPE.
在本实施例中, 第一邻居发送 E0R消息, 由 SPE完成路由收敛判断, 从 而确定第一邻居是否已经完成触发路由发布条件的收敛任务, 如果判断得 出第一邻居已经完成路由收敛, 再向第二邻居发送路由信息, 这样, 如果 第二邻居收到路由信息后, 将流量发送到 SPE , SPE就可以将流量转发到相 应的设备, 从而避免产生流量黑洞。  In this embodiment, the first neighbor sends an E0R message, and the SPE completes the route convergence judgment, so as to determine whether the first neighbor has completed the convergence task of triggering the route advertisement condition, and if it is determined that the first neighbor has completed the route convergence, The second neighbor sends the routing information. If the second neighbor receives the routing information and sends the traffic to the SPE, the SPE can forward the traffic to the corresponding device to avoid blackholes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分 步骤是可以通过程序来指令相关的硬件来完成, 该程序可以存储于一计算 机可读存储介质中, 存储介质可以包括: 只读存储器 (ROM , Read On ly Memory ), 随机存取存储器 ( RAM, Random Acces s Memory )、 磁盘或光盘等。  A person skilled in the art can understand that all or part of the steps of the foregoing embodiments can be completed by a program to instruct related hardware. The program can be stored in a computer readable storage medium. The storage medium can include: Read-only memory (ROM, Read On ly Memory), random access memory (RAM, Random Acces s Memory), disk or optical disk.
以上对本发明实施例所提供的路由收敛方法、 ***以及边缘交换设备 了阐述, 以上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时, 对于本领域的一般技术人员, 依据本发明的思想, 在具体实施方式 及应用范围上均会有改变之处, 综上所述, 本说明书内容不应理解为对本 发明的限制。  The foregoing describes the route convergence method, system, and edge switching device provided by the embodiments of the present invention. The foregoing description of the embodiments is only used to help understand the method and core idea of the present invention. Meanwhile, for those skilled in the art, The present invention is not limited by the scope of the present invention.

Claims

权利要求 Rights request
1、 一种路由收敛方法, 其特征在于, 包括:  A route convergence method, comprising:
边缘交换设备判断第一邻居是否已经完成路由收敛;  The edge switching device determines whether the first neighbor has completed route convergence.
若是, 则向第二邻居发送路由信息, 所述边缘交换设备的两侧分别为 用户侧边缘设备和网络侧边缘设备, 所述第一邻居和所述第二邻居中的一 个是所述用户侧边缘设备而另一个是所述网络侧边缘设备。  If yes, the routing information is sent to the second neighbor, where the two sides of the edge switching device are the user edge device and the network edge device, and one of the first neighbor and the second neighbor is the user side. The edge device and the other is the network side edge device.
2、 根据权利要求 1所述的方法, 其特征在于, 所述边缘交换设备判断 第一邻居是否已经完成路由收敛, 包括:  The method according to claim 1, wherein the edge switching device determines whether the first neighbor has completed route convergence, and includes:
在所述边缘交换设备重启后, 接收所述第一邻居发送的路由信息, 并 统计路由的数量;  After the edge switching device is restarted, receiving routing information sent by the first neighbor, and counting the number of routes;
判断预先保存的路由的数量与统计的路由的数量的比值是否达到预先 设置的比值, 所述预先保存的路由的数量为所述边缘交换设备重启前预先 保存在本地的由所述第一邻居发送的路由的数量。  Determining whether the ratio of the number of pre-stored routes to the number of the statistic routes reaches a preset ratio, where the number of pre-stored routes is sent by the first neighbor before being saved locally before the edge switching device restarts The number of routes.
3、 根据权利要求 1所述的方法, 其特征在于, 所述边缘交换设备判断 第一邻居是否已经完成路由收敛之前, 所述方法还包括:  The method according to claim 1, wherein the method further includes: before the edge switching device determines whether the first neighbor has completed route convergence, the method further includes:
所述边缘交换设备向所述第一邻居发送会话连接消息, 所述会话连接 消息包括扩展字段和所述边缘交换设备等待通报消息的时间 T1 , 所述扩展 字段表示所述边缘交换设备要求所述第一邻居在每一个地址族完成初始的 更新后返回所述通报消息。  The edge switching device sends a session connection message to the first neighbor, where the session connection message includes an extension field and a time T1 of the edge switching device waiting for a notification message, where the extension field indicates that the edge switching device requires the The first neighbor returns the notification message after each address family completes the initial update.
4、 根据权利要求 3所述的方法, 其特征在于, 所述边缘交换设备判断 第一邻居是否已经完成路由收敛, 包括:  The method according to claim 3, wherein the edge switching device determines whether the first neighbor has completed route convergence, including:
判断是否收到所述第一邻居发送的支持通报消息, 所述支持通报消息 表明所述第一邻居在每一个地址族完成初始的更新后有能力返回所述通报 消息;  Determining whether the support notification message sent by the first neighbor is received, the support notification message indicating that the first neighbor has the ability to return the notification message after each address family completes the initial update;
若是, 则判断在所述时间 T1内是否收到所述第一邻居发送的通报消息。 If yes, it is determined whether the notification message sent by the first neighbor is received within the time T1.
5、 根据权利要求 2至 4所述的方法, 其特征在于, 所述向第二邻居发送 的路由信息为经路由策略优化筛选后的路信息; The method according to any one of claims 2 to 4, wherein the routing information sent to the second neighbor is the path information optimized by the routing policy;
所述路由策略为下述策略中的一种:  The routing policy is one of the following strategies:
a . 对待发送的路由信息进行内部网关协议的迭代优选;  a. Iterative optimization of the internal gateway protocol for the routing information to be sent;
然后对迭代优选后的路由信息进行路由聚合; 再对聚合后的路由信息进行条件匹配筛选; Then performing route aggregation on the iteratively preferred routing information; Perform condition matching screening on the aggregated routing information.
b. 对待发送的路由信息进行内部网关协议的迭代优选;  b. Iterative preference of the internal gateway protocol for the routing information to be sent;
然后对迭代优选后的路由信息进行路由聚合;  Then performing route aggregation on the iteratively preferred routing information;
c 对待发送的路由信息进行内部网关协议的迭代优选;  c Iterative optimization of the internal gateway protocol for the routing information to be sent;
然后对迭代优选后的路由信息进行条件匹配筛选;  Then performing condition matching screening on the iteratively preferred routing information;
d. 对待发送的路由信息进行路由聚合;  d. route aggregation of the routing information to be sent;
再对聚合后的路由信息进行条件匹配筛选;  Perform condition matching screening on the aggregated routing information.
e. 对待发送的路由信息进行内部网关协议的迭代优选;  e. Iterative optimization of the internal gateway protocol for the routing information to be sent;
f. 对待发送的路由信息进行路由聚合;  f. route aggregation of the routing information to be sent;
g. 对待发送的路由信息进行条件匹配筛选。  g. Perform conditional matching filtering on the routing information to be sent.
6、 一种边缘交换设备, 其特征在于, 包括:  6. An edge switching device, comprising:
判断模块, 用于判断第一邻居是否已经完成路由收敛;  a determining module, configured to determine whether the first neighbor has completed route convergence;
路由信息发送模块, 用于当所述判断模块判断所述第一邻居已经完成 路由收敛时, 向第二邻居发送路由信息, 所述边缘交换设备的两侧分别为 用户侧边缘设备和网络侧边缘设备, 所述第一邻居和所述第二邻居中的一 个是所述用户侧边缘设备而另一个是所述网络侧边缘设备。  a routing information sending module, configured to send routing information to the second neighbor when the determining module determines that the first neighbor has completed the route convergence, where the two sides of the edge switching device are the user edge device and the network side edge respectively The device, one of the first neighbor and the second neighbor is the user side edge device and the other is the network side edge device.
7、 根据权利要求 6所述的设备, 其特征在于, 所述判断模块包括: 存储单元, 用于保存路由的数量, 所述路由的数量为在所述边缘交换 设备重启前所述边缘交换设备接收的由所述第一邻居发送的路由的数量; 接收单元, 用于在所述边缘交换设备重启后接收所述第一邻居发送的 路由信息;  The device according to claim 6, wherein the determining module comprises: a storage unit, configured to save the number of routes, where the number of the routes is the edge switching device before the edge switching device restarts Receiving the number of routes sent by the first neighbor; receiving unit, configured to receive routing information sent by the first neighbor after the edge switching device restarts;
统计单元, 用于统计所述接收单元接收的路由的数量;  a statistical unit, configured to count the number of routes received by the receiving unit;
判断单元, 用于判断所述存储单元保存的路由的数量与所述统计单元 统计的路由的数量的比值是否达到预先设置的比值。  The determining unit is configured to determine whether a ratio of the number of routes saved by the storage unit to the number of routes counted by the statistical unit reaches a preset ratio.
8、 根据权利要求 6所述的设备, 其特征在于, 所述装置还包括: 会话连接消息发送模块, 用于向所述第一邻居发送会话连接消息, 所 述会话连接消息包括扩展字段和所述边缘交换设备等待通报消息的时间 T1, 所述扩展字段表示要求所述第一邻居在每一个地址族完成初始的更新 后返回所述通报消息。  The device according to claim 6, wherein the device further comprises: a session connection message sending module, configured to send a session connection message to the first neighbor, where the session connection message includes an extension field and a The time T1 at which the edge switching device waits for the notification message, the extension field indicates that the first neighbor is required to return the notification message after each address family completes the initial update.
9、 根据权利要求 8所述的设备, 其特征在于, 所述判断模块包括: 第一判断单元, 用于判断是否收到所述第一邻居发送的支持通报消息, 所述支持通报消息表明所述第一邻居在每一个地址族完成初始的更新后有 能力返回所述通报消息; The device according to claim 8, wherein the determining module comprises: a first determining unit, configured to determine whether a support notification message sent by the first neighbor is received, The support notification message indicates that the first neighbor has the ability to return the notification message after each address family completes an initial update;
第二判断单元, 用于在所述第一判断单元判断结果为真时, 判断在所 述时间 T1内是否收到所述第一邻居发送的通报消息。  The second determining unit is configured to determine, when the first determining unit determines that the result is true, whether the notification message sent by the first neighbor is received within the time T1.
1 0、 根据权利要求 9所述的设备, 其特征在于:  10. The device according to claim 9, wherein:
所述路由信息发送模块具体用于:  The routing information sending module is specifically configured to:
当在所述时间 T1内收到所述第一邻居发送的通报消息时, 则在接收所 述通报消息后开始计时, 在预先设定的时间 T3后向所述第二邻居发送路由 信息;  When the notification message sent by the first neighbor is received within the time T1, timing is started after receiving the notification message, and routing information is sent to the second neighbor after a preset time T3;
当在所述时间 T1内没有收到所述第一邻居发送的通报消息时, 则在所 述时间 T1结束后开始计时, 在预先设定的时间 T4后向所述第二邻居发送路 由信息;  When the notification message sent by the first neighbor is not received within the time T1, the timing starts after the end of the time T1, and the routing information is sent to the second neighbor after the preset time T4;
当没有收到所述第一邻居发送的支持通报消息时, 在预先设定的时间 T2后向所述第二邻居发送路由信息。  When the support notification message sent by the first neighbor is not received, the routing information is sent to the second neighbor after the preset time T2.
1 1、 根据权利要求 6-1 0中的任一权利要求所述的设备, 其特征在于: 所述路由信息发送模块包括:  The device according to any one of claims 6-1 to 0, wherein the routing information sending module comprises:
路由优化陣选单元, 用于根据预先设置的路由策略将待发送的路由信 息进行优化筛选;  a route optimization array unit, configured to optimize and filter routing information to be sent according to a preset routing policy;
发送单元, 用于向所述第二邻居发送经所述路由优化陣选单元优化筛 选后的路由。  And a sending unit, configured to send, to the second neighbor, a route that is optimized and filtered by the route optimization array unit.
12、 一种路由收敛***, 其特征在于, 包括:  12. A route convergence system, comprising:
权 6至权 10中任一权利要求所述的边缘交换设备和第一邻居; 所述第一邻居用于, 向所述边缘交换设备发送明细路由; 接收所述边 缘交换设备发送的会话连接消息, 所述会话连接消息携带扩展字段, 所述 扩展字段表示所述边缘交换设备要求所述第一邻居在每一个地址族完成初 始的更新后返回通报消息; 如果所述第一邻居能够对扩展字段进行解析, 则向所述边缘交换设备发送支持通报消息, 所述支持通报消息为表明所述 第一邻居在每一个地址族完成初始的更新后有能力返回通报消息。  The edge switching device and the first neighbor according to any one of claims 6 to 10; the first neighbor is configured to send a detailed route to the edge switching device; and receive a session connection message sent by the edge switching device The session connection message carries an extension field, where the extension field indicates that the edge switching device requests the first neighbor to return a notification message after each address family completes an initial update; if the first neighbor can And performing parsing, sending a support notification message to the edge switching device, where the support notification message indicates that the first neighbor has the ability to return a notification message after completing an initial update for each address family.
PCT/CN2011/075016 2010-10-29 2011-05-31 Method, system and edge switch device for route convergence WO2011150832A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010529030.3 2010-10-29
CN201010529030.3A CN102136999B (en) 2010-10-29 2010-10-29 Route converging method, system and edge switching equipment

Publications (1)

Publication Number Publication Date
WO2011150832A1 true WO2011150832A1 (en) 2011-12-08

Family

ID=44296659

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/075016 WO2011150832A1 (en) 2010-10-29 2011-05-31 Method, system and edge switch device for route convergence

Country Status (2)

Country Link
CN (1) CN102136999B (en)
WO (1) WO2011150832A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112804141A (en) * 2018-09-06 2021-05-14 华为技术有限公司 Method for sending message, network equipment and computer storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106911568B (en) * 2017-02-24 2019-11-12 新华三技术有限公司 BGP GR implementation method and device
CN107547374B (en) * 2017-06-01 2020-04-28 新华三技术有限公司 Aggregation route processing method and device
CN110971516B (en) * 2019-10-25 2021-01-15 华为技术有限公司 Method and device for processing routing information

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080080509A1 (en) * 2006-09-29 2008-04-03 Nortel Networks Limited Method and apparatus for learning endpoint addresses of IPSec VPN tunnels
CN101364927A (en) * 2008-09-24 2009-02-11 华为技术有限公司 Method, apparatus and system realizing fault recovery of virtual private network
JP2010178310A (en) * 2009-02-02 2010-08-12 Kddi Corp Route control system and route control apparatus
CN101820397A (en) * 2010-05-25 2010-09-01 杭州华三通信技术有限公司 Network convergence method and device in virtual private local area network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741738A (en) * 2009-12-15 2010-06-16 中兴通讯股份有限公司 Method and device for realizing graceful restart of link state routing protocol

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080080509A1 (en) * 2006-09-29 2008-04-03 Nortel Networks Limited Method and apparatus for learning endpoint addresses of IPSec VPN tunnels
CN101364927A (en) * 2008-09-24 2009-02-11 华为技术有限公司 Method, apparatus and system realizing fault recovery of virtual private network
JP2010178310A (en) * 2009-02-02 2010-08-12 Kddi Corp Route control system and route control apparatus
CN101820397A (en) * 2010-05-25 2010-09-01 杭州华三通信技术有限公司 Network convergence method and device in virtual private local area network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112804141A (en) * 2018-09-06 2021-05-14 华为技术有限公司 Method for sending message, network equipment and computer storage medium
CN112804141B (en) * 2018-09-06 2023-09-26 华为技术有限公司 Method for transmitting message, network equipment and computer storage medium

Also Published As

Publication number Publication date
CN102136999B (en) 2014-04-02
CN102136999A (en) 2011-07-27

Similar Documents

Publication Publication Date Title
US11134006B2 (en) Loop conflict avoidance in a spine-and-leaf network topology
US9276898B2 (en) Method and device for link fault detecting and recovering based on ARP interaction
US9705782B2 (en) Method and system for efficient graceful restart in an open shortest path first (OSPF) network
WO2009092253A1 (en) Method and router for fast re-route
WO2009009977A1 (en) Master backup switch method for route device and backup system for route device
WO2008031334A1 (en) Route updating method, system and router
TW201134151A (en) RSVP-TE graceful restart under fast re-route conditions
WO2008141557A1 (en) A method for routing convergence, routing device and main control board in the routing device
JP2006135970A (en) SoftRouter DYNAMIC BINDING PROTOCOL
JP2005130228A (en) Communication device for path control between as and path control method therefor
WO2015123962A1 (en) Processing method and device for graceful restart of open flow switch, and open flow controller
JP6147338B2 (en) Method and system for enabling rerouting for home network after connectivity failure
WO2007036103A1 (en) A method for recovering the service-forwarding route and the system thereof
WO2016086713A1 (en) Equal-cost multi-path outbound interface update method and apparatus
WO2007003088A1 (en) A method and system for updating a route
JP2022052741A (en) Target neighbor search for boundary gateway protocol
WO2011150832A1 (en) Method, system and edge switch device for route convergence
WO2012163219A1 (en) Lsp network congestion processing method, device and system
WO2013086858A1 (en) Method and device for recovering customer service
WO2010102560A1 (en) Method, device and system for exiting graceful restart
WO2007121626A1 (en) A strategic routing device and method
WO2009135422A1 (en) A qinq internal broadcast realizing method and apparatus
EP2575306B1 (en) Ospf nonstop routing synchronization nack
EP2575304B1 (en) OSPF nonstop routing (NSR) synchronization reduction
WO2015100610A1 (en) Method and device for keeping ip address of user equipment fixed

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: 11789211

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: 11789211

Country of ref document: EP

Kind code of ref document: A1