CN106506279B - Network deadlock state detection method and device - Google Patents

Network deadlock state detection method and device Download PDF

Info

Publication number
CN106506279B
CN106506279B CN201611040583.6A CN201611040583A CN106506279B CN 106506279 B CN106506279 B CN 106506279B CN 201611040583 A CN201611040583 A CN 201611040583A CN 106506279 B CN106506279 B CN 106506279B
Authority
CN
China
Prior art keywords
port
timer
blocking
state
current port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611040583.6A
Other languages
Chinese (zh)
Other versions
CN106506279A (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.)
Suzhou Centec Communications Co Ltd
Original Assignee
SHENGKE NETWORK (SUZHOU) CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENGKE NETWORK (SUZHOU) CO Ltd filed Critical SHENGKE NETWORK (SUZHOU) CO Ltd
Priority to CN201611040583.6A priority Critical patent/CN106506279B/en
Publication of CN106506279A publication Critical patent/CN106506279A/en
Application granted granted Critical
Publication of CN106506279B publication Critical patent/CN106506279B/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

Abstract

the invention provides a method and a device for detecting a network deadlock state. The method comprises the following steps: each port of the network equipment is provided with a timer, and whether the timer of the current port is triggered or not is judged according to a port blocking state table in the network equipment; if the timer of the current port is triggered, judging whether the blocking time of the current port counted by the timer of the current port is larger than a set threshold value or not; and when the blocking time of the current port is greater than a set threshold value, confirming that the network enters a deadlock state. The invention can accurately, sensitively and automatically detect the deadlock phenomenon of the network, thereby improving the safety and the reliability of the system.

Description

