CN110099001A - The machinery of consultation of two-way converting parameters of detection time, device and electronic equipment - Google Patents

The machinery of consultation of two-way converting parameters of detection time, device and electronic equipment Download PDF

Info

Publication number
CN110099001A
CN110099001A CN201910365813.3A CN201910365813A CN110099001A CN 110099001 A CN110099001 A CN 110099001A CN 201910365813 A CN201910365813 A CN 201910365813A CN 110099001 A CN110099001 A CN 110099001A
Authority
CN
China
Prior art keywords
time parameter
sequence number
local terminal
message
parameter
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
CN201910365813.3A
Other languages
Chinese (zh)
Other versions
CN110099001B (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 CN201910365813.3A priority Critical patent/CN110099001B/en
Publication of CN110099001A publication Critical patent/CN110099001A/en
Application granted granted Critical
Publication of CN110099001B publication Critical patent/CN110099001B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of two-way converting parameters of detection time machinery of consultation, device and electronic equipments, wherein, method includes: when time parameter changes, the first parameter negotiation message is sent, newest local terminal time parameter and corresponding newest time parameter sequence number are carried in the first parameter negotiation message;The first parameter negotiation confirmation message is received, the first parameter negotiation confirmation message carries the local terminal time parameter sequence number of opposite equip. storage;Whether more newest local terminal time parameter sequence number and the local terminal time parameter sequence number received are consistent;Newest local terminal time parameter when consistent, after the variation that comes into force.Since a time parameter time parameter sequence number of every variation does primary record, can accurately judge whether BFD message is expired according to the variation of time parameter sequence number, to guarantee the accuracy that time parameter is negotiated, improve the stability of BFD, save networking cost.

Description

The machinery of consultation of two-way converting parameters of detection time, device and electronic equipment
Technical field
The present invention relates to fields of communication technology, and in particular to a kind of two-way converting parameters of detection time machinery of consultation, device And electronic equipment.
Background technique
BFD (Bidirectional Forwarding Detection, two-way converting detection) is a general, standard Change, the unrelated quick fault testing mechanism unrelated with agreement of medium, for the two-way converting path between detection device.BFD exists Session is established in two equipment, two equipment can periodically send BFD control message after session establishment, if when detecting The BFD control message that interior one end does not receive opposite end then thinks that failure has occurred in the two-way converting path.
After BFD session establishment, when two equipment can negotiate to determine the transmission of BFD control message by message interaction Between be spaced and detection time.Minimum BFD is controlled into packet sending intervals below, minimum BFD controls message receiving time Interval and detection number are referred to as time parameter, or are properly termed as timer parameter, specifically can be by sending P (Poll, parameter Negotiate) message is timed device parameter negotiation, terminates to negotiate process after receiving F (Final, parameter negotiation confirmation) message.When Between often will appear both ends during parameter negotiation and negotiate inconsistent situation.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of two-way converting parameters of detection time machinery of consultation, device and electricity Sub- equipment, to solve often to will appear both ends during time parameter is negotiated in the prior art and negotiate inconsistent technology to ask Topic.
According in a first aspect, the embodiment of the invention provides a kind of two-way converting parameters of detection time machinery of consultation,
When time parameter changes, the first parameter negotiation message is sent, is carried most in the first parameter negotiation message New local terminal time parameter and the corresponding newest time parameter sequence number of newest local terminal time parameter;It is true to receive the first parameter negotiation Recognize message, the first parameter negotiation confirmation message carries the local terminal time parameter sequence number of opposite equip. storage;More newest local terminal Whether time parameter sequence number and the local terminal time parameter sequence number received are consistent;When newest time parameter sequence number with receive Local terminal time parameter sequence number is consistent, the newest local terminal time parameter after the variation that comes into force.
Optionally, inconsistent with the local terminal time parameter sequence number that receives when newest local terminal time parameter sequence number and receive Local terminal time parameter sequence number it is first, determine that the local terminal time parameter sequence number that receives is corresponding and have expired local terminal time ginseng Number, abandons the first parameter negotiation confirmation message received.
Optionally, the sequence number that time parameter Serial No. cycle accumulor counts, time parameter sequence number accumulated counts are extremely When dominant bit, time parameter sequence number adds up then to jump again and become zero;When newest local terminal time parameter sequence number and the sheet received When end time parameter sequence number is inconsistent and the local terminal time parameter sequence number that receives is first, further includes: judge local terminal time ginseng Whether number sequence row number is zero and whether newest local terminal time parameter sequence number is dominant bit;Local terminal time parameter Serial No. zero and Newest local terminal time parameter when newest local terminal time parameter Serial No. dominant bit, after the variation that comes into force.
Optionally, two-way converting parameters of detection time machinery of consultation further include: receive the second parameter negotiation message;Judge The opposite end time parameter sequence number and locally stored opposite end time parameter sequence number that two parameter negotiation messages carry whether one It causes;When the opposite end that the opposite end time parameter sequence number received is inconsistent with locally stored opposite end time series number and receives Between argument sequence number rear, opposite end time parameter and opposite end time parameter sequence that the second parameter negotiation message of storage carries Number;Send the second parameter negotiation confirmation message, wherein the second parameter negotiation confirmation message carries the opposite end time parameter of storage Sequence number.
Optionally, when the opposite end time parameter sequence number that receives and locally stored opposite end time series number it is inconsistent and The opposite end time parameter sequence number received is first, abandons the second parameter negotiation message received.
Optionally, when two-way converting inspection session fails, respectively by local terminal time parameter sequence number and the opposite end received Time parameter sequence number zero.
According to second aspect, the embodiment of the invention provides a kind of two-way converting parameters of detection time consulting devices, comprising: Transmission unit carries in the first parameter negotiation message for when time parameter changes, sending the first parameter negotiation message There are newest local terminal time parameter and the corresponding newest time parameter sequence number of newest local terminal time parameter;Receiving unit is used for The first parameter negotiation confirmation message is received, the first parameter negotiation confirmation message carries the local terminal time parameter sequence of opposite equip. storage Row number;Comparing unit, for more newest local terminal time parameter sequence number and the local terminal time parameter sequence number that receives whether one It causes;Validation unit, it is consistent with the local terminal time parameter sequence number received for working as newest time parameter sequence number, after the variation that comes into force Newest local terminal time parameter.
According to second aspect, the embodiment of the invention provides a kind of electronic equipment, comprising: memory and processor, storage Connection is communicated with each other between device and processor, and computer instruction is stored in memory, processor passes through computer instructions, Thereby executing the two-way detection forwarding detection Timing Negotiation method of above-mentioned first aspect any one.
According to second aspect, the embodiment of the invention provides a kind of computer readable storage mediums, which is characterized in that calculates Machine readable storage medium storing program for executing is stored with computer instruction, and computer instruction is for keeping computer any thereby executing above-mentioned first aspect One two-way detection forwarding detection Timing Negotiation method.
The application has the following beneficial effects:
1. the application passes through the corresponding newest time parameter sequence number of newest local terminal time parameter in parameter negotiation message With the local terminal time parameter sequence number of the opposite equip. storage carried in parameter negotiation confirmation message, parameter negotiation report can be specified The sequence and corresponding relationship of the transmission of text and parameter negotiation confirmation message avoid parameter negotiation message and parameter negotiation from confirming report Literary matching error.The case where changing repeatedly for some time parameter, local device can be for the time ginsengs repeatedly changed Number constructs and sends respectively many kinds of parameters negotiation packet, the every variation equal stored count one of time parameter sequence number of time parameter Secondary, every kind of parameter negotiation packet carries corresponding time parameter message respectively, and local device can be negotiated based on the parameters received The local terminal time parameter sequence number for the opposite equip. storage that confirmation message carries, determines that the parameter negotiation confirmation message is replied suitable Sequence, and the newest parameter negotiation message of local device transmission whether is corresponded to, it also can accurately identify the sheet received End time parameter sequence number correspondence has expired local terminal time parameter, to guarantee the accuracy that time parameter is negotiated, improves BFD Stability, save networking cost.
2. when receiving the parameter negotiation message of opposite equip. transmission, by comparing the parameter negotiation of opposite equip. transmission The order of the opposite end time parameter sequence number of message band and locally stored opposite end time parameter sequence number, if pair received Hold the opposite end time parameter sequence number that time parameter sequence number is inconsistent with locally stored opposite end time series number and receives In rear, that is, the no random ordering of the parameter negotiation message received, received sequence is correctly pair that storage parameter negotiation message carries Hold time parameter and opposite end time parameter sequence number, the parameter negotiation message acknowledged receipt of effective.When by the opposite end that receives Between argument sequence number can accurately be acknowledged receipt of compared with locally stored opposite end time series number parameter association Business's text, to guarantee the accuracy that time parameter is negotiated, improves the stability of BFD, saving group with the presence or absence of out-of-order situation Net cost.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention 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 some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 a shows P Message processing random ordering situation schematic diagram in the prior art;
Fig. 1 b shows P Message processing situation schematic diagram not in time in the prior art;
Fig. 2 shows the flow charts of the two-way converting parameters of detection time machinery of consultation of the embodiment of the present invention;
The BFD control message that Fig. 3 a shows the embodiment of the present invention forces part field format schematic diagram;
Fig. 3 b shows the BFD control message authentication part field format schematic diagram of the embodiment of the present invention
Fig. 4 shows equipment room BFD session diagram of the embodiment of the present invention;
Fig. 5 shows the flow chart of another two-way converting parameters of detection time machinery of consultation of the embodiment of the present invention;
Fig. 6 shows another equipment room BFD session diagram of the embodiment of the present invention;
Fig. 7 shows the schematic diagram of the two-way converting parameters of detection time consulting device of the embodiment of the present invention;
The two-way converting parameters of detection time that Fig. 8 shows the embodiment of the present invention negotiates interaction flow schematic diagram;
Fig. 9 shows the hardware structural diagram of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those skilled in the art are not having Every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
Hereinafter, simply being introduced BFD agreement first.
BFD establishes session using the mechanism of three-way handshaking, and sender can be in message when sending BFD control message Local current session status, Sta field and local of the recipient according to the BFD control message received are inserted in Sta field Current sessions state carries out the migration of state machine, establishes session.P message and the second device replied F message are sent with the first equipment For, BFD session establishment process is as follows:
1) after the BFD of the first equipment and the second equipment receives the notice of upper layer application, sending state to opposite end respectively is The BFD of Down controls message.
2) after the BFD that the second equipment receives that opposite end state is Down controls message, local session state is moved to by Down Init then sends the BFD that state is Init and controls message.The BFD state change of first equipment is the same as the second equipment.
3) after the BFD that the first equipment receives that opposite end state is Init controls message, local session state is moved to by Init Up then sends the BFD that state is Up and controls message.The BFD state change of second equipment is the same as the first equipment.
4) BFD both sides' state is all Up, and session is successfully established and starts to detect link state.
In the BFD session valid period, timer parameter can negotiate modification without influencing session status at any time.BFD session The timer negotiation of two-end device independently carry out, timer time can be different.
It is that the minimum BFD that the first equipment is supported controls packet sending intervals (that BFD, which controls packet sending intervals, One equipment Desired Min TX Interval) the minimum BFD control message receiving time interval (the supported with the second equipment Two equipment Required Min RX Interval) among maximum value, that is to say, that the equipment of slow one end determines Send frequency.
However, negotiate process in, the corresponding relationship of P message and F message be it is fuzzy, such as the second equipment receive P report Text sends F message according to the principle for receiving message one message of reply.Before the first equipment receives F message, meeting one Straight row sends P message, until receiving the F message of the second device replied.Its frequency of giving out a contract for a project is the frequency of giving out a contract for a project currently to come into force Rate.In practical applications there may be P Message processing is out-of-order or P Message processing not in time the case where, cause P message source to have The F message that may be received not is to cause to negotiate wrong to the response of current newest P message.
For example, the situation of P Message processing random ordering as shown in Figure 1a, it is assumed that the first equipment will reduce the transmission of local terminal Time interval has sent the first P message P1 to the second equipment.First equipment increases the transmission time interval of local terminal again, in It is to have sent second of P message P2 to the second equipment again.Second of P message P2 is reached prior to the first P message P1, and second sets After receiving second of P message P2, the packet receiving time come into force is increased, then the first P message P1 is received again, will test therewith Time reduces, and after the first equipment side receives the F message of the second equipment transmission, the first equipment thinks that the second equipment has known this The case where end transmission time interval becomes larger, then tunes up transmission time interval, and in fact, the second equipment still uses at this time Lesser detection time.In this way it is possible to which the second equipment is caused to lead to time parameter negotiation error since detection time is too small Time-out.
In addition, a kind of may cause the case where negotiating wrong situation P Message processing as shown in Figure 1 b not in time, it is assumed that the One equipment will reduce the transmission time interval of local terminal, have sent the first P message P1 to the second equipment.Second equipment receives first The first F message F1 can be sent after kind P message P1, if the first equipment handles the first F message F1, first is set It is standby to increase the transmission time interval of local terminal again, then second of P message P2 is had sent to the second equipment again.First equipment Time parameter (detection time) directly increases, if the second equipment has delay, or processing to second of P message P2 Message processing Overlong time, the time of consumption are more than the transmission time interval of the first equipment after increasing, and may cause the first equipment time-out.Invention The reason of people's discovery, time parameter negotiation error is that expired message can not be identified in message transmission process, leads to time parameter There is mistake in negotiation.For the correctness for guaranteeing the negotiation of BFD time parameter, needs to guarantee that P Message processing cannot be out-of-order, need simultaneously Guarantee that P message needs to be completed by quickly processing timely in real time, however, the configuration of BFD send and receive packets time parameter is smaller, for example is made into 3ms or 1ms, above-mentioned two o'clock more cannot be guaranteed.BFD agreement is in a network mainly for detection of failure, after reporting fault, if It reports by mistake, large-scale service switching can be triggered, it is huge to systematic influence.
Therefore, the invention proposes a kind of two-way converting parameters of detection time machineries of consultation, in embodiment, machinery of consultation It is carried out between two equipment of BFD session, the executable this method of any equipment in the present embodiment can be with two It is illustrated for platform equipment, specifically, the machinery of consultation can be used for the enabled device of two-way converting detection, i.e. time parameter Actively changed equipment specifically may refer to two-way converting parameters of detection time machinery of consultation shown in Fig. 2, this method May include:
S11. when time parameter changes, the first parameter negotiation message is sent, is carried in the first parameter negotiation message There are newest local terminal time parameter and the corresponding newest time parameter sequence number of newest local terminal time parameter.In the present embodiment, BFD control message format may refer to shown in Fig. 3 a and Fig. 3 b, wherein Fig. 3 a shows the pressure partial words of BFD control message Section, Fig. 3 b show the optional authentication part field of BFD control message, only introduce part related with the application field here Meaning:
Diag: the reason of diagnosing code, showing sender the last time session Down.
Sta (State): sender's BFD session current state, value are as follows: 0 represents AdminDown, and 1 represents Down, 2 generations Table I nit, 3 represent Up.
P (Poll): being set as 1, indicates that sender's request is attached confirmation, or send required parameter and change really Recognize;It is set as 0, indicates sender's not request confirmation.
F (Final): being set as 1, indicates that sender responds one and receives the BFD control message that P bit is 1;It is set as 0, indicate that sender is not responding to one and receives the BFD control message that P bit is 1.
My Discriminator: the unique non-zero value that sender generates, for identifying different BFD sessions.
Your Discriminator: the value is to receive if the BFD control message for having received session neighbours transmission Otherwise My Discriminator in message is 0.
The field meanings of the authentication section shown in Fig. 3 b:
Auth Type: auth type.
Auth Len: optional authentication partial-length, including Auth Type and Auth Len field.
In the present embodiment, time parameter sequence number can be addition in parameter negotiation message, i.e., enabled device is being sent out The P message sent when raw time parameter variation, in the present embodiment, time parameter sequence number can be the field of 16 bytes Sequence, for example, the local terminal time parameter sequence number carried in parameter negotiation message in the present embodiment can be My Sequence.The number of My Sequence record local terminal active transformation period parameter.Specifically, if forcing part field Sequence is added, may cause the BFD message for being unable to compatibility standard.Therefore, in the present embodiment, using sequence as recognizing Message is demonstrate,proved, increases Auth Type type, storage time argument sequence sequence newly.Primary parameter occurs in enabled device to become After change, the time parameter sequence number My Sequence of local terminal is increased 1.It is when P message is sent, newest local terminal time parameter is corresponding Newest time parameter sequence number My SequenceA fill out in P message, send together.In the present embodiment, when equipment room After BFD session is deleted or session status becomes DOWN, the time parameter sequence number of local terminal and the time for the opposite end searched out are deleted Argument sequence number guarantees the correctness of sequence number after next session establishment.
S12. the first parameter negotiation confirmation message is received, when the first parameter negotiation message carries the local terminal of opposite equip. storage Between argument sequence number.In the present embodiment, the first parameter negotiation confirmation message is the ginseng that opposite equip. is directed to that local device is sent The negotiation confirmation that number negotiation packet, that is, P message is replied as a result, be properly termed as F message, in opposite equip. reply in the present embodiment F message in, carry local terminal time parameter sequence number Your Sequence specifically, after opposite equip. receives P message, If P message is not expired message, just the My Sequence in P message is updated into opposite equip., opposite equip. passes through Your Sequence records local terminal time parameter sequence number, when going back F message, when carrying newest local terminal in opposite equip. Between argument sequence Your Sequence B.
S13. whether more newest local terminal time parameter sequence number and the local terminal time parameter sequence number received are consistent, BFD Session would generally be held consultation parameter by sending P message, terminate to negotiate process after receiving F message.But negotiating process at present In, the corresponding relationship of P message and F message is fuzzy, it is possible to which the F message received is not to current newest P message Response causes to negotiate wrong.Therefore, in order to ensure the first parameter negotiation confirmation message received be send carry newest Hold the first parameter negotiation of time parameter message response, need more newest local terminal time parameter sequence number with receive local terminal when Between argument sequence number it is whether consistent.When newest time parameter sequence number is consistent with the local terminal time parameter sequence number received, enter Step S14, when the local terminal that newest local terminal time parameter sequence number is inconsistent with the local terminal time parameter sequence number that receives and receives Time parameter sequence number is first, then it represents that the first parameter negotiation confirmation message received is hair when former time parameter changes The response of the parameter negotiation message sent, enters step S15.
S14. the newest local terminal time parameter to come into force after changing.
S15. it determines that the local terminal time parameter sequence number received correspondence has expired local terminal time parameter, abandons the received One parameter negotiation confirmation message.
The application can specify the hair of P message and F message by carrying time parameter sequence number in P message and F message The sequence and corresponding relationship sent avoid P message and F message matching mistake.For example, changing repeatedly for some time parameter The case where, local device can construct and send respectively a variety of P messages, the every change of time parameter for the time parameter repeatedly changed Change that an equal stored count of time parameter sequence number is primary, and every kind of P message carries corresponding time parameter message respectively, first sets It is standby to determine what the F message was replied according to the local terminal time parameter sequence number for the opposite equip. storage that the F message received carries Sequentially and which kind of corresponding P message, expired message also can be accurately identified, to guarantee what time parameter was negotiated Accuracy improves the stability of BFD, saves networking cost.
Specifically, the BFD session that can be established with the first equipment shown in Fig. 4 and the second equipment, pair present embodiment ensure that The accuracy that time parameter is negotiated is illustrated, and is opened as shown in figure 4, can establish BFD session with the first equipment and the second equipment It is illustrated for beginning, after the variation of the first equipment first time time parameter, the newest time parameter sequence number My of the first equipment Sequence A becomes 1.The information carried in the first P message P1 message are as follows: My Sequence A=1;First equipment second After secondary time parameter variation, the newest time parameter sequence number My Sequence A of the first equipment becomes 2.Second of P message P2 The information carried in message are as follows: My Sequence A=2;After second equipment receives the first P message P1 message, first is replied F message F1 is planted, the information carried in message: the first equipment time parameter sequence number Your of the second equipment storage Sequence B=1;After second equipment receives second of P message P2 message, second of F message F2 message is replied, message is taken The information of band: the first equipment time parameter sequence number Sequence B=2 of the second equipment of Your storage;First equipment receives A kind of F message F1, discovery Your Sequence B are less than My Sequence A.Message will be ignored, not triggered time parameter Variation.After the first equipment receives second of F message F2, it is found that its Your Sequence B is equal to My Sequence B. Come into force variation after second variation after time parameter.It can be to avoid so P Message processing leads to timeout issue not in time It will be avoided by.
As optional embodiment, since the field of time parameter sequence number preset length is counted, using circulation When the mode of accumulated counts, i.e. time argument sequence accumulated counts to dominant bit, when time parameter sequence number adds up again then Jump is initial value, for example, time parameter sequence number is the field of 16 byte lengths, after counting reaches 2 16 powers, is jumped Become initial value 0, for example, when newest local terminal time parameter sequence number and the inconsistent local terminal time parameter sequence number received, Newest local terminal time parameter is 0 and the local terminal time parameter sequence number maximum sequence number that receives, then it is assumed that the local terminal time received Argument sequence number is first;When receiving opposite end time parameter Serial No. zero, the opposite end time parameter Serial No. being locally stored is most Big value, then it is assumed that the opposite end time series number being locally stored is first.
In the present embodiment, the machinery of consultation of two-way converting parameters of detection time can also receive parameter negotiation message, due to Opposite equip. occur multiple time parameter variation when, multiple parameters negotiation packet can be sent, when after transmission time parameter Negotiation packet first reaches local device with the parameter negotiation message sent online, and local device receives posterior parameter negotiation report Wen Hou is confirmed, time parameter is changed, and rear have received again formerly sends parameter negotiation message, be further continued for being confirmed, change The time parameter that opposite equip. is formerly sent, then the time parameter that will lead to local device is not newest time parameter, is caused Time parameter negotiation error.For this purpose, when receiving parameter negotiation message, as shown in figure 5, two-way converting parameters of detection time is negotiated Method can also include the following steps:
S21. the second parameter negotiation message is received.Second parameter negotiation message carries opposite end time parameter sequence number.
When S22. judging the opposite end time parameter sequence number of the second parameter negotiation message carrying with locally stored opposite end Between argument sequence number it is whether consistent.In the present embodiment, opposite equip. occur multiple time parameter variation when, it is every occur one time when Between Parameters variation, primary parameter negotiation packet can be sent, if opposite equip. send parameter negotiation message formerly send it is slow In rear transmission parameter negotiation message reach local device, the parameter negotiation message formerly sent when reaching local device, The parameter negotiation message in rear transmission that the opposite end time parameter sequence number and local terminal one that parameter negotiation message carries store carries Opposite end time parameter sequence number it is inconsistent, therefore, when receiving the second parameter negotiation message, need to compare receive parameter association The opposite end time parameter sequence that the opposite end time parameter sequence number that Business's text carries is carried with the parameter negotiation message received before It is number whether consistent, when the opposite end time parameter sequence number received is inconsistent with locally stored opposite end time series number and receives Opposite end time parameter sequence number rear, then may indicate that the sequence of the second parameter negotiation message received is sent with opposite end The sequence of two parameter negotiation messages is identical, and there is no out-of-order situations, enters step S23.When the opposite end time parameter sequence received Row number is inconsistent with locally stored opposite end time series number and the opposite end time parameter sequence number that receives is first, then it is assumed that receives The opposite end time parameter sequence number arrived is out of date, then enters step S24.
S23. the opposite end time parameter and opposite end time parameter sequence number of the carrying of the second parameter negotiation message are stored.
S24. the second parameter negotiation message received is abandoned
S25. the second parameter negotiation confirmation message is sent.In the opposite end time parameter for storing the carrying of the second parameter negotiation message And after the time parameter sequence number of opposite end, it will confirm that the confirmation result of renewal time parameter with the second parameter negotiation confirmation message It is sent to opposite equip..Wherein, the second parameter negotiation confirmation message carries the opposite end time parameter sequence number of storage.
Specifically, can be by taking the BFD session that the first equipment shown in fig. 6 and the second equipment are established as an example, to the present embodiment The accuracy for guaranteeing that time parameter is negotiated is illustrated, as shown in fig. 6, in the present embodiment, the second equipment executes step S21- S25.After the variation of first equipment first time time parameter, the My Sequence A of the first equipment becomes 1.The first P message P1 report The information carried in text are as follows: My Sequence A=1;After the variation of first second of equipment time parameter, the My of the first equipment Sequence A becomes 2.The information carried in second of P message P2 message are as follows: My Sequence A=2;Second equipment because Second of P message P2 message is first received, the Your Sequence B of the second equipment becomes 2, while renewal time parameter.Below When receiving the first P message P1 message, because its My Sequence A of the first equipment of discovery is less than the second equipment local Your Sequence B.This message will be ignored.So P packet out-ordering will not go wrong.
The embodiment of the invention also provides a kind of two-way converting parameters of detection time consulting devices, as shown in fig. 7, negotiating dress Setting includes: transmission unit 10, for sending the first parameter negotiation message, the first parameter negotiation when time parameter changes Newest local terminal time parameter and the corresponding newest time parameter sequence number of newest local terminal time parameter are carried in message;It receives Unit 20, for receiving the first parameter negotiation confirmation message, the first parameter negotiation confirmation message carries the sheet of opposite equip. storage Hold time parameter sequence number;Comparing unit 30 is joined for more newest local terminal time parameter sequence number with the local terminal time received Whether number sequence row number is consistent;Validation unit 40, for when newest time parameter sequence number and the local terminal time parameter sequence received Number consistent, the newest local terminal time parameter after the variation that comes into force.
In order to more preferably illustrate that above-mentioned two-way detection forwarding detection Timing Negotiation method in the present embodiment can be with two The interactive system of equipment composition is specifically described, and in the present embodiment, interactive system may include establish BFD session the One equipment and the second equipment, specifically, the first equipment can for two-way converting detection enabled device, the first equipment can when Between parameter when changing, send P message, the second equipment can be the equipment that is enabled of two-way converting detection, receive P message When to the first device replied F message.Specific interaction flow may refer to system interaction figure shown in Fig. 8.
The embodiment of the invention provides a kind of electronic equipment, which can be located at the first equipment and/or second Equipment specifically may refer to Fig. 9, which may include processor 11 and memory 12, wherein processor 11 and deposit Reservoir 12 can be connected by bus or other modes, in Fig. 9 for being connected by bus.
Processor 11 can be central processing unit (Central Processing Unit, CPU).Processor 11 can be with For other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, The combination of the chips such as discrete hardware components or above-mentioned all kinds of chips.
Memory 12 is used as a kind of non-transient computer readable storage medium, can be used for storing non-transient software program, non- Transient computer executable program and module, such as management, use or the construction method of the container mirror image in the embodiment of the present invention Corresponding program instruction/module.Processor 11 by operation storage non-transient software program in memory 12, instruction with And module, it is thereby executing the various function application and data processing of processor, i.e., two-way in realization above method embodiment Detection forwarding detection Timing Negotiation method.
Memory 12 may include storing program area and storage data area, wherein storing program area can storage program area, Application program required at least one function;It storage data area can the data etc. that are created of storage processor 11.In addition, storage Device 12 may include high-speed random access memory, can also include non-transient memory, for example, at least a magnetic disk storage Part, flush memory device or other non-transient solid-state memories.In some embodiments, it includes relative to place that memory 12 is optional The remotely located memory of device 11 is managed, these remote memories can pass through network connection to processor 11.The reality of above-mentioned network Example includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
One or more module stores in memory 12, when being executed by processor 11, executes the above method and implements Two-way detection forwarding detection Timing Negotiation method in example.
It is that can lead to it will be understood by those skilled in the art that realizing all or part of the process in above-described embodiment method Computer program is crossed to instruct relevant hardware and complete, program can be stored in a computer-readable storage medium, the journey Sequence is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, storage medium can be read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), flash memory (Flash Memory), hard disk (Hard Disk Drive, abbreviation: HDD) or solid state hard disk (Solid-State Drive, SSD) etc..
Although being described in conjunction with the accompanying the embodiment of the present invention, those skilled in the art can not depart from the present invention Spirit and scope in the case where various modifications and variations can be made, such modifications and variations are each fallen within by appended claims institute Within the scope of restriction.

