CN106941426A - A kind of chain processing method and device - Google Patents

A kind of chain processing method and device Download PDF

Info

Publication number
CN106941426A
CN106941426A CN201610005907.6A CN201610005907A CN106941426A CN 106941426 A CN106941426 A CN 106941426A CN 201610005907 A CN201610005907 A CN 201610005907A CN 106941426 A CN106941426 A CN 106941426A
Authority
CN
China
Prior art keywords
terminal device
negotiation information
negotiation
member interface
information
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
CN201610005907.6A
Other languages
Chinese (zh)
Other versions
CN106941426B (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201610005907.6A priority Critical patent/CN106941426B/en
Priority to PCT/CN2016/089806 priority patent/WO2017117957A1/en
Publication of CN106941426A publication Critical patent/CN106941426A/en
Application granted granted Critical
Publication of CN106941426B publication Critical patent/CN106941426B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5003Managing SLA; Interaction between SLA and QoS
    • H04L41/5006Creating or negotiating SLA contracts, guarantees or penalties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/76Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/324Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the data link layer [OSI layer 2], e.g. HDLC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2213/00Indexing scheme relating to selecting arrangements in general and for multiplex systems
    • H04Q2213/13567Indexing scheme relating to selecting arrangements in general and for multiplex systems negotiation, management policy, goals

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Environmental & Geological Engineering (AREA)
  • Communication Control (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本发明公开了一种链路处理方法和装置。本发明中的链路处理方法包括:第一终端设备通过执行协商流程导通第一终端设备的第一成员接口和第二终端设备中与第一成员接口物理连接的第二成员接口;第一终端设备接收第二终端设备按照预置的时间间隔重复发送的第一扩展保活报文,第一扩展保活报文中包括第二终端设备中的第一协商信息和第二协商信息,第二协商信息的内容在第二成员接口异常时发生变化;第一终端设备在确定所接收到的第一协商信息和第二协商信息与第一终端设备中的第一协商信息和第二协商信息不同时,关闭第一成员接口。本发明解决了现有技术提供的链路检测方法中,链路可靠性较差的问题。

The invention discloses a link processing method and device. The link processing method in the present invention includes: the first terminal device connects the first member interface of the first terminal device and the second member interface physically connected to the first member interface in the second terminal device by executing a negotiation process; the first The terminal device receives the first extended keep-alive message repeatedly sent by the second terminal device according to a preset time interval, the first extended keep-alive message includes the first negotiation information and the second negotiation information in the second terminal device, and the second The content of the second negotiation information changes when the second member interface is abnormal; the first terminal device determines that the received first negotiation information and second negotiation information are different from the first negotiation information and second negotiation information in the first terminal device If not, shut down the first member interface. The invention solves the problem of poor link reliability in the link detection method provided by the prior art.

Description

Link processing method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a link processing method and apparatus.
Background
A High-Level Data Link Control (HDLC) is a bit-oriented Data Link layer Control protocol for transmitting Data over a synchronous network, and the HDLC can provide transparent transmission between points and points for an upper layer protocol.
The user can realize low-load data transmission and link detection functions through the HDLC. Specifically, the header of the HDLC protocol only occupies four bytes, so that a larger data packet can be transmitted under the condition of the same Maximum-Receive-Unit (MRU), and the HDLC protocol has a greater advantage particularly for the transmission of short packets, such as a link detection packet. The HDLC provides a timing detection function for the link, which can be implemented by a keep-alive message (keepalive message) in a standard protocol, and as long as both physically connected member interfaces in the devices at both ends are protocol-on (UP), the HDLC triggers the keep-alive message regularly, notifies the opposite end that the member interface at the end is protocol-on, and if the keep-alive message at the opposite end can be received at the same time, considers that the member interface at the opposite end is protocol-on, i.e. the link is normal, and can perform communication, as shown in fig. 1, which is a schematic diagram of a principle of detecting the link by the keep-alive message in the HDLC protocol in the prior art, the router a and the router B are devices at both ends of the link, and fig. 2 is a schematic diagram of a format of the keep-alive; in a specific implementation, if the local terminal does not receive the keep-alive message of the opposite terminal after a certain time, the member interface of the opposite terminal is considered to be abnormal, and the link can be disconnected. However, in the above-mentioned link detection method, if the opposite end is in a normal sending and abnormal receiving state, the home end can also receive the keep-alive message sent by the opposite end, and at this time, the home end cannot sense the abnormal state of the opposite end, and a phenomenon of single traffic occurs.
However, in the link detection method in the prior art, one end of the link may not sense the abnormal state of the opposite end, and the phenomenon of single traffic occurs, thereby causing the problem of poor link reliability.
Disclosure of Invention
In order to solve the above technical problems, the present invention provides a link processing method and apparatus, so as to solve the problem that in the link detection method in the prior art, the link reliability is poor due to the fact that one end of the link may not sense the abnormal state of the opposite end and the phenomenon of single traffic occurs.
In a first aspect, the present invention provides a link processing method, including:
a first terminal device conducts a first member interface of the first terminal device and a second member interface which is physically connected with the first member interface in a second terminal device by executing a negotiation process, and the first terminal device and the second terminal device which finish the negotiation process both have first negotiation information of the first member interface and second negotiation information of the second member interface;
the first terminal device receives a first extended keep-alive message which is repeatedly sent by the second terminal device according to a preset time interval, wherein the first extended keep-alive message comprises first negotiation information and second negotiation information in the second terminal device, and the content of the second negotiation information changes when the second member interface is abnormal;
and the first terminal equipment closes the first member interface when determining that the received first negotiation information and second negotiation information are different from the first negotiation information and the second negotiation information in the first terminal equipment.
In a first possible implementation manner of the first aspect, after the first terminal device sets a first timer, and the first terminal device conducts a first member interface of the first terminal device and a second member interface, which is physically connected to the first member interface, of a second terminal device by executing a negotiation procedure, the method further includes:
the first terminal equipment starts the first timer;
after the first terminal device receives the first extended keep-alive message sent by the second terminal device, the method further includes:
and the first terminal equipment sets the first timer to start timing from zero when determining that the received first negotiation information and second negotiation information are the same as the first negotiation information and the second negotiation information in the first terminal equipment.
In a second possible implementation manner of the first aspect, the first terminal device repeatedly sends a second extended keep-alive message to the second terminal device according to a preset time interval, where the second extended keep-alive message includes first negotiation information and second negotiation information in the first terminal device, a content of the first negotiation information changes when the first member interface is abnormal, and the second extended keep-alive message is used to instruct the second terminal device to close the second member interface when it is determined that the received first negotiation information and second negotiation information are different from the first negotiation information and second negotiation information in the second terminal device.
According to a second possible implementation manner of the first aspect, in a third possible implementation manner, a second timer is set in the second terminal device, the second timer starts to count time after the second member interface is turned on, and the second extended keep-alive message is further used to instruct the second terminal device to set the second timer to count time from zero when it is determined that the received first negotiation information and second negotiation information are the same as the first negotiation information and second negotiation information in the second terminal device.
According to the first possible implementation manner of the first aspect, in a fourth possible implementation manner, the method further includes:
the first terminal equipment closes the first member interface when detecting that the timing value of the first timer is larger than a first threshold value;
the first terminal device sends a third extended keep-alive message to the second terminal device, the third extended keep-alive message does not carry the first negotiation information or carries the first negotiation information after content change, and the third extended keep-alive message is used for indicating the second terminal device to close the second member interface;
and the first terminal equipment and the second terminal equipment execute the negotiation process again.
According to the first aspect and any one of the first to fourth possible implementation manners of the first aspect, in a fifth possible implementation manner, the receiving, by the first terminal device, the first extended keep-alive message further includes a third timer, the third timer starts timing when the first extended keep-alive message is sent, and after the receiving, by the first terminal device, the first extended keep-alive message that is repeatedly sent by the second terminal device according to a preset time interval, the method further includes:
when the timing value of the third timer is less than or equal to the second threshold value and the received first negotiation information and second negotiation information are determined to be the same as the first negotiation information and the second negotiation information in the first terminal device, the first terminal device maintains the current state of the first member interface; or,
the first terminal equipment closes the first member interface when the timing value of the third timer is larger than a second threshold value;
the first terminal device sends a fourth extended keep-alive message to the second terminal device, the fourth extended keep-alive message does not carry the first negotiation information or carries the first negotiation information after content change, and the fourth extended keep-alive message is used for indicating the second terminal device to close the second member interface;
and the first terminal equipment and the second terminal equipment execute the negotiation process again.
According to the first aspect and any one of the first to fourth possible implementation manners of the first aspect, in a sixth possible implementation manner, the conducting, by the first terminal device, a first member interface of the first terminal device and a second member interface, which is physically connected to the first member interface, of the second terminal device by performing a negotiation procedure includes:
the first terminal equipment sends the first negotiation information to the second terminal equipment and indicates the second terminal equipment to store the first negotiation information;
the first terminal equipment receives and stores the second negotiation information sent by the second terminal equipment;
the first terminal device sends a first negotiation message to the second terminal device, the first negotiation message includes first negotiation information and second negotiation information in the first terminal device, the first negotiation message is used for indicating the second terminal device to conduct the second member interface when the fact that the received first negotiation information and second negotiation information are the same as the first negotiation information and the second negotiation information in the second terminal device is determined;
the first terminal equipment receives a second negotiation message sent by the second terminal equipment, wherein the second negotiation message comprises second negotiation information and first negotiation information in the second terminal equipment;
and the first terminal equipment conducts the first member interface when determining that the received first negotiation information and second negotiation information are the same as the first negotiation information and the second negotiation information in the first terminal equipment.
According to a sixth possible implementation manner of the first aspect, in a seventh possible implementation manner, a third member interface in the first terminal device is physically connected to a fourth member interface in the second terminal device, and third negotiation information of the third member interface is the same as the first negotiation information;
after the first terminal device conducts the first member interface of the first terminal device and the second member interface, which is physically connected with the first member interface, of the second terminal device by executing a negotiation process, the method further includes:
the first terminal device executes the negotiation process to conduct the third member interface and the fourth member interface when fourth negotiation information of the fourth member interface is the same as the second negotiation information; or,
and the first terminal equipment fails to execute the negotiation process when the fourth negotiation information of the fourth member interface is different from the second negotiation information.
In a second aspect, the present invention provides a link processing apparatus, provided in a first terminal device, the link processing apparatus including:
the negotiation module is used for conducting a first member interface of the first terminal device and a second member interface which is physically connected with the first member interface in the second terminal device by executing a negotiation process, and the first terminal device and the second terminal device which finish the negotiation process both have first negotiation information of the first member interface and second negotiation information of the second member interface;
a receiving module, configured to receive a first extended keep-alive message that is repeatedly sent by the second terminal device according to a preset time interval, where the first extended keep-alive message includes first negotiation information and second negotiation information in the second terminal device, and a content of the second negotiation information changes when the second member interface is abnormal;
and the processing module is used for closing the first member interface when the first negotiation information and the second negotiation information received by the receiving module are determined to be different from the first negotiation information and the second negotiation information in the first terminal equipment.
In a first possible implementation manner of the second aspect, a first timer is provided in the first terminal device, and the link processing apparatus further includes: a starting module 18, configured to start the first timer after the negotiation module conducts a first member interface of the first terminal device and a second member interface, which is physically connected to the first member interface, of the second terminal device by executing a negotiation process;
the processing module is further configured to set the first timer to start timing from zero when it is determined that the first negotiation information and the second negotiation information received by the receiving module are the same as the first negotiation information and the second negotiation information in the first terminal device.
In a second possible implementation manner of the second aspect, the link processing apparatus further includes: a sending module, configured to repeatedly send a second extended keep-alive packet to the second terminal device according to a preset time interval, where the second extended keep-alive packet includes first negotiation information and second negotiation information in the first terminal device, a content of the first negotiation information changes when the first member interface is abnormal, and the second extended keep-alive packet is used to instruct the second terminal device to close the second member interface when it is determined that the received first negotiation information and second negotiation information are different from the first negotiation information and second negotiation information in the second terminal device.
According to a second possible implementation manner of the second aspect, in a third possible implementation manner, a second timer is set in the second terminal device, the second timer starts to count time after the second member interface is turned on, and the second extended keep-alive message is further used to instruct the second terminal device to set the second timer to count time from zero when it is determined that the received first negotiation information and second negotiation information are the same as the first negotiation information and second negotiation information in the second terminal device.
In a fourth possible implementation manner, according to the first possible implementation manner of the second aspect, the processing module is further configured to close the first member interface when detecting that a count value of the first timer is greater than a first threshold;
the link processing apparatus further includes: a sending module, configured to send a third extended keep-alive message to the second terminal device, where the third extended keep-alive message does not carry the first negotiation information or carries the first negotiation information after content change, and the third extended keep-alive message is used to instruct the second terminal device to close the second member interface;
the negotiation module is further configured to execute the negotiation process with the second terminal device again.
According to the second aspect and any one of the first to fourth possible implementation manners of the second aspect, in a fifth possible implementation manner, the first extended keep-alive message received by the receiving module further includes a third timer, the third timer starts timing when the first extended keep-alive message is sent out, and the processing module is further configured to keep a current state of the first member interface when a timing value of the third timer is less than or equal to the second threshold, and it is determined that the first negotiation information and the second negotiation information received by the receiving module are the same as the first negotiation information and the second negotiation information in the first terminal device; or,
the processing module is further configured to close the first member interface when the timing value of the third timer is greater than a second threshold;
the sending module is further configured to send a fourth extended keep-alive message to the second terminal device, where the fourth extended keep-alive message does not carry the first negotiation information or carries the first negotiation information after content change, and the fourth extended keep-alive message is used to instruct the second terminal device to close the second member interface;
the negotiation module is further configured to execute the negotiation process with the second terminal device again.
According to the second aspect and any one of the first to fourth possible implementation manners of the second aspect, in a sixth possible implementation manner, the negotiation module includes:
a sending unit, configured to send the first negotiation information to the second terminal device, and instruct the second terminal device to store the first negotiation information;
a receiving unit, configured to receive and store the second negotiation information sent by the second terminal device;
the sending unit is further configured to send a first negotiation packet to the second terminal device, where the first negotiation packet includes first negotiation information and second negotiation information in the first terminal device, and the first negotiation packet is used to instruct the second terminal device to turn on the second member interface when it is determined that the received first negotiation information and second negotiation information are the same as the first negotiation information and second negotiation information in the second terminal device;
the receiving unit is further configured to receive a second negotiation packet sent by the second terminal device, where the second negotiation packet includes second negotiation information and first negotiation information in the second terminal device;
and the processing unit is used for conducting the first member interface when the first negotiation information and the second negotiation information received by the receiving unit are determined to be the same as the first negotiation information and the second negotiation information in the first terminal equipment.
According to a sixth possible implementation manner of the second aspect, in a seventh possible implementation manner, a third member interface in the first terminal device is physically connected to a fourth member interface in the second terminal device, and third negotiation information of the third member interface is the same as the first negotiation information;
the processing module is further configured to execute a negotiation process to conduct a third member interface and a fourth member interface after the negotiation module conducts a first member interface of the first terminal device and a second member interface, which is physically connected to the first member interface, of the second terminal device by executing the negotiation process, and when fourth negotiation information of the fourth member interface is the same as the second negotiation information; or,
the processing module is further configured to, after the negotiation module conducts a first member interface of the first terminal device and a second member interface, which is physically connected to the first member interface, of the second terminal device by executing a negotiation process, and when fourth negotiation information of the fourth member interface is different from the second negotiation information, execute the negotiation process and fail.
According to the link processing method and device provided by the invention, the first terminal device conducts the first member interface and the second member interface which are physically connected through executing the negotiation process with the second terminal device, and determines whether the state of the second member interface of the second terminal device is abnormal or not by receiving the first extended keep-alive message repeatedly sent by the second terminal device after the negotiation process is finished, so that whether the member interface of the opposite terminal is abnormal or not can be sensed in real time after the two terminal devices establish the link connection, and the member interface of the local terminal is closed when the link connection is abnormal, thereby avoiding the phenomenon of single pass of link flow; the method provided by the invention solves the problem that the link reliability is poor due to the phenomenon of single flow caused by the fact that one end of the link can not sense the abnormal state of the opposite end in the link detection method in the prior art.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.
Fig. 1 is a schematic diagram illustrating a principle of a keep-alive packet detection link in an HDLC protocol in the prior art;
FIG. 2 is a diagram illustrating a format of a keep-alive message in a standard protocol;
fig. 3 is a flowchart of a link processing method according to an embodiment of the present invention;
fig. 4 is a schematic view of an application scenario of the link processing method according to the embodiment shown in fig. 3;
fig. 5 is a schematic diagram illustrating a negotiation flow in the link processing method according to the embodiment shown in fig. 3;
fig. 6 is a flowchart of another link processing method according to an embodiment of the present invention;
fig. 7 is a flowchart of another link processing method according to an embodiment of the present invention;
fig. 8 is a schematic format diagram of a first extended keep-alive packet of the link processing method according to the embodiment shown in fig. 7;
fig. 9 is a schematic view of an application scenario of the link processing method according to the embodiment of the present invention;
fig. 10 is a schematic view of another application scenario of the link processing method according to the embodiment of the present invention;
fig. 11 is a schematic structural diagram of a link processing apparatus according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of another link processing apparatus according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of another link processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
The technical solution of the present invention is described in detail below by specific embodiments, where the first terminal device and the second terminal device in the following embodiments of the present invention may be, for example, routers, and a member interface of any terminal device may be a Packet Over SONET/SDH (POS) interface carried by a Synchronous Optical Network (SONET)/Synchronous Digital Hierarchy (SDH). The following specific embodiments of the present invention may be combined, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 3 is a flowchart of a link processing method according to an embodiment of the present invention. The link processing method provided by this embodiment is suitable for the case of performing link detection through the HDLC protocol, and the method may be executed by a link processing apparatus, where the link processing apparatus may be implemented by combining hardware and software, and the link processing apparatus may be integrated in a processor of the first terminal device for being invoked by the processor. As shown in fig. 3, the method of this embodiment may include:
s110, the first terminal device conducts a first member interface of the first terminal device and a second member interface physically connected to the first member interface in the second terminal device by executing a negotiation process, and both the first terminal device and the second terminal device completing the negotiation process have first negotiation information of the first member interface and second negotiation information of the second member interface.
As shown in fig. 4, which is an application scenario diagram of the link processing method provided in the embodiment shown in fig. 3, a router a in fig. 4 is a first terminal device, a router B is a second terminal device, a1 is a first member interface, and B1 is a second member interface, where a1 and B1 are both the POS interfaces, and a1 and B1 are physically connected. In this embodiment, the first terminal device conducts the first member interface and the second member interface by executing the negotiation process, and at this time, a link between the first member interface and the second member interface is conducted, so that data transmission may be performed.
Fig. 5 is a schematic diagram of a negotiation flow in the link processing method according to the embodiment shown in fig. 3; that is, S110 in this embodiment specifically includes:
s1101, the first terminal device sends first negotiation information to the second terminal device, and instructs the second terminal device to store the first negotiation information.
S1102, the first terminal device receives and stores the second negotiation information sent by the second terminal device.
In this embodiment, the first negotiation information may be Local negotiation information (LCI) of the first member interface, and if the LCI is not configured for the first member interface, the first negotiation information may also be a host name (hostname) or an interface name (interface name) of the first member interface; similarly, the second negotiation information may also be the LCI of the second member interface, or the host name or interface name of the first member interface.
S1103, the first terminal device sends a first negotiation packet to the second terminal device, where the first negotiation packet includes first negotiation information and second negotiation information in the first terminal device, and the first negotiation packet is used to instruct the second terminal device to turn on the second member interface when it is determined that the received first negotiation information and second negotiation information are the same as the first negotiation information and second negotiation information in the second terminal device.
S1104, the first terminal device receives a second negotiation packet sent by the second terminal device, where the second negotiation packet includes second negotiation information and first negotiation information in the second terminal device.
S1105, the first terminal device turns on the first member interface when it is determined that the received first negotiation information and the second negotiation information are the same as the first negotiation information and the second negotiation information in the first terminal device.
In this embodiment, taking the first terminal device as an example for description, after receiving the second negotiation packet, but when the second negotiation information fails to be stored, the first terminal device may restart to execute the negotiation process. In addition, in the above steps, the execution sequence of S1101 and S1102, and S1103 and S1104 to S1105 is not limited, that is, the negotiation information or the negotiation packet is sent by which terminal device first, as long as it is possible to realize that each terminal device has the first negotiation information and the second negotiation information, and the member interface of the local terminal can be turned on after receiving the negotiation packet sent by the other terminal, the negotiation process can be completed.
It should be noted that, the on member interface or the off member interface in each embodiment of the present invention refers to protocol on (Up) or protocol off (Down), and performs protocol on or protocol off based on physical connection.
S120, the first terminal device receives a first extended keep-alive message which is repeatedly sent by the second terminal device according to a preset time interval, the first extended keep-alive message comprises first negotiation information and second negotiation information in the second terminal device, and the content of the second negotiation information changes when the second member interface is abnormal.
S130, the first terminal device closes the first member interface when determining that the received first negotiation information and the second negotiation information are different from the first negotiation information and the second negotiation information in the first terminal device.
In this embodiment, after the link protocol between the first member interface and the second member interface is turned on, interaction of the extended keep-alive messages needs to be performed to detect whether the member interfaces of the two-end devices have an abnormal state in real time. In a specific implementation, if the second member interface is in an abnormal state, for example, the sending is normal and the receiving is abnormal as described in the background art, the first terminal device cannot sense the abnormal state of the second member interface in the second terminal device through a link detection mode in the prior art, and the link has a single traffic, that is, data sent from the first terminal device to the second terminal device cannot be received; in contrast, in this embodiment, when the second member interface is abnormal, the content of the second negotiation information may be changed, that is, at this time, the second negotiation information in the first extended keep-alive message sent by the second terminal is different from the content of the second negotiation information stored in the first terminal device, and at this time, the first terminal device may close the first member interface, that is, disconnect the link. After the link is disconnected, the first terminal device may perform the negotiation procedure shown in fig. 5 with the second terminal device again.
Similarly, the first terminal device may also make the second terminal device know the state of the first member interface by sending a second extended keep-alive message to the second terminal device, and the specific manner is: the first terminal device repeatedly sends a second extended keep-alive message to the second terminal device according to a preset time interval, where the second extended keep-alive message includes first negotiation information and second negotiation information in the first terminal device, the content of the first negotiation information changes when the first member interface is abnormal, and the second extended keep-alive message is used to instruct the second terminal device to close the second member interface, that is, disconnect the link, after the link is disconnected, the first terminal device may also execute the negotiation process shown in fig. 5 with the second terminal device again.
In the link processing method provided by this embodiment, the first terminal device conducts the first member interface and the second member interface which are physically connected through executing the negotiation process with the second terminal device, and determines whether the state of the second member interface of the second terminal device is abnormal or not by receiving the first extended keep-alive message repeatedly sent by the second terminal device after the negotiation process is completed, so that it is realized that after the link connection is completed, the two terminal devices can sense whether the member interface of the opposite terminal is abnormal or not in real time, and the member interface of the local terminal is closed when the link connection is abnormal, thereby avoiding the phenomenon of single pass of link traffic; the method provided by the embodiment solves the problem that in the link detection method in the prior art, one end of the link may not sense the abnormal state of the opposite end, so that the flow single pass phenomenon occurs, and the reliability of the link is poor.
Further, fig. 6 is a flowchart of another link processing method according to an embodiment of the present invention, where the first terminal device in this embodiment is further provided with a first timer, and on the basis of the embodiment shown in fig. 3, after S110, the method further includes: s111, the first terminal equipment starts a first timer; s120 may further include: s140, the first terminal device sets the first timer to start timing from zero when determining that the received first negotiation information and the second negotiation information are the same as the first negotiation information and the second negotiation information in the first terminal device. It should be noted that in the present embodiment, S130 and S140 are selectively executed.
The first timer in this embodiment is used for starting timing from zero when the first terminal device receives the first extended keep-alive message and determines that the state of the second member interface is normal, that is, as long as the first timer executes the above steps circularly, a timing value of the first timer will be within a certain range; correspondingly, when the state of the second member interface is abnormal, the state can also be represented by the timing value of the first timer, and the specific implementation manner may be as follows: s150, when detecting that the timing value of the first timer is greater than a first threshold value, the first terminal equipment closes the first member interface; s160, the first terminal device sends a third extended keep-alive message to the second terminal device, wherein the third extended keep-alive message does not carry the first negotiation information or carries the first negotiation information after content change, and the third extended keep-alive message is used for indicating the second terminal device to close the second member interface; s170, the first terminal device performs the negotiation process with the second terminal device again. In this embodiment, the first threshold may be, for example, 3 timing periods of a timer, where the timing period may be set by a designer according to sensitivity requirements on a link, and if the timing period is not set, the timing period may default to be the same as the timing period of a protection packet in the HDLC protocol, and is usually 10 seconds(s).
When the first terminal device in this embodiment does not receive the first extended keep-alive message sent by the second terminal device for a long time, it is considered that an abnormal problem occurs in the link, and when the first terminal device sends the third extended keep-alive message to the second terminal device, the first negotiation information may not be carried or the content of the first negotiation information may be changed. In this embodiment, after the link negotiation between the first member interface and the second member interface is successful and the first member interface is in the closed state for some reason, the first timer set in the terminal device may notify the second terminal device of the state, and the second member interface may be closed, so that the states of the two ends of the physically connected member interfaces are ensured to be consistent, and further, the single-pass phenomenon of the link is avoided; and when the member interfaces at both ends of the link are in the closed state, the initial negotiation process can be re-entered.
It should be noted that S150 to S170 in this embodiment may be executed after S111, and the first terminal device may check that the timing value of the first timer is overtime after repeatedly receiving the first extended keep-alive packet for multiple times, or may execute S150 to S170 after completing the negotiation process and starting the first timer and not receiving the first extended keep-alive packet. The embodiment shown in fig. 6 is illustrated as S150 to S170 performed after S140. And S130, S140 and S150 to S170 in the embodiment shown in fig. 6 are selectively performed, and S170 may be performed after S130.
Further, on the basis of the foregoing embodiments, the state of the link may also be notified to the terminal device by extending the content of the keep-alive message, as shown in fig. 7, which is a flowchart of another link processing method provided in the embodiment of the present invention, where fig. 7 is shown by taking the embodiment shown in fig. 3 as an example, in S120 of this embodiment, the first extended keep-alive message received by the first terminal device further includes a third timer, and the third timer starts to count time from when the first extended keep-alive message is sent out, and in a possible implementation manner, the method provided in this embodiment further includes, after S120: s140, when the timing value of the third timer is less than or equal to the second threshold, and it is determined that the received first negotiation information and the second negotiation information are the same as the first negotiation information and the second negotiation information in the first terminal device, the first terminal device maintains the current state of the first member interface, and if the first terminal device has the first timer and the first timer is started, the first timer may also be set to start timing from zero; in another possible implementation manner, after S120, the method provided in this embodiment further includes: s150, when the timing value of the third timer is greater than a second threshold value, the first terminal equipment closes the first member interface; s160, the first terminal device sends a fourth extended keep-alive message to the second terminal device, the fourth extended keep-alive message does not carry the first negotiation information or carries the first negotiation information after content change, and the fourth extended keep-alive message is used for indicating the second terminal device to close the second member interface; s170, the first terminal device performs the negotiation process with the second terminal device again.
As shown in fig. 8, a format schematic diagram of a first extended keep-alive message of the link processing method provided in the embodiment shown in fig. 7 is shown, where the first extended keep-alive message in this embodiment includes local end negotiation information (i.e., second negotiation information), opposite end negotiation information (i.e., first negotiation information), and a timer, where each item of content is composed of a Type (Type), a Length (Length), and a Value (Value) (abbreviated as: TLV), for example, the local end negotiation information is preset in the second terminal device, the opposite end negotiation information is filled when the second terminal device executes a negotiation process, and if the filling is not successful, the opposite end negotiation information is 0, and the timer starts to time when the second terminal device sends the first extended keep-alive message; meanwhile, the first extended keep-alive message further includes a standard format of the keep-alive message in a standard protocol, that is, the content shown in fig. 2.
It should be noted that the implementation and technical effects of S150 to S170 in this embodiment are the same as those of S150 to S170 in the embodiment shown in fig. 6, and therefore, no further description is provided herein; in addition, S130, S140, and S150 to S170 in this embodiment are selectively performed, specifically, different selections are made by the first terminal device according to the content in the first extended keep-alive message, and S170 may also be performed after S130.
Similarly, the second terminal device in this embodiment may be provided with a second timer, where the second timer starts timing after the second member interface is turned on, and the second extended keep-alive message sent by the first terminal device is further used to instruct the second terminal device to set the second timer to start timing from zero when it is determined that the received first negotiation information and the second negotiation information are the same as the first negotiation information and the second negotiation information in the second terminal device. In addition, the second terminal device in this embodiment may also determine whether the link is in an abnormal state according to a timing value of the second timer, and the second extended keep-alive message may also be provided with a timer.
In the specific implementation of the present invention, in order to improve the communication capability of the link, a plurality of POS interfaces may be bundled into one interface, which is called a member Group (POS-Group) interface (hereinafter, referred to as a PG interface for short), and the sum of the PG interfaces is the sum of the bandwidths of the member interfaces, and in this way, the bandwidth of the interface may be increased; for example, the first terminal device further has a third member interface, the fourth member interface in the second terminal device is physically connected to the third member interface, and the third negotiation information of the third member interface is the same as the first negotiation information, then on the basis that the links of the first member interface and the second member interface have been established in the above embodiment, if the fourth negotiation information of the fourth member interface is the same as the second negotiation information, the first terminal device may execute the negotiation process again to conduct the third member interface and the fourth member interface; and if the fourth negotiation information is different from the second negotiation information, the establishment of the link between the third member interface and the fourth member interface cannot be realized.
It should be noted that, in this embodiment, the first member interface and the third member interface are a bundled PG interface, and the second member interface and the fourth member interface are a bundled PG interface, and load sharing can be implemented through the PG interface, and the PG interface disperses traffic on different links and finally reaches a unified destination, so that traffic congestion caused by traffic all traveling along the same path can be avoided. In addition, the PG interface can also improve the reliability of the link, and in the PG interface, if a certain member interface is abnormal in state, the flow can be transmitted by depending on other member interfaces.
The application of the PG interface is specifically described below by some specific examples. For example, as shown in fig. 9, an application scenario diagram of the link processing method provided by the embodiment of the present invention is shown, for example, in fig. 9, a router a is a first terminal device, a router B is a second terminal device, a bundling port PG1 of an HDLC of the router a includes three member interfaces a1, a2, and A3, a bundling port PG2 of an HDLC of the router B includes three member interfaces B1, B2, and B3, and physical connection relations are a1 to B1, a2 to B2, and A3 to B3, where LCI information of the member interfaces a1, a2, and A3 are the same, LCI information of the B1 and B2 are the same, and LCI information of the B3 is not equal to LCI information of the B1. On the one hand, assuming that the link between a1 and B1 is successfully negotiated first, the LCI information sent by B2 to a2 is equal to the LCI information of activated member interface B1, the link negotiation between a2 and B2 is successful, the LCI information sent by B3 to A3 is not equal to the LCI information of activated member interface B1, and the link negotiation between A3 and B3 is failed. On the other hand, in the application scenario, the LCI information of the B2 member interface is modified to be LCI information not equal to B1, and thereafter, the LCI information of the B2 end in the first extended keep-alive message sent by the B2 received by the a2 is different from the LCI information of the B2 stored in the router a, the router a protocol closes the member interface a2, and clears the stored LCI information of the B2; similarly, if the LCI information sent from a2 and received by B2 is different from the LCI information of a2 and stored in router B, the router B protocol closes the member interface B2, clears the stored LCI information of a2, and then enters the initial negotiation process to re-perform the link negotiation.
For another example, as shown in fig. 10, for another application scenario of the link processing method provided by the embodiment of the present invention, for example, the router a in fig. 10 is a first terminal device, the router B and the router C are both second terminal devices, the binding port PG1 of the HDLC of the router a includes four member interfaces a1, a2, A3, and A4, the binding port PG2 of the HDLC of the router B includes two member interfaces B1 and B2, the binding port PG3 of the HDLC of the router C includes two member interfaces C1 and C2, the physical connection relationships are that a1 connects to B1, a2 connects to B2, A3 connects to C1, A4 connects to C2, and LCI information of a1, a2, A3, and A4 are the same, LCI information of B1 and B2 is the same, LCI information of C1 and C2 is the same, but the router information is different from the router C information of the router B. If three devices perform link negotiation through the negotiation process provided by the present invention at the same time, the router a receives LCI information sent by the router B and the router C, and a contention mechanism is adopted, the sub-link of which device completes the negotiation process in fig. 5 first, and the member interface of which device completes negotiation first, for example, the router C completes the negotiation process with the router a first, the link of the router B cannot successfully negotiate.
It should be noted that, the link processing method provided in each embodiment of the present invention may set an extension protocol switch for a member interface or a PG interface of a terminal device, execute the link processing method described in each embodiment when the extension protocol switch is turned on, and perform link establishment and detection by using a method in the prior art when the extension protocol switch is turned off. In addition, the second terminal device in each embodiment of the present invention executes the negotiation process, and the manner of performing link detection after the link negotiation is successful is the same as the manner of executing the first terminal device, which is not described herein again.
Fig. 11 is a schematic structural diagram of a link processing apparatus according to an embodiment of the present invention. The link processing apparatus provided in this embodiment is suitable for use in the case of performing link detection through the HDLC protocol, and the link processing apparatus is implemented by combining hardware and software, and the apparatus may be integrated in a processor of the first terminal device for being invoked by the processor. As shown in fig. 11, the link processing apparatus of this embodiment specifically includes: a negotiation module 11, a receiving module 12, a processing module 13 and a sending module 14.
The negotiation module 11 is configured to conduct a first member interface of the first terminal device and a second member interface, which is physically connected to the first member interface, of the second terminal device by executing a negotiation process, and both the first terminal device and the second terminal device that complete the negotiation process have first negotiation information of the first member interface and second negotiation information of the second member interface.
In this embodiment, after the negotiation process is executed, a link between the first member interface and the second member interface is protocol-conducted, and data transmission may be performed, and a specific process of the negotiation process in this embodiment is specifically described in the following embodiments.
It should be noted that, turning on or turning off the member interface in each embodiment of the present invention refers to protocol turning on or protocol turning off, and the protocol turning on or protocol turning off is performed on the basis of physical connection.
A receiving module 12, configured to receive a first extended keep-alive message repeatedly sent by a second terminal device according to a preset time interval, where the first extended keep-alive message includes first negotiation information and second negotiation information in the second terminal device, and a content of the second negotiation information changes when a second member interface is abnormal.
A processing module 13, configured to close the first member interface when it is determined that the first negotiation information and the second negotiation information received by the receiving module 12 are different from the first negotiation information and the second negotiation information in the first terminal device.
In this embodiment, when the second member interface is abnormal, the content of the second negotiation information may be changed, that is, at this time, the content of the second negotiation information in the first extended keep-alive message sent by the second terminal is different from the content of the second negotiation information stored in the first terminal device, and at this time, the first terminal device may close the first member interface, that is, disconnect the link. After the link is disconnected, the negotiation module 11 may perform the negotiation procedure shown in fig. 5 with the second terminal device again.
Similarly, the first terminal device may also make the second terminal device know the state of the first member interface by sending a second extended keep-alive message to the second terminal device, and the specific manner is: the link processing apparatus provided in this embodiment further includes: a sending module 14, configured to repeatedly send a second extended keep-alive message to the second terminal device according to a preset time interval, where the second extended keep-alive message includes first negotiation information and second negotiation information in the first terminal device, a content of the first negotiation information changes when the first member interface is abnormal, and the second extended keep-alive message is used to instruct the second terminal device to close the second member interface when it is determined that the received first negotiation information and second negotiation information are different from the first negotiation information and second negotiation information in the second terminal device.
The link processing apparatus provided in the embodiment of the present invention is configured to execute the link processing method provided in the embodiment shown in fig. 3 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
Fig. 12 is a schematic structural diagram of another link processing apparatus according to an embodiment of the present invention, which illustrates an execution process of a negotiation flow in each embodiment of the present invention through the embodiment shown in fig. 12, where the negotiation module 11 includes: a sending unit 15, configured to send the first negotiation information to the second terminal device, and instruct the second terminal device to store the first negotiation information.
And a receiving unit 16, configured to receive and store the second negotiation information sent by the second terminal device.
The sending unit 15 is further configured to send a first negotiation message to the second terminal device, where the first negotiation message includes first negotiation information and second negotiation information in the first terminal device, and the first negotiation message is used to instruct the second terminal device to turn on the second member interface when it is determined that the received first negotiation information and second negotiation information are the same as the first negotiation information and second negotiation information in the second terminal device.
The receiving unit 16 is further configured to receive a second negotiation packet sent by the second terminal device, where the second negotiation packet includes second negotiation information and first negotiation information in the second terminal device.
The processing unit 17 is configured to determine that the first negotiation information and the second negotiation information received by the receiving unit 16 are the same as the first negotiation information and the second negotiation information in the first terminal device, and turn on the first member interface.
In this embodiment, after receiving the second negotiation packet, the first terminal device may restart to execute the negotiation procedure when the second negotiation information is failed to be stored. In the process of the negotiation process, it is not limited which terminal device sends the negotiation information or the negotiation message first, and the negotiation process can be completed as long as it can be realized that each terminal device has the first negotiation information and the second negotiation information, and the member interface of the local terminal can be conducted after the negotiation message sent by the opposite side is received.
It should be noted that the modules and units in the embodiments of the present invention are all virtual modules and units that implement specific functions, and the sending unit 15 in this embodiment may be implemented by the same physical device as the sending module 14, the receiving unit 16 and the receiving module 12 in fig. 11, and the processing unit 17 and the processing module 13 may be implemented by different physical devices; for example, the transmitting unit 15 and the transmitting module 14 may be the same transmitter, the receiving unit 16 and the receiving module 12 may be the same receiver, and the processing unit 17 and the processing module 13 may be the same processor.
Further, fig. 13 is a schematic structural diagram of another link processing apparatus according to an embodiment of the present invention, where a first terminal device in this embodiment is further provided with a first timer, and on the basis of the embodiment shown in fig. 11, the link processing apparatus in this embodiment further includes: the starting module 18 is configured to start the first timer after the negotiation module 11 conducts the first member interface of the first terminal device and the second member interface, which is physically connected to the first member interface, of the second terminal device by executing the negotiation process; the processing module 13 is further configured to set the first timer to start timing from zero when it is determined that the first negotiation information and the second negotiation information received by the receiving module 12 are the same as the first negotiation information and the second negotiation information in the first terminal device. It should be noted that, in this embodiment, the processing module 13 turns off the first member interface and the processing module 13 sets the first timer to be selectively executed from zero.
The first timer in this embodiment is used for starting timing from zero when the first terminal device receives the first extended keep-alive message and determines that the state of the second member interface is normal, that is, as long as the first timer executes the above steps circularly, a timing value of the first timer will be within a certain range; correspondingly, when the state of the second member interface is abnormal, the state can also be represented by the timing value of the first timer, and the specific implementation manner may be as follows: the processing module 13 is further configured to close the first member interface when detecting that the timing value of the first timer is greater than a first threshold value; a sending module 14, configured to send a third extended keep-alive message to the second terminal device, where the third extended keep-alive message does not carry the first negotiation information or carries the first negotiation information after content change, and the third extended keep-alive message is used to instruct the second terminal device to close the second member interface; and the negotiation module 11 is further configured to perform a negotiation procedure with the second terminal device again. It should be noted that the above processing procedure is specifically executed after the first timer is started.
The link processing apparatus provided in the embodiment of the present invention is configured to execute the link processing method provided in the embodiment shown in fig. 6 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
Further, on the basis of the foregoing embodiments, the state of the link may also be notified to the terminal device by extending the content of the keep-alive message, specifically, the first extended keep-alive message received by the receiving module 12 further includes a third timer, and the third timer starts timing when the third extended keep-alive message is sent out; in a first possible implementation manner, the processing module 13 is further configured to, when the timing value of the third timer is less than or equal to a second threshold, and it is determined that the first negotiation information and the second negotiation information received by the receiving module 12 are the same as the first negotiation information and the second negotiation information in the first terminal device, maintain the current state of the first member interface, and in a case that the first terminal device has the first timer, the first timer may also be set to start timing from zero; in a second possible implementation manner, the processing module 13 is further configured to close the first member interface when the timing value of the third timer is greater than a second threshold; at this time, the sending module 14 is further configured to send a fourth extended keep-alive message to the second terminal device, where the fourth extended keep-alive message does not carry the first negotiation information or carries the first negotiation information after content change, and the fourth extended keep-alive message is used to instruct the second terminal device to close the second member interface; and the negotiation module 11 is further configured to perform a negotiation procedure with the second terminal device again. It should be noted that, the format of the first extended keep-alive packet in this embodiment may also refer to the format shown in fig. 8, and the content and the function of the first extended keep-alive packet are the same as those in the foregoing embodiment, and therefore, the description is not repeated here.
The link processing apparatus provided in the embodiment of the present invention is configured to execute the link processing method provided in the embodiment shown in fig. 7 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
Similarly, the second terminal device in this embodiment may be provided with a second timer, where the second timer starts timing after the second member interface is turned on, and the second extended keep-alive message sent by the first terminal device is further used to instruct the second terminal device to set the second timer to start timing from zero when it is determined that the received first negotiation information and the second negotiation information are the same as the first negotiation information and the second negotiation information in the second terminal device. In addition, the second terminal device in this embodiment may also determine whether the link is in an abnormal state according to a timing value of the second timer, and the second extended keep-alive message may also be provided with a timer.
In the specific implementation of the invention, in order to improve the communication capacity of the link, a plurality of POS interfaces can be bound into one PG interface; for example, the first terminal device further has a third member interface, the fourth member interface in the second terminal device is physically connected to the third member interface, and the third negotiation information of the third member interface is the same as the first negotiation information, so that on the one hand, the processing module 13 is further configured to execute a negotiation process to conduct the third member interface and the fourth member interface when the fourth negotiation information of the fourth member interface is the same as the second negotiation information on the one hand, on the basis that the links of the first member interface and the second member interface have been established in the above embodiment; on the other hand, the processing module 13 is further configured to fail to execute the negotiation process when the fourth negotiation information of the fourth member interface is different from the second negotiation information. The specific application of the PG interface in this embodiment may refer to the application scenarios and execution manners shown in fig. 9 and fig. 10, and therefore, details are not described herein again.
Although the embodiments of the present invention have been described above, the above description is only for the convenience of understanding the present invention, and is not intended to limit the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (16)

1. A link processing method, comprising:
a first terminal device conducts a first member interface of the first terminal device and a second member interface which is physically connected with the first member interface in a second terminal device by executing a negotiation process, and the first terminal device and the second terminal device which finish the negotiation process both have first negotiation information of the first member interface and second negotiation information of the second member interface;
the first terminal device receives a first extended keep-alive message which is repeatedly sent by the second terminal device according to a preset time interval, wherein the first extended keep-alive message comprises first negotiation information and second negotiation information in the second terminal device, and the content of the second negotiation information changes when the second member interface is abnormal;
and the first terminal equipment closes the first member interface when determining that the received first negotiation information and second negotiation information are different from the first negotiation information and the second negotiation information in the first terminal equipment.
2. The link processing method according to claim 1, wherein a first timer is provided in the first terminal device, and after the first terminal device conducts a first member interface of the first terminal device and a second member interface physically connected to the first member interface in a second terminal device by executing a negotiation procedure, the method further comprises:
the first terminal equipment starts the first timer;
after the first terminal device receives the first extended keep-alive message sent by the second terminal device, the method further includes:
and the first terminal equipment sets the first timer to start timing from zero when determining that the received first negotiation information and second negotiation information are the same as the first negotiation information and the second negotiation information in the first terminal equipment.
3. The link processing method according to claim 1, wherein the first terminal device repeatedly sends a second extended keep-alive message to the second terminal device according to a preset time interval, the second extended keep-alive message includes first negotiation information and second negotiation information in the first terminal device, a content of the first negotiation information changes when the first member interface is abnormal, and the second extended keep-alive message is used to instruct the second terminal device to close the second member interface when it is determined that the received first negotiation information and second negotiation information are different from the first negotiation information and second negotiation information in the second terminal device.
4. The link processing method according to claim 3, wherein a second timer is set in the second terminal device, the second timer starts timing after the second member interface is turned on, and the second extended keep-alive message is further used to instruct the second terminal device to set the second timer to start timing from zero when it is determined that the received first negotiation information and second negotiation information are the same as the first negotiation information and second negotiation information in the second terminal device.
5. The link processing method of claim 2, further comprising:
the first terminal equipment closes the first member interface when detecting that the timing value of the first timer is larger than a first threshold value;
the first terminal device sends a third extended keep-alive message to the second terminal device, the third extended keep-alive message does not carry the first negotiation information or carries the first negotiation information after content change, and the third extended keep-alive message is used for indicating the second terminal device to close the second member interface;
and the first terminal equipment and the second terminal equipment execute the negotiation process again.
6. The link processing method according to any one of claims 1 to 5, wherein the first extended keep-alive message received by the first terminal device further includes a third timer, the third timer starts timing when the first extended keep-alive message is sent out, and after the first terminal device receives the first extended keep-alive message that is repeatedly sent by the second terminal device according to a preset time interval, the method further includes:
when the timing value of the third timer is less than or equal to the second threshold value and the received first negotiation information and second negotiation information are determined to be the same as the first negotiation information and the second negotiation information in the first terminal device, the first terminal device maintains the current state of the first member interface; or,
the first terminal equipment closes the first member interface when the timing value of the third timer is larger than a second threshold value;
the first terminal device sends a fourth extended keep-alive message to the second terminal device, the fourth extended keep-alive message does not carry the first negotiation information or carries the first negotiation information after content change, and the fourth extended keep-alive message is used for indicating the second terminal device to close the second member interface;
and the first terminal equipment and the second terminal equipment execute the negotiation process again.
7. The link processing method according to any one of claims 1 to 5, wherein the first terminal device conducts a first member interface of the first terminal device and a second member interface physically connected to the first member interface in a second terminal device by performing a negotiation process, and the method includes:
the first terminal equipment sends the first negotiation information to the second terminal equipment and indicates the second terminal equipment to store the first negotiation information;
the first terminal equipment receives and stores the second negotiation information sent by the second terminal equipment;
the first terminal device sends a first negotiation message to the second terminal device, the first negotiation message includes first negotiation information and second negotiation information in the first terminal device, the first negotiation message is used for indicating the second terminal device to conduct the second member interface when the fact that the received first negotiation information and second negotiation information are the same as the first negotiation information and the second negotiation information in the second terminal device is determined;
the first terminal equipment receives a second negotiation message sent by the second terminal equipment, wherein the second negotiation message comprises second negotiation information and first negotiation information in the second terminal equipment;
and the first terminal equipment conducts the first member interface when determining that the received first negotiation information and second negotiation information are the same as the first negotiation information and the second negotiation information in the first terminal equipment.
8. The link processing method according to claim 7, wherein a third member interface in the first terminal device is physically connected to a fourth member interface in the second terminal device, and third negotiation information of the third member interface is the same as the first negotiation information;
after the first terminal device conducts the first member interface of the first terminal device and the second member interface, which is physically connected with the first member interface, of the second terminal device by executing a negotiation process, the method further includes:
the first terminal device executes the negotiation process to conduct the third member interface and the fourth member interface when fourth negotiation information of the fourth member interface is the same as the second negotiation information; or,
and the first terminal equipment fails to execute the negotiation process when the fourth negotiation information of the fourth member interface is different from the second negotiation information.
9. A link processing apparatus provided in a first terminal device, the link processing apparatus comprising:
the negotiation module is used for conducting a first member interface of the first terminal device and a second member interface which is physically connected with the first member interface in the second terminal device by executing a negotiation process, and the first terminal device and the second terminal device which finish the negotiation process both have first negotiation information of the first member interface and second negotiation information of the second member interface;
a receiving module, configured to receive a first extended keep-alive message that is repeatedly sent by the second terminal device according to a preset time interval, where the first extended keep-alive message includes first negotiation information and second negotiation information in the second terminal device, and a content of the second negotiation information changes when the second member interface is abnormal;
and the processing module is used for closing the first member interface when the first negotiation information and the second negotiation information received by the receiving module are determined to be different from the first negotiation information and the second negotiation information in the first terminal equipment.
10. The link processing apparatus according to claim 9, wherein a first timer is provided in the first terminal device, and the link processing apparatus further comprises: a starting module 18, configured to start the first timer after the negotiation module conducts a first member interface of the first terminal device and a second member interface, which is physically connected to the first member interface, of the second terminal device by executing a negotiation process;
the processing module is further configured to set the first timer to start timing from zero when it is determined that the first negotiation information and the second negotiation information received by the receiving module are the same as the first negotiation information and the second negotiation information in the first terminal device.
11. The link processing apparatus according to claim 9, further comprising: a sending module, configured to repeatedly send a second extended keep-alive packet to the second terminal device according to a preset time interval, where the second extended keep-alive packet includes first negotiation information and second negotiation information in the first terminal device, a content of the first negotiation information changes when the first member interface is abnormal, and the second extended keep-alive packet is used to instruct the second terminal device to close the second member interface when it is determined that the received first negotiation information and second negotiation information are different from the first negotiation information and second negotiation information in the second terminal device.
12. The link processing apparatus according to claim 11, wherein a second timer is set in the second terminal device, the second timer starts timing after the second member interface is turned on, and the second extended keep-alive message is further used to instruct the second terminal device to set the second timer to start timing from zero when it is determined that the received first negotiation information and second negotiation information are the same as the first negotiation information and second negotiation information in the second terminal device.
13. The link processing apparatus according to claim 10, wherein the processing module is further configured to turn off the first member interface when detecting that the timing value of the first timer is greater than a first threshold value;
the link processing apparatus further includes: a sending module, configured to send a third extended keep-alive message to the second terminal device, where the third extended keep-alive message does not carry the first negotiation information or carries the first negotiation information after content change, and the third extended keep-alive message is used to instruct the second terminal device to close the second member interface;
the negotiation module is further configured to execute the negotiation process with the second terminal device again.
14. The link processing apparatus according to any one of claims 9 to 13, wherein the first extended keep-alive message received by the receiving module further includes a third timer, and the third timer starts timing when the first extended keep-alive message is sent out, and the processing module is further configured to maintain a current state of the first member interface when a timing value of the third timer is less than or equal to the second threshold and it is determined that the first negotiation information and the second negotiation information received by the receiving module are the same as the first negotiation information and the second negotiation information in the first terminal device; or,
the processing module is further configured to close the first member interface when the timing value of the third timer is greater than a second threshold;
the sending module is further configured to send a fourth extended keep-alive message to the second terminal device, where the fourth extended keep-alive message does not carry the first negotiation information or carries the first negotiation information after content change, and the fourth extended keep-alive message is used to instruct the second terminal device to close the second member interface;
the negotiation module is further configured to execute the negotiation process with the second terminal device again.
15. The link processing apparatus according to any one of claims 9 to 13, wherein the negotiation module comprises:
a sending unit, configured to send the first negotiation information to the second terminal device, and instruct the second terminal device to store the first negotiation information;
a receiving unit, configured to receive and store the second negotiation information sent by the second terminal device;
the sending unit is further configured to send a first negotiation packet to the second terminal device, where the first negotiation packet includes first negotiation information and second negotiation information in the first terminal device, and the first negotiation packet is used to instruct the second terminal device to turn on the second member interface when it is determined that the received first negotiation information and second negotiation information are the same as the first negotiation information and second negotiation information in the second terminal device;
the receiving unit is further configured to receive a second negotiation packet sent by the second terminal device, where the second negotiation packet includes second negotiation information and first negotiation information in the second terminal device;
and the processing unit is used for conducting the first member interface when the first negotiation information and the second negotiation information received by the receiving unit are determined to be the same as the first negotiation information and the second negotiation information in the first terminal equipment.
16. The link processing apparatus according to claim 15, wherein a third member interface in the first terminal device is physically connected to a fourth member interface in the second terminal device, and third negotiation information of the third member interface is the same as the first negotiation information;
the processing module is further configured to execute a negotiation process to conduct a third member interface and a fourth member interface after the negotiation module conducts a first member interface of the first terminal device and a second member interface, which is physically connected to the first member interface, of the second terminal device by executing the negotiation process, and when fourth negotiation information of the fourth member interface is the same as the second negotiation information; or,
the processing module is further configured to, after the negotiation module conducts a first member interface of the first terminal device and a second member interface, which is physically connected to the first member interface, of the second terminal device by executing a negotiation process, and when fourth negotiation information of the fourth member interface is different from the second negotiation information, execute the negotiation process and fail.
CN201610005907.6A 2016-01-05 2016-01-05 A link processing method and device Active CN106941426B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610005907.6A CN106941426B (en) 2016-01-05 2016-01-05 A link processing method and device
PCT/CN2016/089806 WO2017117957A1 (en) 2016-01-05 2016-07-12 Link processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610005907.6A CN106941426B (en) 2016-01-05 2016-01-05 A link processing method and device

Publications (2)

Publication Number Publication Date
CN106941426A true CN106941426A (en) 2017-07-11
CN106941426B CN106941426B (en) 2019-06-04

Family

ID=59273120

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610005907.6A Active CN106941426B (en) 2016-01-05 2016-01-05 A link processing method and device

Country Status (2)

Country Link
CN (1) CN106941426B (en)
WO (1) WO2017117957A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6128313A (en) * 1997-09-11 2000-10-03 Cisco Technology, Inc. Apparatus and method for filtering line noise and improper packet formatting
CN101047712A (en) * 2006-06-19 2007-10-03 华为技术有限公司 Device and method for detecting Ethernet interface configuration
CN101789954A (en) * 2009-01-24 2010-07-28 华为技术有限公司 Communication method, equipment and system in unicast environment
CN103440188A (en) * 2013-08-29 2013-12-11 福建星网锐捷网络有限公司 Method and device for detecting PCIE hardware faults
CN103957079A (en) * 2014-04-30 2014-07-30 杭州华三通信技术有限公司 Negotiation method and equipment in HDLC network

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102325086A (en) * 2006-08-02 2012-01-18 华为技术有限公司 Method for communicating media stream, communication detection methods and systems thereof
US8102630B2 (en) * 2008-07-22 2012-01-24 Sahul Hameed Abdul Kader Jailani Method for maintaining connectivity in failed switches of stack
CN102769573B (en) * 2012-08-01 2014-11-05 杭州华三通信技术有限公司 Method for sending BGP (border gateway protocol) keep-alive information by the aid of BFD (bidirectional forwarding detection) messages and routing devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6128313A (en) * 1997-09-11 2000-10-03 Cisco Technology, Inc. Apparatus and method for filtering line noise and improper packet formatting
CN101047712A (en) * 2006-06-19 2007-10-03 华为技术有限公司 Device and method for detecting Ethernet interface configuration
CN101789954A (en) * 2009-01-24 2010-07-28 华为技术有限公司 Communication method, equipment and system in unicast environment
CN103440188A (en) * 2013-08-29 2013-12-11 福建星网锐捷网络有限公司 Method and device for detecting PCIE hardware faults
CN103957079A (en) * 2014-04-30 2014-07-30 杭州华三通信技术有限公司 Negotiation method and equipment in HDLC network

Also Published As

Publication number Publication date
CN106941426B (en) 2019-06-04
WO2017117957A1 (en) 2017-07-13

Similar Documents

Publication Publication Date Title
ES2662111T3 (en) Method and system to synchronize with a neighbor in a group of aggregation of interconnecting links of distributed resilient networks (DRNI)
CN105657748B (en) Communication method and network equipment based on tunnel binding
US20090232152A1 (en) Method and apparatus for aggregating ports
US20110299409A1 (en) Reachability detection in trill networks
US20120155458A1 (en) Repeated Lost Packet Retransmission in a TCP/IP Network
WO2007016833A1 (en) An method for the triggering failure detection of bidirectional forwarding detection
KR20120091382A (en) Dual transmission for communication networks
CN109691031B (en) Service message transmission method and node equipment
JP7430224B2 (en) Packet processing methods and gateway devices
CN101697626A (en) Communication fault detection method and system based on two-way forwarding detection protocol
CN110875855A (en) Method and network device for detecting network link status
CN107465613B (en) Link aggregation interface communication state switching method and device
CN106559280A (en) Bidirectional forwarding detection (BFD) method and device
CN103873336A (en) Distributed resilient network interconnection-based service bearing method and device
CN100561977C (en) A fast rerouting method when multiple ports share the transmission link
US20150055482A1 (en) TCP Extended Fast Recovery and Segment Timing
CN107204888B (en) Method and device for switching timeout time and communication equipment
US9979510B2 (en) Application timeout aware TCP loss recovery
CN102239670A (en) A load sharing method and device
CN106941426B (en) A link processing method and device
US20160254974A1 (en) TCP Layer with Higher Level Testing Capabilities
US12531808B2 (en) Transport protocol selection based on connection state
CN109873763B (en) Communication method and device
US11882059B2 (en) Method for selecting port to be switched to operating state in dual-homing access and device
CN101795216B (en) Method and equipment for resetting watch dog in multi-hop bidirectional forwarding detection (BFD)

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