Network deadlock state detection method and device
Technical Field
the invention relates to the technical field of computer networks, in particular to a method and a device for detecting a network deadlock state.
Background
the flow control protocol in IEEE802.3 specifies that, when the packet buffer amount of the current port of the network switch reaches a certain set threshold, the current port sends a Pause blocking frame to the upstream port to notify the upstream port to suspend the transmission of the packet, and when the packet buffer amount of the current port is released to a certain set threshold, the current port sends a Pause forwarding frame to the upstream port to notify the upstream port to start the transmission of the packet.
However, when the network topology changes, a short message forwarding loop may occur, and for a message forwarding loop formed by a plurality of network switches, the participation of the flow control protocol may cause the message forwarding loop to enter a deadlock state and cannot forward a message, so that the entire network enters a deadlock state.
for example, as shown in fig. 1, a packet forwarding loop is formed for a network switch a including port 1 and port 3 and a network switch B including port 2 and port 4, and accordingly, the packet forwarding loop is port 1 → port 2 → port 4 → port 3 → port 1. In the message forwarding loop, when the message buffer amount of the port 2 reaches the threshold value for sending the Pause blocking frame, the port 2 sends the Pause blocking frame to the port 1 to inform the port A to stop sending the message, and the port 1 cannot send the message to cause that the message buffer amount of the port 3 cannot be released, when the message buffer amount of the port 3 reaches the threshold value for sending the Pause blocking frame, the port 3 sends the Pause blocking frame to the port 4 to inform the port 4 to stop sending the message, and the port 4 cannot send the message to cause that the message buffer amount of the port 2 cannot be released, thereby causing continuous blocking of the port 1. Therefore, the message forwarding loop formed by the network switch A and the network switch B enters a deadlock state and cannot forward the message.
Aiming at the network deadlock phenomenon in the prior art, a manual detection method of the network deadlock state is generally adopted: the method comprises the steps of manually monitoring counters arranged on all ports of a network switch, wherein the counters are used for counting the number of Pause blocking frames received by the ports where the counters are located, when the number of the Pause blocking frames received by the ports where the counters are located reaches a set threshold value, the network is considered to enter a deadlock state, and then the network switch of the ports where the counters are located reports that the network enters the deadlock state to a processor, so that the processor can conveniently solve the deadlock state, and normal forwarding of messages is recovered.
in the process of implementing the invention, the inventor finds that at least the following technical problems exist in the prior art:
In the prior art, the detection method of the network deadlock state needs manual intervention, so that the detection sensitivity is not high, and the safety and the reliability of the system are seriously influenced.
Disclosure of Invention
the method and the device for detecting the network deadlock state can accurately, sensitively and automatically detect the network deadlock phenomenon, thereby improving the safety and the reliability of the system.
In a first aspect, the present invention provides a method for detecting a network deadlock state, where each port of a network device is provided with a timer, and the method includes:
judging whether a timer of a current port is triggered according to a port blocking state table in the network equipment;
if the timer of the current port is triggered, judging whether the blocking time of the current port counted by the timer of the current port is larger than a set threshold value or not;
And when the blocking time of the current port is greater than a set threshold value, confirming that the network enters a deadlock state.
Optionally, the port blocking status table includes status information of each port, where the status information includes a blocking status and a non-blocking status.
optionally, the determining, according to the port blocking status table inside the network device, whether the timer of the current port is triggered includes:
When the port blocking state table shows that the current port state is changed from a non-blocking state to a blocking state, triggering a timer of the current port and starting timing;
And when the current port state is changed from the blocking state to the non-blocking state, the timer of the current port is closed and the timer is cleared.
optionally, when the blocking time of the current port is not greater than the set threshold and the timer of the current port is always in the trigger state, the timer of the current port continues to count time.
in a second aspect, the present invention provides a network deadlock detection apparatus, where each port of a network device is provided with a timer, and the apparatus includes:
a first judging unit, configured to judge whether a timer of a current port is triggered according to a port blocking status table inside the network device;
a second judging unit, configured to, when the timer of the current port is triggered, judge whether a blocking time of the current port counted by the timer of the current port is greater than a set threshold;
And the confirming unit is used for confirming that the network enters a deadlock state when the blocking time of the current port is greater than a set threshold value.
Optionally, the port blocking status table in the first processing unit includes status information of each port, where the status information includes a blocking status and a non-blocking status.
Optionally, the first judging unit includes:
the triggering module is used for triggering and starting timing of a timer of the current port when the current port state is changed from a non-blocking state to a blocking state in the port blocking state table;
And the clearing module is used for closing the timer of the current port and clearing the timer when the port blocking state table shows that the port state of the current switch is changed from the blocking state to the non-blocking state.
optionally, the apparatus further comprises:
and when the blocking time of the current port is not more than a preset threshold value and the timer of the current port is always in a trigger state, continuing timing by the timer of the current port.
According to the method and the device for detecting the network deadlock state, whether a timer of a current port is triggered or not is judged according to a port blocking state table in the network equipment; if the timer of the current port is triggered, judging whether the blocking time of the current port counted by the timer of the current port is larger than a set threshold value or not; and when the blocking time of the current port is greater than a set threshold value, confirming that the network enters a deadlock state. Compared with the prior art, the method can accurately, sensitively and automatically detect the deadlock phenomenon of the network, thereby improving the safety and reliability of the system.
Drawings
fig. 1 is a message forwarding loop formed by a network switch a and a network switch B;
FIG. 2 is a flowchart illustrating a method for detecting deadlock in a network according to an embodiment of the invention;
FIG. 3 is a flowchart illustrating the operation of port 1 deadlock detection in switch A of FIG. 1;
FIG. 4 is a schematic structural diagram of a network deadlock detection apparatus according to an embodiment of the present invention;
Fig. 5 is a schematic structural diagram of the first determining unit 11 in fig. 4.
Detailed Description
in order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
the invention provides a method for detecting a network deadlock state, which comprises the following steps of:
s11, judging whether the timer of the current port is triggered according to the port blocking state table in the network equipment;
Optionally, the port blocking status table includes status information of each port, where the status information includes a blocking status and a non-blocking status.
Optionally, the determining, according to the port blocking status table inside the network device, whether the timer of the current port is triggered includes:
when the port blocking state table shows that the current port state is changed from a non-blocking state to a blocking state, triggering a timer of the current port and starting timing;
Specifically, after the current port timer is triggered, a scan clock existing inside the network device starts to scan the current port timer, and a time value of the current port timer is increased by one scan clock cycle every time the scan clock scans the current port timer;
And when the current port state is changed from the blocking state to the non-blocking state, the timer of the current port is closed and the timer is cleared.
specifically, when the current port timer is turned off and the scan clock scans the current port timer, the current port timer is always kept in a zero state.
S12, if the timer of the current port is triggered, judging whether the blocking time of the current port counted by the timer of the current port is larger than a set threshold value;
specifically, the timer of the current port is used for counting the current port blocking time;
And S13, when the blocking time of the current port is larger than the set threshold, confirming that the network enters a deadlock state.
specifically, when the blocking time of the current port is greater than a set threshold value, it is determined that the network enters a deadlock state, and a current port ID is reported to a CPU at the same time, after the CPU receives the current port ID, the CPU searches and closes the Pause signal channel of the current port according to the current port ID, and after the current port no longer generates network deadlock, the CPU opens the Pause signal channel of the current port.
Optionally, when the blocking time of the current port is not greater than the set threshold and the timer of the current port is always in the trigger state, the timer of the current port continues to count time.
Specifically, when the current port timer value is not greater than a preset threshold value, the timer of the current port is always in a triggered state, and the scan clock scans to the current port timer, the current switch port timer value is increased by one clock cycle, and the scan clock continues to scan the next port;
for example: fig. 3 is a flowchart illustrating the operation of detecting deadlock status of port 1 in switch a of fig. 1.
after the port 1 receives the Pause signal, the information in the blocking state table corresponding to the port 1 is changed from 1 to 0, which indicates that the state of the port 1 is changed from a non-blocking state to a blocking state;
and triggering a timer corresponding to the port 1 and starting timing, taking the scanning clock period as 10ns as an example, when the scanning clock scans the port 1 once, the timer value corresponding to the port 1 is increased by 10ns, and when the timer value of the port 1 reaches a set threshold value, confirming that a deadlock phenomenon is detected and reporting the deadlock phenomenon to a CPU.
The network deadlock state detection method provided by the embodiment of the invention judges whether a timer of a current port is triggered according to a port blocking state table in the network equipment; if the timer of the current port is triggered, judging whether the blocking time of the current port counted by the timer of the current port is larger than a set threshold value or not; and when the blocking time of the current port is greater than a set threshold value, confirming that the network enters a deadlock state. Compared with the prior art, the method can accurately, sensitively and automatically detect the deadlock phenomenon of the network, thereby improving the safety and reliability of the system.
An embodiment of the present invention further provides a device for detecting a network deadlock state, where as shown in fig. 4, the device includes:
a first determining unit 11, configured to determine whether a timer of a current port is triggered according to a port blocking status table inside the network device;
Optionally, the port blocking status table in the first processing unit includes status information of each port, where the status information includes a blocking status and a non-blocking status.
A second determining unit 12, configured to determine, when the timer of the current port is triggered, whether a blocking time of the current port counted by the timer of the current port is greater than a set threshold;
a confirming unit 13, configured to confirm that the network enters a deadlock state when the blocking time of the current port is greater than a set threshold.
the network deadlock state detection device provided by the embodiment of the invention judges whether the timer of the current port is triggered according to the port blocking state table in the network equipment; if the timer of the current port is triggered, judging whether the blocking time of the current port counted by the timer of the current port is larger than a set threshold value or not; and when the blocking time of the current port is greater than a set threshold value, confirming that the network enters a deadlock state. Compared with the prior art, the method can accurately, sensitively and automatically detect the deadlock phenomenon of the network, thereby improving the safety and reliability of the system.
optionally, as shown in fig. 5, the first judging unit 11 further includes:
A triggering module 111, configured to trigger and start timing a timer of the current port when the port blocking status table shows that the current port status changes from a non-blocking status to a blocking status;
a clearing module 112, configured to close the timer of the current port and clear the timer when the port blocking state table shows that the port state of the current switch is changed from the blocking state to the non-blocking state.
Optionally, the apparatus further comprises:
And when the blocking time of the current port is not more than a preset threshold value and the timer of the current port is always in a trigger state, continuing timing by the timer of the current port.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
the above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A method for detecting a network deadlock condition, wherein a timer is provided for each port of a network device, the method comprising:
Judging whether a timer of a current port is triggered according to an IEEE802.3 flow control protocol port blocking state table in the network equipment;
if the timer of the current port is triggered, judging whether the blocking time of the current port counted by the timer of the current port is larger than a set threshold value or not;
when the blocking time of the current port is larger than a set threshold value, confirming that the network enters a deadlock state;
the port blocking state table of the IEEE802.3 flow control protocol contains state information of each port, where the state information includes a blocking state and a non-blocking state.
2. The method of claim 1, wherein the determining whether the timer for the current port is triggered according to the port blocking status table of the IEEE802.3 traffic control protocol inside the network device comprises:
when the IEEE802.3 flow control protocol port blocking state table shows that the current port state is changed from a non-blocking state to a blocking state, triggering a timer of the current port and starting timing;
and when the IEEE802.3 flow control protocol port blocking state table shows that the current port state is changed from the blocking state to the non-blocking state, closing the timer of the current port and clearing the timer.
3. The method of claim 2, further comprising:
And when the blocking time of the current port is not more than the set threshold value and the timer of the current port is always in a trigger state, the timer of the current port continues to count time.
4. A network deadlock detection apparatus, wherein a timer is provided for each port of a network device, the apparatus comprising:
A first judging unit, configured to judge whether a timer of a current port is triggered according to an IEEE802.3 flow control protocol port blocking status table inside the network device;
A second judging unit, configured to, when the timer of the current port is triggered, judge whether a blocking time of the current port counted by the timer of the current port is greater than a set threshold;
A confirming unit, configured to confirm that the network enters a deadlock state when the blocking time of the current port is greater than a set threshold;
the port blocking state table of the IEEE802.3 flow control protocol contains state information of each port, where the state information includes a blocking state and a non-blocking state.
5. The apparatus according to claim 4, wherein the first judging unit includes:
the triggering module is used for triggering and starting timing of a timer of the current port when the IEEE802.3 flow control protocol port blocking state table shows that the current port state is changed from a non-blocking state to a blocking state;
and the clearing module is used for closing the timer of the current port and clearing the timer when the port blocking state of the current switch is changed from the blocking state to the non-blocking state in the IEEE802.3 flow control protocol port blocking state table.
6. the apparatus according to claim 5, wherein when the blocking time of the current port is not greater than the preset threshold and the timer of the current port is always in the triggered state, the timer of the current port continues to count.
CN201611040583.6A 2016-11-11 2016-11-11 Network deadlock state detection method and device Active CN106506279B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611040583.6A CN106506279B (en) 2016-11-11 2016-11-11 Network deadlock state detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611040583.6A CN106506279B (en) 2016-11-11 2016-11-11 Network deadlock state detection method and device

