WO2020051862A1 - Broadcast storm prevention method and apparatus - Google Patents

Broadcast storm prevention method and apparatus Download PDF

Info

Publication number
WO2020051862A1
WO2020051862A1 PCT/CN2018/105623 CN2018105623W WO2020051862A1 WO 2020051862 A1 WO2020051862 A1 WO 2020051862A1 CN 2018105623 W CN2018105623 W CN 2018105623W WO 2020051862 A1 WO2020051862 A1 WO 2020051862A1
Authority
WO
WIPO (PCT)
Prior art keywords
broadcast
message
received
broadcast message
network device
Prior art date
Application number
PCT/CN2018/105623
Other languages
French (fr)
Chinese (zh)
Inventor
李彦举
房璟
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201880097376.5A priority Critical patent/CN112673602B/en
Priority to PCT/CN2018/105623 priority patent/WO2020051862A1/en
Publication of WO2020051862A1 publication Critical patent/WO2020051862A1/en

Links

Images

Classifications

    • 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

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and device for avoiding broadcast storms.
  • the first method is to break the loop through the spanning tree protocol STP, so that the entire network maintains a tree-like network.
  • the second method is to determine whether the broadcast packet is a duplicate broadcast packet by using a special mark or sequence number in the broadcast packet. If the broadcast packet is a duplicate broadcast packet, the duplicate broadcast packet is discarded.
  • the shortcomings of the foregoing prior arts are that the STP technology cannot maintain the networking mode as a mesh networking, and the optimal path cannot be achieved during route selection. Deduplication of broadcast packets by sequence numbers requires modification of the broadcast packets, which is not suitable for transmitting broadcast packets using the Ethernet message format.
  • Embodiments of the present invention provide a method and device for avoiding broadcast storms, and avoid broadcast storms without changing a network structure between routes and broadcasting packets transmitted between routes.
  • an embodiment of the present invention provides a method for avoiding a broadcast storm, which includes: a network device receives a broadcast message; the network device determines whether the broadcast message is received repeatedly; if the broadcast message is repeated When receiving, the network device determines whether the time difference between the broadcast message and the last received broadcast message is less than a threshold, and determines whether the number of times the broadcast message is received is greater than the threshold; if When the broadcast message is compared with the last received broadcast message, the received time difference is less than a threshold, and the number of times that the broadcast message is received is greater than the threshold, the network device discards the broadcast message.
  • the determining whether the broadcast message is repeatedly received includes: the network device determining whether a source media of the received broadcast message is stored. Whether the control MAC address is the MAC address of the network device, and if the MAC address of the broadcast message is the MAC address of the network device, the broadcast message is repeatedly received.
  • the determining whether the broadcast packet is repeatedly received includes:
  • the broadcast or multicast packet content record table includes: a source or MAC address of the broadcast or multicast packet, The content of the multicast message, the time when the last broadcast or multicast message was received, and the number of times the broadcast or multicast message was received.
  • an embodiment of the present invention provides a network device, including: a receiver for receiving a broadcast message; a processor for determining whether the broadcast message is received repeatedly; if the broadcast message is repeated Receiving, determining whether the time difference between the broadcast message and the last received broadcast message is less than a threshold, and determining whether the number of times the broadcast message is received is greater than the threshold; the processor, further, It is used to discard the broadcast message when the time difference between the broadcast message and the last received broadcast message is less than a threshold, and the number of times the broadcast message is received is greater than the threshold.
  • the processor is configured to determine whether the broadcast packet is repeatedly received, including:
  • the processor is configured to determine whether the source media access control MAC address of the received broadcast message is the MAC address of the network device, and if the MAC address of the broadcast message is the MAC address of the network device, Then the broadcast message is received repeatedly.
  • the processor is configured to determine whether the network device has the content of the broadcast message, and if the network device has the broadcast message The broadcast message is received repeatedly; if the broadcast message is not included in the broadcast or multicast message content record table, the broadcast message is not received repeatedly, and the memory is notified to record the broadcast or Message content of a multicast packet; the network device further includes: the memory, which is used to record the content of the broadcast message.
  • the broadcast or multicast message content record table includes: a source MAC address of the broadcast or multicast message, a content of the broadcast or multicast message, and a broadcast or multicast message received most recently. The time of the message, the number of times a broadcast or multicast message was received.
  • the broadcast or multicast message content record table is periodically aged.
  • broadcast storms are avoided without changing the networking structure between the routes and without changing the broadcast packets transmitted between the routes.
  • FIG. 1 is a system networking diagram of a network device in an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for avoiding a broadcast storm in an embodiment of the present invention
  • FIG. 3 is a flowchart of another method for avoiding a broadcast storm according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a network device according to an embodiment of the present invention.
  • FIG. 5 is another schematic structural diagram of a network device according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a parameter page of a network device according to an embodiment of the present invention.
  • FIG. 7 is another schematic diagram of a parameter page of a network device according to an embodiment of the present invention.
  • FIG. 8 is another schematic diagram of a parameter page of a network device according to an embodiment of the present invention.
  • the master router A, the slave router B, the slave router C, and the slave router D form a local area network.
  • the main router A is connected to the Internet in a wired or wireless manner.
  • Each of the master router A, the slave router B, the slave router C, and the slave router D can be connected to one or more terminal devices in a wired or wireless manner.
  • the difference between master router A and slave router B, slave router C, and slave router D is that the master router is used to access the Internet on the WAN side and to implement LAN-side routing, and the slave router is only used to implement LAN Routing on the side.
  • the master router and the slave routers in the LAN can be connected in a wired manner.
  • the networking mode of at least three of them may be a ring network.
  • the looped networking mode has certain advantages, such as more choices when selecting transmission paths.
  • the route from master router A to slave router D can take the master router A on the left side of the ring consisting of master router A, slave router B, and slave router C to slave router B to From Router C to Router D.
  • starting from router C to slave router B you can follow the path from router C to master router A, and then to slave router B. It can also start directly from slave router C and reach slave router B without going through master router A. This will cause the same broadcast packet to be repeatedly transmitted to the same destination router. Therefore, when there is a loop in the network, each frame will be repeatedly transmitted in the network, causing a broadcast storm.
  • the technical solution of the embodiment of the present invention can avoid a broadcast storm without changing the networking structure between the routes and the broadcast packets transmitted between the routes.
  • FIG. 2 is a flowchart of a method for avoiding a broadcast storm in an embodiment of the present invention. The following steps may be performed by a router, a base station, a DSLAM (Digital Subscriber Line Access Multiplexer, Digital Subscriber Line Access Multiplexer), a switch, and a DSL (Digital Subscriber Line) gateway.
  • a router is used as an example for illustration.
  • Step S201 The router receives a multicast or broadcast message.
  • Step S202 The router determines whether the multicast or broadcast message is received for the first time. When it is determined that the multicast or broadcast message is received for the first time, it proceeds to step S204. When it is determined that the multicast or broadcast message is not received for the first time, the process proceeds to step S203. Specifically, if the source MAC (Media Access Control) address of the received broadcast or multicast message is the MAC address of the router, it indicates that the message was sent by the device and can be identified as having been received The message.
  • the source MAC Media Access Control
  • the broadcast or multicast message content record table After receiving a broadcast or multicast message, query the broadcast or multicast message content record table. If the message content exists in the record table, it indicates that the message has been sent; if there is no record in the record table, The message indicates that the message has not been sent, and the message content of the broadcast or multicast packet is recorded.
  • the broadcast or multicast message content record table includes the following entries: the broadcast or multicast source MAC address, the message content, the time of the last received message, and the number of received messages.
  • the above-mentioned broadcast or multicast message content record table may be set to age (clear) periodically.
  • step S203 the router compares the received message with the last received message to determine whether the time difference is less than a threshold. When the time difference is less than the threshold, the process proceeds to step S206. When the time difference is greater than or equal to the threshold, the process proceeds to step S205.
  • step S204 the router records the content and reception time of the message.
  • step S205 the router determines whether the number of times the packet is received is greater than the threshold. If the router determines that the number of times the packet is received is greater than the threshold, the process proceeds to step S206. The router determines that the number of times the packet is received is less than or equal to the threshold, and proceeds to step S207.
  • Step S206 The router discards the message.
  • step S207 the router records the number of times the message is received.
  • Step S208 The router forwards the message.
  • the method of the embodiment of the present invention can ensure that the topology structure of the router connection does not change, and that the structure of the message transmitted between the routers is also unchanged. not changing.
  • FIG. 3 is a flowchart of another method for avoiding a broadcast storm in an embodiment of the present invention.
  • Step S301 The router receives a multicast or broadcast message.
  • Step S302 The router determines whether the multicast or broadcast message is received for the first time. When it is determined that the multicast or broadcast message is received for the first time, it proceeds to step S304. When it is determined that the multicast or broadcast message is not received for the first time, the process proceeds to step S303. Specifically, if the source MAC (Media Access Control) address of the received broadcast or multicast message is the MAC address of the router, it indicates that the message was sent by the device and can be identified as having been received. The message. or,
  • the source MAC Media Access Control
  • the broadcast or multicast message content record table After receiving a broadcast or multicast message, query the broadcast or multicast message content record table. If the message content exists in the record table, it indicates that the message has been sent; if the message does not exist in the record table, , Indicating that the message has not been sent, while recording the message content of the broadcast or multicast packet.
  • the broadcast or multicast message content record table includes the following entries: the broadcast or multicast source MAC address, the message content, the time of the last received message, and the number of received messages.
  • the above-mentioned broadcast or multicast message content record table may be set to age (clear) at 1 second timing.
  • step S303 the router determines whether the number of times the message is received is greater than the threshold. If the router determines that the number of times the message is received is greater than the threshold, the process proceeds to step S306. If the router determines that the number of times the packet is received is less than or equal to the threshold, it proceeds to step S305.
  • step S304 the router records the content and reception time of the message.
  • step S305 the router compares the received message with the last received message to determine whether the time difference is less than a threshold. When the time difference is less than the threshold, the process proceeds to step S306. When the router determines that the time difference is greater than or equal to the threshold, it proceeds to step S307.
  • Step S306 The router discards the message.
  • Step S307 The router records the number of times the message is received.
  • Step S308 The router forwards the message.
  • the method of the embodiment of the present invention can ensure that the topology structure of the router connection does not change, and that the structure of the message transmitted between the routers is also unchanged. not changing.
  • FIG. 4 is a schematic structural diagram of a network device in an embodiment of the present invention.
  • a router is used as an example for description of a network device.
  • the router shown in FIG. 4 includes a processor 480, a power supply 490 for supplying power to the processor, an internal memory 420 connected to the processor 480, a USB interface 410 connected to the processor 480, and an Ethernet connected to the processor 480.
  • An interface 440, and a WiFi module 470 connected to the processor 480. The role of each module will be described in detail below.
  • the processor 480 is the control center of the router 400, and uses various interfaces and lines to connect various parts of the router 400, and executes the router by running or executing application programs stored in the internal memory 420, and calling data stored in the internal memory 420. 400 various functions and processing data.
  • the processor 480 may include one or more processing units; the processor 480 may further integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and an application program, etc.
  • the modem processor mainly handles wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 480.
  • the memory 420 is used to store application programs and data, and the processor 480 executes various functions and data processing of the router 400 by running the application programs and data stored in the memory 420.
  • the memory 420 mainly includes a storage program area and a storage data area, where the storage program area can store an operating system and application programs required for at least one function; the storage data area can store data created according to the use of the router 400.
  • the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as a magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the memory 420 may store various operating systems, such as a Linux operating system. Specifically, the memory 420 may store a content table of the last received message and a broadcast or multicast message content record table.
  • the USB interface 410 is used to connect the processor 480 and a USB peripheral device, and provides services related to the USB standard.
  • the Ethernet interface 440 is used to provide a wired interface to connect uplink and / or downlink Ethernet lines.
  • the Ethernet interface is an uplink Ethernet interface.
  • the Ethernet interface is a downlink Ethernet interface.
  • the WiFi module 470 is configured to provide an interface for downlink WiFi wireless connection.
  • the interface of the WiFi wireless connection is a downlink interface.
  • Upstream means from the terminal equipment to the network equipment.
  • the downlink here refers to the network equipment to the terminal equipment.
  • the network device 130 may include a processor 1301, a Wi-Fi device 1303, a power supply device 1305, and a memory 1302.
  • the foregoing parts of the network device 130 may be obtained through One or more communication buses 1304 are connected.
  • the electronic device 130 may further include a USB interface and the like, and details are not described herein again.
  • the processor 480 in the network device in FIG. 4 and the processor 1301 in the network device in FIG. 5 are used to execute the steps in the method embodiments shown in FIG. 2 and FIG. 3, which are not described herein again.
  • FIG. 6 is a schematic diagram of a parameter page of a network device according to an embodiment of the present invention. Specifically, the network device presents a parameter page of the network device through an application APP running on the terminal device connected to the network device.
  • an application APP running on the terminal device connected to the network device.
  • the app has a loopback counting option. After opening the "Loopback Count" tab, enter the interface on the right in Figure 6.
  • the interface on the right side of Figure 6 includes the following options: whether to enable loopback counting, whether the loopback count is feedback, and whether the loopback count has reached a threshold.
  • whether the loopback counting is enabled refers to whether the router has the loopback counting enabled. If loopback counting is enabled, the router will enable loopback counting. For example, in the figure on the right, the loopback counting function is enabled.
  • Whether the loopback count is feedback refers to whether the loopback count value is fed back. For example, if there are 5 duplicate packets, the feedback loopback count is 5.
  • Whether the loopback count reaches the threshold refers to whether the feedback loopback count has reached a preset value. If the value of the loopback count reaches a threshold, the feedback reaches a preset threshold.
  • FIG. 7 is a schematic diagram of another parameter page of a network device according to an embodiment of the present invention. Among them, on the interface of the terminal connected to the router, the loopback count feedback value is displayed as 5. The user can choose "OK” or "Cancel”.
  • FIG. 8 is a schematic diagram of another parameter page of a network device according to an embodiment of the present invention.
  • the interface of the terminal connected to the router displays whether the loopback count reaches a threshold. If the count reaches 10 and the loopback count threshold is 10, the loopback count reaches the threshold 10. At this time, the user can select "OK", which means that the loopback count reaches the threshold. When the value of the loopback count does not reach the threshold of the loopback count, the user can also select "Cancel".
  • first”, “second”, and the like may be used to describe various electronic devices in the above embodiments, these electronic devices should not be limited by these terms. These terms are only used to distinguish one electronic device from another.
  • the first electronic device may be named the second electronic device, and similarly, the second electronic device may also be named the first electronic device without departing from the scope of the embodiments of the present application.
  • the term “if” can be interpreted as meaning “when” or “after” or “responding to determining " or “responding to detecting " depending on the context.
  • the phrases “if determined ! or “if detected (the stated condition or event)” can be interpreted to mean “when determined ! or “in response to a determination ! or “on detection (Statement or event stated) “or” in response to detection (statement or event stated) ".
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, a computer, a cloud server, or data
  • the center transmits to another website site, computer, cloud server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a cloud server, a data center, or the like that includes one or more available medium integrations.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk).