Claims (9)

1. a kind of two-way converting parameters of detection time machinery of consultation characterized by comprising
When time parameter changes, the first parameter negotiation message is sent, is carried most in the first parameter negotiation message New local terminal time parameter and the corresponding newest time parameter sequence number of the newest local terminal time parameter;
The first parameter negotiation confirmation message is received, when the first parameter negotiation confirmation message carries the local terminal of opposite equip. storage Between argument sequence number;
Whether compare the newest local terminal time parameter sequence number consistent with the local terminal time parameter sequence number that receives;
When the newest time parameter sequence number is consistent with the local terminal time parameter sequence number received, newest after the variation that comes into force Hold time parameter.
2. two-way converting parameters of detection time machinery of consultation as described in claim 1, which is characterized in that when the newest local terminal Time parameter sequence number is inconsistent with the local terminal time parameter sequence number received and the local terminal time parameter sequence number that receives is first, It determines that the local terminal time parameter sequence number received correspondence has expired local terminal time parameter, abandons first parameter association received Quotient's confirmation message.
3. two-way hair parameters of detection time machinery of consultation as claimed in claim 2, which is characterized in that the time parameter sequence Number sequence number counted for cycle accumulor, when the time parameter sequence number accumulated counts to dominant bit, the time parameter sequence Row number adds up then to jump again and become zero;
When the local terminal that the newest local terminal time parameter sequence number is inconsistent with the local terminal time parameter sequence number that receives and receives When time parameter sequence number is first, further includes:
Judge whether the local terminal time parameter sequence number is zero and whether newest local terminal time parameter sequence number is dominant bit;
When the local terminal time parameter Serial No. zero and newest local terminal time parameter Serial No. dominant bit, after the variation that comes into force Newest local terminal time parameter.
4. two-way converting parameters of detection time machinery of consultation as described in claim 1, which is characterized in that the method also includes
Receive the second parameter negotiation message;
Judge the opposite end time parameter sequence number and locally stored opposite end time ginseng that the second parameter negotiation message carries Whether number sequence row number is consistent;
When the opposite end that the opposite end time parameter sequence number received is inconsistent with locally stored opposite end time series number and receives Time parameter sequence number is in opposite end time parameter and opposite end time parameter rear, that storage the second parameter negotiation message carries Sequence number;
Send the second parameter negotiation confirmation message, wherein the second parameter negotiation confirmation message carries the described right of storage Hold time parameter sequence number.
5. two-way converting parameters of detection time machinery of consultation as claimed in claim 4, which is characterized in that
When the opposite end that the opposite end time parameter sequence number received is inconsistent with locally stored opposite end time series number and receives Time parameter sequence number is first, abandons the second parameter negotiation message received.
6. two-way converting parameters of detection time machinery of consultation as described in claim 1, which is characterized in that
When two-way converting inspection session failure, respectively by local terminal time parameter sequence number and the opposite end time parameter sequence received Number zero.
7. a kind of two-way converting parameters of detection time consulting device characterized by comprising
Transmission unit, for sending the first parameter negotiation message, the first parameter negotiation report when time parameter changes Newest local terminal time parameter and the corresponding newest time parameter sequence number of the newest local terminal time parameter are carried in text;
Receiving unit, for receiving the first parameter negotiation confirmation message, the first parameter negotiation confirmation message carries opposite end and sets The local terminal time parameter sequence number of standby storage;
Comparing unit, for the newest local terminal time parameter sequence number and the local terminal time parameter sequence number that receives whether Unanimously;
Validation unit, it is consistent with the local terminal time parameter sequence number received for working as the newest time parameter sequence number, it comes into force Newest local terminal time parameter after variation.
8. a kind of electronic equipment characterized by comprising memory and processor, between the memory and the processor Connection is communicated with each other, computer instruction is stored in the memory, the processor, which passes through, executes the computer instruction, from And perform claim requires two-way detection forwarding detection Timing Negotiation method described in 1-6 any one.
9. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer to refer to It enables, the computer instruction is for turning the computer thereby executing two-way detection as claimed in any one of claims 1 to 6 Hair detection Timing Negotiation method.
CN201910365813.3A 2019-04-30 2019-04-30 Bidirectional forwarding detection time parameter negotiation method and device and electronic equipment Active CN110099001B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910365813.3A CN110099001B (en) 2019-04-30 2019-04-30 Bidirectional forwarding detection time parameter negotiation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910365813.3A CN110099001B (en) 2019-04-30 2019-04-30 Bidirectional forwarding detection time parameter negotiation method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110099001A true CN110099001A (en) 2019-08-06
CN110099001B CN110099001B (en) 2021-03-23

