A method and apparatus for single-arm echo BFD controllable aggregation sharing negotiation
By expanding, padding, and adjusting BFD packets, the problem of inconvenient BFD packet forwarding control in MC-LAG scenarios is solved, enabling controllable path sharing and dynamic traffic sharing, and ensuring the controllability and balance of link protection and traffic sharing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-23
- Publication Date
- 2026-03-24
AI Technical Summary
In the MC-LAG scenario, BFD packets are difficult to control when forwarded on the aggregation port. The inability to confirm the return packet path may lead to misjudgment and uncontrollable switching behavior in the aggregation master-slave switchover scenario. Furthermore, there is a lack of dynamic traffic sharing and control mechanism based on traffic feedback.
By filling in specified fields in the BFD message, the network status is obtained and sent to the controlled end. The controlled end makes adjustments based on the filled fields and parameters to achieve controllable path sharing and dynamic traffic sharing, including filling in the A field, M field, Auth Type field and Auth Data field to trigger different modes and adjustment factors.
It enables controllability of the return packet path and dynamic adjustment of downstream traffic distribution in MC-LAG scenarios, solves the problem of inconvenient control of aggregated port forwarding, and ensures controllability of link protection and balance of traffic distribution.
Smart Images

Figure CN116489093B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication, and in particular to a method and apparatus for single-arm echo BFD controllable aggregation load sharing negotiation. Background Technology
[0002] Bidirectional Forwarding Detection (BFD) is a bidirectional forwarding detection mechanism that provides millisecond-level detection, enabling rapid link detection. By working in conjunction with upper-layer routing protocols, BFD can achieve rapid route convergence, ensuring service continuity. The BFD detection mechanism is implemented through the BFD Echo function. BFD Echo is a detection mechanism where the local system sends a BFD Echo aggregation negotiation message (hereinafter referred to as a BFD message), and the remote system loops the message back. It is divided into passive echo and single-arm echo functions. The single-arm echo function is suitable for single-hop IP link scenarios, typically used between two directly connected devices, where one device supports BFD and the other does not. By creating a single-arm echo BFD session on the device supporting BFD, the device not supporting BFD will receive the BFD message and directly loop it back, thus achieving rapid link detection.
[0003] In some cross-device link aggregation group (MC-LAG) protection scenarios, when BFD packets need to perform link probing on the aggregation port, the following problems may occur:
[0004] 1. If the next hop of the peer device's return packet is an aggregated outgoing interface, and there are more than one aggregated member interface, traffic sharing may be required. However, the inability to confirm the return packet path can lead to misjudgments and uncontrollable failover behavior in aggregated primary / standby scenarios. Conventional methods use a Layer 2 BFD session established for each Layer 2 aggregated member link for protection. However, since multicast IP transmission cannot cross Layer 2 switching domains, establishing a BFD session for each Layer 3 aggregated member link also fails to control the return packet path.
[0005] 2. Due to upstream outbound load exceeding the threshold, it is necessary to promptly notify access network elements for traffic sharing. Currently, the control of aggregated traffic sharing generally adopts a downstream static configuration sharing algorithm, without dynamic control based on traffic feedback negotiation.
[0006] Therefore, how to overcome the shortcomings of existing technologies and solve the problem of inconvenient control when forwarding BFD messages on aggregated ports is a problem to be solved in this technical field. Summary of the Invention
[0007] In view of the above-mentioned defects or improvement needs of the existing technology, the present invention solves the problem of inconvenient control of BFD messages when forwarding on aggregated ports.
[0008] The embodiments of the present invention adopt the following technical solutions:
[0009] In a first aspect, the present invention provides a method for controllable aggregation and load-sharing negotiation of single-arm echo BFD, specifically comprising: the control end obtaining the current network state, the network state including: the receiving port of the BFD message responded by the controlled end does not meet the expected entry requirements, and the upstream egress bandwidth is close to a preset congestion threshold; the control end filling in the BFD message according to the network state, and sending the BFD message to the controlled end to inform the controlled end to enter the corresponding mode, wherein the fields to be filled in the BFD message include: A field, M field, Auth Type field, and Auth Data field; after receiving the BFD message, the controlled end identifies the A field and M field, enters the mode specified by the values of the A field and M field, and adjusts the network state according to the parameters in the Auth Type field and Auth Data field.
[0010] Preferably, the control terminal obtains the current network status by: after sending a BFD message, the control terminal obtains the BFD message response from the controlled terminal and enters the control terminal's ingress interface, and determines whether the ingress interface meets the expected ingress interface; or, the control terminal senses whether the upstream egress bandwidth is close to a preset congestion threshold.
[0011] Preferably, the step of filling the BFD message according to the network status specifically includes: when the ingress interface does not meet the expected ingress interface, filling the authentication type Auth Type of NEGMODE_B, setting Auth Data to the load sharing control parameter type, and setting the A and M fields to trigger the controlled end to enter the BFD probe negotiation frame mode; when the upstream egress bandwidth is close to the preset congestion threshold, filling the authentication type Auth Type of NEGMODE_A, setting the egress reduction target ratio, statistical period and control strategy in Auth Data, and setting the A and M fields to trigger the controlled end to enter the data load sharing negotiation mode.
[0012] Preferably, when the ingress interface does not meet the expected ingress interface, the adjustment of the network state based on the parameters in the Auth Type and Auth Data fields specifically includes: the controlled end obtaining the aggregation member port information of the BFD packet, performing a trial calculation on the traffic sharing result of the sending egress according to the control type requirements, obtaining the aggregation member port different from the current egress as the sending egress and the corresponding egress deflection factor information, the controlled end filling the egress deflection factor information into the corresponding field of the egress deflection factor in the AuthData field of the BFD packet, and forwarding the packet back to the control end through the sending egress; after receiving the adjustment factor information through the session, the control end enters NEGMODE_C mode, sets the M field to be closed, retains the A field, and fills the current adjustment factor information as the Auth Data content of the next sent packet, and fills the authentication type Auth Type of NEGMODE_C. After the controlled end forwarding plane receives the packet with the A field set, it performs an Auth... The adjustment factor information in the Data is extracted and used as the hash basis for forwarding this message. When the primary link fails, the BFD timeout control terminal does not report the failure, but only reports the member port deactivation event. The control terminal resends the BFD message. When the control terminal detects the backup link failure, it reports the primary link failure and triggers the backup link switchover.
[0013] Preferably, the calculation of the traffic sharing result of the sending exit according to the control type requirements includes: the controlled end sets the exit offset base value to the current base value according to the control negotiation requirements in NEGMODE_B mode, and iterates the traffic sharing algorithm of this device to obtain the real exit; after offsetting according to the change step size in the adjustment factor configured in this network element, it is added to the hash key for exit offset recalculation without hash deduplication sharing, and the new exit is calculated and compared with the original exit result. If they are inconsistent, the currently calculated exit offset factor is encapsulated into the message.
[0014] Preferably, when the upstream egress bandwidth approaches the preset congestion threshold, the adjustment of the network status based on the parameters in the Auth Type and AuthData fields specifically includes: after receiving the BFD message, the controlled end obtains the current egress traffic sharing situation of the BFD to form a sharing matching table, and obtains the egress reduction target ratio and control strategy; the controlled end recalculates the service situation of the sending egress according to the egress reduction target ratio and control strategy, and responds to the notification end with the result parameters; based on the negotiation results of the controlled end, the control end sets the M field to be closed and retains the A field for situations that can meet expectations, and notifies the downstream controlled end to start the sharing adjustment, and the controlled end reallocates the bandwidth according to the result parameters.
[0015] Preferably, the controlled end recalculates the service status of the sending exit according to the exit reduction target ratio and control strategy. Specifically, this includes: adding a controllable periodic traffic ratio table based on service characteristics and hashkey; combining the sharing ratio of the pressure reduction required to achieve the exit reduction target ratio and the control strategy to obtain the target traffic ratio table to be adjusted; based on the target traffic ratio table, combined with traffic characteristics and adjustment factor information in the BFD message, performing a two-level traffic sharing trial calculation; if the trial exit fails to effectively migrate to the backup exit, jumping according to the adjustment factor information until it meets expectations, and recording the corresponding adjustment factor information.
[0016] Preferably, the step of obtaining the target flow ratio table to be adjusted specifically includes: comparing the current outflow reduction ratio of each flow with the target outflow reduction ratio; if the target outflow reduction ratio is not less than the outflow reduction ratio, using the current flow characteristics as the adjustment target for that flow; if the reduction target ratio is less than the outflow reduction ratio, sequentially adding the outflow reduction ratio of the next flow until the reduction target ratio is not less than the outflow reduction ratio.
[0017] Preferably, the two-level traffic sharing trial calculation specifically includes: calculating the hash calculation result of the current flow's five-tuple based on the original packet five-tuple information, using a random binary value within the preset factor bit width upper limit as the starting SEED value; obtaining the adjusted expected SEED value according to the factor change domain range and change bit interval, and calculating a new hashkey result based on the expected SEED value.
[0018] On the other hand, the present invention provides an apparatus for single-arm echo BFD controllable aggregation burden negotiation, specifically comprising at least one processor and a memory, wherein the at least one processor and the memory are connected via a data bus, the memory stores instructions that can be executed by at least one processor, and the instructions, after being executed by the processor, are used to complete the single-arm echo BFD controllable aggregation burden negotiation method in the first aspect.
[0019] Compared with the prior art, the beneficial effects of the embodiments of the present invention are as follows: by filling the specified fields in the BFD message, the path sharing factor is carried to the upstream through the upstream and downstream negotiation mechanism, which solves the need for protection switching of non-directly connected devices in the MC-LAG scenario, and makes the return packet path controllable in the aggregation scenario; and by combining the upstream load situation, the downstream aggregation allocation ratio is dynamically informed and adjusted, realizing the dynamic management and control of the downstream based on the traffic feedback negotiation method. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments of the present invention will be briefly described below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0021] Figure 1 This is a schematic diagram of the protection switching relationship in a typical MC-LAG protection scenario;
[0022] Figure 2 This is a schematic diagram illustrating the process of distributing services from the access device to the upstream in existing technologies.
[0023] Figure 3 This is a flowchart of a method for single-arm echo BFD controllable aggregation burden-sharing negotiation provided by an embodiment of the present invention;
[0024] Figure 4 This is a schematic diagram of the BFD message structure defined in the protocol;
[0025] Figure 5 A diagram illustrating the schema type corresponding to the AuthType field;
[0026] Figure 6 A diagram illustrating the meaning of the parameters corresponding to each value in the Auth Data field;
[0027] Figure 7 A flowchart illustrating another method for single-arm echo BFD controllable aggregation burden-sharing negotiation provided by an embodiment of the present invention;
[0028] Figure 8 This is a timing diagram of a method for controlled aggregation sharing negotiation in single-arm echo BFD provided in an embodiment of the present invention;
[0029] Figure 9 A schematic diagram of a controllable path obtained by a single-arm echo BFD controllable aggregation sharing negotiation method provided in an embodiment of the present invention;
[0030] Figure 10 A flowchart illustrating another method for single-arm echo BFD controllable aggregation burden-sharing negotiation provided by an embodiment of the present invention;
[0031] Figure 11 This is a diagram illustrating the current rate distribution of ports based on hashkeys at the controlled end.
[0032] Figure 12 This is a schematic diagram showing the percentage relationship of target result rates based on the hashkey port on the controlled end.
[0033] Figure 13A flowchart illustrating another method for single-arm echo BFD controllable aggregation burden-sharing negotiation provided by an embodiment of the present invention;
[0034] Figure 14 A flowchart illustrating another method for single-arm echo BFD controllable aggregation burden-sharing negotiation provided by an embodiment of the present invention;
[0035] Figure 15 A schematic diagram of a two-level shared trial calculation model;
[0036] Figure 16 A flowchart illustrating another method for single-arm echo BFD controllable aggregation burden-sharing negotiation provided by an embodiment of the present invention;
[0037] Figure 17 Timing diagram of another single-arm echo BFD controllable aggregation sharing negotiation method provided in an embodiment of the present invention;
[0038] Figure 18 A schematic diagram of a device structure for a single-arm echo BFD controllable polymerization sharing negotiation provided in an embodiment of the present invention;
[0039] The accompanying figure is labeled as follows:
[0040] 11: Processor; 12: Memory. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0042] This invention is an architecture of a specific functional system. Therefore, the specific embodiments mainly describe the functional logic relationship of each structural module, and do not limit the specific software and hardware implementation methods.
[0043] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0044] Example 1:
[0045] In practice, single-arm echo (SEE) does not require both ends to have negotiated echo capabilities. One end is configured with BFD detection, while the other end does not need BFD capability. In the following text, the end configured with BFD detection is referred to as the control end, and the end without BFD capability is referred to as the controlled end. During detection, the control end sends a special BFD message. The source IP and destination IP in the message's IP header are both the control end's IP address, and the BFD session connection local identifier and BFD session connection remote identifier in the BFD payload are the same. After receiving the message, the controlled end directly loops back to the control end to determine if the link is normal. Because the controlled end does not need BFD capability, it has strong adaptability to the performance of the controlled end devices.
[0046] In typical MC-LAG protection scenarios, the protection switching relationship is as follows: Figure 1 As shown in the diagram. DUT1 is the control terminal, and S1 is the controlled terminal. DUT1 has aggregation ports trunk1 and trunk2. Between DUT1 and S1, there is a primary link L1 (corresponding to aggregation port trunk1), backup links L2-L3, and backup link L4 (corresponding to aggregation port trunk2). DUT2 and S2 are network elements that can act as routing relays, and VM1 is the virtual machine corresponding to S1. The following is based on... Figure 1 The protection switching relationship in this embodiment illustrates the implementation process of the solution provided in this embodiment. In specific implementation scenarios, the following implementation process can be referred to and adjusted according to actual needs.
[0047] Downlink traffic from DUT1 needs to be sent to VM1 via the MC-LAG protection of DUT1-DUT2. When downlink L1 of DUT1 fails, it is desired to switch to links L2-L3 via MC-LAG link protection. When link L3 is interrupted, it is desired to trigger the interface turnk1 logical interface on DUT1 to go down, and forward the data through the next-hop exit trunk2 of the backup link L3, via link L4, and through S2 to reach VM1. During the switchover, due to the existence of the turnk1-trunk2 aggregation port, the following problems will occur: 1. After the BFD message sent by DUT1 reaches the access S1 device, because the uplink interface of the access S1 device is a cross-frame aggregation port, the BFD message return packet may return to DUT1 via link L3, making it impossible to effectively detect the connectivity of L1. 2. Because link L1 is connected to the LSW L2 non-directly connected switching device, the existing per-port BFD L2 layer protection detection cannot meet the requirements.
[0048] On the other hand, the process of sharing services from access devices to upstream devices is as follows: Figure 2As shown, the uplink traffic from S1 needs to be forwarded to the aggregation device via DUT1. When the uplink egress link of DUT1 becomes congested, it is desirable to adjust the traffic aggregation and load balancing results reasonably through the MC-LAG downlink access device, so that some traffic can be distributed to the uplink of DUT2. Since the traffic sent by S1 cannot perceive uplink congestion, it may lead to an uneven distribution of access traffic, and the existing mechanism does not have a way to adjust the traffic distribution in a timely manner as needed.
[0049] To solve the above problems, such as Figure 3 As shown in the figure, the specific steps of the single-arm echo BFD controllable aggregation sharing negotiation method provided in this embodiment of the invention are as follows.
[0050] Step 101: The control terminal obtains the current network status.
[0051] Since this embodiment needs to solve two technical problems—the receiving port of the BFD message responded by the controlled end does not meet the expected entry requirements and the upstream egress bandwidth is close to the preset congestion threshold—the control end needs to first judge the network condition and confirm the type of problem that needs to be solved so that the required mode and parameters can be transmitted to the downstream device through BFD message extension in subsequent steps.
[0052] Step 102: Fill the BFD message according to the network status and send the BFD message to the controlled end to inform the controlled end to enter the corresponding mode.
[0053] The BFD message structure defined in the protocol is as follows: Figure 4 As shown, the specific meanings of the fields can be found in the detailed description in RFC 5880. This embodiment mainly involves the mandatory A and M fields, as well as the optional Auth Type and Auth Data fields. The specific explanations of each field are as follows:
[0054] 1. Authentication Present(A): If set, it indicates that authentication is required.
[0055] 2. Multipoint(M): Reserved bit for future point-to-multipoint expansion of BFD.
[0056] 3. Authentication Type (Auth Type): BFD controls the authentication type used in the message.
[0057] 4. Authentication Data (Auth Data): Net payload of authentication fields.
[0058] To address the aforementioned technical issues, this embodiment expands the field pairs. The A and M fields inform the controlled terminal of the desired mode, while the AuthType and Auth Data fields transmit the required parameters. The specific settings and meanings of each field are detailed later. The values of the AuthType and Auth Data fields and their corresponding meanings are as follows: Figure 4 As shown, the pattern type corresponding to the AuthType field is as follows: Figure 5 As shown, the meanings of the parameters corresponding to each value in the Auth Data field are as follows: Figure 6 As shown below, the parameter corresponding to the Auth Data field will be referred to as the adjustment factor.
[0059] Step 103: After receiving the BFD message, the controlled end identifies the A and M fields, enters the mode specified by the values of the A and M fields, and adjusts the network status according to the parameters in the Auth Type and Auth Data fields.
[0060] Upon receiving the BFD message, the controlled terminal determines the required network state based on the values set in the A and M fields, and adjusts the network state according to the parameters carried in the AuthType and Auth Data fields. The specific adjustment method will be detailed later.
[0061] After steps 101-103 provided in this embodiment, the current network status and corresponding parameters can be transmitted to the downstream controlled end by expanding the BFD message, so that the controlled end can make corresponding adjustments according to the network status and parameters to solve the corresponding technical problems.
[0062] The following sections will detail the specific implementation process of the above steps to address the two problems that need to be solved in this embodiment.
[0063] Question 1: A mechanism is needed to control the path load balancing when BFD packets are forwarded at the aggregation port.
[0064] To control the forwarding path of the aggregation port, step 101 is required to obtain the current aggregation port forwarding path and determine if it is the expected forwarding path. After the control end sends a BFD message, it obtains the ingress interface of the BFD message responded by the controlled end at the control end and determines whether the ingress interface meets the expected ingress interface. Specifically: after the control end DUT1 sends a BFD message, the controlled end S1 responds with a BFD message. DUT1 obtains the ingress port of the BFD message responded by S1 at its own end and determines whether the ingress port meets the expected ingress requirements. If it meets the expected ingress requirements, DUT1 starts the subsequent operations as a normal session.
[0065] If the expected entry point is not met, the BFD message needs to be filled in according to step 102, and the BFD message needs to be sent again so that S1 can adjust the response path. Specifically: fill in the Auth Type field (0xC8) of NEGMODE_B, set Auth Data to the shared control parameter type, and set the A and M fields to trigger the controlled end to enter the BFD probe negotiation frame mode. The B1 type is specifically... Figure 5 In the “Shared Control Parameter Type” section, type B1 can be filled in according to the format of the BFD probe negotiation frame.
[0066] After receiving the BFD message containing the mode and parameters, the controlled end, following step 103, uses BFD to probe the negotiated frame mode and probes the ingress interface that matches the expectations. For example... Figure 7 As shown, the specific steps are as follows.
[0067] Step 201: The controlled end obtains the aggregation member port information of the BFD message, performs trial calculation on the traffic sharing result of the sending exit according to the control type requirements, and obtains the aggregation member port that is different from the current exit as the sending exit and the corresponding exit deflection factor (offset) information. The controlled end fills the exit deflection factor information into the corresponding field of the exit deflection factor in the Auth Data field of the BFD message, and forwards the message back to the control end through the sending exit.
[0068] After receiving the BFD message, the controlled end S1 recognizes that the reserved bits in the A and M fields have been set. According to the agreed NEGMODE_B mode behavior, it extracts the control type code contained in the Auth Type, namely the BFD control word (AUTH) 0xC8, and obtains the local ingress aggregation interface information of the BFD message. The ingress aggregation interface information contains the aggregation member port information.
[0069] The controlled end S1 performs trial calculations on the traffic sharing results of the sending egress according to the control type requirements, and obtains the deflection factor information of the egress that is different from the current egress. In this scenario, the different egress is another aggregation member port. In the specific calculation, the port offset information that needs to be added when the actual aggregation sharing forwards to another aggregation member port can be combined with the device as a new adjustment factor, which is filled into the response BFD message for encapsulation (Auth Type: 0xC8, Authdata: 0x80 egress deflection factor value) and forwarded through the aggregation port corresponding to L3, and sent back to the control DUT1.
[0070] Step 202: After receiving the adjustment factor information through the session, the control end enters NEGMODE_C mode, sets the M field to be closed, retains the A field, and fills the current adjustment factor information as the Auth Data content of the next sent message, and fills the Auth Type of NEGMODE_C. After receiving the message with the A field set, the controlled end forwarding plane extracts the adjustment factor information in the Auth Data and uses it as the hash basis for forwarding this message.
[0071] After receiving the factor information, the control terminal DUT1 session will again determine whether the ingress port meets the expected ingress requirements.
[0072] If the expected entry does not meet the requirements, resend the BFD message and repeat the adjustments in step 201.
[0073] If the expected entry point is met, the system enters NEGMODE_C mode, disables the M field, and retains the A field. Simultaneously, the adjustment factor information is updated and used as the Auth Data content in the next sent BFD message, and the authentication type Auth Type (reserved type 0xC8) of NEGMODE_C is also filled in.
[0074] After the controlled end S1 forwarding plane receives a message with the A field set, it obtains the authentication type Auth Type as a reserved type 0xC8. It then extracts the adjustment factor information from Auth Date and uses it as the hash basis for forwarding this message. After this processing, the controlled end can continuously forward BFD data messages sent by the controlling end according to the expected aggregation port selection result. For other types of data messages sent using this aggregation member interface as the next hop out interface, the original aggregation and load-sharing process remains unchanged.
[0075] Step 203: When the primary link fails, the BFD timeout control terminal does not report the fault, but only reports the member port deactivation event. The control terminal resends the BFD ECHO message. When the control terminal detects the backup link failure, it reports the primary link failure and triggers the backup link switchover.
[0076] When a failure occurs in link L1, the BFD timeout control terminal does not report trunk1 down, but only reports the deactivation event of the corresponding member port of L1.
[0077] Since there may be a link failure but the controlled end S1 is normal, the control end OUT1 resends the BFD message, repeats the above trial and adjustment, until the BFD message in response from S1 is received from the backup return packet path.
[0078] When the control terminal DUT1 detects a backup link failure, it notifies the tunk1 interface to go down, triggering the L3 next hop to switch to the backup trunk2.
[0079] After steps 201-203 provided in this embodiment, the expected path can be found and the expected aggregation port can be obtained.
[0080] Specifically, the trial calculation process in step 202 is as follows: The controlled end, according to the control negotiation requirements in NEGMODE_B mode, sets the egress offset base value to the current base value and iteratively calculates the actual egress using the flow sharing algorithm of this device. Specifically, according to the control negotiation requirements in NEGMODE_B mode, the egress offset factor O1 information specified in the current network element configuration parameters (such as...) is used... Figure 6 The actual output (i.e., the output of the first return packet) is calculated using the current base value and iterated according to the traffic sharing algorithm of device S1. However, this output may not necessarily match the expected sharing effect.
[0081] After offsetting according to the change step size in the adjustment factor configured for this network element, it is added to the hash key for recalculation of the outbound deflection without enabling hash deduplication and load balancing. The new outbound result is compared with the original outbound result. If they are inconsistent, the effect of switching the response port is achieved, and the calculation process can be terminated. The currently calculated outbound deflection factor information is then encapsulated in the message. Specifically, the base value is offset according to the step size parameter configured for the S1 device, that is, according to the O2 parameter value in the outbound adjustment factor, and then added to the hash key for recalculation of the outbound deflection without enabling hash deduplication and load balancing (type 0x02 in the control policy). The new outbound result is compared with the original outbound result. If they are inconsistent, the current outbound deflection factor information is encapsulated in the message (Auth Type: 0xC8, Authdata: 0x80 outbound deflection factor value).
[0082] The timeline of the above implementation process is as follows: Figure 8 As shown, by carrying an adjustment factor in the extended BFD message, controllable path sharing is achieved when the BFD message is forwarded at the aggregation port, solving problem 1 in this embodiment and obtaining the desired result. Figure 9 The controllable path shown.
[0083] Question 2: It is necessary to be able to dynamically inform and adjust the downstream aggregation allocation ratio based on the upstream load situation.
[0084] To allocate downstream aggregation ratios, step 101 is required to detect whether the upstream egress bandwidth is approaching a preset congestion threshold. For general equipment, this can be achieved by monitoring the size of the QoS queue buffer on the outgoing interface and determining whether the port's capacity exceeds expectations based on the consumption of the forwarding chip's buffer queue. By configuring a buffer alarm threshold (e.g., triggering a congestion event notification if the buffer exceeds 90% of its total capacity), the occurrence and resolution of port congestion can be detected. In specific implementations, an appropriate detection method should be selected based on the capabilities of the specific equipment.
[0085] When the upstream egress bandwidth approaches the preset congestion threshold, the BFD message needs to be populated according to step 102, and the BFD message needs to be sent again so that S1 can adjust the aggregation allocation ratio. Specifically: populate the authentication type Auth Type (0xC6) of NEGMODE_A, set the egress reduction target ratio, statistical period and control policy in Auth Data (0xC7), and set the A field and M field to trigger the controlled end to enter the data sharing negotiation mode.
[0086] After receiving the BFD message containing the mode and parameters, the controlled end adjusts the proportion according to the data sharing negotiation mode, following step 103. Specifically, as follows... Figure 10 As shown.
[0087] Step 301: After receiving the BFD message, the controlled end obtains the current BFD outbound traffic sharing situation to form a sharing matching table, and obtains the outbound reduction target ratio and control strategy.
[0088] After receiving the BFD message, the controlled end S1, in NEGMODE_A mode (0xC6), obtains the traffic sharing information of the aggregation port to which the current BFD belongs, forms a traffic sharing matching table, and obtains the traffic sharing control parameter A1 information. The A1 information specifically includes... Figure 5 The A1 type of "Shared Control Type" has the following specific value: the control parameter information obtained from the BFD control message is multiplied by 100 as a percentage. Step 302: The controlled end recalculates the service status of the sending exit according to the exit reduction target ratio and control strategy, and sends the result parameters back to the notification control end.
[0089] The controlled end S1 monitors the outgoing service status according to... Figure 5 The control parameters carried in the message, combined with Figure 6 The flow control configuration information of this network element shown is recalculated, and the result parameters are recorded. After the controlled end S1 successfully completes the recalculation, it sends a response to the notification control end DUT1, carrying the negotiation result.
[0090] Step 303: Based on the negotiation result of the controlled end (Auth Type: 0xC9, Authdata: 0x01, 0x01: Success / 0x02: Failure), the control end DUT1 performs the following processing: If the expected situation can be met, the control end DUT1 sets the M field to be closed, retains the A field, notifies the downstream controlled end to start the bandwidth sharing adjustment, and the controlled end redistributes the bandwidth according to the result parameters.
[0091] If the expected bandwidth reduction cannot be met, the control terminal DUT1 will report an alarm. If the required bandwidth can be met, the M field will be disabled, the A field will be retained, and the downstream controlled terminal S1 will be notified to initiate a bandwidth sharing adjustment. The controlled terminal S1 will then initiate a new bandwidth sharing algorithm to distribute the bandwidth reasonably according to the notification.
[0092] After steps 301-303 provided in this embodiment, the traffic sharing adjustment can be completed.
[0093] In step 301 above, the specific method for obtaining the traffic sharing status of the aggregation port to which the current BFD belongs and forming the sharing matching table is as follows:
[0094] Define the current percentage of ports based on the hashkey: SF_CUR.
[0095] Define the current rate ratio of the controlled end based on the hashkey port as follows: Figure 11 As shown.
[0096] Define the target percentage of ports based on hashkey: SF_AIM;
[0097] The controlled end is defined based on the target result rate ratio of the port using the hashkey as follows: Figure 12 As shown.
[0098] In step 302 above, such as Figure 13 As shown, the process by which the controlled end recalculates the business status of the outgoing network according to the outgoing network reduction target ratio and control strategy is as follows.
[0099] Step 401: Add a controllable periodic traffic percentage table based on business characteristics and hashkey, and combine the sharing ratio and control strategy required to achieve the export reduction target ratio to obtain the target traffic percentage table that needs to be adjusted.
[0100] A new controllable periodic traffic percentage table based on business characteristics and hashkey is added. Combined with the sharing ratio of the pressure reduction required to achieve the NEGMODE_A mode A1 requirement and the A2 control strategy, the target traffic percentage table that needs to be adjusted is obtained.
[0101] Step 402: According to the target traffic ratio table, combining the traffic characteristics with the adjustment factor information in the BFD packet, perform a two-level sharing trial calculation on the traffic. When the trial calculation shows that the exit has not effectively migrated to the standby exit, perform a jump according to the adjustment factor information until the expectation is met, and record the corresponding adjustment factor information.
[0102] For the target ratio table, perform a two-level sharing trial calculation on the result traffic in Step 3.1 by combining the traffic characteristics with each parameter in the adjustment factor. When the trial calculation shows that the exit has effectively migrated to the standby exit, it is considered that the target is achieved; otherwise, perform a jump according to the configured factor parameters until the expectation is met, and record the corresponding exit deflection factor and Seed result. In order to achieve the change in the sharing effect from Figures 11 to 12 the calculated exit deflection factor and Seed attribute need to be saved locally at the controlled end as the actually effective parameters for the hash operation in the subsequent service forwarding process. The specific hash operation method can use Figure 15 a two-level hash process.
[0103] After going through Steps 401 - Step 402 provided in this embodiment, the re-trial calculation of the allocation ratio can be completed.
[0104] In the above Step 401, as Figure 14 shown, the process of obtaining the target traffic ratio table that needs to be adjusted is as follows.
[0105] Step 501: Compare the current exit reduction ratio of each flow with the exit reduction target ratio.
[0106] Take a traffic's current SF_CUR_x and compare it with A1. If SF_CUR_x >= A1, obtain the current flow characteristics as the adjustment target.
[0107] Step 502: If the exit reduction target ratio is not less than the exit reduction ratio, use the current flow characteristics as the adjustment target for this flow.
[0108] If SF_CUR_x < A1, sequentially stack the (SF_CUR_n)sum of the second traffic until it satisfies >= A1 and then stop.
[0109] Step 503: If the reduction target ratio is less than the exit reduction ratio, sequentially stack the exit reduction ratio of the next flow until the reduction target ratio is not less than the exit reduction ratio and then stop.
[0110] Perform the processing of Step 402 on each flow in the result of Step 502.
[0111] After going through Steps 501 - Step 502 provided in this embodiment, the adjusted target traffic ratio table can be obtained.
[0112] In step 402 above, the two-level shared trial calculation mode is as follows: Figure 15 As shown.
[0113] When performing trial calculations, the port offset algorithm should be used preferentially. Specifically:
[0114] Add a port offset to the original output port result: Result6 = Result5 + offset.
[0115] If Result6 or Result5 is inconsistent with the original outlet of the flow, the process ends; otherwise, the calculation process in step 402 is repeated.
[0116] Furthermore, a forced hash deduplication algorithm can be used for two-level load balancing, such as... Figure 16 As shown, the specific process is as follows.
[0117] Step 601: Calculate the hash result of the current stream's five-tuple based on the original packet five-tuple information, using a random binary value within the preset factor bit width upper limit as the starting SEED value.
[0118] Get the hash calculation result of the current stream quintuple: Result1 = Func_hash(original packet quintuple information).
[0119] Get a valid starting value for SEED, and take a random binary number within the width of S1: Result2 = Func_S1(SEED).
[0120] Step 602: Obtain the adjusted expected SEED value according to the range of the factor change domain and the change bit interval, and calculate the new hash key result based on the expected SEED value.
[0121] Obtain the expected SEED value obtained by adjusting factors S2 and S3: Result3 = Result2 + (Result2 & S2 bit-width mask) + S3.
[0122] Get the result of the new hash key calculation: Result4 = (Result1 & Result3).
[0123] Retrieve the result of the new output port calculation: Result5 = Func_port_map(Result4)
[0124] After steps 501-502 provided in this embodiment, the result of the two-level load sharing trial calculation of the forced HASH deduplication algorithm can be obtained.
[0125] The timeline of the above implementation process is as follows: Figure 17As shown, an upstream dynamic feedback flow control sharing parameter negotiation mechanism is adopted, combined with a downstream two-level trial balance adjustment sharing factor calculation method, so that the downstream flow is effectively controlled and shared, thus solving problem 2 in this embodiment.
[0126] As can be seen from the implementation process corresponding to the two problems mentioned above, the single-arm echo BFD controllable aggregation sharing negotiation method provided in this embodiment solves the scenario requirement of L2-L3 protection switching of non-directly connected devices in the MC-LAG scenario, making the protection effect controllable, and solving the downstream demand for adjusting traffic sharing on demand.
[0127] Example 2:
[0128] Based on the single-arm echo BFD controllable aggregation load-sharing negotiation method provided in Embodiment 1 above, the present invention also provides an apparatus for implementing the above method, such as... Figure 18 The diagram shown is a schematic representation of the device architecture according to an embodiment of the present invention. The device for single-arm echo BFD controllable aggregation load-sharing negotiation in this embodiment includes one or more processors 11 and a memory 12. Figure 18 Take a processor 11 as an example.
[0129] Processor 11 and memory 12 can be connected via a bus or other means. Figure 18 Taking the example of a connection between China and Israel via a bus.
[0130] The memory 12 serves as a non-volatile computer-readable storage medium for the single-arm echo BFD controllable aggregation sharing negotiation method. It can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the single-arm echo BFD controllable aggregation sharing negotiation method in Embodiment 1. The processor 11 executes various functional applications and data processing of the single-arm echo BFD controllable aggregation sharing negotiation device by running the non-volatile software programs, instructions, and modules stored in the memory 12, thereby implementing the single-arm echo BFD controllable aggregation sharing negotiation method of Embodiment 1.
[0131] Memory 12 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 12 may optionally include memory remotely located relative to processor 11, which can be connected to processor 11 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0132] The program instructions / modules are stored in memory 12. When executed by one or more processors 11, they perform the single-arm echo BFD controllable aggregation burden-sharing negotiation method described in Embodiment 1 above, for example, performing the above-described method. Figure 3 , Figure 7 and Figure 10 The steps are shown below.
[0133] Those skilled in the art will understand that all or part of the steps in the various methods of the embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0134] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for single-arm echo BFD controllable aggregation sharing negotiation, characterized in that, Specifically, it includes: The control terminal obtains the current network status, which includes: the receiving port of the BFD message responded by the controlled terminal does not meet the expected ingress requirements, and the upstream egress bandwidth is close to the preset congestion threshold. The BFD message is populated according to the network status and then sent to the controlled end to inform the controlled end to enter the corresponding mode. The fields that need to be populated in the BFD message include: A field, M field, Auth Type field and AuthData field. After receiving the BFD message, the controlled end identifies the A and M fields, enters the mode specified by the values of the A and M fields, and adjusts the network status according to the parameters in the Auth Type and Auth Data fields. The process of filling in BFD messages based on network status specifically includes: when the ingress interface does not meet the expected ingress interface, filling in the authentication type Auth Type of NEGMODE_B, setting Auth Data to the load sharing control parameter type, and setting the A and M fields to trigger the controlled end to enter the BFD probe negotiation frame mode; when the upstream egress bandwidth is close to the preset congestion threshold, filling in the authentication type Auth Type of NEGMODE_A, setting the egress reduction target ratio, statistical period, and control strategy in Auth Data, and setting the A and M fields to trigger the controlled end to enter the data load sharing negotiation mode. When the ingress interface does not match the expected ingress interface, the network state is adjusted according to the parameters in the Auth Type and Auth Data fields. Specifically, this includes: the controlled end obtaining the aggregation member port information of the BFD packet, performing a trial calculation on the traffic sharing result of the sending egress according to the control type requirements, obtaining the aggregation member port different from the current egress as the sending egress and the corresponding egress deflection factor information, the controlled end filling the egress deflection factor information into the corresponding field of the egress deflection factor in the Auth Data field of the BFD packet, and forwarding the packet back to the control end through the sending egress; after receiving the adjustment factor information through the session, the control end enters NEGMODE_C mode, sets the M field to be closed, retains the A field, and fills the current adjustment factor information as the Auth Data content of the next sent packet, and fills in the Auth Type of NEGMODE_C authentication type. After the controlled end forwarding plane receives the packet with the A field set, it performs an Auth... The adjustment factor information in the Data is extracted and used as the hash basis for forwarding this message. When the primary link fails, the BFD timeout control terminal does not report the failure, but only reports the member port deactivation event. The control terminal resends the BFD message. When the control terminal detects the backup link failure, it reports the primary link failure and triggers the backup link switchover.
2. The method for single-arm echo BFD controllable aggregation sharing negotiation according to claim 1, characterized in that, The control terminal obtains the current network status, specifically including: After the control end sends a BFD message, it obtains the BFD message response from the controlled end and enters the control end's ingress interface to determine whether the ingress interface matches the expected ingress interface. Alternatively, the control unit can sense whether the upstream outbound bandwidth is close to the preset congestion threshold.
3. The method for single-arm echo BFD controllable aggregation sharing negotiation according to claim 1, characterized in that, The calculation of the traffic sharing result at the sending exit is performed according to the control type requirements, specifically including: The controlled end, according to the control negotiation requirements in NEGMODE_B mode, sets the outlet offset base value to the current base value and iteratively obtains the actual outlet value using the flow sharing algorithm of this device. After offsetting according to the change step size in the adjustment factor configured in this network element, it is added to the hash key for recalculation of the outbound deduplication without hash deduplication and distribution. The new outbound result is compared with the original outbound result. If they are inconsistent, the currently calculated outbound deduplication factor is encapsulated into the message.
4. The method for single-arm echo BFD controllable aggregation sharing negotiation according to claim 1, characterized in that, When the upstream outbound bandwidth approaches a preset congestion threshold, the adjustment of the network status based on the parameters in the Auth Type and Auth Data fields specifically includes: After receiving the BFD message, the controlled end obtains the current BFD outbound traffic sharing situation to form a sharing matching table, and obtains the outbound reduction target ratio and control strategy; The controlled end recalculates the business status of the outgoing network according to the outgoing network reduction target ratio and control strategy, and sends the result parameters back to the control end. Based on the negotiation results with the controlled end, the control end sets the M field to be closed and the A field to be retained if the expected conditions can be met. It then notifies the downstream controlled end to start the bandwidth sharing adjustment, and the controlled end reallocates the bandwidth according to the result parameters.
5. The method for single-arm echo BFD controllable aggregation sharing negotiation according to claim 4, characterized in that, The controlled end recalculates the outbound service status based on the outbound reduction target ratio and control strategy, specifically including: A new controllable periodic traffic percentage table based on business characteristics and hashkey is added. Combined with the sharing ratio and control strategy required to achieve the export reduction target ratio, the target traffic percentage table that needs to be adjusted is obtained. Based on the target traffic percentage table, combined with traffic characteristics and adjustment factor information in the BFD message, a two-level traffic sharing trial calculation is performed. If the trial exit fails to effectively migrate to the backup exit, the traffic is redirected according to the adjustment factor information until the expected result is met, and the corresponding adjustment factor information is recorded.
6. The method for single-arm echo BFD controllable aggregation sharing negotiation according to claim 5, characterized in that, The process of deriving the target traffic percentage table that needs adjustment specifically includes: Compare the current export reduction rate with the export reduction target rate for each flow; If the export reduction target ratio is not less than the export reduction ratio, the current flow characteristics shall be used as the adjustment target for that flow; If the reduction target ratio is less than the export reduction ratio, the export reduction ratio of the next flow is added sequentially until the reduction target ratio is no less than the export reduction ratio.
7. The method for single-arm echo BFD controllable aggregation sharing negotiation according to claim 5, characterized in that, The two-level traffic sharing calculation specifically includes: The hash result of the current stream is calculated based on the original packet quintuple information, and the random binary value within the preset factor bit width upper limit is used as the starting SEED value. The adjusted expected SEED value is obtained by considering the range of the factor variation domain and the interval of the variation bit. The new hashkey result is then calculated based on the expected SEED value.
8. A device for single-arm echo BFD controllable aggregation sharing negotiation, characterized in that: It includes at least one processor and a memory, which are connected via a data bus. The memory stores instructions that can be executed by the at least one processor. After being executed by the processor, the instructions are used to complete the single-arm echo BFD controllable aggregation burden-sharing negotiation method according to any one of claims 1-7.
Citation Information
Patent Citations
Port state setting method, and port priority selection method and device
CN103560898A
Bidirectional forwarding detection method and device
CN111654406A