Abstract

Disclosed in the present invention is a broadcast storm prevention method, comprising: a network device receives a broadcast message; the network device determines whether the broadcast message is repeatedly received; if the broadcast message is repeatedly received, the network device determines whether a reception time difference of the broadcast message, compared with the broadcast message received last time, is less than a threshold value, and determines whether the number of times of receiving the broadcast message is greater than the threshold value; and if the reception time difference of the broadcast message, compared with the broadcast message received last time, is less than the threshold value, and the number of times of receiving the broadcast message is greater than the threshold value, the network device discards the broadcast message. The broadcast storm is prevented in the case that a networking structure between routes and a broadcast packet delivered between the routes are not changed.

Description

一种避免广播风暴的方法和装置Method and device for avoiding broadcast storm 技术领域Technical field
本发明涉及通信领域,尤其涉及一种避免广播风暴的方法和装置。The present invention relates to the field of communications, and in particular, to a method and device for avoiding broadcast storms.
背景技术Background technique
目前组网技术越来越复杂,组网成环的概率较大。而环回组网会引起广播风暴,导致整个网络瘫痪。At present, the networking technology is becoming more and more complicated, and the probability of network looping is greater. The loopback networking will cause a broadcast storm, which will bring down the entire network.
现有技术中有两种方式来避免广播风暴:There are two ways to avoid broadcast storms in the prior art:
第一种方式,通过生成树协议STP破除环路,使整个网络保持一个树状组网。The first method is to break the loop through the spanning tree protocol STP, so that the entire network maintains a tree-like network.
第二种方式,通过广播包中的特殊标记或者序号来确认是否是重复的广播包,如果是重复的广播包就丢弃该重复的广播包。The second method is to determine whether the broadcast packet is a duplicate broadcast packet by using a special mark or sequence number in the broadcast packet. If the broadcast packet is a duplicate broadcast packet, the duplicate broadcast packet is discarded.
但是上述现有技术的不足在于,STP技术无法保持组网方式为网状组网,在路由的选路上无法做到最优路径。而通过序号对广播包去重,需要对广播包进行改造,无法适用于用以太网的报文格式传输广播包。However, the shortcomings of the foregoing prior arts are that the STP technology cannot maintain the networking mode as a mesh networking, and the optimal path cannot be achieved during route selection. Deduplication of broadcast packets by sequence numbers requires modification of the broadcast packets, which is not suitable for transmitting broadcast packets using the Ethernet message format.
发明内容Summary of the Invention
本发明实施例提供一种避免广播风暴的方法和装置,在不改变路由之间的组网结构和不改变路由之间传递的广播包的情况下,避免广播风暴。Embodiments of the present invention provide a method and device for avoiding broadcast storms, and avoid broadcast storms without changing a network structure between routes and broadcasting packets transmitted between routes.
第一方面,本发明实施例提供了一种避免广播风暴的方法,包括:网络设备接收广播报文;所述网络设备判断所述广播报文是否为重复接收;若所述广播报文为重复接收,所述网络设备判断所述广播报文和上一次收到的所述广播报文相比,接收的时间差是否小于阈值,以及判断所述广播报文收到的次数是否大于阈值;若所述广播报文和上一次收到的所述广播报文相比,接收的时间差小于阈值,以及所述广播报文收到的次数大于阈值,则所述网络设备丢弃所述广播报文。In a first aspect, an embodiment of the present invention provides a method for avoiding a broadcast storm, which includes: a network device receives a broadcast message; the network device determines whether the broadcast message is received repeatedly; if the broadcast message is repeated When receiving, the network device determines whether the time difference between the broadcast message and the last received broadcast message is less than a threshold, and determines whether the number of times the broadcast message is received is greater than the threshold; if When the broadcast message is compared with the last received broadcast message, the received time difference is less than a threshold, and the number of times that the broadcast message is received is greater than the threshold, the network device discards the broadcast message.
结合第一方面,在第一方面的第一种可实现方式中,所述判断所述广播报文是否为重复接收,包括:所述网络设备判断接收到的所述广播报文的源媒体存取控制MAC地址是否为所述网络设备的MAC地址,如果所述广播报文的MAC地址是所述网络设备的MAC地址,则所述广播报文为重复接收。With reference to the first aspect, in a first implementable manner of the first aspect, the determining whether the broadcast message is repeatedly received includes: the network device determining whether a source media of the received broadcast message is stored. Whether the control MAC address is the MAC address of the network device, and if the MAC address of the broadcast message is the MAC address of the network device, the broadcast message is repeatedly received.
结合第一方面,在第一方面的第二种可实现方式中,所述判断所述广播报文是否为重复接收,包括:With reference to the first aspect, in a second implementable manner of the first aspect, the determining whether the broadcast packet is repeatedly received includes:
判断所述网络设备中是否有所述广播报文的内容,若所述网络设备中有所述广播报文的内容,则所述广播报文为重复接收;如果所述广播或组播报文内容记录表中没有所述广播报文,则所述广播报文不是重复接收,并记录该广播或组播包的报文内容。结合第一方面的第二种可实现方式在第一方面的第四种可实现方式中,所述广播或组播报文内容记录表包括:广播或组播报文的源MAC地址,广播或组播报文的内容,最近一次接收广播或组播报文的时间,接收广播或组播报文的次数。Determine whether the content of the broadcast message exists in the network device, and if the content of the broadcast message exists in the network device, the broadcast message is received repeatedly; if the broadcast or multicast message If the broadcast message is not included in the content record table, the broadcast message is not repeatedly received, and the message content of the broadcast or multicast packet is recorded. In combination with the second implementable manner of the first aspect, in a fourth implementable manner of the first aspect, the broadcast or multicast packet content record table includes: a source or MAC address of the broadcast or multicast packet, The content of the multicast message, the time when the last broadcast or multicast message was received, and the number of times the broadcast or multicast message was received.
在一种可能的实现方式中,所述广播或组播报文内容记录表定时老化。第二方面,本发明实施例提供一种网络设备,包括:接收器,用于接收广播报文;处理器,用于判断所述广播报文是否为重复接收;若所述广播报文为重复接收,判断所述广播报文和上一次收到的所述广播报文相比,接收的时间差是否小于阈值,以及判断所述广播报文收到的次数是否大于阈值;所述处理器,还用于当所述广播报文和上一次收到的所述广播报文相比,接收的时间差小于阈值,以及所述广播报文收到的次数大于阈值时,丢弃所述广播报文。In a possible implementation manner, the broadcast or multicast message content record table is periodically aged. In a second aspect, an embodiment of the present invention provides a network device, including: a receiver for receiving a broadcast message; a processor for determining whether the broadcast message is received repeatedly; if the broadcast message is repeated Receiving, determining whether the time difference between the broadcast message and the last received broadcast message is less than a threshold, and determining whether the number of times the broadcast message is received is greater than the threshold; the processor, further, It is used to discard the broadcast message when the time difference between the broadcast message and the last received broadcast message is less than a threshold, and the number of times the broadcast message is received is greater than the threshold.
结合第二方面,第二方面的第一种可实现方式中,所述处理器用于判断所述广播报文是否为重复接收,包括:With reference to the second aspect, in a first implementable manner of the second aspect, the processor is configured to determine whether the broadcast packet is repeatedly received, including:
所述处理器用于判断接收到的所述广播报文的源媒体存取控制MAC地址是否为所述网络设备的MAC地址,如果所述广播报文的MAC地址是所述网络设备的MAC地址,则所述广播报文为重复接收。The processor is configured to determine whether the source media access control MAC address of the received broadcast message is the MAC address of the network device, and if the MAC address of the broadcast message is the MAC address of the network device, Then the broadcast message is received repeatedly.
结合第二方面,第二方面的第二种可实现方式中,所述处理器用于判断所述网络设备中是否有所述广播报文的内容,若所述网络设备中有所述广播报文的内容,则所述广播报文为重复接收;如果所述广播或组播报文内容记录表中没有所述广播报文,则所述广播报文不是重复接收,并通知存储器记录该广播或组播包的报文内容;所述网络设备还包括:所述存储器,用于记录所述广播报文的内容。With reference to the second aspect, in a second implementable manner of the second aspect, the processor is configured to determine whether the network device has the content of the broadcast message, and if the network device has the broadcast message The broadcast message is received repeatedly; if the broadcast message is not included in the broadcast or multicast message content record table, the broadcast message is not received repeatedly, and the memory is notified to record the broadcast or Message content of a multicast packet; the network device further includes: the memory, which is used to record the content of the broadcast message.
在一种可能的实现方式中,所述广播或组播报文内容记录表包括:广播或组播报文的源MAC地址,广播或组播报文的内容,最近一次接收广播或组播报文的时间,接收广播或组播报文的次数。In a possible implementation manner, the broadcast or multicast message content record table includes: a source MAC address of the broadcast or multicast message, a content of the broadcast or multicast message, and a broadcast or multicast message received most recently. The time of the message, the number of times a broadcast or multicast message was received.
在一种可能的实现方式中,所述广播或组播报文内容记录表定时老化。In a possible implementation manner, the broadcast or multicast message content record table is periodically aged.
通过上述实施例,在不改变路由之间的组网结构和不改变路由之间传递的广播包的情况下,避免广播风暴。Through the above embodiments, broadcast storms are avoided without changing the networking structure between the routes and without changing the broadcast packets transmitted between the routes.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。In order to explain the technical solutions in the embodiments of the present invention or the prior art more clearly, the drawings used in the embodiments or the description of the prior art will be briefly introduced below.
图1是本发明实施例中的网络设备的系统组网图;FIG. 1 is a system networking diagram of a network device in an embodiment of the present invention;
图2是本发明实施例中的避免广播风暴的方法流程图;2 is a flowchart of a method for avoiding a broadcast storm in an embodiment of the present invention;
图3是本发明实施例中的另一避免广播风暴的方法流程图;3 is a flowchart of another method for avoiding a broadcast storm according to an embodiment of the present invention;
图4是本发明实施例中的网络设备的结构示意图;4 is a schematic structural diagram of a network device according to an embodiment of the present invention;
图5是本发明实施例中的网络设备的另一结构示意图;FIG. 5 is another schematic structural diagram of a network device according to an embodiment of the present invention; FIG.
图6是本发明实施例中网络设备的参数页面示意图;6 is a schematic diagram of a parameter page of a network device according to an embodiment of the present invention;
图7是本发明实施例中网络设备的参数页面的另一示意图;7 is another schematic diagram of a parameter page of a network device according to an embodiment of the present invention;
图8是本发明实施例中网络设备的参数页面的又一示意图。FIG. 8 is another schematic diagram of a parameter page of a network device according to an embodiment of the present invention.
具体实施方式detailed description
为确认本发明的目的、技术方案和优点更加清楚,下面结合附图对本发明实施例作 进一步的详细描述。In order to confirm the purpose, technical solution and advantages of the present invention, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
如图1所示的系统中,主路由器A、从路由器B、从路由器C和从路由器D组成一个局域网。在该局域网中,由主路由器A通过有线或无线的方式连接到因特网。主路由器A、从路由器B、从路由器C和从路由器D各自可通过有线或无线的方式连接一个或多个终端设备。其中,主路由器A和从路由器B、从路由器C和从路由器D之间的区别在于,主路由器用于接入WAN侧的因特网(Internet)和实现LAN侧的路由,从路由器仅用于实现LAN侧的路由。该局域网中的主路由器和各从路由器可以用有线的方式相连。当至少四个路由器在组网时,其中的至少三个路由器的组网方式可能为环状组网。成环的组网方式有一定的好处,比如选择传输通路时的选择较多。比如如图1的组网方式中,从主路由器A到从路由器D的路由中,可以走由主路由器A、从路由器B和从路由器C组成的环左侧的主路由器A到从路由器B到从路由器C,再到从路由器D。也可以走右侧的主路由器A到从路由器C,再到从路由器D。还例如,由从路由器C出发,到从路由器B,可以走由从路由器C到主路由器A,再到从路由器B的路径。也可以直接由从路由器C出发,不经由主路由器A,到达从路由器B。这样就会造成同一广播报文重复传输到同一目的路由器。因此,当网络中存在环路,就会造成每一帧都在网络中重复传播,引起广播风暴。In the system shown in FIG. 1, the master router A, the slave router B, the slave router C, and the slave router D form a local area network. In this local area network, the main router A is connected to the Internet in a wired or wireless manner. Each of the master router A, the slave router B, the slave router C, and the slave router D can be connected to one or more terminal devices in a wired or wireless manner. The difference between master router A and slave router B, slave router C, and slave router D is that the master router is used to access the Internet on the WAN side and to implement LAN-side routing, and the slave router is only used to implement LAN Routing on the side. The master router and the slave routers in the LAN can be connected in a wired manner. When at least four routers are in a network, the networking mode of at least three of them may be a ring network. The looped networking mode has certain advantages, such as more choices when selecting transmission paths. For example, in the networking method shown in Figure 1, the route from master router A to slave router D can take the master router A on the left side of the ring consisting of master router A, slave router B, and slave router C to slave router B to From Router C to Router D. You can also go from the master router A on the right to slave router C, and then to slave router D. For another example, starting from router C to slave router B, you can follow the path from router C to master router A, and then to slave router B. It can also start directly from slave router C and reach slave router B without going through master router A. This will cause the same broadcast packet to be repeatedly transmitted to the same destination router. Therefore, when there is a loop in the network, each frame will be repeatedly transmitted in the network, causing a broadcast storm.
本发明实施例的技术方案,能够在不改变路由之间的组网结构和不改变路由之间传递的广播包的情况下,避免广播风暴。The technical solution of the embodiment of the present invention can avoid a broadcast storm without changing the networking structure between the routes and the broadcast packets transmitted between the routes.
如图2是本发明实施例中的避免广播风暴的方法流程图。以下步骤的执行主体可以为路由器、基站、DSLAM(数字用户线路接入复用器,Digital Subscriber Line Access Multiplexer)、交换机、和DSL(数字用户线路,Digital Subscriber Line)网关。本发明实施例中以路由器为例说明。FIG. 2 is a flowchart of a method for avoiding a broadcast storm in an embodiment of the present invention. The following steps may be performed by a router, a base station, a DSLAM (Digital Subscriber Line Access Multiplexer, Digital Subscriber Line Access Multiplexer), a switch, and a DSL (Digital Subscriber Line) gateway. In the embodiment of the present invention, a router is used as an example for illustration.
步骤S201,路由器接收到组播或广播报文。Step S201: The router receives a multicast or broadcast message.
步骤S202,路由器判断是否首次收到该组播或广播报文。当判断为首次收到该组播或广播报文时,进入步骤S204。当判断为不是首次收到该组播或广播报文时,进入步骤S203。具体的,如果接收到的广播或组播报文的源MAC(媒体存取控制,Media Access Control)地址为本路由器的MAC地址,说明该报文是本设备发送的,可以标识为已经接收过该报文。Step S202: The router determines whether the multicast or broadcast message is received for the first time. When it is determined that the multicast or broadcast message is received for the first time, it proceeds to step S204. When it is determined that the multicast or broadcast message is not received for the first time, the process proceeds to step S203. Specifically, if the source MAC (Media Access Control) address of the received broadcast or multicast message is the MAC address of the router, it indicates that the message was sent by the device and can be identified as having been received The message.
或者,可选的,接收到广播或组播报文后,查询广播或组播报文内容记录表,如果记录表中有该报文内容,说明已经发送过该报文;如果记录表中没有该报文,说明没有发送过该报文,同时记录该广播或组播包的报文内容。Alternatively, optionally, after receiving a broadcast or multicast message, query the broadcast or multicast message content record table. If the message content exists in the record table, it indicates that the message has been sent; if there is no record in the record table, The message indicates that the message has not been sent, and the message content of the broadcast or multicast packet is recorded.
其中,广播或组播报文内容记录表,包括如下表项:广播或组播源MAC地址,报文内容,最近一次接收报文时间,接收报文次数。The broadcast or multicast message content record table includes the following entries: the broadcast or multicast source MAC address, the message content, the time of the last received message, and the number of received messages.
Figure PCTCN2018105623-appb-000001
Figure PCTCN2018105623-appb-000001
Figure PCTCN2018105623-appb-000002
Figure PCTCN2018105623-appb-000002
为了避免正常发送的广播或组网报文被丢弃掉,可以设定上述广播或组播报文内容记录表1s定时老化(清除)。In order to avoid the broadcast or networking messages that are normally sent from being discarded, the above-mentioned broadcast or multicast message content record table may be set to age (clear) periodically.
步骤S203,路由器将收到的报文和上次收到的该报文相比,判断时间差是否小于阈值。当时间差小于阈值时,进入步骤S206。当时间差大于或等于阈值时,进入步骤S205。In step S203, the router compares the received message with the last received message to determine whether the time difference is less than a threshold. When the time difference is less than the threshold, the process proceeds to step S206. When the time difference is greater than or equal to the threshold, the process proceeds to step S205.
步骤S204,路由器记录该报文的内容和接收时间。In step S204, the router records the content and reception time of the message.
步骤S205,路由器判断收到该报文的次数是否大于阈值,如果路由器判断收到该报文的次数大于阈值,进入步骤S206。路由器判断收到该报文的次数小于或等于阈值,进入步骤S207。In step S205, the router determines whether the number of times the packet is received is greater than the threshold. If the router determines that the number of times the packet is received is greater than the threshold, the process proceeds to step S206. The router determines that the number of times the packet is received is less than or equal to the threshold, and proceeds to step S207.
步骤S206,路由器将该报文丢弃。Step S206: The router discards the message.
步骤S207,路由器记录该报文的接收次数。In step S207, the router records the number of times the message is received.
步骤S208,路由器转发该报文。Step S208: The router forwards the message.
本发明实施例中,当判断接收到重复的报文后,通过进一步判断跟上次接收到该报文相比,时间差是否小于阈值,以及进一步判断收到该报文的次数是否大于阈值,从而确定是转发该报文还是丢弃该报文。从而保证该报文不在环状网络中无限次转发,从而不会造成广播风暴。与现有技术中的需要破除环的方式和修改报文结构的方式相比,本发明实施例的方法能保证路由器连接的拓扑结构不改变,以及保证在路由器之间传递的报文的结构也不改变。In the embodiment of the present invention, after judging that a duplicate message is received, it is further judged whether the time difference is smaller than a threshold compared with the last message received, and whether the number of times the message is received is greater than the threshold, thereby Determine whether to forward or discard the message. This ensures that the packet is not forwarded indefinitely on the ring network, which will not cause a broadcast storm. Compared with the method in the prior art that needs to break the ring and modify the message structure, the method of the embodiment of the present invention can ensure that the topology structure of the router connection does not change, and that the structure of the message transmitted between the routers is also unchanged. not changing.
如图3是本发明实施例中的避免广播风暴的另一方法流程图。FIG. 3 is a flowchart of another method for avoiding a broadcast storm in an embodiment of the present invention.
步骤S301,路由器接收到组播或广播报文。Step S301: The router receives a multicast or broadcast message.
步骤S302,路由器判断是否首次收到该组播或广播报文。当判断为首次收到该组播或广播报文时,进入步骤S304。当判断为不是首次收到该组播或广播报文时,进入步骤S303。具体的,如果接收到的广播或组播报文的源MAC(媒体存取控制,Media Access Control)地址为本路由器的MAC地址,说明该报文是本设备发送的,可以标识为已经接收过该报文。或者,Step S302: The router determines whether the multicast or broadcast message is received for the first time. When it is determined that the multicast or broadcast message is received for the first time, it proceeds to step S304. When it is determined that the multicast or broadcast message is not received for the first time, the process proceeds to step S303. Specifically, if the source MAC (Media Access Control) address of the received broadcast or multicast message is the MAC address of the router, it indicates that the message was sent by the device and can be identified as having been received. The message. or,
具体的,接收到广播或组播报文后,查询广播或组播报文内容记录表,如果记录表中有该报文内容,说明已经发送过该报文;如果记录表中没有该报文,说明没有发送过该报文,同时记录该广播或组播包的报文内容。Specifically, after receiving a broadcast or multicast message, query the broadcast or multicast message content record table. If the message content exists in the record table, it indicates that the message has been sent; if the message does not exist in the record table, , Indicating that the message has not been sent, while recording the message content of the broadcast or multicast packet.
其中,广播或组播报文内容记录表,包括如下表项:广播或组播源MAC地址,报文内容,最近一次接收报文时间,接收报文次数。The broadcast or multicast message content record table includes the following entries: the broadcast or multicast source MAC address, the message content, the time of the last received message, and the number of received messages.
Figure PCTCN2018105623-appb-000003
Figure PCTCN2018105623-appb-000003
Figure PCTCN2018105623-appb-000004
Figure PCTCN2018105623-appb-000004
为了避免正常发送的广播或组网报文被丢弃掉,可以设定上述广播或组播报文内容记录表1秒定时老化(清除)。In order to prevent the broadcast or networking messages sent normally from being discarded, the above-mentioned broadcast or multicast message content record table may be set to age (clear) at 1 second timing.
步骤S303,路由器判断收到该报文的次数是否大于阈值,如果路由器判断收到该报文的次数大于阈值,进入步骤S306。如果路由器判断收到该报文的次数小于或等于阈值,进入步骤S305。In step S303, the router determines whether the number of times the message is received is greater than the threshold. If the router determines that the number of times the message is received is greater than the threshold, the process proceeds to step S306. If the router determines that the number of times the packet is received is less than or equal to the threshold, it proceeds to step S305.
步骤S304,路由器记录该报文的内容和接收时间。In step S304, the router records the content and reception time of the message.
步骤S305,路由器将收到的报文和上次收到的该报文相比,判断时间差是否小于阈值。当时间差小于阈值时,进入步骤S306。当路由器判断时间差大于或等于阈值时,进入步骤S307。In step S305, the router compares the received message with the last received message to determine whether the time difference is less than a threshold. When the time difference is less than the threshold, the process proceeds to step S306. When the router determines that the time difference is greater than or equal to the threshold, it proceeds to step S307.
步骤S306,路由器将该报文丢弃。Step S306: The router discards the message.
步骤S307,路由器记录该报文的接收次数。Step S307: The router records the number of times the message is received.
步骤S308,路由器转发该报文。Step S308: The router forwards the message.
本发明实施例中,当判断接收到重复的报文后,通过进一步判断收到该报文的次数是否大于阈值,以及进一步判断跟上次接收到该报文相比,时间差是否小于阈值,从而确定是转发该报文还是丢弃该报文。从而保证该报文不在环状网络中无限次转发,从而不会造成广播风暴。与现有技术中的需要破除环的方式和修改报文结构的方式相比,本发明实施例的方法能保证路由器连接的拓扑结构不改变,以及保证在路由器之间传递的报文的结构也不改变。In the embodiment of the present invention, after judging that a duplicate message is received, it is further judged whether the number of times that the message is received is greater than a threshold value, and whether the time difference is smaller than the threshold value compared with the last time the message is received, so that Determine whether to forward or discard the message. This ensures that the packet is not forwarded indefinitely on the ring network, which will not cause a broadcast storm. Compared with the method in the prior art that needs to break the ring and modify the message structure, the method of the embodiment of the present invention can ensure that the topology structure of the router connection does not change, and that the structure of the message transmitted between the routers is also unchanged. not changing.
如图4是本发明实施例中的网络设备的结构示意图。本发明实施例中,将以路由器作为网络设备的举例来说明。如图4所示的路由器中,包括处理器480,为处理器供电的电源490,和处理器480相连的内部存储器420,和处理器480相连的USB接口410,和处理器480相连的以太网接口440,以及,和处理器480相连的WiFi模块470。以下将详细介绍各个模块的作用。FIG. 4 is a schematic structural diagram of a network device in an embodiment of the present invention. In the embodiment of the present invention, a router is used as an example for description of a network device. The router shown in FIG. 4 includes a processor 480, a power supply 490 for supplying power to the processor, an internal memory 420 connected to the processor 480, a USB interface 410 connected to the processor 480, and an Ethernet connected to the processor 480. An interface 440, and a WiFi module 470 connected to the processor 480. The role of each module will be described in detail below.
处理器480是路由器400的控制中心,利用各种接口和线路连接路由器400的各个部分,通过运行或执行存储在内部存储器420内的应用程序,以及调用存储在内部存储器420内的数据,执行路由器400的各种功能和处理数据。在一些实施例中,处理器480可包括一个或多个处理单元;处理器480还可以集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器480中。The processor 480 is the control center of the router 400, and uses various interfaces and lines to connect various parts of the router 400, and executes the router by running or executing application programs stored in the internal memory 420, and calling data stored in the internal memory 420. 400 various functions and processing data. In some embodiments, the processor 480 may include one or more processing units; the processor 480 may further integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and an application program, etc. The modem processor mainly handles wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 480.
存储器420用于存储应用程序以及数据,处理器480通过运行存储在存储器420的应用程序以及数据,执行路由器400的各种功能以及数据处理。存储器420主要包括存储程序区以及存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可以存储根据使用路由器400时所创建的数据。此外,存储器420可以包括高速随机存取存储器,还可以包括非易失存储器,例如磁盘存储器件、闪存器件或其他易失性固态存储器件等。存储器420可以存储各种操作系统,如linux操作系 统。具体的,存储器420可以存储上一次收到的报文内容和广播或组播报文内容记录表。The memory 420 is used to store application programs and data, and the processor 480 executes various functions and data processing of the router 400 by running the application programs and data stored in the memory 420. The memory 420 mainly includes a storage program area and a storage data area, where the storage program area can store an operating system and application programs required for at least one function; the storage data area can store data created according to the use of the router 400. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as a magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. The memory 420 may store various operating systems, such as a Linux operating system. Specifically, the memory 420 may store a content table of the last received message and a broadcast or multicast message content record table.
USB接口410用于将处理器480和USB外设连接,提供USB标准相关的服务。The USB interface 410 is used to connect the processor 480 and a USB peripheral device, and provides services related to the USB standard.
以太网接口440用于提供有线接口,连接上行和/或下行的以太网线。当该以太网接口440连接上行以太网线时,该以太网接口为上行以太网接口。当该以太网接口440连接下行以太网线时,该以太网接口为下行以太网接口。The Ethernet interface 440 is used to provide a wired interface to connect uplink and / or downlink Ethernet lines. When the Ethernet interface 440 is connected to an uplink Ethernet line, the Ethernet interface is an uplink Ethernet interface. When the Ethernet interface 440 is connected to a downlink Ethernet line, the Ethernet interface is a downlink Ethernet interface.
WiFi模块470用于提供下行的WiFi无线连接的接口。该WiFi无线连接的接口为下行接口。The WiFi module 470 is configured to provide an interface for downlink WiFi wireless connection. The interface of the WiFi wireless connection is a downlink interface.
此处的上行是指从终端设备到网络设备。此处的下行是指从网络设备到终端设备。Upstream here means from the terminal equipment to the network equipment. The downlink here refers to the network equipment to the terminal equipment.
本申请实施例提供了一种网络设备,如图5所示,该网络设备130可以包括处理器1301、Wi-Fi装置1303、电源装置1305及存储器1302,该网络设备130的上述各个部分可以通过一根或多根通信总线1304连接。可以理解的是,尽管图13未示出,该电子设备130还可以包括USB接口等,在此不再赘述。An embodiment of the present application provides a network device. As shown in FIG. 5, the network device 130 may include a processor 1301, a Wi-Fi device 1303, a power supply device 1305, and a memory 1302. The foregoing parts of the network device 130 may be obtained through One or more communication buses 1304 are connected. It can be understood that, although not shown in FIG. 13, the electronic device 130 may further include a USB interface and the like, and details are not described herein again.
上述图4中的网络设备中的处理器480和图5中的网络设备中的处理器1301用于执行上述如图2和图3中的方法实施例中的步骤,此处不再赘述。The processor 480 in the network device in FIG. 4 and the processor 1301 in the network device in FIG. 5 are used to execute the steps in the method embodiments shown in FIG. 2 and FIG. 3, which are not described herein again.
图6是本发明实施例中网络设备的参数页面示意图。具体的,网络设备通过与之连接的终端设备上运行的应用程序APP呈现网络设备的参数页面。6 is a schematic diagram of a parameter page of a network device according to an embodiment of the present invention. Specifically, the network device presents a parameter page of the network device through an application APP running on the terminal device connected to the network device.
例如,该APP上有环回计数的选项。点开“环回计数”的标签后,进入图6右边的界面。图6的右边的界面包括如下几个选项:是否开启环回计数,环回计数是否反馈,环回计数是否达到阈值。For example, the app has a loopback counting option. After opening the "Loopback Count" tab, enter the interface on the right in Figure 6. The interface on the right side of Figure 6 includes the following options: whether to enable loopback counting, whether the loopback count is feedback, and whether the loopback count has reached a threshold.
其中,是否开启环回计数是指该路由器是否开启环回计数。如果开启环回计数,则路由器则开启环回计数的功能。比如现在右图中,为已经开启环回计数的功能。Among them, whether the loopback counting is enabled refers to whether the router has the loopback counting enabled. If loopback counting is enabled, the router will enable loopback counting. For example, in the figure on the right, the loopback counting function is enabled.
环回计数是否反馈,是指是否反馈环回计数的数值。例如,重复的数据包有5个,是否反馈环回计数为5。Whether the loopback count is feedback refers to whether the loopback count value is fed back. For example, if there are 5 duplicate packets, the feedback loopback count is 5.
环回计数是否达到阈值,是指反馈环回计数是否达到预设的数值。如果环回计数的数值达到阈值,则反馈达到预设的阈值。Whether the loopback count reaches the threshold refers to whether the feedback loopback count has reached a preset value. If the value of the loopback count reaches a threshold, the feedback reaches a preset threshold.
图7是本发明实施例中网络设备的另一参数页面示意图。其中,在与路由器相连的终端的界面上,显示环回计数反馈的数值为5。用户可以选择“确定”或“取消”。7 is a schematic diagram of another parameter page of a network device according to an embodiment of the present invention. Among them, on the interface of the terminal connected to the router, the loopback count feedback value is displayed as 5. The user can choose "OK" or "Cancel".
图8是本发明实施例中网络设备的又一参数页面示意图。其中,在与路由器相连的终端的界面上,显示是否环回计数达到阈值。如果计数达到10,并且环回计数的阈值为10,则环回计数就到达阈值10。这时,用户可以选择“确定”,表示环回计数达到阈值。当环回计数的数值没有到达环回计数的阈值时,用户也可以选择“取消”。8 is a schematic diagram of another parameter page of a network device according to an embodiment of the present invention. The interface of the terminal connected to the router displays whether the loopback count reaches a threshold. If the count reaches 10 and the loopback count threshold is 10, the loopback count reaches the threshold 10. At this time, the user can select "OK", which means that the loopback count reaches the threshold. When the value of the loopback count does not reach the threshold of the loopback count, the user can also select "Cancel".
使用图6到图8的界面,将更容易使得用户能够参与网络设备的环回计数参数设定,使得环回计数的参数设定更容易。Using the interfaces of FIG. 6 to FIG. 8 will make it easier for the user to participate in the loopback counting parameter setting of the network device, and make the parameter setting of the loopback counting easier.
应当理解的是,虽然术语“第一”、“第二”等可能在上述实施例中用来描述各种电子设备,但是这些电子设备不应当被这些术语限定。这些术语只是用来将一个电子设备与另一电子设备区分开。例如,第一电子设备可以被命名为第二电子设备,类似地,第二电子设备也可以被命名为第一电子设备,而不背离本申请实施例的范围。It should be understood that although the terms “first”, “second”, and the like may be used to describe various electronic devices in the above embodiments, these electronic devices should not be limited by these terms. These terms are only used to distinguish one electronic device from another. For example, the first electronic device may be named the second electronic device, and similarly, the second electronic device may also be named the first electronic device without departing from the scope of the embodiments of the present application.
如上述实施例中所用,根据上下文,术语“如果”可以被解释为意思是“当…时”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语 “如果确定…”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“在确定…时”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。As used in the above embodiments, the term "if" can be interpreted as meaning "when" or "after" or "responding to determining ..." or "responding to detecting ..." depending on the context. Similarly, depending on the context, the phrases "if determined ..." or "if detected (the stated condition or event)" can be interpreted to mean "when determined ..." or "in response to a determination ..." or "on detection (Statement or event stated) "or" in response to detection (statement or event stated) ".
在上述实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在上述实施例和权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in the above embodiments is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms "a," "the," and "the" used in the foregoing embodiments and claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、云服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、云服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的云服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present invention are wholly or partially generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, a computer, a cloud server, or data The center transmits to another website site, computer, cloud server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a cloud server, a data center, or the like that includes one or more available medium integrations. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk).
为了解释的目的,前面的描述是通过参考具体实施例来进行描述的。然而,上面的示例性的讨论并非意图是详尽的,也并非意图要将上述技术方案限制到所公开的精确形式。根据以上教导内容,很多修改形式和变型形式都是可能的。选择和描述实施例是为了充分阐明本技术方案的原理及其实际应用,以由此使得本领域的其他技术人员能够充分利用具有适合于所构想的特定用途的各种修改的技术方案以及各种实施例。For the purpose of explanation, the foregoing description is described by referring to specific embodiments. However, the above exemplary discussion is not intended to be exhaustive, nor is it intended to limit the above technical solutions to the precise forms disclosed. Based on the above teachings, many modifications and variations are possible. The embodiments were chosen and described in order to fully explain the principles of the technical solution and its practical application, thereby enabling others skilled in the art to make full use of the technical solution with various modifications suitable for the specific purpose envisaged and various Examples.

