CN111010328A - Method and equipment for preventing white board switch from being looped - Google Patents

Method and equipment for preventing white board switch from being looped Download PDF

Info

Publication number
CN111010328A
CN111010328A CN201911088972.XA CN201911088972A CN111010328A CN 111010328 A CN111010328 A CN 111010328A CN 201911088972 A CN201911088972 A CN 201911088972A CN 111010328 A CN111010328 A CN 111010328A
Authority
CN
China
Prior art keywords
port
message
switch
short
circuited
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.)
Pending
Application number
CN201911088972.XA
Other languages
Chinese (zh)
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 Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201911088972.XA priority Critical patent/CN111010328A/en
Publication of CN111010328A publication Critical patent/CN111010328A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • H04L12/437Ring fault isolation or reconfiguration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a method and equipment for preventing a white board exchanger from being looped, wherein the method comprises the following steps: defining the Ethernet type in the loop detection message as a first parameter in the white board switch; responding to the port of the switch receiving the message and the Ethernet type being a first parameter, transmitting the message to the CPU for analysis; responding to the analyzed message with the source mac address as the port address and the load as the vlan number of the port, and judging that the port is short-circuited; the shorted port is disabled to prevent loop messages from being generated. By using the method and the equipment of the invention, when the port is short-circuited due to misoperation, the short-circuited port can be effectively and automatically down-switched, thereby reducing the consumption of the broadcast storm message on the CPU, reducing the utilization rate of the CPU, ensuring that the normal protocol message can be processed by the CPU, ensuring that the data service can be normally forwarded and ensuring that the switch can be normally used.

Description

