CN107547619B - Timer parameter negotiation method and device - Google Patents

Timer parameter negotiation method and device Download PDF

Info

Publication number
CN107547619B
CN107547619B CN201710463924.9A CN201710463924A CN107547619B CN 107547619 B CN107547619 B CN 107547619B CN 201710463924 A CN201710463924 A CN 201710463924A CN 107547619 B CN107547619 B CN 107547619B
Authority
CN
China
Prior art keywords
message
identification information
packet
timer parameter
carried
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.)
Active
Application number
CN201710463924.9A
Other languages
Chinese (zh)
Other versions
CN107547619A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201710463924.9A priority Critical patent/CN107547619B/en
Publication of CN107547619A publication Critical patent/CN107547619A/en
Application granted granted Critical
Publication of CN107547619B publication Critical patent/CN107547619B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Communication Control (AREA)

Abstract

The application provides a timer parameter negotiation method and a device, the method is applied to a first BFD-enabled device, and the method comprises the following steps: when the timer parameter changes, sending a parameter negotiation P message to a second device, wherein the P message carries the changed timer parameter and identification information for identifying the P message; receiving a parameter negotiation confirmation F message returned by the second equipment; and when the identification information carried by the F message is determined to be consistent with the identification information carried by the P message, determining that the F message is matched with the P message, and generating the changed timer parameter. By carrying the identification information in the P message and the F message, the corresponding relation between the P message and the F message can be determined, and the matching error between the P message and the F message is avoided.

Description