Claims (10)

  1. 一种避免广播风暴的方法,其特征在于,包括:A method for avoiding broadcast storms, comprising:
    网络设备接收广播报文;A network device receives a broadcast message;
    所述网络设备判断所述广播报文是否为重复接收;Determining, by the network device, whether the broadcast message is repeatedly received;
    若所述广播报文为重复接收,所述网络设备判断所述广播报文和上一次收到的所述广播报文相比,接收的时间差是否小于阈值,以及判断所述广播报文收到的次数是否大于阈值;If the broadcast message is repeatedly received, the network device determines whether the time difference between the broadcast message and the last received broadcast message is less than a threshold, and determines whether the broadcast message is received. Whether the number of times is greater than the threshold;
    若所述广播报文和上一次收到的所述广播报文相比,接收的时间差小于阈值,以及所述广播报文收到的次数大于阈值,则所述网络设备丢弃所述广播报文。If the time difference between the broadcast message and the last received broadcast message is less than a threshold, and the number of times the broadcast message is received is greater than the threshold, the network device discards the broadcast message. .
  2. 根据权利要求1所述的方法,其特征在于,所述判断所述广播报文是否为重复接收,包括:The method according to claim 1, wherein the determining whether the broadcast message is received repeatedly comprises:
    所述网络设备判断接收到的所述广播报文的源媒体存取控制MAC地址是否为所述网络设备的MAC地址,如果所述广播报文的MAC地址是所述网络设备的MAC地址,则所述广播报文为重复接收。Determining, by the network device, whether the source MAC address of the received broadcast message is the MAC address of the network device, and if the MAC address of the broadcast message is the MAC address of the network device, The broadcast message is received repeatedly.
  3. 根据权利要求1所述的方法,其特征在于,所述判断所述广播报文是否为重复接收,包括:The method according to claim 1, wherein the determining whether the broadcast message is received repeatedly comprises:
    判断所述网络设备中是否有所述广播报文的内容,若所述网络设备中有所述广播报文的内容,则所述广播报文为重复接收;如果所述广播或组播报文内容记录表中没有所述广播报文,则所述广播报文不是重复接收,并记录该广播或组播包的报文内容。Determine whether the content of the broadcast message exists in the network device, and if the content of the broadcast message exists in the network device, the broadcast message is received repeatedly; if the broadcast or multicast message If the broadcast message is not included in the content record table, the broadcast message is not repeatedly received, and the message content of the broadcast or multicast packet is recorded.
  4. 根据权利要求3所述的方法,其特征在于,所述广播或组播报文内容记录表包括:The method according to claim 3, wherein the broadcast or multicast message content record table comprises:
    广播或组播报文的源MAC地址,广播或组播报文的内容,最近一次接收广播或组播报文的时间,接收广播或组播报文的次数。The source MAC address of the broadcast or multicast message, the content of the broadcast or multicast message, the last time the broadcast or multicast message was received, and the number of times the broadcast or multicast message was received.
  5. 根据权利要求3至4任一项所述的方法,其特征在于,所述广播或组播报文内容记录表定时老化。The method according to any one of claims 3 to 4, wherein the content recording table of the broadcast or multicast message is periodically aged.
  6. 一种网络设备,其特征在于,包括:A network device, comprising:
    接收器,用于接收广播报文;A receiver for receiving broadcast messages;
    处理器,用于判断所述广播报文是否为重复接收;若所述广播报文为重复接收,判断所述广播报文和上一次收到的所述广播报文相比,接收的时间差是否小于阈值,以及判断所述广播报文收到的次数是否大于阈值;A processor, configured to determine whether the broadcast message is repeatedly received; if the broadcast message is repeatedly received, determine whether a time difference between the broadcast message and the last received broadcast message is received; Less than the threshold, and determining whether the number of times the broadcast message is received is greater than the threshold;
    所述处理器,还用于当所述广播报文和上一次收到的所述广播报文相比,接收的时间差小于阈值,以及所述广播报文收到的次数大于阈值时,丢弃所述广播报文。The processor is further configured to discard the broadcast message when the time difference between the broadcast message and the last received broadcast message is less than a threshold, and the number of times that the broadcast message is received is greater than the threshold. Describe broadcast messages.
  7. 根据权利要求6所述的网络设备,其特征在于,所述处理器用于判断所述广播报文是否为重复接收,包括:The network device according to claim 6, wherein the processor is configured to determine whether the broadcast message is repeatedly received, comprising:
    所述处理器用于判断接收到的所述广播报文的源媒体存取控制MAC地址是否为所述网络设备的MAC地址,如果所述广播报文的MAC地址是所述网络设备的MAC地址,则所述广播报文为重复接收。The processor is configured to determine whether the source media access control MAC address of the received broadcast message is the MAC address of the network device, and if the MAC address of the broadcast message is the MAC address of the network device, Then the broadcast message is received repeatedly.
  8. 根据权利要求6所述的网络设备,其特征在于,所述处理器用于判断所述广播报文是否为重复接收,包括:The network device according to claim 6, wherein the processor is configured to determine whether the broadcast message is repeatedly received, comprising:
    所述处理器用于判断所述网络设备中是否有所述广播报文的内容,若所述网络设备 中有所述广播报文的内容,则所述广播报文为重复接收;如果所述广播或组播报文内容记录表中没有所述广播报文,则所述广播报文不是重复接收,并通知存储器记录该广播或组播包的报文内容;所述网络设备还包括:The processor is configured to determine whether there is content of the broadcast message in the network device, and if the content of the broadcast message is in the network device, the broadcast message is repeatedly received; if the broadcast is Or the broadcast message is not included in the multicast message content record table, the broadcast message is not repeatedly received, and the memory is notified to record the message content of the broadcast or multicast packet; the network device further includes:
    所述存储器,用于记录所述广播报文的内容。The memory is configured to record content of the broadcast message.
  9. 根据权利要求7所述的网络设备,其特征在于,所述广播或组播报文内容记录表包括:The network device according to claim 7, wherein the broadcast or multicast message content record table comprises:
    广播或组播报文的源MAC地址,广播或组播报文的内容,最近一次接收广播或组播报文的时间,接收广播或组播报文的次数。The source MAC address of the broadcast or multicast message, the content of the broadcast or multicast message, the last time the broadcast or multicast message was received, and the number of times the broadcast or multicast message was received.
  10. 根据权利要求6至9任一项所述的网络设备,其特征在于,所述广播或组播报文内容记录表定时老化。The network device according to any one of claims 6 to 9, wherein the content recording table of the broadcast or multicast message is periodically aged.
