Message transmission method and apparatus, and electronic device
By switching NDF to intermediate state and switching to initial state at appropriate time during the failure turn-back process of EVPN, the multi-packet problem of BUM packets caused by dual DF is solved, and the single packet transmission of BUM packets is realized.
Patent Information
- Application Number
- CN202311179994.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-13
- Publication Date
- 2025-03-14
AI Technical Summary
During the failure reversal process of EVPN dual-origin or multi-origin scenarios, multiple packets of BUM packets may occur due to dual DF.
By switching NDF to an intermediate state at the first starting time and switching the intermediate state to an initial state at a time when it is determined that the state of the second PE is inconsistent with the initial state of the first PE, ensuring that when the first PE is switched to DF, the state of the second PE is not DF, thereby avoiding the occurrence of double DF.
It effectively avoids the multi-packet problem of BUM packets during failover, ensuring that the CE only receives one BUM packet.
Smart Images

Figure CN119629033A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer communication technology, and in particular to a message transmission method, device and electronic equipment. Background Art
[0002] Ethernet Virtual Private Network (EVPN) in the field of computer communication technology is a two-layer virtual private network (VPN) technology. The EVPN can be applied to multi-homing scenarios or dual-homing scenarios. The following explanation takes the dual-homing scenario as an example. Please refer to Figure 1 :
[0003] In this dual-homing scenario, the first customer edge device (CE) is connected to the first provider edge device (PE) and the second PE. The Ethernet segment identifier (ESI) between the first CE and the first PE is the same as the ESI between the first CE and the second PE, indicating that the first PE and the second PE are connected to the same CE. The second CE is connected to the third PE, and the third PE is connected to the first PE and the second PE.
[0004] Among them, the first PE can obtain the device information of the second PE through the Border Gateway Protocol (BGP) routing; similarly, the second PE can obtain the device information of the first PE through the BGP routing. When the first PE is powered on, the first PE will use its device information and the device information of the second PE to perform the designated forwarder (DF) election. Similarly, when the second PE is powered on, the second PE will also use its device information and the device information of the first PE to perform the DF election.
[0005] Assume that the election result of the first PE is that the first PE is the DF of the first CE; the election result of the second PE is that the second PE is the backup designated forwarder (English: Backup Designated Forwarder, abbreviated as BDF) of the first CE. Among them, the functions of DF include sending BUM messages to the first CE and sending well-known unicast messages to the first CE; BDF means switching to DF when the original DF fails, and taking over the functions of the original DF. In normal working mode, when the second CE transmits a broadcast / unknown unicast / multicast (English: Broadcast Unknown-unicast Multicas, abbreviated as BUM) message to the first CE, it must first transmit the BUM message to the third PE. Then, the third PE transmits the BUM message to the first PE and the second PE. Since the state of the first PE is DF and the state of the second PE is BDF, at this time, the first CE will only receive one BUM message.
[0006] When the first PE fails, the state of the first PE switches from DF to non-designated forwarder (NDF), and the state of the second PE switches from BDF to DF. Among them, NDF is neither BDF nor DF. However, in the EVPN dual-homing scenario, NDF is consistent with BDF. At this time, the second PE transmits the BUM message to the first CE.
[0007] When the fault of the first PE is repaired and it is powered on again, a trigger message is sent to the second PE based on the fourth type (English: TYPE4) routing to enable the second PE to conduct an election. At the same time, after sending the trigger message to the second PE, the election is performed. Since the device information contained in the first PE is consistent with the device information contained before it fails, and the device information contained in the second PE is also consistent with the device information contained in the first PE before it fails. Therefore, after the first PE performs the DF election again, its election result is still that the first PE is the DF of the first CE; after receiving the election information sent by the first PE, the second PE can determine that the fault of the first PE has been repaired, and perform the DF election again, and the election result is still that the second PE is the BDF of the first CE. Then the state of the first PE switches from NDF to DF, and the state of the second PE switches from DF to BDF. This process is also called a fault switching back process. At this time, the first PE transmits a BUM message to the first CE.
[0008] However, due to network delay and other reasons, the time when the second PE learns that the second PE is the BDF of the first CE will be later than the time when the first PE learns that the first PE is the DF of the first CE. Therefore, during the fault switching back process, when the state of the first PE switches from NDF to DF, it takes a certain amount of time for the state of the second PE to switch from DF to BDF. Therefore, when the state of the first PE is DF, the state of the second PE is also DF within a certain period of time. At this time, both the first PE and the second PE will send the received BUM message to the first CE, which will cause the first CE to receive two identical BUM messages, that is, it will cause the problem of multiple BUM messages. Summary of the invention
[0009] The present application provides a message transmission method, device and electronic device to solve the problem of multiple BUM messages caused by dual DF during the fault switchback process of EVPN dual homing scenario or multi-homing scenario. The specific implementation scheme is as follows:
[0010] In a first aspect, the present application provides a method for transmitting a message, the method being applied to a first operator edge device PE whose current state is a non-designated converter NDF in an Ethernet virtual private network EVPN, and the initial state of the first PE is a designated forwarder DF; the EVPN also includes a second PE whose current state is the DF, and the second PE and the first PE are connected to the same user edge device CE, the method comprising:
[0011] Sending a trigger message to the second PE, and switching the NDF to an intermediate state at a first start time; wherein the first start time is no later than a first sending time of sending the trigger message; the trigger message instructs the first PE to perform an election; and the intermediate state instructs the PE not to transmit a target message;
[0012] At a first termination time, the intermediate state is switched to the initial state, and the target message is transmitted to the CE; wherein the first termination time is a determination time when it is determined that the state of the second PE is inconsistent with the initial state of the first PE.
[0013] Through the above application embodiment, at the first start time, the first PE switches NDF to an intermediate state, and then at a determined time (i.e., the first end time) when it is determined that the state of the second PE is inconsistent with the initial state of the first PE, the intermediate state is switched to the initial state, and then the target message is transmitted to the CE. This makes the switching time of the first PE switching to DF later than the switching time of the second PE switching to a state inconsistent with DF, ensuring that when the first PE switches to DF, the state of the second PE must not be DF (i.e., the state of the second PE can be, for example, BDF or NDF). Therefore, the above application embodiment avoids the occurrence of double DF during the fault switching process, thereby avoiding the problem of multiple packages of the target message (such as BUM message).
[0014] In a possible implementation manner, at the first start time, switching the NDF to the intermediate state includes:
[0015] Determine a first sending time for sending the trigger information to the second PE as the first starting time; or, receive a blocking instruction, and read the first starting time in the blocking instruction;
[0016] At the first start time, the NDF is switched to the intermediate state.
[0017] In a possible implementation manner, after the NDF is switched to the intermediate state at the first starting time, the method further includes:
[0018] determining whether to send the trigger information to the second PE at the first start time;
[0019] If not, the start time information is sent to the second PE; wherein the start time information indicates that the state of the first PE is the intermediate state and the fault of the first PE has been repaired.
[0020] In a possible implementation manner, at the first termination time, switching the intermediate state to the initial state includes:
[0021] In response to determining to send the first election result information to the second PE, determining the time of sending the first election result information as a second sending time; and in response to receiving the second election result information sent by the second PE, determining the time of receiving the second election result information as a first receiving time;
[0022] In response to not receiving the termination time information sent by the second PE before the second sending time and the first receiving time, determining that the state of the second PE is inconsistent with the initial state of the first PE at a later time between the second sending time and the first receiving time, and determining the later time as the first termination time; wherein the termination time information indicates that the state of the second PE is inconsistent with the initial state of the first PE;
[0023] At the first termination time, the intermediate state is switched to the initial state.
[0024] In a possible implementation manner, at the first termination time, switching the intermediate state to the initial state includes:
[0025] In response to receiving the termination time information sent by the second PE, based on the termination time information, determining that the state of the second PE is inconsistent with the initial state of the first PE, and determining a second receiving time for receiving the termination time information as the first termination time;
[0026] At the first termination time, the intermediate state is switched to the initial state.
[0027] In a possible implementation manner, after sending the trigger information to the second PE, the method further includes:
[0028] In the target route, add the target information including the first election result information;
[0029] The first election result information is sent to the second PE based on the target route carrying the target information.
[0030] In a second aspect, the present application provides a method for transmitting a message, the method being applied to a second operator edge device PE whose current state is a designated forwarder DF in an Ethernet virtual private network EVPN; the EVPN also includes a first PE whose current state is a non-designated forwarder NDF and whose initial state is the DF, the second PE and the first PE are connected to the same user edge device CE, the method comprising:
[0031] receiving the start time information or trigger information sent by the first PE, and determining a second start time; wherein the start time information indicates that the state of the first PE is an intermediate state and the fault of the first PE has been repaired, the second start time is not earlier than the third receiving time of receiving the start time information or not earlier than the fourth receiving time of receiving the trigger information, and the intermediate state indicates that the PE does not transmit the target message;
[0032] Determine a switching state that is inconsistent with the initial state of the first PE, and based on the start time information or the trigger information, at the second start time, switch the DF to the switching state, and send termination time information to the first PE; wherein the termination time information indicates that the state of the second PE is inconsistent with the initial state of the first PE.
[0033] Through the above-mentioned application embodiment, the second PE determines the first start time based on the start time information or trigger information sent by the first PE, and then determines the switching state that is inconsistent with the initial state of the first PE, and switches the DF to the switching state at the first start time, and sends the first PE the termination time information indicating that the state of the second PE is inconsistent with the initial state of the first PE, so that the first PE determines that the state of the second PE is inconsistent with its initial state (i.e., DF), thereby avoiding the situation that after the first PE switches to DF, the second PE has not yet switched DF to a state inconsistent with DF. Therefore, during the fault switching process, by performing the fault switching through the above-mentioned application embodiment, there will be no two DFs repeatedly sending target messages (i.e., BUM messages) to the CE, so that the target message (such as BUM message) will not be multiple packets.
[0034] In a third aspect, the present application also provides a message transmission device, the device is applied to a first operator edge device PE whose current state is a non-designated forwarder NDF in an Ethernet virtual private network EVPN, and the initial state of the first PE is a designated forwarder DF; the EVPN also includes a second PE whose current state is the DF, and the second PE and the first PE are connected to the same user edge device CE, and the device includes:
[0035] a switching module, configured to send a trigger message to the second PE, and switch the NDF to an intermediate state at a first start time; wherein the first start time is no later than a first sending time of sending the trigger message; the trigger message instructs the first PE to perform an election; and the intermediate state instructs the PE not to transmit a target message;
[0036] The first processing module is used to switch the intermediate state to the initial state and transmit the target message to the CE at a first termination time; wherein the first termination time is a determination time when the state of the second PE is determined to be inconsistent with the initial state of the first PE.
[0037] In a possible implementation, the switching module is specifically used to determine the first sending time of sending the trigger information to the second PE as the first start time; or, receive a blocking instruction and read the first start time in the blocking instruction; at the first start time, switch the NDF to the intermediate state.
[0038] In a possible implementation, the switching module is specifically used to determine whether to send the trigger information to the second PE at the first start time; if not, send the start time information to the second PE; wherein the start time information indicates that the state of the first PE is the intermediate state and the fault of the first PE has been repaired.
[0039] In a possible implementation manner, the first processing module is specifically used to, in response to determining to send the first election result information to the second PE, determine the time for sending the first election result information as the second sending time; and, in response to receiving the second election result information sent by the second PE, determine the time for receiving the second election result information as the first receiving time; in response to not receiving the termination time information sent by the second PE before the second sending time and the first receiving time, determine that the state of the second PE is inconsistent with the initial state of the first PE at the later time between the second sending time and the first receiving time, and determine the later time as the first termination time; wherein the termination time information indicates that the state of the second PE is inconsistent with the initial state of the first PE; at the first termination time, switch the intermediate state to the initial state.
[0040] In a possible implementation, the first processing module is specifically used to, in response to receiving the termination time information sent by the second PE, determine, based on the termination time information, that the state of the second PE is inconsistent with the initial state of the first PE, and determine that the second receiving time of receiving the termination time information is the first termination time; at the first termination time, switch the intermediate state to the initial state.
[0041] In a possible implementation manner, the switching module is specifically configured to add target information including the first election result information in the target route; and send the first election result information to the second PE based on the target route carrying the target information.
[0042] In a fourth aspect, the present application further provides a message transmission device, the device being applied to a second operator edge device PE whose current state is a designated forwarder DF in an Ethernet virtual private network EVPN; the EVPN also includes a first PE whose current state is a non-designated forwarder NDF and whose initial state is the DF, the second PE and the first PE are connected to the same user edge device CE, the device comprising:
[0043] a determination module, configured to receive the start time information or the trigger information sent by the first PE, and determine a second start time; wherein the start time information indicates that the state of the first PE is an intermediate state and the fault of the first PE has been repaired, the second start time is not earlier than a third receiving time of receiving the start time information or not earlier than a fourth receiving time of receiving the trigger information, and the intermediate state indicates that the PE does not transmit the target message;
[0044] The second processing module is used to determine a switching state that is inconsistent with the initial state of the first PE, and based on the start time information or the trigger information, at the second start time, switch the DF to the switching state, and send termination time information to the first PE; wherein the termination time information indicates that the state of the second PE is inconsistent with the initial state of the first PE.
[0045] In a fifth aspect, the present application provides an electronic device, including:
[0046] Memory, used to store computer programs;
[0047] The processor is used to implement the above-mentioned message transmission method steps when executing the computer program stored in the memory.
[0048] In a sixth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned message transmission method are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A schematic diagram of an EVPN dual-homing scenario provided in an embodiment of the present application;
[0050] Figure 2 A method for transmitting a message according to an embodiment of the present invention Figure 1 ;
[0051] Figure 3 A schematic diagram of a PE state timeline provided in an embodiment of the present application;
[0052] Figure 4 A method for transmitting a message according to an embodiment of the present invention Figure 2 ;
[0053] Figure 5 A schematic diagram of a processing process of a message transmission method provided in an embodiment of the present application;
[0054] Figure 6 A schematic diagram of a message transmission device provided in an embodiment of the present application Figure 1 ;
[0055] Figure 7 A schematic diagram of a message transmission device provided in an embodiment of the present application Figure 2 ;
[0056] Figure 8 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The specific operating methods in the method embodiments can also be applied to device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A is connected to B, which can represent: A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, words such as "first" and "second" are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0058] The embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0059] During the failover process in the EVPN dual-homing scenario or multi-homing scenario, when the first PE switches from NDF to DF and the second PE switches from DF to BDF or NDF, due to network delay and other reasons, the problem of multiple target packets (such as BUM packets) caused by dual DF occurs.
[0060] Therefore, the present application proposes a method for transmitting a message. During a fault switching back process, for a first PE whose initial state is DF, the first PE first switches NDF to an intermediate state at a first starting time, and the intermediate state indicates that the target message (such as a BUM message) is not transmitted; then, when the first PE determines that the state of the second PE is inconsistent with DF, the first PE switches the intermediate state to DF, thereby avoiding the double DF that occurs during the fault switching back process in the prior art, thereby avoiding multiple BUM message packets caused by the double DF.
[0061] Reference Figure 2 The figure shows a message transmission method process provided by an embodiment of the present application. Figure 1 The method is applied to a first PE in an EVPN whose current state is NDF, whose initial state is DF, and whose fault has been repaired. The EVPN also includes a second PE whose current state is DF, and the first PE and the second PE are connected to the same CE. The method includes:
[0062] S11, sending a trigger message to the second PE, and switching the NDF to an intermediate state at a first start time.
[0063] The trigger information instructs the first PE to perform election; the intermediate state instructs the PE not to transmit the target message; and the first start time is no later than the first sending time of sending the trigger information.
[0064] In an embodiment of the present application, the election performed by the first PE may be a DF election. The target message may be a BUM message. In addition to indicating that the target message is not transmitted, the intermediate state also indicates that the PE can transmit a well-known unicast message. The reason for setting the first start time not later than the first sending time of sending the trigger information is as follows:
[0065] like Figure 3 As shown, when the first start time is later than the first sending time of sending the trigger information, the first PE cannot know the status of the second PE before receiving the message sent by the second PE. If the second PE switches its status to NDF after receiving the trigger information, even if the second PE sends status information indicating the second PE status to the first PE after switching to NDF, there is still a risk of double NDF.
[0066] Therefore, based on the setting that the first start time is not later than the first sending time of sending the trigger information, the occurrence of double NDF can be avoided. Since NDF does not transmit well-known unicast messages, and the intermediate state can transmit well-known unicast messages, the risk of well-known unicast message loss is reduced.
[0067] In an EVPN dual-homing scenario or a multi-homing scenario, when the fault of the first PE is repaired and powered on again, the first PE sends a trigger message to the second PE based on TYPE4 routing, and switches the NDF to an intermediate state at a first start time.
[0068] The first PE can make the second PE perform election by sending trigger information to the second PE. Meanwhile, after sending the trigger information to the second PE, the first PE also performs election.
[0069] The first starting time when the first PE switches the NDF to the intermediate state can be determined according to the following three implementations:
[0070] In a possible implementation, first, a first sending time for sending trigger information to the second PE is determined, and then the first sending time is used as the first start time.
[0071] In another possible implementation, first, a blocking instruction is received. Then, the first start time in the blocking instruction is directly read, so that the first start time can be determined by the blocking instruction. The blocking instruction includes the first start time and indicates that the first PE switches to an intermediate state.
[0072] In another possible implementation, first, the power-on time of the first PE is determined. Then, the power-on time is directly used as the first start time. That is, after the first PE is powered on, the NDF is switched to the intermediate state.
[0073] Furthermore, after the first PE switches the NDF to the intermediate state at the first start time, it is necessary to determine whether to send trigger information to the second PE at the first start time to ensure that the second PE can learn the current state of the first PE in a timely manner.
[0074] If the trigger information has not been sent to the second PE at the first start time, the start time information is sent to the second PE. The start time information indicates that the state of the first PE is an intermediate state. In addition, the start time information also indicates that the fault of the first PE has been repaired. Therefore, sending the start time information to the second PE can enable the second PE to know that the state of the first PE has switched to an intermediate state and that the fault of the first PE has been repaired, so that the second PE can perform corresponding operations. At the same time, it can also be determined that the first start time is earlier than the first sending time of sending the trigger information.
[0075] If it is determined to send trigger information to the second PE at the first start time, since the trigger information instructs the first PE to perform an election, it can indicate that the fault of the first PE has been repaired, and it can also indicate that the state of the first PE has switched to an intermediate state. At this time, there is no need to send the start time information to the second PE. At the same time, the first start time can be determined as the first sending time.
[0076] Through the above method, based on the judgment result of whether the trigger information is sent to the second PE at the first start time, it is determined whether the first start time is earlier than the first sending time of sending the trigger information. When the first start time is earlier than the first sending time, by sending the start time information to the second PE, the second PE can be informed of the status of the first PE, so that the second PE can perform corresponding operations.
[0077] S12, at the first termination time, switching the intermediate state to the initial state, and transmitting the target message to the CE.
[0078] The first termination time is a determination time at which it is determined that the state of the second PE is inconsistent with the initial state of the first PE.
[0079] Since the second PE is not the initial DF of the CE, for the second PE, the state inconsistent with the initial state (ie, DF) of the first PE may be BDF, NDF, or an intermediate state.
[0080] After the NDF is switched to the intermediate state in step S11, when it is determined that the state of the second PE is inconsistent with the initial state of the first PE, the determined time at which the state of the second PE is determined to be inconsistent with the initial state of the first PE is used as the first termination time, so that at the first termination time, the intermediate state is switched to the initial state, and the target message is transmitted to the CE.
[0081] In a possible implementation, when it is determined that the state of the second PE is inconsistent with the initial state of the first PE, the termination time information sent by the second PE is received. Since the termination time information indicates that the state of the second PE is inconsistent with the initial state of the first PE, it can be directly determined based on the received termination time information that the state of the second PE is inconsistent with the initial state of the first PE.
[0082] In the embodiment of the present application, the first PE performs an election before switching the intermediate state to the initial state and after sending a trigger message to the second PE. When performing the election, the first PE can obtain the device information of the adjacent PE device (i.e., the second PE) through BGP routing, so as to perform the election based on the device information. The execution steps of the election are well known to those skilled in the art and will not be described in detail here.
[0083] After the election is performed, the first election result information is obtained. The first election result information includes the target state of the first PE. In the embodiment of the present application, the target state of the first PE may be the initial state of the first PE, that is, the target state of the first PE is DF.
[0084] Then, the first election result information is sent to the second PE, so that the second PE confirms that the first PE has confirmed its own target state.
[0085] In a possible implementation, when sending the first election result information to the second PE, firstly, target information including the first election result information is added to the target route, and then, based on the target route carrying the target information, the first election result information is sent to the second PE.
[0086] In the embodiment of the present application, the target route may be a first type (English: TYPE1) route, a second type (English: TYPE2) route, a third type (English: TYPE3) route, a TYPE4 route, etc. Among them, the target route is optimally a TYPE1 route.
[0087] The above TYPE1 route includes multiple routes, such as Ethernet Auto-Discovery Per Ethernet Segment (EAD-ES) and Ethernet Auto-Discovery Per EVPN Instance (EAD-EVI). Among them, EAD-EVI is the best route in TYPE1 route. The above target route is the best EAD-EVI route in TYPE1 route.
[0088] When the target information including the first election result information is added to the target route, the target information may be a Layer 2 (L2) extended community attribute. Then, the first election result information is added to the L2 extended community attribute so that the target information includes the first election result information.
[0089] When the first election result information is supplemented in the L2 extended community attribute, the first election result information may be supplemented in a reserved field (English: Reserved) of the L2 extended community attribute.
[0090] In the embodiment of the present application, in the L2 extended community attribute, when the first election result information is supplemented to Reserved, the first election result information may be supplemented to the end of Reserved, or to the position marked as 0 in Reserved.
[0091] For example, when the first election result information is added to the end of Reserved in the L2 extended community attribute, the added result is shown in Table 1 below:
[0092] Table 1 Supplementary results table
[0093] Identification bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Logo 0 0 0 0 0 0 0 0 0 0 0 0 DBN
[0094] Among them, the identifiers D, B, and N indicate DF, BDF, and NDF, respectively. When the value of D in Table 1 is a preset value, it indicates that the destination state of the first PE is DF, that is, the state of the first PE is switched to DF. When the value of B is a preset value, it indicates that the destination state of the first PE is BDF, that is, the state of the first PE is switched to BDF. When the value of N is a preset value, it indicates that the destination state of the first PE is NDF, that is, the state of the first PE is switched to NDF. It should be noted that only one value among the values corresponding to D, B, and N can be a preset value.
[0095] In the embodiment of the present application, the preset value may be a numerical value such as 1, or a letter or symbol, etc. Optimally, the preset value is 1.
[0096] Then, at the first termination time, the intermediate state is switched to the initial state.
[0097] In a possible implementation manner, when the intermediate state is switched to the initial state at the first termination time, the first termination time is first determined, and then the intermediate state is switched to the initial state at the first termination time.
[0098] In one possible implementation, the first termination time is determined by: in response to receiving a release instruction, directly reading the first termination time in the release instruction to determine the first termination time. The release instruction includes information indicating that the state of the second PE is inconsistent with the initial state of the first PE, and includes the first termination time.
[0099] In another possible implementation, the first termination time is determined in the following manner: the first termination time can be determined by presetting the existence duration of the intermediate state. The existence duration of the intermediate state is greater than the duration of the appearance of the double DF during the fault reversal process. Therefore, at the end of the existence duration of the intermediate state, it can be determined that the states of the first PE and the second PE are not both DF. Since the initial state (i.e., the destination state) of the first PE is DF, at the end of the existence duration of the intermediate state, it can be determined that the state of the second PE is inconsistent with the initial state of the first PE.
[0100] Specifically, first, before the first start time is determined in step S11, the existence time of the preset intermediate state is obtained. Then, when the first start time is determined in step S11, the timing is started until the timing time reaches the existence time of the intermediate state, and the timing is ended. At the time point of ending the timing, it is determined that the state of the second PE is inconsistent with the initial state of the first PE, and the time point of ending the timing is used as the first end time.
[0101] In order to reduce the existence time of the intermediate state and to reduce the packet loss time of the target message (such as the BUM message), in another possible implementation, the determination of the optimal first termination time is triggered in the following manner: in the operations of sending the first election result information to the second PE, receiving the second election result information sent by the second PE, and receiving the termination time information sent by the second PE, when the first PE performs any of the three operations for the first time, the step of determining the first termination time is triggered. That is, at any time of the second sending time, the first receiving time, and the second receiving time, the determination of the first termination time is started. Among them, the second sending time is the time of sending the first election result information to the second PE, the first receiving time is the time of receiving the second election result information sent by the second PE, and the second receiving time is the time of receiving the termination time information sent by the second PE. The specific steps for determining the first termination time in this implementation are shown in the following two embodiments:
[0102] Embodiment 1:
[0103] After switching the NDF to the intermediate state in step S11, in the operations of sending the first election result information to the second PE, receiving the second election result information sent by the second PE, and receiving the termination time information sent by the second PE, the first PE may first perform the operation of sending the first election result information to the second PE, or the operation of receiving the second election result information sent by the second PE. Specifically, in response to determining to send the first election result information to the second PE, the time for sending the first election result information is determined to be the second sending time. And, in response to receiving the second election result information sent by the second PE, the time for receiving the second election result information is determined to be the first receiving time. Then, in response to not receiving the termination time information sent by the second PE before the second sending time and the first receiving time, at the later time between the second sending time and the first receiving time, it is determined that the state of the second PE is inconsistent with the initial state of the first PE, and the later time is determined to be the first termination time.
[0104] The reason why it is determined that the state of the second PE is inconsistent with the initial state of the first PE at the later time between the second sending time and the first receiving time is as follows:
[0105] At the second sending time, the first PE determines that its own destination state (i.e., initial state) is DF based on the first election result information. At the first receiving time, the first PE determines the destination state of the second PE based on the second election result information, and determines that the second PE has learned its own destination state. When the destination state of the second PE in the second election result information is not DF, the first PE can determine that its destination state (i.e., initial state) is inconsistent with the destination state of the second PE. Since the second starting time of switching DF to the switching state in the second PE is no later than the third sending time of sending the second election result information to the first PE, or no later than the sum of the third sending time and the information transmission time, the information transmission time is the shortest transmission time when the second PE and the first PE transmit information. Therefore, when the first PE receives the second election result information, the second PE has already switched its DF to the switching state, and the switching state is the intermediate state or the destination state of the second PE. Then, when the first PE receives the second election result information, the state of the second PE must not be DF. Therefore, at the later time between the second sending time and the first receiving time, the state of the second PE must be inconsistent with the initial state of the first PE.
[0106] It should be noted that after determining that the later time between the second sending time and the first receiving time is the first termination time, the first termination time will not be updated even if the termination time information sent by the second PE is received.
[0107] In a possible implementation, when determining the later time between the second sending time and the first receiving time as the first termination time, specifically, if the first PE first performs an operation of sending the first election result information to the second PE, then in response to determining to send the first election result information to the second PE, the time of sending the first election result information is determined to be the second sending time. At this time, it can be determined that: the second sending time is before the first receiving time.
[0108] After sending the first election result information, in response to determining to receive the second election result information sent by the second PE, the time of receiving the second election result information is determined to be the first receiving time, and it is determined that before the first receiving time, the termination time information sent by the second PE is not received. At this time, it can be determined that the state of the second PE is inconsistent with the initial state of the first PE, and the first receiving time is determined as the first termination time.
[0109] Alternatively, after sending the first election result information, in response to determining to receive the termination time information sent by the second PE, the time of receiving the termination time information is determined to be the second receiving time, and it is determined that before the second receiving time, the second election result information sent by the second PE is not received. At this time, based on the termination time information, it can be determined that the state of the second PE is inconsistent with the initial state of the first PE, and the second receiving time is determined to be the first termination time.
[0110] In another possible implementation, when determining the later time between the second sending time and the first receiving time as the first termination time, specifically, if the first PE first performs an operation of receiving the second election result information sent by the second PE, then in response to receiving the second election result information sent by the second PE, the time of receiving the second election result information is determined to be the first receiving time. In this case, the first receiving time may be determined to be before the second sending time.
[0111] After receiving the second election result information, in response to determining to send the first election result information to the second PE, the time for sending the first election result information to the second PE is determined to be the second sending time, and it is determined that before the second sending time, no termination time information sent by the second PE is received. At this time, it can be determined that the state of the second PE is inconsistent with the initial state of the first PE, and the second sending time is determined as the first termination time.
[0112] Alternatively, after receiving the second election result information, in response to determining that the termination time information sent by the second PE is received, the time of receiving the termination time information is determined to be the second receiving time, and it is determined that before the second receiving time, the first election result information is not sent to the second PE. At this time, based on the termination time information, it can be determined that the state of the second PE is inconsistent with the initial state of the first PE, and the second receiving time is determined as the first termination time.
[0113] Embodiment 2:
[0114] After switching the NDF to the intermediate state in step S11, in the operations of sending the first election result information to the second PE, receiving the second election result information sent by the second PE, and receiving the termination time information sent by the second PE, if the first PE first executes the reception of the termination time information sent by the second PE, then in response to determining that the termination time information sent by the second PE is received, based on the termination time information, it can be determined that the state of the second PE is inconsistent with the initial state of the first PE, then the second receiving time of the received termination time information is determined to be the first termination time.
[0115] Through the above method, in the second receiving time of the termination time information, and the last time between the second sending time of the first election result information and the first receiving time of the second election result information, the second receiving time or the earliest time of the above last time is used as the first termination time, which can reduce the existence time of the intermediate state, thereby reducing the duration of packet loss of the target message (such as BUM message), realizing rapid convergence of the BUM message, and reducing the difficulty of directly setting the existence time of the intermediate state.
[0116] In summary, after the first PE is powered on again, when NDF is switched to DF, NDF is first switched to an intermediate state at the first start time. Since the intermediate state indicates that the target message is not transmitted, and also indicates that the transmission of well-known unicast messages is allowed, even if the second PE has switched DF to NDF at this time, there will be no double NDF phenomenon, thereby reducing the risk of packet loss of known unicast messages. Then, when it is determined that the state of the second PE is inconsistent with DF, the intermediate state is switched to DF, thereby avoiding the double DF phenomenon in which the second PE is still DF after the first PE is switched to DF during the fault switching process, so that the CE will not receive two duplicate target messages (such as BUM messages) at the same time, and there will be no problem of multiple BUM messages.
[0117] Based on the same inventive concept, an embodiment of the present application provides a method for transmitting a message, which is applied to a second PE in an EVPN whose current state is DF, and the EVPN also includes a first PE whose current state is NDF and whose initial state is DF, and the first PE and the second PE are connected to the same CE, please refer to Figure 4, the implementation steps of the method include:
[0118] S21, receiving the start time information or trigger information sent by the first PE, and determining the second start time.
[0119] The start time information, trigger information and intermediate state are the start time information, trigger information and intermediate state in step S11 and step S12, which will not be described in detail here.
[0120] It should be noted that, in addition to instructing the first PE to perform an election, the trigger information also triggers the second PE to perform an election. Therefore, for the second PE, the trigger information instructs the second PE to perform an election.
[0121] The second start time is no earlier than the third receiving time for receiving the start time information or no earlier than the fourth receiving time for receiving the trigger information.
[0122] During the fault switchback process, the second PE first receives the start time information or trigger information sent by the first PE, then determines the second start time, and then executes step S22.
[0123] When receiving the start time information or the trigger information, since the first PE sends the start time information only when the first start time is earlier than the first sending time for sending the trigger information, when the first start time is the first sending time, the first PE does not send the start time information. Therefore, when receiving the start time information or the trigger information, the second PE can directly determine whether the start time information is received.
[0124] If the start time information is received, since the start time information indicates that the state of the first PE is an intermediate state and the fault of the first PE has been repaired, the second start time can be directly set to a third receiving time that is not earlier than the receiving start time information, and the election is performed.
[0125] If the start time information is not received, then when the trigger information is received, the election is performed according to the trigger information, and the second start time is set to be no earlier than the fourth receiving time of receiving the trigger information.
[0126] In the embodiment of the present application, the execution steps of the second PE execution election are consistent with the execution steps of the first PE execution election in step S12, which are well known to those skilled in the art and will not be described in detail here.
[0127] After the election is executed, the second election result information may be obtained, and the second election result information includes the destination state of the second PE. In the embodiment of the present application, the destination state of the second PE may be BDF or NDF. In addition, the second election result information is sent to the first PE so that the first PE knows that the second PE has determined its destination state. When the second election result information is sent to the first PE, the principle of sending the first election result information to the second PE is the same as that of the first PE sending the first election result information to the second PE, which will not be repeated here.
[0128] By setting the first start time to be no earlier than the third receiving time or no earlier than the fourth receiving time, the second PE must switch its state only after the state of the first PE is not NDF. At this time, even if the second PE learns that its destination state is NDF after executing the election, it directly switches DF to NDF, which can avoid the existence of double NDF, thereby reducing the risk of packet loss of well-known unicast messages.
[0129] In a possible implementation, when determining the second start time, first, a blocking instruction is received, and then the second start time is directly determined by reading the second start time in the blocking instruction. The blocking instruction includes the second start time.
[0130] S22, determining a switching state that is inconsistent with the initial state of the first PE, and based on the start time information or the trigger information, switching the DF to the switching state at a second start time, and sending the end time information to the first PE.
[0131] After determining the second start time in step S21, determine a switching state that is inconsistent with the initial state of the first PE. Since the initial state of the first PE is DF, the switching state can be an intermediate state, NDF, or BDF. At the same time, based on the start time information or the trigger information, at the second start time, DF is switched to the switching state, and the end time information is sent to the first PE.
[0132] Among them, the termination time information indicates that the state of the second PE is inconsistent with the initial state of the first PE. The inconsistent state is the switching state, and the inconsistent state includes the intermediate state, NDF, and BDF. In a possible implementation, if the above-mentioned inconsistent state (i.e., the switching state) is NDF or BDF, the second election result information after the election is executed based on the start time information or the trigger information to determine whether its own destination state is NDF or BDF. At this time, the second start time determined in step S21 cannot be earlier than the time when the second election result information appears, so that the second PE can determine its own destination state based on the second election result information, thereby determining the switching state. The above-mentioned second start time cannot be later than the preset time point. The first preset time point can be the third sending time for sending the second election result information to the first PE, or it can be the sum of the third sending time and the information transmission time. The reason why the above-mentioned second start time cannot be later than the preset time point is as follows:
[0133] When the second start time is not later than the preset time point, it can be ensured that before the first PE receives the first receiving time of the second election result information, the state of the second PE is BDF or NDF, so that the first PE can determine that its initial state is inconsistent with the state of the second PE at the later time between the second sending time of sending the first election result information and the first receiving time of receiving the second election result information.
[0134] If the destination state of the second PE itself is NDF, the state is switched to NDF, and at the second start time determined in step S21, DF is switched to NDF, and the end time information is sent to the first PE.
[0135] If the destination state of the second PE itself is BDF, the state is switched to BDF, and at the second start time determined in step S21, DF is switched to BDF, and the end time information is sent to the first PE.
[0136] In a possible implementation, if the inconsistent state (i.e., the switching state) is an intermediate state, the second start time cannot be later than the preset time point, thereby ensuring that after receiving the second election result information, the first PE can determine that the state of the second PE is definitely not DF, thereby allowing the first PE to perform corresponding operations.
[0137] At this time, the second start time determined in step S21 can be directly set as the third receiving time for receiving the start time information or as the fourth receiving time for receiving the trigger information.
[0138] Then, at the second start time, DF is switched to the intermediate state.
[0139] After DF is switched to the intermediate state at the second starting time, the intermediate state can be switched to BDF or NDF at any time based on the second election result information. For example, the time to switch the intermediate state to BDF or NDF can be determined based on the existence time of the intermediate state.
[0140] When determining the time to switch the intermediate state to BDF or NDF based on the existence time of the intermediate state, it is consistent with the step of determining the first termination time by presetting the existence time of the intermediate state in step S12, and will not be repeated here. It should be noted that the existence time of the intermediate state preset in the second PE may be consistent with or inconsistent with the existence time of the intermediate state preset in the first PE.
[0141] When the intermediate state is switched to BDF or NDF at any time, the intermediate state may also be switched to BDF or NDF at the last time between the third sending time and the fifth receiving time. The fifth receiving time is the receiving time of the first election result information sent by the first PE.
[0142] Since at the last time between the third sending time and the fifth receiving time, the second PE can determine that its destination state is BDF or NDF, and can also determine that the first PE has learned that its destination state is DF, the second PE switches the intermediate state to BDF or NDF at the last time, thereby avoiding the phenomenon of no DF in the EVPN dual-homing or multi-homing scenario.
[0143] In summary, in the message transmission method proposed in the present application, the second PE determines a switching state that is inconsistent with the initial state of the first PE, and based on the received start time information or trigger information, at the second start time, switches the DF to the switching state, and sends the end time information indicating that the state of the second PE is inconsistent with the initial state of the first PE to the first PE, so that the first PE switches its state to the initial state only after determining that the state of the second PE is inconsistent with its initial state, avoiding the occurrence of double DF when the initial state of the first PE is DF, thereby avoiding repeated sending of BUM messages to CE during double DF, and further solving the problem of multiple BUM messages.
[0144] The technical solution of this application is further explained below in conjunction with a specific application process.
[0145] like Figure 5The figure shows a processing diagram of the message transmission method, where MID represents an intermediate state. First, after the first PE is powered on again, the first PE sends a trigger message to the second PE based on the TYPE4 route, and switches the NDF to the intermediate state; the trigger message instructs the second PE to perform an election, and the intermediate state indicates that the BUM message is not transmitted to the CE. After sending the trigger message to the second PE, the DF election is performed to obtain the first election result information, and the first election result information is sent to the second PE based on the TYPE1 route. The first election result information contains that the destination state of the first PE itself is DF. If the second election result information sent by the second PE is received after the first election result information is sent to the second PE, the intermediate state is switched to DF when the second election result information is received. If the second election result information sent by the second PE has been received before the first election result information is sent to the second PE, the intermediate state is switched to DF when the first election result information is sent to the second PE.
[0146] When the second PE receives the trigger information, it switches DF to the intermediate state. At the same time, it performs DF election, obtains the second election result information, and sends the second election result information to the first PE based on the TYPE1 route. The second election result information includes that the destination state of the second PE itself is BDF. If the first election result information sent by the first PE is received after the second election result information is sent to the first PE, the intermediate state is switched to BDF when the first election result information is received. If the first election result information sent by the first PE is received before the second election result information is sent to the first PE, the intermediate state is switched to BDF when the second election result information is sent to the first PE.
[0147] Through the above method, the first PE and the second PE are set based on the intermediate state, and then the NDF to DF or DF to BDF is switched, which avoids the occurrence of double DF during the switching process, so that the CE will not receive duplicate BUM messages during the process, and the BUM message will not have the problem of multiple packets.
[0148] Moreover, the timing of switching to the intermediate state and the timing of switching the intermediate state to DF or BDF are determined based on the sending and receiving time of the trigger information, the first election result information, and the second election result information. Compared with setting the existence time of the intermediate state based on experience, the timing of switching to the intermediate state and the timing of switching the intermediate state to DF or BDF are determined based on the existence time of the intermediate state. It can avoid setting the existence time of the intermediate state too long, thereby reducing excessive BUM message packet loss when the existence time of the intermediate state is set too long, that is, solving the problem of multiple BUM message packets and reducing BUM message packet loss. At the same time, it also avoids the difficulty of setting the existence time of the intermediate state.
[0149] Based on the same inventive concept, the present application also provides a message transmission device in an embodiment, such as Figure 6 The figure shows a schematic diagram of the structure of a message transmission device provided by the present application. Figure 1 , the device is applied to the first PE in the EVPN whose current state is NDF, and the initial state of the first PE is DF; the EVPN also includes a second PE whose current state is DF, the second PE and the first PE are connected to the same CE, and the device is connected to the aforementioned Figure 2 The device corresponds to a method for transmitting a message shown in FIG.
[0150] The switching module 601 is used to send a trigger message to the second PE, and switch the NDF to an intermediate state at a first start time; wherein the first start time is not later than a first sending time of sending the trigger message; the trigger message instructs the first PE to perform an election; and the intermediate state instructs the PE not to transmit a target message;
[0151] The first processing module 602 is used to switch the intermediate state to the initial state and transmit the target message to the CE at a first termination time; wherein the first termination time is a determination time when it is determined that the state of the second PE is inconsistent with the initial state of the first PE.
[0152] In a possible implementation, the switching module 601 is specifically used to determine the first sending time for sending trigger information to the second PE as the first starting time; or, receive a blocking instruction and read the first starting time in the blocking instruction; at the first starting time, switch the NDF to an intermediate state.
[0153] In a possible implementation, the switching module 601 is also used to determine whether to send trigger information to the second PE at the first start time; if not, send start time information to the second PE; wherein the start time information indicates that the state of the first PE is an intermediate state and the fault of the first PE has been repaired.
[0154] In one possible implementation, the first processing module 602 is specifically used to, in response to determining that the first election result information is sent to the second PE, determine the time for sending the first election result information as the second sending time; and, in response to receiving the second election result information sent by the second PE, determine the time for receiving the second election result information as the first receiving time; in response to not receiving the termination time information sent by the second PE before the second sending time and the first receiving time, determine that the state of the second PE is inconsistent with the initial state of the first PE at the later time between the second sending time and the first receiving time, and determine the later time as the first termination time; wherein the termination time information indicates that the state of the second PE is inconsistent with the initial state of the first PE; at the first termination time, the intermediate state is switched to the initial state.
[0155] In a possible implementation, the first processing module 602 is also used to respond to the termination time information received from the second PE, determine based on the termination time information that the state of the second PE is inconsistent with the initial state of the first PE, and determine the second receiving time of receiving the termination time information as the first termination time; at the first termination time, switch the intermediate state to the initial state.
[0156] In a possible implementation manner, the switching module 601 is further configured to add target information including the first election result information to the target route; and send the first election result information to the second PE based on the target route carrying the target information.
[0157] Based on the same inventive concept, the present application also provides a message transmission device in an embodiment, such as Figure 7 The figure shows a schematic diagram of the structure of a message transmission device provided by the present application. Figure 2 , the device is applied to the second PE in the EVPN whose current state is DF; the EVPN also includes a first PE whose current state is NDF and whose initial state is DF, the second PE and the second PE are connected to the same CE, and the device is the same as the aforementioned Figure 4 The device corresponds to a method for transmitting a message shown in FIG.
[0158] The determination module 701 is used to receive the start time information or the trigger information sent by the first PE, and determine the second start time; wherein the start time information indicates that the state of the first PE is an intermediate state and the fault of the first PE has been repaired, the second start time is not earlier than the third receiving time of receiving the start time information or not earlier than the fourth receiving time of receiving the trigger information, and the intermediate state indicates that the PE does not transmit the target message;
[0159] The second processing module 702 is used to determine a switching state that is inconsistent with the initial state of the first PE, and based on the start time information or trigger information, at a second start time, switches the DF to a switching state, and sends termination time information to the first PE; wherein the termination time information indicates that the state of the second PE is inconsistent with the initial state of the first PE.
[0160] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application. The electronic device can realize the function of the transmission device of the above-mentioned message, referring to Figure 8 , the electronic equipment includes:
[0161] At least one processor 801, and a memory 802 connected to the at least one processor 801. The specific connection medium between the processor 801 and the memory 802 is not limited in the embodiment of the present application. Figure 8 In the example, the processor 801 and the memory 802 are connected via a bus 800. Figure 8The connections between other components are shown in bold lines, and are not intended to be limiting. The bus 800 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 8 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 801 can also be called a controller, and there is no limitation on the name.
[0162] In the embodiment of the present application, the memory 802 stores instructions that can be executed by at least one processor 801. The at least one processor 801 can execute the message transmission method discussed above by executing the instructions stored in the memory 802. The processor 801 can implement Figure 6-7 The functions of each module in the device shown.
[0163] Among them, the processor 801 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 802 and calling the data stored in the memory 802, the various functions of the device and process data, the device can be monitored as a whole.
[0164] In one possible design, the processor 801 may include one or more processing units, and the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 801. In some embodiments, the processor 801 and the memory 802 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0165] Processor 801 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the message transmission method disclosed in the embodiments of the present application can be directly embodied as a hardware processor execution, or a combination of hardware and software modules in the processor.
[0166] The memory 802 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 802 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (English: Random Access Memory, abbreviated as RAM), a static random access memory (English: Static Random Access Memory, abbreviated as SRAM), a programmable read-only memory (English: Programmable Read Only Memory, abbreviated as PROM), a read-only memory (English: Read Only Memory, abbreviated as ROM), an electrically erasable programmable read-only memory (English: Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 802 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 802 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0167] By designing and programming the processor 801, the code corresponding to the message transmission method described in the above embodiment can be fixed into the chip, so that the chip can execute the code when running. Figure 2 , Figure 4 The steps of the message transmission method of the embodiment shown are as follows: How to design and program the processor 801 is a technology well known to those skilled in the art and will not be described in detail here.
[0168] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the message transmission method discussed above.
[0169] In some possible implementations, various aspects of the message transmission method provided in the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of the message transmission method according to various exemplary embodiments of the present application described above in this specification.
[0170] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0171] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0172] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0173] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0174] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A message transmission method, characterized in that: The method is applied to a first operator edge device PE in an Ethernet virtual private network EVPN, whose current state is a non-designated forwarder NDF, and whose initial state is a designated forwarder DF; The EVPN also includes a second PE whose current state is the DF, and the second PE and the first PE are connected to the same user edge device CE, and the method includes: Sending a trigger message to the second PE, and switching the NDF to an intermediate state at a first start time; wherein the first start time is no later than a first sending time of sending the trigger message; the trigger message instructs the first PE to perform an election; and the intermediate state instructs the PE not to transmit a target message; At a first termination time, the intermediate state is switched to the initial state, and the target message is transmitted to the CE; wherein the first termination time is a determination time when it is determined that the state of the second PE is inconsistent with the initial state of the first PE.
2. The method according to claim 1, characterized in that The switching of the NDF to the intermediate state at the first starting time includes: Determine a first sending time for sending the trigger information to the second PE as the first starting time; or, receive a blocking instruction, and read the first starting time in the blocking instruction; At the first start time, the NDF is switched to the intermediate state.
3. The method according to claim 1, characterized in that After the NDF is switched to the intermediate state at the first starting time, the method further includes: determining whether to send the trigger information to the second PE at the first start time; If not, the start time information is sent to the second PE; wherein the start time information indicates that the state of the first PE is the intermediate state and the fault of the first PE has been repaired.
4. The method according to claim 1, characterized in that The switching of the intermediate state to the initial state at the first termination time includes: In response to determining to send the first election result information to the second PE, determining the time of sending the first election result information as a second sending time; and in response to receiving the second election result information sent by the second PE, determining the time of receiving the second election result information as a first receiving time; In response to not receiving the termination time information sent by the second PE before the second sending time and the first receiving time, determining that the state of the second PE is inconsistent with the initial state of the first PE at a later time between the second sending time and the first receiving time, and determining the later time as the first termination time; wherein the termination time information indicates that the state of the second PE is inconsistent with the initial state of the first PE; At the first termination time, the intermediate state is switched to the initial state.
5. The method according to claim 1, characterized in that The switching of the intermediate state to the initial state at the first termination time comprises: In response to receiving the termination time information sent by the second PE, based on the termination time information, determining that the state of the second PE is inconsistent with the initial state of the first PE, and determining a second receiving time for receiving the termination time information as the first termination time; At the first termination time, the intermediate state is switched to the initial state.
6. The method according to any one of claims 1 to 5, characterized in that: After sending the trigger information to the second PE, the method further includes: In the target route, add the target information including the first election result information; The first election result information is sent to the second PE based on the target route carrying the target information.
7. A message transmission method, characterized in that: The method is applied to a second operator edge device PE whose current state is a designated forwarder DF in an Ethernet virtual private network EVPN; the EVPN also includes a first PE whose current state is a non-designated forwarder NDF and whose initial state is the DF, and the second PE and the first PE are connected to the same user edge device CE, and the method includes: receiving the start time information or trigger information sent by the first PE, and determining a second start time; wherein the start time information indicates that the state of the first PE is an intermediate state and the fault of the first PE has been repaired, the second start time is not earlier than the third receiving time of receiving the start time information or not earlier than the fourth receiving time of receiving the trigger information, and the intermediate state indicates that the PE does not transmit the target message; Determine a switching state that is inconsistent with the initial state of the first PE, and based on the start time information or the trigger information, at the second start time, switch the DF to the switching state, and send termination time information to the first PE; wherein the termination time information indicates that the state of the second PE is inconsistent with the initial state of the first PE.
8. A message transmission device, characterized in that: The device is applied to a first operator edge device PE whose current state is a non-designated forwarder NDF in an Ethernet virtual private network EVPN, and whose initial state is a designated forwarder DF; the EVPN also includes a second PE whose current state is the DF, and the second PE and the first PE are connected to the same user edge device CE, and the device includes: a switching module, configured to send a trigger message to the second PE, and switch the NDF to an intermediate state at a first start time; wherein the first start time is no later than a first sending time of sending the trigger message; the trigger message instructs the first PE to perform an election; and the intermediate state instructs the PE not to transmit a target message; The first processing module is used to switch the intermediate state to the initial state and transmit the target message to the CE at a first termination time; wherein the first termination time is a determination time when the state of the second PE is determined to be inconsistent with the initial state of the first PE.
9. A message transmission device, characterized in that: The device is applied to a second operator edge device PE whose current state is a designated forwarder DF in an Ethernet virtual private network EVPN; the EVPN also includes a first PE whose current state is a non-designated forwarder NDF and whose initial state is the DF, and the second PE and the first PE are connected to the same user edge device CE, and the device includes: a determination module, configured to receive the start time information or the trigger information sent by the first PE, and determine a second start time; wherein the start time information indicates that the state of the first PE is an intermediate state and the fault of the first PE has been repaired, the second start time is not earlier than a third receiving time of receiving the start time information or not earlier than a fourth receiving time of receiving the trigger information, and the intermediate state indicates that the PE does not transmit the target message; The second processing module is used to determine a switching state that is inconsistent with the initial state of the first PE, and based on the start time information or the trigger information, at the second start time, switch the DF to the switching state, and send termination time information to the first PE; wherein the termination time information indicates that the state of the second PE is inconsistent with the initial state of the first PE.
10. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method steps of any one of claims 1 to 7 when executing the computer program stored in the memory.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.