CN108880868A - BFD keep alive Packet transmission method, device, equipment and machine readable storage medium - Google Patents

BFD keep alive Packet transmission method, device, equipment and machine readable storage medium Download PDF

Info

Publication number
CN108880868A
CN108880868A CN201810554562.9A CN201810554562A CN108880868A CN 108880868 A CN108880868 A CN 108880868A CN 201810554562 A CN201810554562 A CN 201810554562A CN 108880868 A CN108880868 A CN 108880868A
Authority
CN
China
Prior art keywords
sequence number
keep alive
alive packet
bfd
bfd keep
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810554562.9A
Other languages
Chinese (zh)
Other versions
CN108880868B (en
Inventor
吴文
汪亮
李乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201810554562.9A priority Critical patent/CN108880868B/en
Publication of CN108880868A publication Critical patent/CN108880868A/en
Application granted granted Critical
Publication of CN108880868B publication Critical patent/CN108880868B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/18Protocol analysers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

The application provides a kind of BFD keep alive Packet transmission method, device, equipment and machine readable storage medium, this method:After local terminal network equipment is switched to slave control board from main control board, start first timer;Before first timer time-out, the first reservation sequence number, and periodicity sending first kind BFD keep alive Packet are being added into the first kind BFD keep alive Packet that peer network device is sent;After first timer time-out, the second reservation sequence number is being added into the second class BFD keep alive Packet that peer network device is sent, and send the second class BFD keep alive Packet.By the technical solution of the application, the first third class BFD keep alive Packet that receive can be abandoned to avoid peer network device, BFD agreement is avoided to shake, during solving masterslave switchover, since the differ greatly agreement of initiation of sequence number shakes problem.

Description

BFD keep alive Packet transmission method, device, equipment and machine readable storage medium
Technical field
This application involves fields of communication technology, more particularly, to a kind of BFD (Bidirectional Forwarding Detection, two-way converting detection) keep alive Packet transmission method, device, equipment and machine readable storage medium.
Background technique
BFD (Bidirectional Forwarding Detection, two-way converting detection) is general, standardization , the unrelated quick fault testing mechanism unrelated with agreement of medium, for detecting the two-way converting path between the network equipment.Its In, local terminal network equipment and peer network device are required to establish BFD session, in local terminal network equipment and peer network device After state is UP, local terminal network equipment periodically (such as sends primary) every 10 milliseconds and sends BFD guarantor to peer network device Message living, and peer network device periodically (such as sends primary) every 10 milliseconds and sends BFD keep-alive report to local terminal network equipment Text.Based on this, if the local terminal network equipment BFD that (such as 30 milliseconds) do not receive peer network device transmission within a preset time is protected Message living, it is determined that two-way converting path fails, and upper-layer protocol is notified to be further processed.
Summary of the invention
The application provides a kind of BFD keep alive Packet transmission method, described applied to the slave control board of local terminal network equipment Local terminal network equipment further includes main control board, the method includes:
After the local terminal network equipment is switched to the slave control board from the main control board, the first timing of starting Device;
Before first timer time-out, first is being added into the first kind BFD keep alive Packet that peer network device is sent Reservation sequence number, and periodicity sending first kind BFD keep alive Packet;First reservation sequence number is for making the correspondent network Equipment forbids carrying out sequence number detection to the first kind BFD keep alive Packet;
After first timer time-out, second is being added into the second class BFD keep alive Packet that peer network device is sent Reservation sequence number, and send the second class BFD keep alive Packet;Second reservation sequence number is for setting the correspondent network It is standby to forbid carrying out the second class BFD keep alive Packet sequence number detection, and determine BFD keep alive Packet that next time is received into Row sequence number detection.
The application provides a kind of BFD keep alive Packet transmission method, is applied to peer network device, the peer network device For receiving the BFD keep alive Packet of local terminal network equipment transmission, and the local terminal network equipment includes main control board and spare Master control borad, the method includes:
The first kind BFD keep alive Packet for the first reservation sequence number of carrying that local terminal network equipment is sent is received, and according to institute The first reservation sequence number is stated to forbid carrying out sequence number detection to the first kind BFD keep alive Packet;
The second class BFD keep alive Packet of the second reservation sequence number of carrying that local terminal network equipment is sent is received, and according to institute It states the second reservation sequence number to forbid carrying out the second class BFD keep alive Packet sequence number detection, and reserved according to described second Sequence number, which is determined, carries out sequence number detection to the BFD keep alive Packet that next time receives.
The application provides a kind of BFD keep alive Packet transmitting device, described applied to the slave control board of local terminal network equipment Local terminal network equipment further includes main control board, and described device includes:
Starting module, for being switched to the slave control board from the main control board in the local terminal network equipment Afterwards, start first timer;
Adding module is used for before first timer time-out, in the first kind BFD keep-alive report sent to peer network device The first reservation sequence number is added in text, first reservation sequence number is for forbidding the peer network device to described first Class BFD keep alive Packet carries out sequence number detection;
Sending module is used for periodicity sending first kind BFD keep alive Packet;
The adding module is also used to after first timer time-out, in the second class BFD sent to peer network device The second reservation sequence number is added in keep alive Packet, second reservation sequence number is for forbidding the peer network device to institute It states the second class BFD keep alive Packet and carries out sequence number detection, and determine and sequence number inspection is carried out to the BFD keep alive Packet that next time receives It surveys;
The sending module is also used to send the second class BFD keep alive Packet.
The application provides a kind of BFD keep alive Packet transmitting device, is applied to peer network device, the peer network device For receiving the BFD keep alive Packet of local terminal network equipment transmission, and the local terminal network equipment includes main control board and spare Master control borad, described device include:
Receiving module, the first kind BFD keep-alive of the first reservation sequence number of carrying for receiving local terminal network equipment transmission Message;
Detection module carries out sequence to the first kind BFD keep alive Packet for forbidding according to first reservation sequence number Row number detection;
The receiving module is also used to receive the second class of the second reservation sequence number of carrying of local terminal network equipment transmission BFD keep alive Packet;
The detection module is also used to be forbidden according to second reservation sequence number to the second class BFD keep alive Packet Sequence number detection is carried out, and is determined according to second reservation sequence number and sequence is carried out to the BFD keep alive Packet that next time receives Number detection.
The application provides a kind of electronic equipment, including:Processor and machine readable storage medium, the machine readable storage Media storage has the machine-executable instruction that can be executed by the processor, and the processor executes the executable finger of the machine It enables, to realize above-mentioned method and step.
The application provides a kind of machine readable storage medium, and the machine readable storage medium is stored with the executable finger of machine It enables, for the machine-executable instruction when being called and being executed by processor, the machine-executable instruction promotes the processor Realize above-mentioned method and step.
Based on the above-mentioned technical proposal, it in the embodiment of the present application, is switched in local terminal network equipment from main control board spare After master control borad, slave control board first sends the first kind BFD keep alive Packet for carrying the first reservation sequence number, the first reservation sequence number For making peer network device forbid carrying out sequence number detection to first kind BFD keep alive Packet;Then, slave control board transmission is taken The second class BFD keep alive Packet with the second reservation sequence number, the second reservation sequence number is for forbidding peer network device to the Two class BFD keep alive Packets carry out sequence number detection, and determine and carry out sequence number detection to the BFD keep alive Packet that next time receives; Then, slave control board just sends the third class BFD keep alive Packet for carrying unreserved sequence number, in this way, peer network device connects After receiving third class BFD keep alive Packet, the sequence number that first third class BFD keep alive Packet is carried as initial sequence number, And sequence number detection is carried out to third class BFD keep alive Packet, to avoid abandoning the first third class BFD keep-alive report received Text, avoid BFD agreement shake, solve masterslave switchover during, due to sequence number differ greatly initiation agreement shake problem.
Detailed description of the invention
It, below will be to the application in order to clearly illustrate the embodiment of the present application or technical solution in the prior art Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below Attached drawing is only some embodiments as described in this application, for those of ordinary skill in the art, can also be according to this Shen Please these attached drawings of embodiment obtain other attached drawings.
Fig. 1 is the application scenarios schematic diagram in a kind of embodiment of the application;
Fig. 2 is the flow chart of the BFD keep alive Packet transmission method in a kind of embodiment of the application;
Fig. 3 is the structure chart of the BFD keep alive Packet transmitting device in a kind of embodiment of the application;
Fig. 4 is the structure chart of the BFD keep alive Packet transmitting device in the application another embodiment;
Fig. 5 is the hardware structure diagram of the electronic equipment in a kind of embodiment of the application.
Specific embodiment
In the term that the embodiment of the present application uses merely for the sake of for the purpose of describing particular embodiments, rather than limit this Shen Please.The "an" of singular used in the application and claims, " described " and "the" are also intended to including most shapes Formula, unless context clearly shows that other meanings.It is also understood that term "and/or" used herein refers to comprising one A or multiple associated any or all of project listed may combine.
It will be appreciated that though various letters may be described using term first, second, third, etc. in the embodiment of the present application Breath, but these information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, In the case where not departing from the application range, the first information can also be referred to as the second information, and similarly, the second information can also be with The referred to as first information.Depending on context, in addition, used word " if " can be construed to " ... when " or " when ... " or " in response to determination ".
In order to improve the transmission security of BFD keep alive Packet, BFD keep alive Packet can be added using Encryption Algorithm It is close, and ciphering process can add sequence number, and need to verify sequence number.For example, the first of local terminal network equipment transmission A BFD keep alive Packet carries sequence number M, and second BFD keep alive Packet carries sequence number M+1, and so on.Peer network device After receiving first BFD keep alive Packet, records series M after receiving second BFD keep alive Packet, compares second BFD and protects The sequence number of message living and the difference of sequence number M, if difference is greater than 0 and no more than 9, second BFD keep alive Packet is legal, into Row subsequent processing, otherwise second BFD keep alive Packet is illegal, abandons second BFD keep alive Packet.
If local terminal network equipment is distributed network equipment, local terminal network equipment includes main control board and spare master control Plate, main control board send carry sequence number M BFD keep alive Packet after, if main control board breaks down, trigger it is active and standby fall It changes, BFD keep alive Packet is sent by slave control board, slave control board generates new sequence number R, and sends the BFD for carrying sequence number R Keep alive Packet.After peer network device receives BFD keep alive Packet, if the difference of R and M is greater than 9 or less than 0, it is believed that BFD keep-alive Message is illegal, abandons BFD keep alive Packet, should not actually abandon BFD keep alive Packet, to cause the concussion of BFD agreement.
In view of the above-mentioned problems, the embodiment of the present application proposes a kind of BFD keep alive Packet transmission method, can be applied to include this In the system for holding the network equipment and peer network device, local terminal network equipment and peer network device support BFD agreement, local terminal The network equipment and peer network device are required to establish BFD session, equal in the state of local terminal network equipment and peer network device After UP, local terminal network equipment periodically sends BFD keep alive Packet to peer network device, and peer network device is periodically to this The network equipment is held to send BFD keep alive Packet.
As shown in Figure 1, being the application scenarios schematic diagram of the present embodiment, local terminal network equipment is distributed network equipment, can To include main control board, slave control board and business board, the quantity of business board can be one or more, for convenience of describing, Fig. 1 is by taking a business board as an example.Peer network device can be distributed network equipment, may not be distributed network and sets It is standby, with no restrictions to the type of this peer network device.
When local terminal network equipment periodically sends BFD keep alive Packet to peer network device, if local terminal network equipment Main control board does not break down, then can generate BFD keep alive Packet by main control board, BFD keep alive Packet is sent to industry Business plate, is sent to peer network device for BFD keep alive Packet by business board.If event occurs for the main control board of local terminal network equipment Barrier, then can trigger masterslave switchover, i.e. the slave control board of local terminal network equipment can upgrade to main control board, can be by spare Master control borad generates BFD keep alive Packet, and BFD keep alive Packet is sent to business board, is sent to BFD keep alive Packet pair by business board Hold the network equipment.
When local terminal network equipment periodically sends BFD keep alive Packet to peer network device, in order to improve BFD keep-alive The transmission security of message can also encrypt the BFD keep alive Packet using Encryption Algorithm, which may include But it is not limited to:MD5 (Message Digest Algorithm5, Message Digest Algorithm 5), M-MD5 (Meticulous MD5, fine MD5), SHA1 (Secure Hash Algorithm, Secure Hash Algorithm), M-SHA1 (Meticulous SHA1) Deng with no restrictions to this Encryption Algorithm.
Local terminal network equipment, can also be in BFD keep alive Packet when being encrypted using Encryption Algorithm to BFD keep alive Packet The BFD keep alive Packet that middle addition sequence number, i.e. local terminal network equipment are sent to peer network device can carry sequence number.Opposite end The network equipment carries out sequence number detection after receiving the BFD keep alive Packet, to the BFD keep alive Packet;If sequence number detection Success, then be decrypted BFD keep alive Packet, and whether there is failure using BFD keep alive Packet analysis link;If sequence number is examined Dendrometry loses, then can abandon the BFD keep alive Packet, and delete BFD session, re-establish BFD neighbours, re-establish BFD session.
For example, first BFD keep alive Packet that local terminal network equipment is sent carries sequence number M, second BFD keep alive Packet Sequence number M+1 is carried, third BFD keep alive Packet carries sequence number M+2, and so on.Peer network device is receiving It after one BFD keep alive Packet, determines that BFD keep alive Packet is first BFD keep alive Packet, does not need to carry out sequence number comparison, but It can recorde the sequence number M of first BFD keep alive Packet.Peer network device needs after receiving second BFD keep alive Packet Compare the difference of sequence number (such as sequence number N) and sequence number M of second BFD keep alive Packet, if difference is greater than 0 and is not more than 9, then sequence number detection success, it is believed that second BFD keep alive Packet is legal, and the sequence number M of local record is updated to sequence number BFD keep alive Packet is decrypted in N, and carries out subsequent processing;If difference is greater than 9 or less than 0, sequence number detection failure is recognized It is illegal for second BFD keep alive Packet, abandon second BFD keep alive Packet.Peer network device receives third BFD keep-alive After message, compare the sequence number of third BFD keep alive Packet and the difference of sequence number N, detailed process repeats no more, with such It pushes away.
In another example peer network device after receiving second BFD keep alive Packet, compares second BFD keep alive Packet Sequence number N and sequence number M difference, if difference is greater than 0, sequence number detection success, it is believed that second BFD keep alive Packet is closed The sequence number M of local record is updated to sequence number N by method;If difference is not more than 0, sequence number detection failure, it is believed that second BFD keep alive Packet is illegal, abandons second BFD keep alive Packet.Peer network device is receiving third BFD keep alive Packet Afterwards, comparing the sequence number of third BFD keep alive Packet and the difference of sequence number N, detailed process repeats no more, and so on.
In conclusion when local terminal network equipment periodically sends BFD keep alive Packet to peer network device, if primary master control Plate does not break down, then generates BFD keep alive Packet by main control board, BFD keep alive Packet is sent to opposite end by business board The network equipment, and BFD keep alive Packet carries sequence number.Assuming that main control board sends the BFD keep alive Packet for carrying sequence number M Afterwards, main control board breaks down, then can trigger masterslave switchover, and slave control board upgrades to main control board, by spare master control Plate generates BFD keep alive Packet, BFD keep alive Packet is sent to peer network device by business board, and BFD keep alive Packet carries Sequence number.
But since slave control board does not know the sequence number for the last one BFD keep alive Packet that main control board is sent For M, therefore, slave control board generates new sequence number R, and new sequence number R is unrelated with sequence number M, and sends and carry sequence number R's BFD keep alive Packet.Peer network device is after receiving the BFD keep alive Packet, if the difference of R and M is greater than 9 or less than 0, sequence Row number detection failure, it is believed that BFD keep alive Packet is illegal, abandons BFD keep alive Packet, deletes BFD session, re-establishes BFD neighbours, BFD session is re-established, and should not actually abandon BFD keep alive Packet, to cause the concussion of BFD agreement.
Certainly, in the above-described embodiments, numerical value 9 and numerical value 0 are the example of the application, without limitation, such as Numerical value 9 can also be numerical value 6, numerical value 5 etc., herein by taking numerical value 9 and numerical value 0 as an example.
For above-mentioned discovery, in the embodiment of the present application, spare master control is switched to from main control board in local terminal network equipment After plate, slave control board first sends the first kind BFD keep alive Packet for carrying the first reservation sequence number, and the first reservation sequence number is used for Peer network device is set to forbid carrying out sequence number detection to first kind BFD keep alive Packet;Then, slave control board, which is sent, carries the Second class BFD keep alive Packet of two reservation sequence numbers, the second reservation sequence number is for forbidding peer network device to the second class BFD keep alive Packet carries out sequence number detection, and determines and carry out sequence number detection to the BFD keep alive Packet that next time receives;Then, Slave control board just sends the third class BFD keep alive Packet for carrying unreserved sequence number, and peer network device receives third class After BFD keep alive Packet, using the sequence number of first third class BFD keep alive Packet carrying as initial sequence number, and to third class BFD keep alive Packet carries out sequence number detection, to avoid abandoning third class BFD keep alive Packet, BFD agreement is avoided to shake, solved Since sequence number differs greatly the concussion problem of initiation during masterslave switchover.
In one example, sequence number size can be 4 bytes (32 bit), and sequence number may be other sizes, right This is with no restrictions.Two sequence numbers, referred to as the first reservation sequence number and the second reserved sequence can be reserved in all sequences number Number, and other sequence numbers are unreserved sequence number.For example, sequence number range is 0x00000000-0xFFFFFFFF, it can be with Using 0x00000000 as the first reservation sequence number, using 0x00000001 as the second reservation sequence number, 0x00000002- 0xFFFFFFFF is non-reservation sequence number.
In one example, the BFD keep alive Packet for carrying the first reservation sequence number can also be known as first kind BFD keep-alive The BFD keep alive Packet for carrying the second reservation sequence number is known as the second class BFD keep alive Packet, and will carry unreserved sequence by message The BFD keep alive Packet of row number is known as third class BFD keep alive Packet.
In one example, if main control board does not break down, main control board can generate unreserved sequence at random Row number, such as 0x00000005, and pass through the third class BFD keep alive Packet that business board will carry unreserved sequence number 0x00000005 1 is sent to peer network device;In next sending cycle, main control board will carry unreserved sequence number by business board The third class BFD keep alive Packet 2 of 0x00000006 is sent to peer network device;In next sending cycle, main control board The third class BFD keep alive Packet 3 for carrying unreserved sequence number 0x00000007 is sent to peer network device by business board; And so on.
When main control board breaks down, then masterslave switchover can be triggered, slave control board upgrades to main control board, by Slave control board generates BFD keep alive Packet, and BFD keep alive Packet is sent to peer network device by business board.Based on this, It is shown in Figure 2 after being switched to slave control board from main control board, it is that the BFD keep alive Packet in the embodiment of the present application passes The flow chart of transmission method, this method may include:
Step 201, after local terminal network equipment is switched to slave control board from main control board, slave control board starting the One timer.
Step 202, before first timer time-out, slave control board is in the first kind BFD sent to peer network device The first reservation sequence number, and periodicity sending first kind BFD keep alive Packet are added in keep alive Packet;Wherein, the first reserved sequence Row number is for making peer network device forbid carrying out sequence number detection to first kind BFD keep alive Packet.
Step 203, peer network device receives the first kind for the first reservation sequence number of carrying that local terminal network equipment is sent BFD keep alive Packet (first kind BFD keep alive Packet that the slave control board of local terminal network equipment is sent), and it is first reserved according to this Sequence number is forbidden carrying out sequence number detection to first kind BFD keep alive Packet.
Step 204, after first timer time-out, slave control board is in the second class BFD sent to peer network device The second reservation sequence number is added in keep alive Packet, and sends the second class BFD keep alive Packet;Second reservation sequence number is for making Peer network device is forbidden carrying out the second class BFD keep alive Packet sequence number detection, and determines and protect to the BFD that next time receives Message living carries out sequence number detection.
Step 205, peer network device receives the second class of the second reservation sequence number of carrying that local terminal network equipment is sent BFD keep alive Packet (the second class BFD keep alive Packet that the slave control board of local terminal network equipment is sent), according to the second reserved sequence Row number forbids carrying out the second class BFD keep alive Packet sequence number detection, and is determined according to second reservation sequence number to next time The BFD keep alive Packet received carries out sequence number detection.
In one example, after local terminal network equipment is switched to slave control board from main control board, slave control board It can star first timer (such as countdown timer T1).Further, before first timer time-out, then spare master control Plate periodically sends first kind BFD keep alive Packet to peer network device, such as can send multiple first to peer network device Class BFD keep alive Packet.In addition, then slave control board sends to peer network device and carries the after first timer time-out Two class BFD keep alive Packets such as can send a second class BFD keep alive Packet to peer network device.
Wherein, before first timer time-out, what slave control board was sent to peer network device is all to carry first in advance The first kind BFD keep alive Packet of sequence number 0x00000000 is stayed, the first reservation sequence number is a special sequence number, is represented current Process is the strain phase of masterslave switchover, for making peer network device forbid carrying out sequence number inspection to first kind BFD keep alive Packet It surveys, that is, peer network device is after receiving first kind BFD keep alive Packet, if discovery first kind BFD keep alive Packet carries first Reservation sequence number then forbids carrying out the first kind BFD keep alive Packet sequence number detection, only checks and verify encrypted content, go forward side by side Row subsequent processing.
Wherein, after first timer time-out, slave control board does not retransmit the first kind for carrying the first reservation sequence number BFD keep alive Packet, and the second class BFD keep-alive report for carrying the second reservation sequence number 0x00000001 is sent to peer network device Text, the second reservation sequence number are a special sequences number, and the strain phase for representing masterslave switchover terminates, for making peer network device Forbid the BFD keep-alive report that sequence number detection is carried out to the second class BFD keep alive Packet, and receives peer network device to next time Text carries out sequence number detection.Peer network device is after receiving the second class BFD keep alive Packet, if the second class BFD keep-alive of discovery Message the second reservation sequence number of carrying then forbids carrying out the second class BFD keep alive Packet sequence number detection, only checks and verification adds Close content, and carry out subsequent processing;In addition, peer network device determines that the strain phase of masterslave switchover terminates, need to connect next time The BFD keep alive Packet received carries out sequence number detection, i.e. sequence number detection process is restored.
In one example, peer network device is receiving first kind BFD keep alive Packet (such as first first kind BFD Keep alive Packet) after, then it can star second timer (such as countdown timer T2).Further, in second timer time-out Before, if peer network device receives the second class BFD keep alive Packet, it is determined that BFD detection is normal, deletes second timer. In second timer time-out, if still not receiving the second class BFD keep alive Packet, it is determined that BFD detection is abnormal, can be actively BFD agreement is set to down, and BFD session can be deleted, BFD neighbours is re-established, re-establishes BFD session.
Wherein, the time-out time of second timer can be configured rule of thumb, with no restrictions to this time-out time, the The time-out time of one timer can also be configured rule of thumb, with no restrictions to this time-out time, still, second timer Time-out time can be more than or equal to first timer time-out time.
Based on this, after first timer time-out, the slave control board of local terminal network equipment, which has begun, sends the second class BFD keep alive Packet, and second timer at this time has not timed out, therefore, before second timer time-out, peer network device It should can receive to the second class BFD keep alive Packet.Further, if peer network device does not have before second timer time-out The second class BFD keep alive Packet is received, then illustrates that slave control board after first timer time-out, does not just send the second class The BFD keep alive Packet transmitter of BFD keep alive Packet, i.e. slave control board produces existing exception, can actively be set to BFD agreement down。
In one example, slave control board can also be set after sending the second class BFD keep alive Packet to correspondent network Unreserved sequence number is added in the third class BFD keep alive Packet that preparation is sent, and it is (i.e. normal to send third class BFD keep alive Packet Need to carry out the BFD keep alive Packet of sequence number detection) so that the peer network device is according to unreserved sequence number to third class BFD keep alive Packet carries out sequence number detection.
Further, peer network device receives the third class for the unreserved sequence number of carrying that local terminal network equipment is sent BFD keep alive Packet (the third class BFD keep alive Packet that the slave control board of local terminal network equipment is sent), and according to the unreserved sequence Row number carries out sequence number detection to third class BFD keep alive Packet.
In one example, slave control board is added into the third class BFD keep alive Packet that peer network device is sent Unreserved sequence number may include:Slave control board can generate unreserved sequence number (such as 0x00000002- at random Arbitrary sequence number in 0xFFFFFFFF), with unreserved Serial No. initial sequence number, in sent to peer network device The unreserved sequence number is added in three classes BFD keep alive Packet.
In one example, peer network device carries out sequence to third class BFD keep alive Packet according to the unreserved sequence number Row number detects, and may include:Peer network device is after receiving the second class BFD keep alive Packet, by receive first The unreserved sequence number that third class BFD keep alive Packet carries is determined as initial sequence number;It is then possible to according to the initial sequence number Sequence number detection is carried out to third class BFD keep alive Packet.
For example, slave control board is sending the second class BFD keep alive Packet for carrying the second reservation sequence number 0x00000001 Afterwards, unreserved sequence number R (such as 0x00000006) can be generated at random, which is initial sequence number.Then, Slave control board sends the third class BFD keep alive Packet for carrying unreserved sequence number R to peer network device;In next week Phase, slave control board send the third class BFD keep alive Packet for carrying unreserved sequence number R+1 to peer network device;Next A period, slave control board send the third class BFD keep alive Packet for carrying unreserved sequence number R+2 to peer network device;With This analogizes.
Peer network device carries the second class BFD keep alive Packet of the second reservation sequence number 0x00000001 receiving Afterwards, it determines and sequence number detection is carried out to the BFD keep alive Packet that receives next time, i.e., the BFD keep alive Packet received next time is the One BFD keep alive Packet.Then, peer network device is receiving the third class BFD keep alive Packet for carrying unreserved sequence number R Afterwards, unreserved sequence number R can be determined as to initial sequence number, and since unreserved sequence number R is initial sequence number, no Sequence number comparison is carried out, directly determines sequence number detection success, it is believed that the third class BFD keep alive Packet is legal, records unreserved Sequence number R.
After peer network device receives third class BFD keep alive Packet again, need to compare the third class BFD keep alive Packet Sequence number and unreserved sequence number R difference, if difference is greater than 0 and is not more than 9, sequence number detection success, it is believed that this Three classes BFD keep alive Packet is legal, and the unreserved sequence number R of local record is updated to the sequence of the third class BFD keep alive Packet Number.If difference is greater than 9 or less than 0, sequence number detection failure, it is believed that the third class BFD keep alive Packet is illegal, abandons the third Class BFD keep alive Packet is illegal.
In the above-described embodiments, when slave control board sends BFD keep alive Packet to peer network device, slave control board is BFD keep alive Packet is sent to peer network device by business board, it is without limitation.
In the above-described embodiments, BFD keep alive Packet can be the UP message of BFD, without limitation.
It in the above-described embodiments, is process of the local terminal network equipment to peer network device transmission BFD keep alive Packet, opposite end The network equipment sends the process of BFD keep alive Packet to local terminal network equipment, and details are not described herein.
Based on the above-mentioned technical proposal, it in the embodiment of the present application, is switched in local terminal network equipment from main control board spare After master control borad, slave control board first sends the first kind BFD keep alive Packet for carrying the first reservation sequence number, the first reservation sequence number For making peer network device forbid carrying out sequence number detection to first kind BFD keep alive Packet;Then, slave control board transmission is taken The second class BFD keep alive Packet with the second reservation sequence number, the second reservation sequence number is for forbidding peer network device to the Two class BFD keep alive Packets carry out sequence number detection, and determine and carry out sequence number detection to the BFD keep alive Packet that next time receives; Then, slave control board just sends the third class BFD keep alive Packet for carrying unreserved sequence number, in this way, peer network device connects After receiving third class BFD keep alive Packet, the sequence number that first third class BFD keep alive Packet is carried as initial sequence number, And sequence number detection is carried out to third class BFD keep alive Packet, to avoid abandoning the first third class BFD keep-alive report received Text, avoid BFD agreement shake, solve masterslave switchover during, due to sequence number differ greatly initiation agreement shake problem.
Based on similarly applying conceiving with the above method, a kind of BFD keep alive Packet transmission is also proposed in the embodiment of the present application Device, applied to the slave control board of local terminal network equipment, the local terminal network equipment further includes main control board, such as Fig. 3 institute Show, be the structural schematic diagram of described device, described device includes:
Starting module 301, for being switched to the spare master control from the main control board in the local terminal network equipment After plate, start first timer;
Adding module 302, for being protected in the first kind BFD sent to peer network device before first timer time-out The first reservation sequence number is added in message living, first reservation sequence number is for forbidding the peer network device to described First kind BFD keep alive Packet carries out sequence number detection;
Sending module 303 is used for periodicity sending first kind BFD keep alive Packet;
The adding module 302 is also used to after first timer time-out, in the second class sent to peer network device The second reservation sequence number is added in BFD keep alive Packet, second reservation sequence number is for forbidding the peer network device Sequence number detection is carried out to the second class BFD keep alive Packet, and determines and sequence is carried out to the BFD keep alive Packet that next time receives Number detection;
The sending module 303 is also used to send the second class BFD keep alive Packet.
The adding module 302 is also used to after sending the second class BFD keep alive Packet, to peer network device Unreserved sequence number is added in the third class BFD keep alive Packet of transmission;
The sending module 303 is also used to send the third class BFD keep alive Packet, so that the peer network device Sequence number detection is carried out to third class BFD keep alive Packet according to the unreserved sequence number.
The adding module 302 is adding unreserved sequence into the third class BFD keep alive Packet that peer network device is sent It is specifically used for when row number:Unreserved sequence number is generated at random, with unreserved Serial No. initial sequence number, is set to correspondent network The unreserved sequence number is added in the third class BFD keep alive Packet that preparation is sent.
Based on similarly applying conceiving with the above method, a kind of BFD keep alive Packet transmission is also proposed in the embodiment of the present application Device, is applied to peer network device, and the peer network device is used to receive the BFD keep-alive report of local terminal network equipment transmission Text, and the local terminal network equipment includes main control board and slave control board, as shown in figure 4, the structure for described device is shown It is intended to, described device includes:
Receiving module 401 is protected for receiving the first kind BFD of the first reservation sequence number of carrying of local terminal network equipment transmission Message living;Detection module 402, for forbidding carrying out the first kind BFD keep alive Packet according to first reservation sequence number Sequence number detection;
The receiving module 401 is also used to receive the second of the second reservation sequence number of carrying of local terminal network equipment transmission Class BFD keep alive Packet;The detection module 402 is also used to be forbidden according to second reservation sequence number to the second class BFD Keep alive Packet carries out sequence number detection, and the BFD keep alive Packet received to next time is determined according to second reservation sequence number Carry out sequence number detection.
In one example, described device further includes (being not shown in the figure
Determining module, for after receiving first kind BFD keep alive Packet, then starting second timer;In the second timing When device time-out, if not receiving the second class BFD keep alive Packet, it is determined that BFD detection is abnormal.
The receiving module 401 is also used to receive the third class of the unreserved sequence number of carrying of local terminal network equipment transmission BFD keep alive Packet;The detection module 402 is also used to according to the unreserved sequence number to the third class BFD keep alive Packet Carry out sequence number detection.
Electronic equipment (the slave control board of such as above-mentioned local terminal network equipment, referring to Fig. 3 institute provided by the embodiments of the present application Show, alternatively, peer network device, shown in Figure 4), for hardware view, hardware structure schematic diagram specifically may refer to figure Shown in 5, including:Machine readable storage medium and processor, wherein:
Machine readable storage medium:Store instruction code.
Processor:Communicated with machine readable storage medium, read and execute stored in machine readable storage medium it is described Instruction code realizes the transmission operation of BFD keep alive Packet disclosed in the application above-mentioned example.
Here, machine readable storage medium can be any electronics, magnetism, optics or other physical storage devices, can be with Include or store information, such as executable instruction, data, etc..For example, machine readable storage medium can be:RAM(Radom Access Memory, random access memory), volatile memory, nonvolatile memory, flash memory, memory driver is (as hard Disk drive), solid state hard disk, any kind of storage dish (such as CD, dvd) perhaps similar storage medium or they Combination.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment The combination of any several equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit can be realized in the same or multiple software and or hardware when application.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes computer usable program code that the embodiment of the present application, which can be used in one or more, The computer implemented in computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of program product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It is generally understood that being realized by computer program instructions each in flowchart and/or the block diagram The combination of process and/or box in process and/or box and flowchart and/or the block diagram.It can provide these computer journeys Sequence instruct to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices processor with A machine is generated, so that the instruction generation executed by computer or the processor of other programmable data processing devices is used for Realize the dress for the function of specifying in one or more flows of the flowchart and/or one or more blocks of the block diagram It sets.
Moreover, these computer program instructions also can store be able to guide computer or other programmable datas processing set In standby computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates Manufacture including command device, the command device are realized in one process of flow chart or multiple processes and/or block diagram one The function of being specified in a box or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing devices, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer Or the instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram The step of function of being specified in one box or multiple boxes.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (14)

1. a kind of BFD keep alive Packet transmission method, which is characterized in that described applied to the slave control board of local terminal network equipment Local terminal network equipment further includes main control board, the method includes:
After the local terminal network equipment is switched to the slave control board from the main control board, start first timer;
It is reserved adding first into the first kind BFD keep alive Packet that peer network device is sent before first timer time-out Sequence number, and periodicity sending first kind BFD keep alive Packet;First reservation sequence number is for making the peer network device Forbid carrying out sequence number detection to the first kind BFD keep alive Packet;
It is reserved adding second into the second class BFD keep alive Packet that peer network device is sent after first timer time-out Sequence number, and send the second class BFD keep alive Packet;Second reservation sequence number is for prohibiting the peer network device Sequence number detection only is carried out to the second class BFD keep alive Packet, and determines and sequence is carried out to the BFD keep alive Packet that next time receives Row number detection.
2. the method according to claim 1, wherein the method also includes:
After sending the second class BFD keep alive Packet, add into the third class BFD keep alive Packet that peer network device is sent Add unreserved sequence number, and send the third class BFD keep alive Packet, so that the peer network device is according to described unreserved Sequence number carries out sequence number detection to third class BFD keep alive Packet.
3. according to the method described in claim 2, it is characterized in that, described in the third class BFD sent to peer network device Unreserved sequence number is added in keep alive Packet, including:
Unreserved sequence number is generated at random, and with the unreserved Serial No. initial sequence number, is sent out to peer network device The unreserved sequence number is added in the third class BFD keep alive Packet sent.
4. a kind of BFD keep alive Packet transmission method, which is characterized in that be applied to peer network device, the peer network device For receiving the BFD keep alive Packet of local terminal network equipment transmission, and the local terminal network equipment includes main control board and spare Master control borad, the method includes:
The first kind BFD keep alive Packet for the first reservation sequence number of carrying that local terminal network equipment is sent is received, and according to described the One reservation sequence number forbids carrying out sequence number detection to the first kind BFD keep alive Packet;
The second class BFD keep alive Packet of the second reservation sequence number of carrying that local terminal network equipment is sent is received, and according to described the Two reservation sequence numbers forbid carrying out sequence number detection to the second class BFD keep alive Packet, and according to the described second reserved sequence It number determines and sequence number detection is carried out to the BFD keep alive Packet that receives next time.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
After receiving first kind BFD keep alive Packet, then start second timer;In the second timer time-out, if not Receive the second class BFD keep alive Packet, it is determined that BFD detection is abnormal.
6. according to the method described in claim 4, it is characterized in that, described determine according to second reservation sequence number to next time After the BFD keep alive Packet received carries out sequence number detection, further include:
The third class BFD keep alive Packet for the unreserved sequence number of carrying that local terminal network equipment is sent is received, and according to described non-pre- Sequence number is stayed to carry out sequence number detection to the third class BFD keep alive Packet.
7. a kind of BFD keep alive Packet transmitting device, which is characterized in that described applied to the slave control board of local terminal network equipment Local terminal network equipment further includes main control board, and described device includes:
Starting module, for opening after the local terminal network equipment is switched to the slave control board from the main control board Dynamic first timer;
Adding module is used for before first timer time-out, into the first kind BFD keep alive Packet that peer network device is sent The first reservation sequence number is added, first reservation sequence number is for forbidding the peer network device to the first kind BFD keep alive Packet carries out sequence number detection;
Sending module is used for periodicity sending first kind BFD keep alive Packet;
The adding module is also used to after first timer time-out, in the second class BFD keep-alive sent to peer network device Add the second reservation sequence number in message, second reservation sequence number is for forbidding the peer network device to described the Two class BFD keep alive Packets carry out sequence number detection, and determine and carry out sequence number detection to the BFD keep alive Packet that next time receives;
The sending module is also used to send the second class BFD keep alive Packet.
8. device according to claim 7, which is characterized in that
The adding module is also used to after sending the second class BFD keep alive Packet, in the sent to peer network device Unreserved sequence number is added in three classes BFD keep alive Packet;
The sending module is also used to send the third class BFD keep alive Packet, so that the peer network device is according to Unreserved sequence number carries out sequence number detection to third class BFD keep alive Packet.
9. device according to claim 8, which is characterized in that
Adding module tool when adding unreserved sequence number into the third class BFD keep alive Packet that peer network device is sent Body is used for:Unreserved sequence number is generated at random, with the unreserved Serial No. initial sequence number, is sent out to peer network device The unreserved sequence number is added in the third class BFD keep alive Packet sent.
10. a kind of BFD keep alive Packet transmitting device, which is characterized in that be applied to peer network device, the peer network device For receiving the BFD keep alive Packet of local terminal network equipment transmission, and the local terminal network equipment includes main control board and spare Master control borad, described device include:
Receiving module, the first kind BFD keep alive Packet of the first reservation sequence number of carrying for receiving local terminal network equipment transmission;
Detection module carries out sequence number to the first kind BFD keep alive Packet for forbidding according to first reservation sequence number Detection;
The receiving module, the second class BFD for being also used to receive the second reservation sequence number of carrying of local terminal network equipment transmission are protected Message living;
The detection module is also used to be forbidden carrying out the second class BFD keep alive Packet according to second reservation sequence number Sequence number detection, and determined according to second reservation sequence number and sequence number inspection is carried out to the BFD keep alive Packet that next time receives It surveys.
11. device according to claim 10, which is characterized in that further include:
Determining module, for after receiving first kind BFD keep alive Packet, then starting second timer;It is super in second timer Constantly, if not receiving the second class BFD keep alive Packet, it is determined that BFD detection is abnormal.
12. device according to claim 10, which is characterized in that
The receiving module is also used to receive the third class BFD keep-alive of the unreserved sequence number of carrying of local terminal network equipment transmission Message;
The detection module is also used to carry out sequence number to the third class BFD keep alive Packet according to the unreserved sequence number Detection.
13. a kind of electronic equipment, which is characterized in that including:Processor and machine readable storage medium, the machine readable storage Media storage has the machine-executable instruction that can be executed by the processor, and the processor executes the executable finger of the machine It enables, to realize any method and step of claim 1-3, alternatively, realizing any method step of claim 4-6 Suddenly.
14. a kind of machine readable storage medium, which is characterized in that the machine readable storage medium is stored with the executable finger of machine It enables, for the machine-executable instruction when being called and being executed by processor, the machine-executable instruction promotes the processor Any method and step of claim 1-3 is realized, alternatively, realizing any method and step of claim 4-6.
CN201810554562.9A 2018-05-31 2018-05-31 BFD keep-alive message transmission method, device, equipment and machine readable storage medium Active CN108880868B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810554562.9A CN108880868B (en) 2018-05-31 2018-05-31 BFD keep-alive message transmission method, device, equipment and machine readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810554562.9A CN108880868B (en) 2018-05-31 2018-05-31 BFD keep-alive message transmission method, device, equipment and machine readable storage medium

Publications (2)

Publication Number Publication Date
CN108880868A true CN108880868A (en) 2018-11-23
CN108880868B CN108880868B (en) 2021-02-26

Family

ID=64335627

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810554562.9A Active CN108880868B (en) 2018-05-31 2018-05-31 BFD keep-alive message transmission method, device, equipment and machine readable storage medium

Country Status (1)

Country Link
CN (1) CN108880868B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314432A (en) * 2020-01-20 2020-06-19 新华三大数据技术有限公司 Message processing method and device
CN112653699A (en) * 2020-12-22 2021-04-13 迈普通信技术股份有限公司 BFD authentication method and device and electronic equipment
CN113839836A (en) * 2021-09-27 2021-12-24 新华三信息安全技术有限公司 Aggregation timeout protection method, frame device, cartridge device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394354A (en) * 2008-10-17 2009-03-25 杭州华三通信技术有限公司 Method for avoiding neighbourhood oscillation of intermediate system and an intermediate system
CN101610535A (en) * 2009-07-30 2009-12-23 杭州华三通信技术有限公司 Multilink direct continuous show scape guarantees the method, system and device of BFD conversation stability down
CN102025562A (en) * 2010-11-25 2011-04-20 中兴通讯股份有限公司 Path detection method and device
EP2536066A1 (en) * 2010-02-20 2012-12-19 ZTE Corporation Link detecting method, apparatus and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394354A (en) * 2008-10-17 2009-03-25 杭州华三通信技术有限公司 Method for avoiding neighbourhood oscillation of intermediate system and an intermediate system
CN101610535A (en) * 2009-07-30 2009-12-23 杭州华三通信技术有限公司 Multilink direct continuous show scape guarantees the method, system and device of BFD conversation stability down
EP2536066A1 (en) * 2010-02-20 2012-12-19 ZTE Corporation Link detecting method, apparatus and system
CN102025562A (en) * 2010-11-25 2011-04-20 中兴通讯股份有限公司 Path detection method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314432A (en) * 2020-01-20 2020-06-19 新华三大数据技术有限公司 Message processing method and device
CN111314432B (en) * 2020-01-20 2022-02-22 新华三大数据技术有限公司 Message processing method and device
CN112653699A (en) * 2020-12-22 2021-04-13 迈普通信技术股份有限公司 BFD authentication method and device and electronic equipment
CN113839836A (en) * 2021-09-27 2021-12-24 新华三信息安全技术有限公司 Aggregation timeout protection method, frame device, cartridge device, and storage medium
CN113839836B (en) * 2021-09-27 2023-04-25 新华三信息安全技术有限公司 Aggregation timeout protection method, frame device, cartridge device, and storage medium

Also Published As

Publication number Publication date
CN108880868B (en) 2021-02-26

Similar Documents

Publication Publication Date Title
EP3937041B1 (en) Trusted startup methods and apparatuses of dedicated blockchain node device
EP3937046A1 (en) Trusted startup methods and apparatuses of dedicated blockchain node device
US11444783B2 (en) Methods and apparatuses for processing transactions based on blockchain integrated station
US8774415B2 (en) Key sharing device, key sharing method, and computer program product
US9900291B2 (en) Methods and apparatus for synchronizing decryption state with remote encryption state
EP3937045A1 (en) Hash updating methods and apparatuses of dedicated blockchain node device
US11783339B2 (en) Methods and apparatuses for transferring transaction based on blockchain integrated station
US20220158836A1 (en) Fork Processing Method And Blockchain Node
US11336660B2 (en) Methods and apparatuses for identifying replay transaction based on blockchain integrated station
US11463553B2 (en) Methods and apparatuses for identifying to-be-filtered transaction based on blockchain integrated station
CN108880868A (en) BFD keep alive Packet transmission method, device, equipment and machine readable storage medium
US11665234B2 (en) Methods and apparatuses for synchronizing data based on blockchain integrated station
JP6230322B2 (en) Communication apparatus, key sharing method, program, and communication system
US20160105411A1 (en) Replaying a batch of secure commands in a secure channel
KR20210128016A (en) Local Ledger Blockchain for Security Updates
CN109831328A (en) Switching method, device, the electronic equipment of intelligent route selection
CN109495320A (en) A kind of transmission method and device of data message
CN105187369A (en) Data access method and data access device
US11018846B2 (en) Methods and apparatuses for achieving a security function, in particular in the environment of a device and/or installation controller
JP6318305B2 (en) How to manage subscriptions on the provisioning server
WO2018028359A1 (en) Service processing method and device, and storage medium and electronic device
CN106998327A (en) A kind of connection control method and device
US20220021690A1 (en) Method and apparatus for attesting physical attacks
CN108076021A (en) Method and device for business processing
TW202040947A (en) Bluetooth pairing method and electronic system

Legal Events

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