PCT/CN2018/105623 2018-09-14 2018-09-14 Broadcast storm prevention method and apparatus WO2020051862A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880097376.5A CN112673602B (en) 2018-09-14 2018-09-14 Method and device for avoiding broadcast storm
PCT/CN2018/105623 WO2020051862A1 (en) 2018-09-14 2018-09-14 Broadcast storm prevention method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/105623 WO2020051862A1 (en) 2018-09-14 2018-09-14 Broadcast storm prevention method and apparatus

Publications (1)

Publication Number Publication Date
WO2020051862A1 true WO2020051862A1 (en) 2020-03-19

Family

ID=69777228

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/105623 WO2020051862A1 (en) 2018-09-14 2018-09-14 Broadcast storm prevention method and apparatus

Country Status (2)

Country Link
CN (1) CN112673602B (en)
WO (1) WO2020051862A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887164A (en) * 2020-12-29 2021-06-01 中国船舶集团有限公司 Broadcast storm diagnosis method, apparatus and computer storage medium
CN113992566A (en) * 2021-10-26 2022-01-28 新华三信息安全技术有限公司 Message broadcasting method and device
CN114448858A (en) * 2020-10-16 2022-05-06 广州海格通信集团股份有限公司 Message broadcasting method, device, network equipment and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656448B (en) * 2021-08-09 2023-12-26 国家计算机网络与信息安全管理中心 Message processing method, device, equipment and readable storage medium
CN114301815B (en) * 2021-12-30 2024-03-15 山石网科通信技术股份有限公司 Method and device for processing broadcast storm

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105337966A (en) * 2015-10-16 2016-02-17 中国联合网络通信集团有限公司 Processing method for network attacks and device
CN106817237A (en) * 2015-12-01 2017-06-09 普天信息技术有限公司 One kind repeats alarming inhibiting method and device
CN107196804A (en) * 2017-06-01 2017-09-22 国网山东省电力公司信息通信公司 Power system terminal communication access network Centralized Alarm Monitoring system and method
CN107968765A (en) * 2016-10-19 2018-04-27 腾讯科技(深圳)有限公司 A kind of network inbreak detection method and server

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299719B (en) * 2008-06-04 2012-07-25 北京星网锐捷网络技术有限公司 Detection processing method for data flow, central processing unit and switch
CN101895446B (en) * 2010-08-11 2012-04-11 广东省电力调度中心 Detection method of broadcast storm and device thereof
CN102196365A (en) * 2011-04-25 2011-09-21 北京交通大学 Method and device for suppressing network broadcast storms
CN102215170B (en) * 2011-06-08 2017-02-08 中兴通讯股份有限公司 Method and processor for restraining Internet storm
CN103685009B (en) * 2012-08-31 2017-04-26 华为技术有限公司 Data packet processing method and system as well as controller
CN104378290B (en) * 2014-10-31 2017-07-11 北京盈进科技有限公司 A kind of message forwarding method and device
CN104753781B (en) * 2015-03-19 2018-05-29 西电通用电气自动化有限公司 A kind of network storm suppressing method of transformer station process layer equipment
TWI599204B (en) * 2016-01-28 2017-09-11 神雲科技股份有限公司 Method for Packet Filtering in Server and Baseboard Management Controller Using the Same
CN106789448A (en) * 2017-02-22 2017-05-31 许继集团有限公司 A kind of network storm method for quick and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105337966A (en) * 2015-10-16 2016-02-17 中国联合网络通信集团有限公司 Processing method for network attacks and device
CN106817237A (en) * 2015-12-01 2017-06-09 普天信息技术有限公司 One kind repeats alarming inhibiting method and device
CN107968765A (en) * 2016-10-19 2018-04-27 腾讯科技(深圳)有限公司 A kind of network inbreak detection method and server
CN107196804A (en) * 2017-06-01 2017-09-22 国网山东省电力公司信息通信公司 Power system terminal communication access network Centralized Alarm Monitoring system and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114448858A (en) * 2020-10-16 2022-05-06 广州海格通信集团股份有限公司 Message broadcasting method, device, network equipment and storage medium
CN114448858B (en) * 2020-10-16 2023-09-01 广州海格通信集团股份有限公司 Message broadcasting method, device, network equipment and storage medium
CN112887164A (en) * 2020-12-29 2021-06-01 中国船舶集团有限公司 Broadcast storm diagnosis method, apparatus and computer storage medium
CN112887164B (en) * 2020-12-29 2023-10-31 中国船舶集团有限公司 Broadcast storm diagnosis method, apparatus and computer storage medium
CN113992566A (en) * 2021-10-26 2022-01-28 新华三信息安全技术有限公司 Message broadcasting method and device