Family

ID=67446712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910365813.3A Active CN110099001B (en) 2019-04-30 2019-04-30 Bidirectional forwarding detection time parameter negotiation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110099001B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112350928A (en) * 2020-10-14 2021-02-09 杭州迪普科技股份有限公司 OSPF (open shortest Path first) protocol-based smooth restart method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651578A (en) * 2009-09-08 2010-02-17 杭州华三通信技术有限公司 Bidirectional forwarding detection method by cross-domain forwarding and PE devices
CN101808022A (en) * 2010-04-22 2010-08-18 中兴通讯股份有限公司 Method and device for realizing bidirectional forwarding detection
CN102769573A (en) * 2012-08-01 2012-11-07 杭州华三通信技术有限公司 Method for sending BGP (border gateway protocol) keep-alive information by the aid of BFD (bidirectional forwarding detection) messages and routing devices
US9258234B1 (en) * 2012-12-28 2016-02-09 Juniper Networks, Inc. Dynamically adjusting liveliness detection intervals for periodic network communications
CN108718282A (en) * 2018-03-22 2018-10-30 新华三技术有限公司 The determination method and device of sequence of message number

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651578A (en) * 2009-09-08 2010-02-17 杭州华三通信技术有限公司 Bidirectional forwarding detection method by cross-domain forwarding and PE devices
CN101808022A (en) * 2010-04-22 2010-08-18 中兴通讯股份有限公司 Method and device for realizing bidirectional forwarding detection
CN102769573A (en) * 2012-08-01 2012-11-07 杭州华三通信技术有限公司 Method for sending BGP (border gateway protocol) keep-alive information by the aid of BFD (bidirectional forwarding detection) messages and routing devices
US9258234B1 (en) * 2012-12-28 2016-02-09 Juniper Networks, Inc. Dynamically adjusting liveliness detection intervals for periodic network communications
CN108718282A (en) * 2018-03-22 2018-10-30 新华三技术有限公司 The determination method and device of sequence of message number

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112350928A (en) * 2020-10-14 2021-02-09 杭州迪普科技股份有限公司 OSPF (open shortest Path first) protocol-based smooth restart method and device