Timer parameter negotiation method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a timer parameter negotiation method and apparatus.
Background
BFD (Bidirectional Forwarding Detection) is a general, standardized, media independent and protocol independent fast failure Detection mechanism for detecting Bidirectional Forwarding paths between devices. BFD establishes conversation on two devices, after the conversation is established, the two devices can periodically send BFD control message, if one end does not receive BFD control message of the opposite end in detection time, the bidirectional forwarding path is considered to have fault.
After the BFD session is established, the two devices can determine the sending time interval and the detection time of the BFD control message through message interaction negotiation. Hereinafter, the minimum BFD control message sending time interval, the minimum BFD control message receiving time interval, and the detection times are collectively referred to as timer parameters, specifically, a timer parameter negotiation may be performed by sending a P (Poll) message, and the negotiation process is ended after receiving an F (Final, parameter negotiation confirmation) message. When the device receives the P message, F message is required to be sent back immediately, and timing sending and overtime detection are started simultaneously; and after the other end device receives the F message, ending the parameter negotiation process, and starting timing transmission and overtime detection in the same way.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for negotiating timer parameters, so as to clarify a corresponding relationship between a P packet and an F packet in a timer parameter negotiation process, and avoid inconsistency of negotiation of timer parameters at two ends of a session due to mismatching of the P packet and the F packet.
Specifically, the method is realized through the following technical scheme:
in a first aspect of the present application, a timer parameter negotiation method is provided, where the method is applied to a first device, and the first device enables a BFD function, and the method includes:
when the timer parameter changes, sending a first P message to a second device, wherein the first P message carries the changed timer parameter and identification information for identifying the first P message;
receiving a first F message returned by the second equipment;
and when the identification information carried by the first F message is determined to be consistent with the identification information carried by the first P message, determining that the first F message is matched with the first P message, and generating the changed timer parameter.
In a second aspect of the present application, a timer parameter negotiation apparatus is provided, where the apparatus may be applied to a first device that enables a BFD function, and has a function of implementing the foregoing method. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the above functions.
In one possible implementation, the apparatus includes:
a sending unit, configured to send a first P packet to a second device when a timer parameter changes, where the first P packet carries the changed timer parameter and identification information used to identify the first P packet;
the receiving unit is used for receiving a first F message returned by the second equipment;
and the matching unit is used for determining that the first F message is matched with the first P message and generating the changed timer parameter when the identification information carried by the first F message is determined to be consistent with the identification information carried by the first P message.
In another possible implementation manner, the apparatus includes a communication interface, a processor, a memory, and a bus, where the communication interface, the processor, and the memory are connected to each other through the bus; the processor executes the timer parameter negotiation method according to the first aspect of the present application by reading the logic instruction stored in the memory.
By carrying the identification information in the P message and the F message, the corresponding relation between the P message and the F message can be determined, and the matching error between the P message and the F message is avoided. For example, for a situation that a certain timer parameter changes repeatedly, the first device may respectively construct and send multiple P packets for the timer parameter that changes many times, each P packet carries different identification information, and the first device may determine which P packet the F packet corresponds to according to the identification information carried by the received F packet, so as to take effect of the corresponding timer parameter.
Drawings
Fig. 1 is a schematic diagram of a format of a BFD control packet;
FIG. 2 is an interaction flow diagram of timer parameter negotiation as provided herein;
FIG. 3 is a flow chart of one embodiment provided herein;
FIG. 4 is a flow chart of another embodiment provided herein;
FIG. 5 is a block diagram of functional blocks of the apparatus provided herein;
fig. 6 is a diagram of the hardware architecture of the device shown in fig. 5 provided herein.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the following, the BFD protocol is first briefly described.
BFD uses three-way handshake mechanism to establish conversation, when sending BFD control message, sender fills local current conversation state in Sta field of message, receiver transfers state machine according to Sta field of received BFD control message and local current conversation state to establish conversation. Taking Route a and Route B as examples, the BFD session establishment procedure is as follows:
1) and after receiving the notification of the upper layer application, the BFDs of the Router A and the Router B respectively send BFD control messages in a Down state to the opposite terminal.
2) After receiving the BFD control message with the state of Down at the opposite end, Router B transfers the state of the local session from Down to Init, and then sends the BFD control message with the state of Init. The BFD state change of Router A is the same as Router B.
3) After receiving the BFD control message with the state of the opposite end being Init, Router A transfers the state of the local session from Init to Up, and then sends the BFD control message with the state of Up. The BFD state change of Router B is the same as Router A.
4) And the states of both BFD parties are Up, and the session is successfully established and starts to detect the link state.
The message format of the BFD control message may be as shown in fig. 1, and only some fields related to the present application are described here:
diag: a diagnostic code indicating the reason for the sender's last session Down.
Sta (State): the current state of the sender BFD session takes the values as follows: 0 represents AdminDown, 1 represents Down, 2 represents Init, and 3 represents Up.
P (poll): setting as 1, indicating that the sender requests to make a connection confirmation or sends a confirmation requesting a parameter change; set to 0, indicating that the sender does not request an acknowledgement.
F (final): setting to 1, indicating that a sender responds to a received BFD control message with P bit of 1; and setting to 0, which indicates that the sender does not respond to a BFD control message with the received P bit of 1.
My Discriminator: the sender generates a unique non-0 value that identifies the different BFD sessions.
Young Discriminator: if the BFD control message sent by the session neighbor is received, the value is the My descriptor in the received message, otherwise, the value is 0.
Wherein, the P bit and the F bit cannot be 1 at the same time. In the application, a BFD control packet with a P bit of 1 is referred to as a P packet, and a BFD control packet with an F bit of 1 is referred to as an F packet. The BFD session generally negotiates parameters by sending a P message, and terminates the negotiation process after receiving an F message.
However, in the negotiation process, the corresponding relationship between the P message and the F message is ambiguous, and there is a possibility that the received F message does not respond to the latest P message at present, which results in a wrong negotiation.
For example, suppose that Route a needs to reduce the transmission time interval of the local terminal, and sends a first P packet to Route B. Before receiving the F message replied by Router B, Router a increases the sending time interval of the home terminal, and then sends the second P message to Router B again. After receiving the first P message, Router B replies an F message to the first P message, and meanwhile, the detection time of the home terminal is reduced. At this time, after receiving the F message, Router a may think that the F message is a response to the second P message, think that Router B already knows that the transmission time interval of Router a is increased, and then increase the transmission time interval; in practice, Router B uses a smaller detection time. This may cause Router B to erroneously time out the timer due to the detection time being too short.
The application provides a solution to clarify the corresponding relationship between the P message and the F message in the parameter negotiation process of the timer, and avoids inconsistent time negotiation at both ends of the session caused by mismatching of the P message and the F message.
The technical scheme of the application is described in the following with the accompanying drawings and various embodiments of the specification.
For convenience of description, a device initiating the timer parameter negotiation will be referred to as a first device, and a device on the other end participating in the timer parameter negotiation will be referred to as a second device, and both the first device and the second device enable the BFD function. Referring to fig. 2, a timer parameter negotiation procedure between a first device and a second device may include the steps of:
step 201: when the timer parameter of the local terminal changes, the first device sends a P message to the second device, and the P message carries the changed timer parameter and identification information for identifying the P message.
Step 202: and after receiving the P message, the second equipment takes the changed timer parameters into effect, carries the identification information of the P message in the F message and sends the F message to the first equipment.
Step 203: after the first device receives the F message returned by the second device, if the identification information carried by the F message is determined to be consistent with the identification information carried by the P message, the F message is determined to be matched with the P message, and the changed timer parameter is validated.
There are many implementation manners for the identification information of the P packet, and here, two implementation manners are simply mentioned:
mode 1: the identification information of the P message may be carried in the My descriptor field of the P message.
Based on the method 1, in step 202, the second device may obtain the identification information from the My Discriminator field of the received P packet, and send the obtained identification information to the first device by carrying the identification information in the My Discriminator field of the F packet.
Mode 2: the identification information of the P packet may be carried in the flag field of the P packet.
Based on the method 2, in step 202, the second device may obtain the identification information from the flag field of the received P packet, and send the obtained identification information to the first device by carrying the obtained identification information in the flag field of the F packet.
In an optional embodiment, if the timer parameter is changed again before the changed timer parameter becomes effective, the first device may temporarily not process the changed timer parameter again until the previously changed timer parameter becomes effective, assign new identification information for the changed timer parameter again, carry the new identification information in a new P packet, send the new P packet to the second device, and take effect on the changed timer parameter after receiving an F packet matched with the new P packet and returned by the second device. The advantages of doing so include, on the one hand, the saving of the amount of identification information, even if the timer parameter changes repeatedly, only two identification information need be occupied by one BFD session; on the other hand it can be guaranteed that the first device will eventually take effect with a later changing timer parameter.
As can be seen from steps 201 to 203, according to the present application, by carrying the identification information in the P message and the F message, the corresponding relationship between the P message and the F message can be determined, and a matching error between the P message and the F message is avoided. For example, for a situation that a certain timer parameter changes repeatedly, the first device may respectively construct and send multiple P packets for the timer parameter that changes many times, each P packet carries different identification information, and the first device may determine which P packet the F packet corresponds to according to the identification information carried by the received F packet, so as to take effect of the corresponding timer parameter.
Referring to fig. 3 and 4, the technical solution of the present application is explained by a more specific embodiment.
Fig. 3 is a flowchart illustrating a timer parameter negotiation process between a first device and a second device in a scenario where an identifier information is carried in a My descriptor field of a P packet, and the process may include the following steps:
step 301: a BFD session is created between a first device and a second device, and the first device applies for a Local identifier (LD) from an index pool.
For the sake of distinction, the LD applied in step 301 is denoted as C-LD (Current LD).
The specific process of creating the BFD session may refer to existing standard protocol flows and will not be described in detail here.
Step 302: the first equipment periodically sends BFD control messages to the second equipment so as to detect whether a link between the first equipment and the second equipment is normal or not.
The C-LD applied in step 301 will be carried in the MyDiscriminator field of the BFD control packet sent by the first device to the second device.
Step 303: when the timer parameter of the local terminal changes, the first device determines whether a P message is already being sent, if so, step 304 is executed, otherwise, step 305 is executed.
Specifically, whether the device is sending the P packet may be recorded by a variable of 1 bit (hereinafter referred to as a first variable). For example, when the first device is before or after sending the P packet, the first variable may be set to 1; after the first device receives the F packet matching the P packet, the first variable may be reset to 0.
Step 304: the first device records the change of the timer parameter and records the change condition, and does not process the changed timer parameter for the moment.
Specifically, whether or not there is an unprocessed changed timer parameter can be recorded by a 1-bit variable (hereinafter referred to as a second variable). For example, it may be defined that when the second variable is set to 1, there is an unprocessed changed timer parameter; when the second variable is set to 0, no unprocessed changed timer parameter is indicated.
For example, assuming that the first device determines to adjust the minimum BFD control packet transmission time interval (hereinafter referred to as TX) of the local terminal from 100ms (milliseconds) to 150ms, if the first variable at this time is 0, the first device may set the first variable to 1, and transmit the P packet (TX is 150ms) to the second device. Then, if the first device decides to adjust the TX of the local terminal to 200ms before receiving the reply from the second device, since the first variable is 1 at this time, the first device does not modify the first variable, and can set the second variable to 1, and record the change condition of the timer parameter as: TX 200 ms. Then, if the first device decides to adjust the TX of the local terminal to 250ms before receiving the reply from the second device, since the first variable and the second variable are both 1, the first device does not modify the first variable and the second variable, and the change condition of the timer parameter can be updated as follows: TX 250 ms. Then, after the first device receives the F packet replied by the second device, the first variable may be set to 0, and then it is checked whether the second variable is 1. Since it is determined that the second variable is 1, the first device reads the variable condition of the timer parameter, sets the first variable to 1 and the second variable to 0, and sends a P message (TX 250ms) to the second device.
Step 305: the first device applies for a new LD from the index pool.
For the sake of distinction, the newly applied LD in step 305 is denoted as N-LD (New LD).
Step 306: and the first equipment sends a P message to the second equipment, wherein the P message carries the changed timer parameter, and the My descriptor field of the P message carries the N-LD.
The N-LD here is the identification information of the P-packet.
Step 307: when the first device receives an F message returned by the second device, judging whether a source terminal identifier (Remote identifier) carried in a Yourdesicminer field of the F message is N-LD; if yes, go on to step 308; otherwise, the execution returns to step 306.
Optionally, before the changed timer parameter is validated, the first device may store a correspondence between the BFD session and the C-LD between the first device and the second device. Therefore, before the second device updates the identification code of the first device to be the N-LD, the first device can continue to process the BFD control message which is sent by the second device and has the value of the Your Discriminator field as the C-LD, and therefore the timer of the local terminal is prevented from being mistakenly overtime.
Step 308: and the first equipment stops sending the P message and generates the modified timer parameter corresponding to the P message.
Optionally, after validating the modified timer parameter, the first device may further delete the correspondence between the BFD session and the C-LD between the first device and the second device, and release the C-LD.
Step 309: the first equipment judges whether unprocessed changed timer parameters exist; if yes, returning to execute step 303, and negotiating the timer parameter with the second device again; otherwise, returning to the step 302, continuing to periodically send BFD control messages to the second device.
At this time, the value of the My descriptor field of the BFD control message is N-LD.
This completes the description of the flow shown in fig. 3.
Fig. 4 is a flowchart illustrating a timer parameter negotiation process between a first device and a second device in a scenario where an identification information is carried in a flag field of a P packet, and the method may include the following steps:
step 401: a BFD session is created between the first device and the second device.
Step 402: the first equipment periodically sends BFD control messages to the second equipment so as to detect whether a link between the first equipment and the second equipment is normal or not.
Step 403: when the timer parameter of the local terminal changes, the first device determines whether the P message is already being sent, if so, step 404 is executed, otherwise, step 405 is executed.
Step 404: the first device records the change of the timer parameter and records the change condition, and does not process the changed timer parameter for the moment.
The implementation of steps 403 and 404 may refer to steps 303 and 304.
Step 405: the first device selects an integer from the range of values of the undefined flag field as the value of the diagnostic code flag.
Because the flag field is used for indicating the reason that the sender has last session Down, when the first device and the second device are both in the Up state, the use of the flag field is not very large, so the present application selects the flag field to carry the identification information of the P packet.
The value range of the flag field is 0-31, and the currently defined value is 0-8, so that in the present application, the first device can select any integer from 9-31 as the flag value.
It should be noted that when selecting the flag value, a flag value different from the flag field value of the current BFD control packet needs to be selected; different BFD sessions may select the same Diag value.
Step 406: and the first equipment sends a P message to the second equipment, wherein the P message carries the changed timer parameter, and the Diag field of the P message carries the Diag value.
Step 407: when the first device receives a message returned by the second device, judging whether the Diag value carried in the Diag field of the F message is consistent with the Diag value carried in the P message; if yes, go on to step 408; otherwise, the step 406 is executed.
Step 408: and the first equipment stops sending the P message and generates the modified timer parameter corresponding to the P message.
Step 409: the first equipment judges whether unprocessed changed timer parameters exist; if yes, returning to step 403, and negotiating the timer parameter with the second device again; otherwise, returning to the step 402, continuing to periodically send BFD control messages to the second device.
At this time, the value of the flag field of the BFD control packet is the flag value selected in step 405. According to the method of fig. 4, only 2 flag values are needed for one BFD session to adequately cope with the scenario of timer parameter negotiation.
This completes the description of the flow shown in fig. 4.
The methods provided herein are described above. The apparatus provided in the present application is described below.
Referring to fig. 5, a functional block diagram of a timer parameter negotiation apparatus provided in the present application is a functional block diagram, where the apparatus may be applied to a first device, and the first device enables a BFD function. As shown in fig. 5, the apparatus may include the following units:
a sending unit 501, configured to send a first P packet to a second device when a timer parameter changes, where the first P packet carries the changed timer parameter and identification information used to identify the first P packet.
A receiving unit 502, configured to receive a first F packet returned by the second device.
A matching unit 503, configured to determine that the first F packet matches the first P packet and generate the changed timer parameter when it is determined that the identification information carried by the first F packet is consistent with the identification information carried by the first P packet.
Optionally, the apparatus may further include an LD processing unit:
and the LD processing unit is used for applying for a new home terminal identification code LD.
Correspondingly, the sending unit 501 is specifically configured to send the new LD carried in the MyDiscriminator field of the first P packet to the second device, where the new LD is the identification information of the first P packet.
Correspondingly, the matching unit 503 is specifically configured to determine an RD carried in a Your descriptor field of the first F packet; and when the RD is consistent with the new LD, determining that the first F message is matched with the first P message.
Optionally, the LD processing unit may be further configured to: determining an old LD used by the first device before sending the first P message; before the changed timer parameter is validated, storing the corresponding relation between the BFD session between the first device and the second device and the old LD; after the changed timer parameter is validated, deleting the corresponding relation between the BFD session between the first device and the second device and the old LD, and releasing the old LD.
Optionally, the apparatus may further include a Diag processing unit;
the flag processing unit is specifically configured to select an integer from an undefined flag field value range as a flag value.
Correspondingly, the sending unit 501 is specifically configured to carry the selected flag value in the flag field of the first P packet and send the flag value to the second device, where the flag value is identification information of the first P packet.
Correspondingly, the matching unit 503 is specifically configured to determine a flag value carried in a flag field of the first F packet; and when the Diag value of the first F message is consistent with the Diag value of the first P message, determining that the first F message is matched with the first P message.
Optionally, before validating the changed timer parameter, the sending unit 501 may be further configured to: and when the timer parameter changes again, the changed timer parameter is not processed for the moment until the previously changed timer parameter takes effect.
Optionally, the receiving unit 502 may be further configured to receive a second P packet sent by a third device;
correspondingly, the sending unit 501 may be further configured to, if the identification information of the second P packet is carried in the My Discriminator field of the second P packet, carry the identification information in the YourDiscriminator field of the second F packet, and send the identification information to the third device; and if the identification information of the second P message is carried in the Diag field of the second P message, carrying the identification information in the Diag field of the second F message and sending the identification information to the third equipment.
It should be noted that the division of the unit in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation. The functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The description of the apparatus shown in fig. 5 is thus completed.
Correspondingly, the application also provides a hardware structure of the device shown in fig. 5. Referring to fig. 6, fig. 6 is a schematic diagram of a hardware structure of the apparatus shown in fig. 5 provided in the present application, where the apparatus includes: a communication interface 601, a processor 602, a memory 603, and a bus 604; the communication interface 601, the processor 602 and the memory 603 communicate with each other via a bus 604.
Among them, the communication interface 601 is used for communicating with other devices. The processor 602 may be a Central Processing Unit (CPU), the memory 603 may be a non-volatile memory (non-volatile memory), and the timer parameter negotiation logic instructions are stored in the memory 603, and the processor 602 may execute the timer parameter negotiation logic instructions stored in the memory 603 to implement the functions of the first device in the flowchart shown in fig. 2.
Up to this point, the description of the hardware configuration shown in fig. 6 is completed.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (12)