Publications (2)

Publication Number Publication Date
CN106506279A CN106506279A (en) 2017-03-15
CN106506279B true CN106506279B (en) 2019-12-13

Family

ID=58328430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611040583.6A Active CN106506279B (en) 2016-11-11 2016-11-11 Network deadlock state detection method and device

Country Status (1)

Country Link
CN (1) CN106506279B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112270153B (en) * 2020-12-15 2021-04-16 鹏城实验室 Waveform acquisition method and device, test equipment and computer readable storage medium
CN113965523A (en) * 2021-10-28 2022-01-21 锐捷网络股份有限公司 Loop-based PFC deadlock processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483500A (en) * 2009-02-13 2009-07-15 杭州华三通信技术有限公司 Processing method and apparatus for member port status changing in stacking system
CN102136960A (en) * 2010-01-27 2011-07-27 华为技术有限公司 Method and device for controlling switch ports
CN103246552A (en) * 2012-02-14 2013-08-14 腾讯科技(深圳)有限公司 Method and device for preventing thread from blocking
CN104636259A (en) * 2015-03-18 2015-05-20 厦门雅迅网络股份有限公司 Function execution timeout and deadlock detection method based on dynamic tracking of operating period

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7469026B2 (en) * 2002-03-07 2008-12-23 The Aerospace Corporation Random walk filter timing recovery loop
CN100344125C (en) * 2003-11-26 2007-10-17 华为技术有限公司 A solution method of data transmission deadlock

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483500A (en) * 2009-02-13 2009-07-15 杭州华三通信技术有限公司 Processing method and apparatus for member port status changing in stacking system
CN102136960A (en) * 2010-01-27 2011-07-27 华为技术有限公司 Method and device for controlling switch ports
CN103246552A (en) * 2012-02-14 2013-08-14 腾讯科技(深圳)有限公司 Method and device for preventing thread from blocking
CN104636259A (en) * 2015-03-18 2015-05-20 厦门雅迅网络股份有限公司 Function execution timeout and deadlock detection method based on dynamic tracking of operating period