Method and equipment for preventing white board switch from being looped
Technical Field
The field relates to the field of computers, and more particularly to a method for ring prevention of a white-card switch.
Background
Currently, there are many small and medium-sized enterprises using traditional switches of the Huashi, Huasan and Cisco brands, while large enterprises such as Google, Amazon and Facebook have started to take the lead to use white-brand switches. The former is programmable and the latter is not programmable, as compared to conventional switches. The biggest bright spot of the white-card switch is strong openness, that is, the operating system, software and other aspects of the white-card switch have more choices for users.
When designing a network, a ring link is considered to be configured with an anti-loop protocol (such as STP), but a non-ring link is generally not configured with the anti-loop protocol, but a wiring error may occur in a networking process, so that a loop is formed. Once the two-layer loop occurs, the broadcast, multicast and unknown unicast messages in the two-layer network are repeatedly copied in a large number of cycles to form a broadcast storm, and the broadcast storm is formed and can be directly uploaded to the control plane of the router. The uploading of a large number of messages occupies the bandwidth of the normal protocol messages, so that the normal protocol messages are discarded, the normal service is influenced, and meanwhile, the CPU occupancy rate is increased.
The current data center operating system, SONIC, does not support a two-layer based port loop detection mechanism and thus is highly likely to cause broadcast storms due to misoperations.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method and an apparatus for ring prevention of a white-tablet switch, which can effectively drop a short-circuited port automatically when the port is short-circuited due to an incorrect operation, thereby reducing consumption of a broadcast storm packet on a CPU, reducing a utilization rate of the CPU, and ensuring that a normal protocol packet can be processed by the CPU, a data service can be forwarded normally, and the switch can be used normally.
In view of the above objects, an aspect of an embodiment of the present invention provides a ring-proof method for a white board switch, including the steps of:
defining the Ethernet type in the loop detection message as a first parameter in the white board switch;
responding to the port of the switch receiving the message and the Ethernet type being a first parameter, transmitting the message to the CPU for analysis;
responding to the analyzed message with the source mac address as the port address and the load as the vlan number of the port, and judging that the port is short-circuited;
the shorted port is disabled to prevent loop messages from being generated.
According to an embodiment of the present invention, further comprising: and enabling the port after the short-circuited port is disabled for a first threshold time interval.
According to one embodiment of the invention, the first threshold time is 300 seconds.
According to one embodiment of the invention, the loop detection message is configured to be sent once every second threshold time.
According to one embodiment of the invention, disabling the shorted port comprises: switch loop disable table entry information is obtained and modified in the statistics database to disable ports.
In another aspect of the embodiments of the present invention, there is also provided a white board switch ring prevention apparatus, comprising:
at least one processor; and
a memory storing program code executable by the processor, the program code when executed by the processor performing the steps of:
defining the Ethernet type in the loop detection message as a first parameter in the white board switch;
responding to the port of the switch receiving the message and the Ethernet type being a first parameter, transmitting the message to the CPU for analysis;
responding to the analyzed message with the source mac address as the port address and the load as the vlan number of the port, and judging that the port is short-circuited;
the shorted port is disabled to prevent loop messages from being generated.
According to an embodiment of the invention, the program code further performs the following steps when executed by the processor: and enabling the port after the short-circuited port is disabled for a first threshold time interval.
According to one embodiment of the invention, the first threshold time is 300 seconds.
According to one embodiment of the invention, the loop detection message is configured to be sent once every second threshold time.
According to one embodiment of the invention, disabling the shorted port comprises: switch loop disable table entry information is obtained and modified in the statistics database to disable ports.
The invention has the following beneficial technical effects: the method for preventing the white board switch from being looped provided by the embodiment of the invention defines the Ethernet type in the loop detection message as a first parameter; responding to the port of the switch receiving the message and the Ethernet type being a first parameter, transmitting the message to the CPU for analysis; responding to the analyzed message with the source mac address as the port address and the load as the vlan number of the port, and judging that the port is short-circuited; the technical scheme of enabling the short-circuited port to prevent the loop message from being generated can effectively and automatically down the short-circuited port when the port is short-circuited due to misoperation, thereby reducing the consumption of the broadcast storm message on a CPU (central processing unit), reducing the utilization rate of the CPU, ensuring that a normal protocol message can be processed by the CPU, normally forwarding a data service and normally using a switch.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flow diagram of a method of ring-proofing a white-card switch according to one embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
In view of the above objects, a first aspect of embodiments of the present invention provides an embodiment of a method for ring-prevention of a white-card switch. Fig. 1 shows a schematic flow diagram of the method.
As shown in fig. 1, the method may include the steps of:
s1 defining an ethernet type (ethertype) in the loop detection message as a first parameter in the white board switch, where the first parameter may be set to 9155, and determining whether the message is a normal communication message or a message for loop detection according to the first parameter;
s2, responding to the message received by the port of the switch and the Ethernet type is the first parameter, transmitting the message to the CPU for analysis, wherein the step is that when the switch sets an ACL rule and the Ethernet type in the two-layer message is 9155, the message is directly transmitted to the CPU for analysis;
s3, responding to the analyzed message that the source mac address is the port address and the load is the vlan number of the port, judging that the port is short-circuited, when the message received by the port of the switch is a loop detection message, the CPU will analyze the message into the forms of source mac (smac), ethertype and load (payload), then judging whether the smac in the message is the same as the mac of the current port, and simultaneously judging whether the load is the vlan number of the current port, if the two judgment conditions are the same, it is indicated that the current port is short-circuited, and the current port needs to be correspondingly processed;
s4 disables the short-circuited port to prevent the loop message from being generated, which can also be understood as turning off the current port, so that the short-circuited port cannot directly cause a large amount of cyclic duplication of broadcast, multicast and unknown unicast messages in the two-layer network, and cannot form a broadcast storm.
The method is mainly used for preventing short circuit between the ports of the switches caused by misoperation in the networking process, so that broadcast, multicast and unknown unicast messages in a two-layer network can be repeatedly copied in a large number of cycles to form broadcast storms.
Through the technical scheme, when the port is short-circuited due to misoperation, the short-circuited port can be effectively and automatically down, so that the consumption of the broadcast storm message on the CPU is reduced, the utilization rate of the CPU is reduced, the normal protocol message can be processed by the CPU, the data service can be normally forwarded, and the switch can be normally used.
In a preferred embodiment of the present invention, the method further comprises: and enabling the port after the short-circuited port is disabled for a first threshold time interval.
In a preferred embodiment of the invention, the first threshold time is 300 seconds. After the shorted port is turned off, the port is enabled, i.e., re-enabled, at fixed intervals, where the interval is set to 300 seconds, but may be other suitable times. And re-enabling the port, if the port is not short-circuited with other ports in the subsequent detection, normally using the port, and if the port is short-circuited in the subsequent detection, continuing to process according to the method.
In a preferred embodiment of the present invention, the loop detection message is configured to be sent every second threshold time, where the second threshold time may be set to 2 seconds, or may be other suitable times.
In a preferred embodiment of the present invention, disabling the shorted port comprises: switch loop disable table entry information is obtained and modified in the statistics database to disable ports.
Through the technical scheme, the fact that the Insight platform Redis component has high availability can be verified, the testing efficiency is improved, human resources are saved, guarantee and basis are provided for Redis high-availability cluster function testing of the cluster, and the product competitiveness is improved.
It should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by instructing relevant hardware through a computer program, and the above programs may be stored in a computer-readable storage medium, and when executed, the programs may include the processes of the embodiments of the methods as 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 embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method disclosed in the embodiments of the present invention.
In view of the above object, according to a second aspect of the embodiments of the present invention, there is provided a ring-proof apparatus for a white board switch, comprising:
at least one processor; and
a memory storing program code executable by the processor, the program code when executed by the processor performing the steps of:
defining the Ethernet type in the loop detection message as a first parameter in the white board switch, wherein the first parameter can be set to 9155, and judging whether the message is a normal communication message or a message for loop detection according to the first parameter;
responding to a port of a switch to receive a message and an Ethernet type is a first parameter, and transmitting the message to a CPU for analysis, wherein the step is that when an ACL rule is set in the switch and the Ethernet type in a two-layer message is specified to be 9155, the message is directly transmitted to the CPU for analysis;
responding to a source mac address in the analyzed message as a port address and a load as a vlan number of the port, judging that the port is short-circuited, when the message received by the port of the switch is a loop detection message, analyzing the message into a source mac (smac), ethertype and load (payload) form by a CPU, judging whether the smac in the message is the same as the mac of the current port, and judging whether the load is the vlan number of the current port, wherein if the two judgment conditions are the same, the current port is short-circuited and the current port needs to be correspondingly processed;
the short-circuited port is enabled to prevent the generation of a loop message, and can also be understood as the current port is turned off, so that the short-circuited port directly cannot cause a large amount of cyclic duplication of broadcast, multicast and unknown unicast messages in a two-layer network, and a broadcast storm cannot be formed.
In a preferred embodiment of the invention, the program code further performs the following steps when executed by the processor: and enabling the port after the short-circuited port is disabled for a first threshold time interval.
In a preferred embodiment of the invention, the first threshold time is 300 seconds. After the shorted port is turned off, the port is enabled, i.e., re-enabled, at fixed intervals, where the interval is set to 300 seconds, but may be other suitable times. And re-enabling the port, if the port is not short-circuited with other ports in the subsequent detection, normally using the port, and if the port is short-circuited in the subsequent detection, continuing to process according to the method.
In a preferred embodiment of the present invention, the loop detection message is configured to be sent every second threshold time, where the second threshold time may be set to 2 seconds, or may be other suitable times.
In a preferred embodiment of the present invention, disabling the shorted port comprises: switch loop disable table entry information is obtained and modified in the statistics database to disable ports.
It should be particularly noted that the embodiment of the system described above employs the embodiment of the method described above to specifically describe the working process of each module, and those skilled in the art can easily think that the modules are applied to other embodiments of the method described above.
Further, the above-described method steps and system elements or modules may also be implemented using a controller and a computer-readable storage medium for storing a computer program for causing the controller to implement the functions of the above-described steps or elements or modules.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The embodiments described above, particularly any "preferred" embodiments, are possible examples of implementations and are presented merely to clearly understand the principles of the invention. Many variations and modifications may be made to the above-described embodiments without departing from the spirit and principles of the technology described herein. All such modifications are intended to be included within the scope of this disclosure and protected by the following claims.