1. A method for negotiating timer parameters, the method being applied to a first device, the first device enabling a Bidirectional Forwarding Detection (BFD) function, the method comprising:
when the timer parameter changes, sending a first parameter negotiation P message to a second device, wherein the first P message carries the changed timer parameter and identification information for identifying the first P message; the identification information is carried in the identification code My descriptor field or the diagnosis code Diag field of the sender; receiving a first parameter negotiation confirmation F message returned by the second equipment;
and when the identification information carried by the first F message is determined to be consistent with the identification information carried by the first P message, determining that the first F message is matched with the first P message, and generating the changed timer parameter.
2. The method of claim 1, wherein said sending the first P-message to the second device comprises:
applying for a new home terminal identification code LD;
sending the new LD carried in the My descriptor field of the first P message to a second device, wherein the new LD is the identification information of the first P message;
when it is determined that the identification information carried by the first F packet is consistent with the identification information carried by the first P packet, determining that the first F packet is matched with the first P packet includes:
determining a far-end authentication code RD carried in a receiver authentication code Your Discriminator field of the first F message;
and when the RD is consistent with the new LD, determining that the first F message is matched with the first P message.
3. The method of claim 2, wherein the method further comprises:
determining an old LD used by the first device before sending the first P message;
before the changed timer parameter is validated, storing the corresponding relation between the BFD session between the first device and the second device and the old LD;
after the changed timer parameter is validated, deleting the corresponding relation between the BFD session between the first device and the second device and the old LD, and releasing the old LD.
4. The method of claim 1, wherein said sending the first P-message to the second device comprises:
selecting an integer from the value range of the undefined Diag field as a Diag value;
carrying the selected Diag value in the Diag field of the first P message and sending the Diag value to a second device, wherein the Diag value is the identification information of the first P message;
when it is determined that the identification information carried by the first F packet is consistent with the identification information carried by the first P packet, determining that the first F packet is matched with the first P packet includes:
determining a Diag value carried in a Diag field of the first F message;
and when the Diag value of the first F message is consistent with the Diag value of the first P message, determining that the first F message is matched with the first P message.
5. The method of claim 1, wherein prior to validating the changed timer parameter, the method further comprises:
and when the timer parameter changes again, the changed timer parameter is not processed for the moment until the previously changed timer parameter takes effect.
6. The method of claim 1, wherein the method further comprises:
receiving a second P message sent by third equipment;
if the identification information of the second P message is carried in the My descriptor field of the second P message, carrying the identification information in the Young descriptor field of the second F message and sending the identification information to a third device;
and if the identification information of the second P message is carried in the Diag field of the second P message, carrying the identification information in the Diag field of the second F message and sending the identification information to the third equipment.
7. A timer parameter negotiation apparatus applied to a first device, the first device enabling Bidirectional Forwarding Detection (BFD) function, the apparatus comprising:
a sending unit, configured to send a first parameter negotiation P packet to a second device when a timer parameter changes, where the first P packet carries the changed timer parameter and identification information used to identify the first P packet; the identification information is carried in the identification code My descriptor field or the diagnosis code Diag field of the sender;
the receiving unit is used for receiving a first parameter negotiation confirmation F message returned by the second equipment;
and the matching unit is used for determining that the first F message is matched with the first P message and generating the changed timer parameter when the identification information carried by the first F message is determined to be consistent with the identification information carried by the first P message.
8. The apparatus of claim 7, wherein the apparatus further comprises a home authentication code (LD) processing unit:
the LD processing unit is used for applying for a new LD;
the sending unit is specifically configured to send the new LD carried in the My descriptor field of the first P packet to the second device, where the new LD is identification information of the first P packet;
the matching unit is specifically configured to determine a far-end authentication code RD carried in a receiver authentication code Your Discriminator field of the first F packet; and when the RD is consistent with the new LD, determining that the first F message is matched with the first P message.
9. The apparatus of claim 8, wherein the LD processing unit is further to:
determining an old LD used by the first device before sending the first P message; before the changed timer parameter is validated, storing the corresponding relation between the BFD session between the first device and the second device and the old LD; after the changed timer parameter is validated, deleting the corresponding relation between the BFD session between the first device and the second device and the old LD, and releasing the old LD.
10. The apparatus of claim 7, wherein the apparatus further comprises a Diag processing unit;
the flag processing unit is specifically configured to select an integer from an undefined flag field value range as a flag value;
the sending unit is specifically configured to carry the selected flag value in a flag field of the first P packet and send the flag value to a second device, where the flag value is identification information of the first P packet;
the matching unit is specifically configured to determine a flag value carried in a flag field of the first F packet; and when the Diag value of the first F message is consistent with the Diag value of the first P message, determining that the first F message is matched with the first P message.
11. The apparatus of claim 7, wherein prior to validating the changed timer parameter, the sending unit is further to:
and when the timer parameter changes again, the changed timer parameter is not processed for the moment until the previously changed timer parameter takes effect.
12. The apparatus of claim 7,
the receiving unit is further configured to receive a second P packet sent by a third device;
the sending unit is further configured to send, if the identification information of the second P packet is carried in the mydistinguisher field of the second P packet, the identification information carried in the Your distinguisher field of the second F packet to the third device; and if the identification information of the second P message is carried in the Diag field of the second P message, carrying the identification information in the Diag field of the second F message and sending the identification information to the third equipment.
CN201710463924.9A 2017-06-19 2017-06-19 Timer parameter negotiation method and device Active CN107547619B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710463924.9A CN107547619B (en) 2017-06-19 2017-06-19 Timer parameter negotiation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710463924.9A CN107547619B (en) 2017-06-19 2017-06-19 Timer parameter negotiation method and device