Also Published As

Publication number Publication date
CN106506279A (en) 2017-03-15

Similar Documents

Publication Publication Date Title
EP2590372A1 (en) Ethernet loop locating method, switching device and system
KR101451150B1 (en) Reducing headroom
US9356868B2 (en) Congestion detection and management at congestion-tree roots
US11381974B2 (en) Method and attack detection function for detection of a distributed attack in a wireless network
CN101188527B (en) A heartbeat detection method and device
EP3160081A1 (en) Alert data processing method and network management device
CN111078453B (en) Method, device, computer equipment and storage medium for automatically fusing and recovering micro-service
EP3387791B1 (en) Technique for reporting and processing alarm conditions occurring in a communication network
CN106506279B (en) Network deadlock state detection method and device
WO2015076708A1 (en) Method and first network node for managing a first ip path used by a connection
EP2704375A1 (en) Network device, communication system, method for detecting abnormal traffic, and program
CN103702348B (en) A kind of detection method and device of Home eNodeB lower network quality
CN112291087B (en) Method and device for realizing OAM error state reporting
US8274889B2 (en) Method, system and computer program product involving congestion detection in ethernet
CN101478800B (en) Method and apparatus for detecting high speed moving state of terminal
CN103227753A (en) Network congestion processing method, system and device
CN112702226B (en) Loop detection method, device, equipment and computer readable storage medium
CN107548065B (en) Method and device for determining detection equipment, access controller and storage medium
CN113037740A (en) GOOSE message sender restart frame judging method
CN104243343A (en) Method for determining message impact and network equipment
CN106603335B (en) Private software traffic monitoring method and device
CN105224411B (en) It is a kind of to avoid CPU from being depleted the method for causing house dog to be restarted
CN113965523A (en) Loop-based PFC deadlock processing method and device
CN107786380B (en) Method and device for detecting network loop of controller and controller
CN109714182B (en) Network control method, device and computer readable storage medium

Legal Events

Date Code Title Description
C06 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
CP03 Change of name, title or address

Address after: 215000 unit 13 / 16, 4th floor, building B, No.5 Xinghan street, Suzhou Industrial Park, Jiangsu Province

Patentee after: Suzhou Shengke Communication Co.,Ltd.

Address before: Xinghan Street Industrial Park of Suzhou city in Jiangsu province 215021 B No. 5 Building 4 floor 13/16 unit

Patentee before: CENTEC NETWORKS (SU ZHOU) Co.,Ltd.

CP03 Change of name, title or address