Claims (10)

1. A method for preventing a loop of a white-card switch, comprising the steps of:
defining the Ethernet type in the loop detection message as a first parameter in the white board switch;
responding to a message received by a port of the switch and the Ethernet type is the first parameter, and transmitting the message to a CPU for analysis;
responding to the analyzed message that the source mac address is the address of the port and the load is the vlan number of the port, and judging that the port is short-circuited;
and enabling the short-circuited port to prevent a loop message from being generated.
2. The method of claim 1, further comprising: enabling the short-circuited port after a first threshold time interval of disabling the port.
3. The method of claim 2, wherein the first threshold time is 300 seconds.
4. The method of claim 1, wherein the loop detection message is configured to be sent once every second threshold time.
5. The method of claim 1, wherein disabling the shorted port comprises: and acquiring and modifying the switch loop disabling table item information in a statistical database to disable the port.
6. An anti-loop apparatus for a white board switch, the apparatus comprising:
at least one processor; and
a memory storing program code executable by the processor, the program code, when executed by the processor, performing the steps of:
defining the Ethernet type in the loop detection message as a first parameter in the white board switch;
responding to a message received by a port of the switch and the Ethernet type is the first parameter, and transmitting the message to a CPU for analysis;
responding to the analyzed message that the source mac address is the address of the port and the load is the vlan number of the port, and judging that the port is short-circuited;
and enabling the short-circuited port to prevent a loop message from being generated.
7. The apparatus of claim 6, wherein the program code, when executed by the processor, further performs the steps of: enabling the short-circuited port after a first threshold time interval of disabling the port.
8. The apparatus of claim 7, wherein the first threshold time is 300 seconds.
9. The apparatus of claim 6, wherein the loop detection message is configured to be sent once every second threshold time.
10. The apparatus of claim 6, wherein disabling the shorted port comprises: and acquiring and modifying the switch loop disabling table item information in a statistical database to disable the port.
CN201911088972.XA 2019-11-08 2019-11-08 Method and equipment for preventing white board switch from being looped Pending CN111010328A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911088972.XA CN111010328A (en) 2019-11-08 2019-11-08 Method and equipment for preventing white board switch from being looped

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911088972.XA CN111010328A (en) 2019-11-08 2019-11-08 Method and equipment for preventing white board switch from being looped