Also Published As

Publication number Publication date
CN112673602B (en) 2023-02-03
CN112673602A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
WO2020051862A1 (en) Broadcast storm prevention method and apparatus
EP3661137B1 (en) Packet control method and network device
US10171253B2 (en) Node directed multicast traffic management systems and methods for mesh networks
WO2019134383A1 (en) Method for controlling network congestion, access device, and computer readable storage medium
WO2016101646A1 (en) Access method and apparatus for ethernet virtual network
WO2017114153A1 (en) Service function chaining (sfc) communication method and device
US20120147747A1 (en) Priority aware mac flow control
WO2021233327A1 (en) Message processing method and apparatus, announcement method and apparatus, network bridge node, source device, storage medium, and message processing system
WO2018121535A1 (en) Load balance processing method and apparatus
EP4064622A1 (en) Method and apparatus for updating routing information, computer device, and storage medium
EP2775663B1 (en) Method and device for recovering customer service
WO2014169856A1 (en) Multicast communication method and aggregation switch
WO2021147377A1 (en) Multicast packet detection method, network device, and system
US9537764B2 (en) Communication apparatus, control apparatus, communication system, communication method, method for controlling communication apparatus, and program
WO2012146139A1 (en) Message filtering method and access device
CN108347384B (en) One-to-many data packet transmission method suitable for mesh network
WO2019174552A1 (en) Multicast route processing method, network device, and route reflector
WO2015180560A1 (en) Service router packet processing method and service node
WO2022042386A1 (en) Method for controlling message sending, network device and system
CN106878173B (en) Route sending method and device
WO2021259111A1 (en) Message processing method and device, and computer readable storage medium
EP3258654B1 (en) Method and system for reducing pim protocol dr change
JP2022120845A5 (en)
WO2012016471A1 (en) Topology convergence method and service provider edge
US20170155543A1 (en) Control apparatus, communication system, and control method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18933498

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18933498

Country of ref document: EP

Kind code of ref document: A1