Publications (2)

Publication Number Publication Date
CN107547619A CN107547619A (en) 2018-01-05
CN107547619B true CN107547619B (en) 2020-11-06

Family

ID=60970908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710463924.9A Active CN107547619B (en) 2017-06-19 2017-06-19 Timer parameter negotiation method and device

Country Status (1)

Country Link
CN (1) CN107547619B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740468B (en) 2018-07-18 2023-07-04 维沃移动通信有限公司 State detection method, configuration method, terminal and network equipment for network communication
CN109039746B (en) * 2018-08-07 2022-02-25 新华三技术有限公司 Method for detecting bidirectional forwarding path and detecting session state and processor
CN109743746A (en) * 2018-12-07 2019-05-10 盛科网络(苏州)有限公司 A kind of two-way converting detection BFD parameter consultation method, device and chip
CN110460672B (en) * 2019-08-19 2022-04-05 迈普通信技术股份有限公司 Session negotiation method, device, equipment and storage medium
CN111010447A (en) * 2019-12-23 2020-04-14 北京奇艺世纪科技有限公司 Data communication method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252476A (en) * 2008-03-18 2008-08-27 华为技术有限公司 Apparatus and method for malfunction detection
CN101800677A (en) * 2010-02-24 2010-08-11 中兴通讯股份有限公司 Processing device and method of bidirectional forwarding detection (BFD) messages
WO2011035805A1 (en) * 2009-09-23 2011-03-31 Telefonaktiebolaget Lm Ericsson (Publ) Network fault detection method and apparatus
CN102035695A (en) * 2010-12-20 2011-04-27 中兴通讯股份有限公司 Bidirectional forwarding detection method and device
CN102932318A (en) * 2011-08-10 2013-02-13 华为技术有限公司 Verification method for bidirectional forwarding detection session and node
CN103067220A (en) * 2012-12-19 2013-04-24 中兴通讯股份有限公司 Two-way link transmission detecting method and two-way link transmission detecting device under the circumstance of parameter updating

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252476A (en) * 2008-03-18 2008-08-27 华为技术有限公司 Apparatus and method for malfunction detection
WO2011035805A1 (en) * 2009-09-23 2011-03-31 Telefonaktiebolaget Lm Ericsson (Publ) Network fault detection method and apparatus
CN101800677A (en) * 2010-02-24 2010-08-11 中兴通讯股份有限公司 Processing device and method of bidirectional forwarding detection (BFD) messages
CN102035695A (en) * 2010-12-20 2011-04-27 中兴通讯股份有限公司 Bidirectional forwarding detection method and device
CN102932318A (en) * 2011-08-10 2013-02-13 华为技术有限公司 Verification method for bidirectional forwarding detection session and node
CN103067220A (en) * 2012-12-19 2013-04-24 中兴通讯股份有限公司 Two-way link transmission detecting method and two-way link transmission detecting device under the circumstance of parameter updating

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
BFD技术介绍;孤独有我2012;《https://wenku.baidu.com/view/ecdac202a0116c175f0e488a.html》;20150803;第1-10页 *