Also Published As

Publication number Publication date
CN110099001B (en) 2021-03-23

Similar Documents

Publication Publication Date Title
US8284669B2 (en) Data acknowledgement apparatus and method
CN102664719B (en) Distributed secure transmission method applied to distributed control system (DCS)
US10637719B2 (en) Bus exception handing method of robot and bus exception handling device
CN107547619B (en) Timer parameter negotiation method and device
CN107528747B (en) Method and device for diagnosing communication state of master station and slave station and computer readable storage medium
CN104980257B (en) Internet of things communication method and device
CN105515901A (en) Message processing apparatus and method
CN106790266A (en) The communication means and device of a kind of intelligent distribution type feeder automation
US11419175B2 (en) Reconstructing a personal area network or system after a failure in the network or system
CN109120446A (en) A kind of zero configuration starting method and apparatus
CN112887416B (en) Frequency adjustment method and device for sending keep-alive packets
CN110099001A (en) The machinery of consultation of two-way converting parameters of detection time, device and electronic equipment
CN112367196B (en) Method and device for detecting network communication fault and electronic equipment
CN111917577B (en) BGP route information acquisition method, device, computer equipment and storage medium
US20210029228A1 (en) Point-to-Point Database Synchronization Over a Transport Protocol
KR20160131532A (en) Adaptive Bidirectional Forwarding Detection protocol and equipment for maximizing service availability in network system
CN105634894B (en) A kind of enhanced CAN bus data re-transmitting method and device
US20050262224A1 (en) Method for modifying one or more parameters for the operation of a network and subscribers for carrying out this method
US20180191562A1 (en) Parameter setting method for system bus and device thereof
CN112187408B (en) Data processing method, system, device, storage medium and processor
WO2016065752A1 (en) Method and device for detecting link state, and storage medium
CN101989896A (en) Feedback method and device for ARQ connection
CN107248935B (en) System and method for network management to discover and monitor network elements
CN111224803A (en) Multi-master detection method in stacking system and stacking system
CN115412483B (en) Method and system for cross-device link aggregation keep-alive message interaction

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