Publications (1)

Publication Number Publication Date
CN111010328A true CN111010328A (en) 2020-04-14

Family

ID=70110932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911088972.XA Pending CN111010328A (en) 2019-11-08 2019-11-08 Method and equipment for preventing white board switch from being looped

Country Status (1)

Country Link
CN (1) CN111010328A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112134775A (en) * 2020-09-25 2020-12-25 苏州浪潮智能科技有限公司 Switch loop detection method and device
CN112769650A (en) * 2021-01-11 2021-05-07 杭州锐思客技术有限公司 Multi-VLAN loop detection method and system
CN114500240A (en) * 2022-04-15 2022-05-13 北京全路通信信号研究设计院集团有限公司 Switchboard short circuit analysis method and device based on network ring network storm flow characteristics

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707538A (en) * 2009-11-25 2010-05-12 烽火通信科技股份有限公司 Method for detecting and automatically recovering Ethernet loopback
CN101710856A (en) * 2009-11-13 2010-05-19 中兴通讯股份有限公司 Method and equipment for detection processing of loopback of aggregation link
CN104184628A (en) * 2013-05-24 2014-12-03 华为技术有限公司 Looped network detection method in network, network equipment and looped network detection system
CN105007221A (en) * 2015-07-28 2015-10-28 上海斐讯数据通信技术有限公司 Loop detection method and system
WO2017056140A1 (en) * 2015-09-28 2017-04-06 株式会社日立製作所 Network system and network node

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710856A (en) * 2009-11-13 2010-05-19 中兴通讯股份有限公司 Method and equipment for detection processing of loopback of aggregation link
CN101707538A (en) * 2009-11-25 2010-05-12 烽火通信科技股份有限公司 Method for detecting and automatically recovering Ethernet loopback
CN104184628A (en) * 2013-05-24 2014-12-03 华为技术有限公司 Looped network detection method in network, network equipment and looped network detection system
CN105007221A (en) * 2015-07-28 2015-10-28 上海斐讯数据通信技术有限公司 Loop detection method and system
WO2017056140A1 (en) * 2015-09-28 2017-04-06 株式会社日立製作所 Network system and network node

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112134775A (en) * 2020-09-25 2020-12-25 苏州浪潮智能科技有限公司 Switch loop detection method and device
CN112134775B (en) * 2020-09-25 2022-08-09 苏州浪潮智能科技有限公司 Switch loop detection method and device
CN112769650A (en) * 2021-01-11 2021-05-07 杭州锐思客技术有限公司 Multi-VLAN loop detection method and system
CN114500240A (en) * 2022-04-15 2022-05-13 北京全路通信信号研究设计院集团有限公司 Switchboard short circuit analysis method and device based on network ring network storm flow characteristics

Similar Documents

Publication Publication Date Title
CN111010328A (en) Method and equipment for preventing white board switch from being looped
CN109495322B (en) Network fault positioning method, related equipment and computer storage medium
CN106605392B (en) System and method for operating on a network using a controller
US9262191B2 (en) Method, apparatus, and system for processing service flow
US10778505B2 (en) System and method of evaluating network asserts
CN108429625B (en) Method and device for realizing fault diagnosis
CN107196820B (en) Switch performance test method, device and system
CN111682989B (en) Method, device and system for detecting port link state
CN102447639B (en) A kind of policy routing method and device
CN112333013A (en) Self-adaptive networking method, device, router and storage medium
US10833889B2 (en) Method and device for monitoring control systems
CN108471372B (en) State control method, device and message transmission method
CN106549821B (en) Network loop detection method and controller
CN115484047A (en) Method, device, equipment and storage medium for identifying flooding attack in cloud platform
US10659251B2 (en) Ring protection network division
CN117319982A (en) Method and device for actively discovering unregistered sensor based on edge calculation
WO2023174055A1 (en) Message transmission method and communication apparatus
CN111817953A (en) Method and device for electing master equipment based on Virtual Router Redundancy Protocol (VRRP)
CN108123899B (en) Statistical method and monitoring method for switch outlet message flow
US10291581B2 (en) Method and system for reducing PIM protocol DR change
CN105577427B (en) The detection method that is communicated to connect between household electrical appliance and mobile terminal, device
CN112532412B (en) Network fault detection method and network fault detection device
CN111884871B (en) Method and equipment for detecting discarded message of switch
CN114448785A (en) Method and device for positioning fault network equipment and electronic equipment
US10491421B2 (en) Ring protection network module

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200414