Also Published As

Publication number Publication date
CN107547619A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN107547619B (en) Timer parameter negotiation method and device
JP5472276B2 (en) Vehicle communication control device
WO2020038256A1 (en) Data transmission method and apparatus
EP3160109B1 (en) Udp-based control command transmission method, sender and receiver
CN110808948B (en) Remote procedure calling method, device and system
US20110060902A1 (en) Vpn connection system and vpn connection method
WO2017088494A1 (en) Link management method and apparatus
CN111629368B (en) Communication method of earphone and charging box, earphone and readable storage medium
CN106789219A (en) The management method and device of router
CN109150659B (en) Processor and BFD message transmission method
US20170272339A1 (en) Method and apparatus for detecting connectivity
US9191312B2 (en) Method and system for implementing PW control bit capability negotiation
US20090106401A1 (en) System and method for Intra Network Internet Protocol (IP) address modification by dual controller
US20080267080A1 (en) Fault Verification for an Unpaired Unidirectional Switched-Path
CN113595839B (en) Device binding method, terminal device and storage medium
CN108055172B (en) Bidirectional forwarding detection method and device
CN107872309B (en) Self-adaptive method, device and equipment for network transmission medium and rate
US8099075B2 (en) Method and apparatus for session establishment for emergency VoIP calls
WO2014019157A1 (en) Communication path processing method and apparatus
CN110677302B (en) Communication control method, device and system
CN110446197B (en) Communication control method, device, equipment and storage medium of intelligent equipment
CN105471927B (en) The method and service node that a kind of pair of business routing message is handled
WO2022001665A1 (en) Communication method for vehicle-mounted device, vehicle-mounted device, storage medium, and electronic apparatus
JPWO2020230221A5 (en) Terminal and communication method
CN107666671B (en) Method and device for detecting wrong connection based on TWAMP

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