Method, device and storage medium for switching bidirectional forwarding detection packet length
Patent Information
- Application Number
- JP2022549876
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-02-20
- Filing Date
- 2020-12-02
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2040-12-02
AI Technical Summary
【0010】 本願の実施例は第1ノードを介して第2ノードに事前切り替えパケットを送信し、BFDパケット長の切り替えを実現しながら、BFDセッションの中断を回避する。
Smart Images

Figure 0007637689000001 
Figure 0007637689000002 
Figure 0007637689000003
Abstract
Description
[Technical field]
[0001] (CROSS-REFERENCE TO RELATED APPLICATIONS) This application claims priority to a Chinese patent application bearing application number 202010104826.8, filed with the State Intellectual Property Office of the People's Republic of China on February 20, 2020, the entire contents of which are incorporated herein by reference.
[0002] The present application relates to wired communication networks, for example to a method, an apparatus and a storage medium for switching bidirectional forwarding detection packet length. [Background technology]
[0003] The Bidirectional Forwarding Detection (BFD) protocol, which runs in asynchronous mode, allows both ends of a BFD session to send large BFD packets to each other and is used to verify the Maximum Transmission Unit (MTU) of the packet forwarding path. If one end of a BFD session enables the sending of large BFD packets, but the other end of the BFD session does not support large BFD packet processing, the other end will simply discard the large BFD packets it receives, causing the BFD session to be interrupted. Summary of the Invention [Problem to be solved by the invention]
[0004] The present invention provides a method, an apparatus and a storage medium for switching BFD packet length, which realizes switching BFD packet length while avoiding interruption of FD session. [Means for solving the problem]
[0005] The embodiment of the present application is sending a pre-switch packet independent of the current BFD packet to a second node when the current Bidirectional Forwarding Detection BFD packet length needs to be switched to a preset length, where a BFD session operating in an asynchronous mode between the first node and the second node is established, and the pre-switch packet is for informing the second node of an intention to switch the current BFD packet length to the preset length; and performing a switching operation on the current BFD packet length when receiving a reply packet fed back from the second node to the pre-switching packet.
[0006] The embodiment of the present application is Provided is a method for switching a BFD packet length, the method including the step of, when receiving a pre-switching packet transmitted from a first node, feeding back to the first node a reply packet for the pre-switching packet, wherein a BFD session operating in an asynchronous mode is established between a second node and the first node, and the pre-switching packet is for notifying the second node that a current BFD packet length is to be switched to a preset length.
[0007] The embodiment of the present application is a first transmitting module for transmitting a pre-switching packet; a first receiving module for receiving a reply packet; If the current Bidirectional Forwarding Detection BFD packet length needs to be switched to the preset length, send an independent pre-switch packet other than the current BFD packet to the second node, and At least one processor that performs a switch operation on a current BFD packet length when receiving a reply packet fed back from the second node in response to the pre-switch packet; Including, A BFD packet length switching device is provided, in which a BFD session operating in an asynchronous mode is established between a first node and the second node, and the pre-switching packet is for notifying the second node that the current BFD packet length is to be switched to the preset length.
[0008] The embodiment of the present application is a second receiving module for receiving the pre-switching packet; a second transmitting module for transmitting a reply packet; At least one processor that, when receiving a pre-switching packet transmitted from a first node, feeds back a reply packet to the first node in response to the pre-switching packet; Including, A BFD packet length switching device is provided, in which a BFD session operating in an asynchronous mode is established between a second node and the first node, and the pre-switching packet is for notifying the second node that it intends to switch the current BFD packet length to a preset length.
[0009] The embodiment of the present application is A storage medium is provided having stored thereon a computer program which, when executed by a processor, implements the method according to any one of the embodiments of the present application. Effect of the Invention
[0010] An embodiment of the present application sends a pre-switching packet to the second node via the first node to achieve BFD packet length switching while avoiding interruption of the BFD session.
[0011] The above examples, other aspects, and details of the embodiments of the present application are described based on the Brief Description of the Drawings, Detailed Description, and Claims. [Brief description of the drawings]
[0012] [Figure 1]FIG. 1 is a schematic diagram of a fixed-size packet segment encapsulation format required for a typical BFD packet in an embodiment of the present application. [Diagram 2] FIG. 2 is a schematic diagram of an encapsulation format of an optional security authentication packet segment of a general BFD packet in an embodiment of the present application. [Diagram 3] FIG. 3 is a flowchart of a method for switching BFD packet length in an embodiment of the present application. [Figure 4] FIG. 4 is a flowchart of a method for switching BFD packet length in an embodiment of the present application. [Diagram 5] FIG. 5 is a flowchart of a method for switching BFD packet length in an embodiment of the present application. [Figure 6] FIG. 6 is a structural schematic diagram of a BFD packet length switching device in an embodiment of the present application. [Figure 7] FIG. 7 is a structural schematic diagram of a BFD packet length switching device in an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, the embodiments of the present application will be described in detail with reference to the drawings. Note that the embodiments and features of the embodiments of the present application can be arbitrarily combined with each other as long as they are not inconsistent.
[0014] The BFD base protocol defined in the IETF (Internet Engineering Task Force) standard Request For Comments (RFC) 5880 describes two operation modes, Asynchronous Mode and Demand Mode, that provide bidirectional forwarding detection after a BFD session has been successfully established.
[0015] In asynchronous mode, the network nodes at both ends of a BFD session periodically send BFD packets to each other, and if one end of a BFD session does not receive BFD packets sent by the other end within a certain detection period, it declares the BFD session to have gone from an Up state to a Down state and may trigger subsequent operations such as protection switching.
[0016] In demand mode, each end of a BFD session checks the connectivity between them in an independent way, and the ends of the BFD session do not periodically send BFD packets to each other. Only when one end initiates connectivity verification on demand, does it send a pair of BFD packets to the other end, and the other end responds to the pair of BFD packets. If the sender does not receive a response packet from the other end within a certain detection time, it declares the BFD session to have gone from Up to Down, and may trigger subsequent operations such as protection switching.
[0017] The BFD base protocol defined in the IETF standard RFC 5880 specifies that a BFD packet includes a mandatory fixed-size packet segment and a selectable security authentication packet segment, of which the length of the mandatory fixed-size packet segment is 24 bytes, and the encapsulation format is as shown in Figure 1, in which the A bit is used to identify whether the BFD packet includes a selectable security authentication packet segment, where a 1 in the A bit position indicates that the BFD packet includes a selectable security authentication packet segment, and a 0 in the A bit position indicates that the BFD packet does not include a selectable security authentication packet segment.
[0018] The length of the selectable security authentication packet segment is not fixed, but varies according to the selected security authentication mechanism, and its length ranges from 2 bytes to 28 bytes, and the encapsulation format is as shown in Figure 2. In summary, the BFD base protocol RFC 5880 only allows the size of the BFD packet to vary within a very small range, with the minimum size being 24 bytes and the maximum size being 52 bytes, and such a BFD packet specified by RFC 5880 is called a general BFD packet in the embodiments of this application, and due to its size limitation, the BFD base protocol cannot be used to verify the MTU of the packet forwarding path.
[0019] In order to overcome the size limitation of general BFD packets, the IETF standardization proposal draft-ietf-bfd-large-packets proposes a large-sized BFD packet. By adding a padding packet segment (Padding) after the general BFD packet, the size of the general BFD packet can be significantly increased, thereby achieving the purpose of obtaining a large-sized BFD packet and verifying the MTU of the packet forwarding path using the BFD protocol.
[0020] The BFD base protocol defined in the IETF standard RFC 5880 allows for the modification of BFD protocol parameters through a notification / reply (Poll / Final) mechanism during the execution of a BFD session operating in asynchronous mode.
[0021] For example, when one end of a BFD session attempts to modify the transmission period of a BFD packet, the Desired Min TX Interval field in the BFD packet sent by that end according to the original period is modified to a new transmission period, and at the same time, when the P bit in the BFD packet is set to 1, it indicates that the other end is notified that the transmission period should be modified. When the other end receives a BFD packet with the P bit set to 1 and including the new transmission period, it immediately replies with a BFD packet with the F bit set to 1 in response, and this BFD packet returned from the other end is independent of other BFD packets that the other end periodically sends. When the notifying side receives a BFD packet returned from the other end with the F bit set to 1, it immediately stops sending BFD packets with the P bit set to 1 and replies by sending BFD packets with the P bit set to 0; otherwise, the notifying side continues to send BFD packets with the P bit set to 1.
[0022] The embodiments of the present application are applied to the process of switching from general BFD packets to large-sized BFD packets after changing the BFD protocol parameter modification mechanism specified in the above-mentioned RFC 5880, thereby solving the problem that the above switching process causes the interruption of the BFD session when the receiving side of the BFD session does not support processing of large-sized BFD packets.
[0023] In an embodiment of the present application, FIG. 3 shows a flowchart of a BFD packet length switching method, which includes the following steps S310 to S320.
[0024] In S310, if the current bidirectional forwarding detection BFD packet length needs to be switched to the preset length, an independent pre-switch packet other than the current BFD packet is sent to the second node.
[0025] In S320, upon receiving a reply packet fed back from the second node in response to the pre-switching packet, a switching operation is performed on the current BFD packet length.
[0026] A BFD session operating in an asynchronous mode is established between a first node and a second node, and the pre-switch packet is for notifying the second node that it intends to switch the current BFD packet length to the preset length.
[0027] When the first node, as the local node initiating the BFD packet length switching, needs to switch the BFD packet length, for example when the preset length is greater than the current BFD packet length, it needs to send a pre-switch packet to the second node, i.e., the other node of the BFD session. If the second node can process this pre-switch packet, the second node will immediately feed back a reply packet after receiving the pre-switch packet.
[0028] In this way, the first node can verify that the second node can process this pre-switched packet, and then perform the switch operation on the current BFD packet length, without the second node being able to process the pre-switched packet and discarding it because it cannot be processed, causing an interruption in the BFD session, by switching the current BFD packet to a BFD packet of the preset length.
[0029] In one embodiment, when the current bidirectional forwarding detection BFD packet length needs to be switched to a preset length, the step of sending an independent pre-switching packet other than the current BFD packet to the second node includes the step of sending the pre-switching packet to the second node when verification of a maximum transmission unit (MTU) of a packet forwarding path is triggered, wherein a packet length of the pre-switching packet is the preset length, and a first preset bit of the pre-switching packet is set to a first preset value, and the current BFD packet length is less than the preset length.
[0030] When the MTU of the packet forwarding path needs to be verified, the first node needs to send a BFD packet whose length is larger than that of a general BFD packet, in this case, the first node sends an independent pre-switching packet other than the current BFD packet to the second node, and the preset length is larger than the current BFD packet length, and according to the notification / response mechanism, the first preset bit in the pre-switching packet is set to a first preset value, thereby notifying the second node to respond to the pre-switching packet so that a reply packet is fed back, and the second preset bit of the reply packet fed back from the second node is set to the first preset value.
[0031] In one embodiment, the P bit of the pre-switch packet is set to one.
[0032] In one embodiment, performing a switch operation on the current BFD packet length includes replacing the current BFD packet with a length-switched BFD packet, the length of the packet being the preset length. When the first node receives the reply packet fed back from the second node, it can determine that a condition for switching the BFD packet length has been met, and then replaces the current BFD packet with the length-switched BFD packet, and continues to send the length-switched BFD packet according to a periodicity of the current BFD packet. Here, the P bit of the length-switched BFD packet is set to 0.
[0033] In one embodiment, when the current bidirectional forwarding detection BFD packet length needs to be switched to a preset length, after the step of sending an independent pre-switching packet other than the current BFD packet to a second node, the step further includes the step of notifying corresponding fault warning information if the reply packet fed back to the pre-switching packet is not received from the second node within a preset time.
[0034] When the first node sends a pre-switching packet, the period for sending the pre-switching packet can be preset, and this period is unrelated to the transmission period of the current BFD packet, but may be greater than the transmission period of the current BFD packet. If the first node does not receive a reply packet fed back from the second node to the pre-switching packet within the preset time, it indicates that the condition for switching the BFD packet to a BFD packet with a preset length is not met, and it is necessary to notify the network management system of warning information that the BFD packet length switching has failed. Optionally, the preset time is 3 to 5 times the period of the pre-switching packet.
[0035] In an embodiment of the present application, FIG. 4 shows a flowchart of a BFD packet length switching method, which includes the following S410.
[0036] In S410, upon receiving a pre-switching packet transmitted from a first node, a reply packet for the pre-switching packet is fed back to the first node.
[0037] A BFD session operating in an asynchronous mode is established between a second node and the first node, and the pre-switching packet is for notifying the second node that the current BFD packet length is to be switched to a preset length. If the second node can process the pre-switching packet, the second node immediately feeds back a reply packet upon receiving the pre-switching packet, thereby performing BFD packet length switching and informing the first node that it can switch to a BFD packet of a preset length.
[0038] In one embodiment, the second preset bit of the reply packet is set to a first preset value.
[0039] Based on the notification / response mechanism, a first preset bit in the received pre-switching packet is set to a first preset value, thereby notifying the second node to respond to the pre-switching packet, and in response, a second preset bit in the reply packet fed back from the second node is set to the first preset value.
[0040] In one embodiment, the F bit of the reply packet is set to one.
[0041] In an exemplary embodiment, FIG. 5 shows a flowchart of a BFD packet length switching method, which includes the following S510 to S550.
[0042] In S510, both ends of the BFD session periodically send general BFD packets to each other, and one end of the BFD session must initiate MTU verification of the packet forwarding path and switch the BFD packets sent from general BFD packets to large-sized BFD packets.
[0043] In S520, after one end of the BFD session initiates verification of the MTU of the route, within a preset time period, a large-sized BFD packet with the P bit set to 1 is continuously sent, in addition to the general BFD packets that are sent periodically.
[0044] Here, the reason why general BFD packets and large-sized BFD packets with the P bit set to 1 must be sent simultaneously is to ensure that the BFD session is not interrupted during the switching process. If a general BFD packet is replaced by a large-sized BFD packet with the P bit set to 1 during the switching process, as in the BFD protocol parameter modification mechanism specified in RFC 5880, it will cause the BFD session to be interrupted if the other side does not support processing large-sized BFD packets.
[0045] The frequency with which an end that initiates MTU validation of a path will send large BFD packets with the P bit set to 1 can be determined based on its own transmission capabilities.
[0046] In S530, one end that starts the verification of the MTU of the route judges whether or not it has received a general BFD packet with the F bit set to 1 returned from the other end within a preset time. When the other end of the BFD session receives a large-sized BFD packet with the P bit set to 1, it immediately replies with a general BFD packet with the F bit set to 1 as a response. Here, the reason for not returning a large-sized BFD packet with the F bit set to 1 and returning a general BFD packet with the F bit set to 1 is to prevent the length of the returned large-sized BFD packet from exceeding the MTU of the reverse packet forwarding route, causing the loss of the response packet. At the same time, the other end continuously receives general BFD packets to ensure that the BFD session is not interrupted.
[0047] In S540, if the end that initiates the route MTU verification receives a general BFD packet with the F bit set to 1 from the other end, it indicates that the switching process is successful, and replaces the general BFD packet with a large-sized BFD packet with the P bit set to 0, and the sending period is the same as the original sending period.
[0048] In S550, after a preset time, if one end that starts the verification of the MTU of the route does not receive a general BFD packet with the F bit set to 1 returned from the other end, it notifies fault warning information and at the same time continues to periodically transmit a general BFD packet with the P bit set to 0. If one end that starts the verification of the MTU of the route does not receive a general BFD packet with the F bit set to 1 returned from the other end, one of these is because the other end does not support processing of large-sized BFD packets, and the other is because the length of the large-sized BFD packet exceeds the MTU of the packet forwarding route, and in either of these two situations, a general BFD packet with the F bit set to 1 returned from the other end is not received.
[0049] At both ends of the BFD session, before switching to sending large-sized BFD packets, the end that initiates route MTU verification sends a large-sized BFD packet with an independent P bit set to 1 other than a general BFD packet, and determines the feasibility of switching to a large-sized BFD packet based on whether or not a general BFD packet with an F bit set to 1 is received in response from the other end, while maintaining the BFD session uninterrupted during this time.
[0050] In an embodiment of the present application, Fig. 6 shows a device for switching BFD packet length, the device includes: a first sending module 610 for sending a pre-switching packet; a first receiving module 620 for receiving a reply packet; and at least one processor for sending an independent pre-switching packet other than a current BFD packet to a second node when a current bidirectional forwarding detection BFD packet length needs to be switched to a preset length, and for performing a switching operation on a current BFD packet length when a reply packet fed back to the pre-switching packet is received from the second node, where a BFD session operating in an asynchronous mode is established between the first node and the second node, and the pre-switching packet is for informing the second node that the current BFD packet length is to be switched to the preset length.
[0051] In one embodiment, when the current Bidirectional Forwarding Detection BFD packet length needs to be switched to a preset length, the step of sending to the second node a pre-switch packet independent of the current BFD packet includes the step of sending the pre-switch packet to the second node when a maximum transmission unit (MTU) verification of a packet forwarding path is triggered, a packet length of the pre-switch packet is the preset length, a first preset bit of the pre-switch packet is set to a first preset value, and the current BFD packet length is less than the preset length.
[0052] In one embodiment, the P bit of the pre-switch packet is set to one.
[0053] In one embodiment, performing a switch operation on the current BFD packet length includes replacing the current BFD packet with a length-switched BFD packet, the packet length being the preset length.
[0054] In one embodiment, after the step of sending an independent pre-switching packet other than the current BFD packet to a second node when the current bidirectional forwarding detection BFD packet length needs to be switched to a preset length, the method further includes the step of notifying corresponding fault warning information when the reply packet fed back to the pre-switching packet is not received from the second node within a preset time.
[0055] In an embodiment of the present application, Fig. 7 shows an apparatus for switching BFD packet length, the apparatus includes: a second receiving module 710 for receiving a pre-switching packet; a second sending module 720 for sending a reply packet; and at least one processor for feeding back a reply packet to the pre-switching packet to the first node when receiving a pre-switching packet sent from a first node, where a BFD session operating in an asynchronous mode is established between the second node and the first node, and the pre-switching packet is for informing the second node that the current BFD packet length is to be switched to a preset length.
[0056] In one embodiment, the second preset bit of the reply packet is set to a first preset value.
[0057] In one embodiment, the F bit of the reply packet is set to one.
[0058] An embodiment of the present application provides a storage medium, which stores a computer program, which, when executed by a processor, implements any one of the methods of the embodiments of the present application.
[0059] The above are merely illustrative examples of the present application, and are not intended to limit the scope of protection of the present application.
[0060] Those skilled in the art will appreciate that the term user terminal includes any suitable type of wireless user equipment, such as, for example, a mobile telephone, a portable data processing device, a portable network access device, or a mobile station mounted on a vehicle.
[0061] Typically, each embodiment of the present application is realized by hardware, dedicated circuits, software, logic circuits, or any combination thereof. For example, the components may be partially realized by hardware and other parts may be realized by firmware or software that can be executed by a controller, microprocessor, or other computing device, but the present application is not limited thereto.
[0062] Embodiments of the present application may be implemented by causing a data processor of a mobile device to execute computer program commands, which may be implemented in a processor entity, such as in hardware, or a combination of software and hardware. The computer program commands may include assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source or target code written in any combination of one or more programming languages.
[0063] Any logic flow block diagrams in the drawings of this application may represent any of program steps, logic circuits connected to each other, modules and their functions, or combinations of program steps and their logic circuits, modules and their functions.
[0064] Computer programs can be stored in memory, which can be of any type compatible with the local technical environment and implemented with any corresponding data storage technology, including but not limited to Read-Only Memory (ROM), Random Access Memory (RAM), optical memory devices and systems (Digital Versatile Disk (DVD) or Compact Disk (CD)), etc.
[0065] The computer readable medium may include a non-transitory computer readable storage medium. The processor may be of any type compatible with the local technology environment, including, but not limited to, general purpose computers, special purpose computers, microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), programmable logic devices (Field-Programmable Gate Arrays (FGPAs) and processors based on multi-core processor architectures.
Claims
1. A first node, sending a pre-switch packet having the second length independent of a current BFD packet having the first length to a second node when the current BFD packet length needs to be switched from a first length to a second length, where a BFD session operating in an asynchronous mode between the first node and the second node is established, and the pre-switch packet is for informing the second node of an intention to switch the current BFD packet length to the second length; and when receiving a reply packet fed back from the second node in response to the pre-switch packet, determining that the second node can process the pre-switch packet having the second length and performing a switching operation to switch the current BFD packet length from the first length to the second length.
2. When it is necessary to switch the current BFD packet length from a first length to a second length, the step of transmitting a pre-switch packet having the second length independent of the current BFD packet having the first length to the second node comprises:
2. The method of claim 1, further comprising the step of: sending the pre-switch packet to the second node if a packet forwarding path maximum transmission unit (MTU) verification is triggered, wherein a first preset bit of the pre-switch packet is set to a first preset value and the first length of the current BFD packet is less than the second length.
3. The method of claim 2 , wherein the P bit of the pre-switch packet is set to one.
4. performing a switching operation to switch the current BFD packet length from the first length to the second length, 2. The method of claim 1, comprising replacing the current BFD packet having the first length with a length-switched BFD packet, the packet length of the length-switched BFD packet being the second length.
5. If it is necessary to switch the current BFD packet length from a first length to a second length, after the step of transmitting a pre-switch packet having the second length independent of the current BFD packet having the first length to the second node, The method according to any one of claims 1 to 4, further comprising the step of notifying corresponding fault warning information if the reply packet fed back from the second node to the pre-switching packet is not received within a preset time.
6. The second node, receiving a current BFD packet having a first length and a pre-switch packet having a second length independent of the current BFD packet, the pre-switch packet being for informing the second node that the current BFD packet length is to be switched to the second length, the pre-switch packet being sent from a first node, the pre-switch packet being sent from the first node to the second node, the pre-switch packet being sent from the second node to the first node; and if the second node can process the pre-switch packet having the second length, feeding back a reply packet to the first node for the pre-switch packet to inform the first node of a switch operation to switch the current BFD packet length from the first length to the second length.
7. 7. The method of claim 6, wherein a second preset bit of the reply packet is set to a first preset value.
8. The method of claim 7 , wherein the F bit of the reply packet is set to one.
9. A bidirectional forwarding detection (BFD) packet length switching device provided in a first node, comprising: a first transmitting module for transmitting a current BFD packet and a pre-switch packet; a first receiving module for receiving a reply packet; If it is necessary to switch the current BFD packet length from a first length to a second length, sending a pre-switch packet having the second length independent of the current BFD packet having the first length to a second node; and at least one processor that, when receiving a feedback packet from the second node in response to the pre-switch packet, determines that the second node can process the pre-switch packet having the second length, and performs a switching operation to switch the current BFD packet length from the first length to the second length; Including, A bidirectional forwarding detection (BFD) packet length switching device, wherein a BFD session operating in an asynchronous mode is established between the first node and the second node, and the pre-switch packet is for notifying the second node that it is about to switch the current BFD packet length to the second length.
10. A bidirectional forwarding detection (BFD) packet length switching device provided in a second node, comprising: a second receiving module for receiving the current BFD packet and the pre-switch packet; a second transmitting module for transmitting a reply packet; receiving a current BFD packet having a first length and a pre-switch packet having a second length independent of the current BFD packet transmitted from a first node; at least one processor that, if the second node can process the pre-switch packet having the second length, feeds back a reply packet to the first node for the pre-switch packet to inform the first node of a switch operation to switch the current BFD packet length from the first length to the second length; Including, A bidirectional forwarding detection (BFD) packet length switching device, wherein a BFD session operating in an asynchronous mode is established between the second node and the first node, and the pre-switch packet is for notifying the second node that it is about to switch the current BFD packet length to the second length.
11. A storage medium having stored thereon a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Packet communication method, and apparatus for performing the method
JP2005073198A
Wireless communication device, wireless communication method, and program
JP2018101954A
Method and system for negotiating the bidirectional forwarding detection session discriminator of pseudo wire
US20100023632A1