Loop protection in network
By detecting and tracking the network loop, disabling the relevant ports and periodically re-enabling the ports using the re-enable timer, the increased network burden and broadcast storm problems caused by the network loop are solved, and network stability and resource consumption are optimized.
Patent Information
- Application Number
- CN202410454916.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-11
- Filing Date
- 2024-04-16
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-04-16
AI Technical Summary
The existence of network loops leads to an increase in network burden, which may trigger a broadcast storm and lead to a network paralysis. The prior art may cause the ports of forwarding devices to be repeatedly enabled and disabled when solving network loops, consume processing resources and increase network services.
By detecting whether there is a network loop on the port of the forwarding device, and generating and sending loop protection packets based on the number of detections exceeding the threshold, adding identity information of the forwarding device to track the network loop, and then disabling the relevant ports to disconnect the loop , and periodically re-enable the port by re-enable the timer.
It effectively solves the problems of increased network burden and broadcast storm caused by network loops, avoids the destructive operations of frequently enabled and disabled forwarding device ports, reduces processing resource consumption, and improves network stability.
Smart Images

Figure CN119484394A_ABST
Abstract
Description
Background Art
[0001] A network includes forwarding devices (e.g., switches, routers, or other communication devices) that receive data packets and pass the data packets along a selected path (selected from a plurality of possible paths) of the network. A data packet may refer to any unit of data that may be transmitted individually through a network. A data packet may also be referred to as a data frame, a data segment, or other type of data unit. BRIEF DESCRIPTION OF THE DRAWINGS
[0002] Some implementations of the present disclosure are described with respect to the following figures.
[0003] Figure 1 is a block diagram arrangement including a network having multiple switches capable of performing network loop protection according to some examples.
[0004] Figure 2 is a flow diagram of a process for a switch according to some examples.
[0005] Figure 3 is a block diagram of a tracking ring protection packet according to some examples.
[0006] Figure 4 is a block diagram of a forwarding device for a network according to some examples.
[0007] Figure 5 is a block diagram of a storage medium storing machine-readable instructions according to some examples.
[0008] Figure 6 is a flow diagram of a process for a forwarding device according to some examples.
[0009] In all drawings, the same reference numerals denote similar, but not necessarily identical, elements. The figures are not necessarily to scale, and the sizes of some parts may be exaggerated to more clearly illustrate the examples shown. In addition, the drawings provide examples and / or implementations consistent with the description; however, the description is not limited to the examples and / or implementations provided in the drawings. DETAILED DESCRIPTION
[0010] A misconfigured network may include a network loop. A network loop occurs if there are multiple paths between a source forwarding device and a destination forwarding device. If a network loop exists, a data packet sent by a source forwarding device via a first path to a destination forwarding device may be returned to the source forwarding device via a second path. Note that each of the paths between a source forwarding device and a destination forwarding device may include zero or more other forwarding devices.
[0011] A network loop can result in increased network traffic that can burden the network. For example, if there are a large number of broadcast or multicast data packets, the presence of a network loop can result in a broadcast storm when forwarding devices continually rebroadcast or re-multicast data packets. A broadcast storm can paralyze a network such that entities attempting to transmit data or access resources over the network can experience noticeable delays or lost data packets, or receive errors indicating that the requested resource is not available.
[0012] When a network loop is detected in the network, the port of the forwarding device can be disabled to disconnect the network loop. In some examples, the forwarding device may include a re-enable timer, which is started in response to the port of the forwarding device being disabled due to the detection of the network loop including the port. When the re-enable timer expires, the previously disabled port is enabled again to allow the transmission of data packets from the port. However, if the network loop is not resolved, the forwarding device can detect the network loop again, and the port may be disabled again, at which point the re-enable timer is started again. As long as the network loop remains unresolved, the port can be repeatedly switched between enabled and disabled states. Switching the port between enabled and disabled states is destructive to the operation of the forwarding device, and can consume the processing resources of the forwarding device. In addition, re-enabling the port when the network loop has not yet been resolved may cause increased network traffic due to the presence of the network loop.
[0013] Failure to resolve a network loop while the ports of the forwarding device are disabled may be due to insufficient information about the network loop. For example, a network administrator may be notified of the existence of a network loop, but the network administrator may not know what caused the network loop.
[0014] According to some implementations of the present disclosure, a forwarding device detects a network loop for a port of the forwarding device, and determines whether the number of network loop detections for the port exceeds a threshold. If so, the switch adds a first information element indicating the identity of the forwarding device to a payload of a loop protection packet, and sends a loop protection packet containing the first information element from the port to the network. If the switch receives a loop protection packet (which indicates that a network loop exists), the switch extracts information elements from the received loop protection packet, wherein the extracted information elements may include the first information element and at least a second information element added to the loop protection packet by at least another forwarding device. The information element added to the loop protection packet by the forwarding device may include a network address of the forwarding device. In some examples, the information element includes a type-length-value (TLV) information element.
[0015] A "loop protection packet" refers to a control packet sent by a forwarding device for the purpose of determining whether a network loop exists in a network. The header of the loop protection packet contains the source network address of the forwarding device that sent the loop protection packet. In some examples, the network address may include a layer 2 network address, such as a media access control (MAC) address. For example, layer 2 refers to the data link layer that is part of the open systems interconnection (OSI) model. In other examples, the network address may include a layer 3 network address (e.g., an Internet Protocol (IP) address) or other type of network address that is used to identify the source and destination of a data packet.
[0016] A "forwarding device" may refer to any device in a switch (layer 2 forwarding device), a router (layer 3 forwarding device), or other communication devices that forwards data packets along a selected path based on the network address in the data packet. In the subsequent discussion, reference is made to examples including switches. Techniques or mechanisms according to some implementations of the present disclosure are applicable to other types of forwarding devices.
[0017] Figure 1 1 is a block diagram of an example arrangement including a network 102 and a controller 104 coupled to the network 102. The controller 104 may include a computer or a group of computers. In some examples, the controller 104 is used to manage the operation of switches in the network 102.
[0018] Network 102 includes switch 106 and other switches 108-1, 108-2, 108-3, 108-4, 110-1, 110-2, and 110-3. Figure 1 A particular number of switches is shown in FIG. 1 , but in other examples, network 102 may include a different number of switches.
[0019] Examples of components of switch 106 are shown in Figure 1 The other switches 108-1, 108-2, 108-3, 110-1, 110-2, and 110-3 may include similar components.
[0020] The switch 106 includes a forwarding engine 114 that forwards data packets received by the switch 106 along a selected path. As used herein, an "engine" may refer to one or more hardware processing circuits, which may include any or some combination of a microprocessor, a core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, or another hardware processing circuit. Alternatively, an "engine" may refer to a combination of one or more hardware processing circuits and machine-readable instructions (software and / or firmware) executable on the one or more hardware processing circuits.
[0021] Switch 106 includes various ports that connect to paths in network 102. A "path" may refer to a link or a trunk or any communication channel of network 102. Note that a trunk may include multiple links. Figure 1 In the example of FIG. 1 , switch 106 includes ports 112 - 1 , 112 - 2 , 112 - 3 , 112 - 4 , 112 - 5 , 112 - 6 , and 112 - 7 . Figure 1 A particular number of ports is shown in the switch 106 in FIG. 1 , but the switch 106 may include a different number of ports in other examples.
[0022] A "port" may refer to a physical communication interface of a switch 106. The port includes a physical connector and a signal transceiver to transmit and receive signals through a path connected to the port. In other examples, a "port" may refer to a virtual communication interface.
[0023] The switch 106 may receive the data packet at the first port, and the forwarding engine 114 may forward the data packet to the second port to transmit the data packet toward the destination of the data packet through a path of the network 102. The forwarding engine 114 may select a path from a plurality of paths of the network 102 based on forwarding information stored in a memory 130 of the switch 106. The memory 130 may be implemented using one or more memory devices, including dynamic random access memory (DRAM) devices, static random access memory (SRAM) devices, flash memory devices, and / or other types of memory devices.
[0024] The forwarding information may be in the form of a MAC address table 132. In other examples, other types of forwarding information may be used by the forwarding engine 114, such as a routing table or another type of forwarding information.
[0025] MAC address table 132 includes entries, each of which associates a port number (or more generally, an identifier of a port) with a corresponding MAC address. In some cases, an entry of the MAC address table may associate a port number with a MAC address and an identifier of a virtual local area network (VLAN).
[0026] In some examples, a VLAN can be defined on network 102. A VLAN refers to a logical network that groups together a subset of devices, such as switches, that are part of a physical network, such as network 102. Multiple VLANs can be defined on network 102. Figure 1 In the example of FIG. 1 , two VLANs 140 and 142 are described. VLAN 140 employs the following switches of network 102: 106, 108-1, 108-2, 108-3, and 108-4. VLAN 142 employs the following switches: 106, 110-1, 110-2, and 110-3.
[0027] The forwarding engine 114 uses the entries of the MAC address table 132 to determine where to send the received data packet. Specifically, the data packet may contain a source MAC address that identifies the source of the data packet (i.e., the endpoint that sent the data packet) and a destination MAC address that identifies the destination of the data packet (i.e., the endpoint of the destination of the data packet). An "endpoint" may refer to a physical electronic device or a virtual device.
[0028] Forwarding engine 114 may perform a lookup of MAC address table 132 to determine whether the destination MAC address of the data packet is in MAC address table 132. If the destination MAC address matches a MAC address in an entry of MAC address table 132, forwarding engine 114 selects a port associated with the MAC address in the matching entry. The data packet is sent by forwarding engine 114 through the selected port.
[0029] If no matching entry is found in the MAC address table 132 , the forwarding engine 114 will broadcast the data packet to all ports of the switch 106 .
[0030] In the example of using VLAN, each entry of MAC address table 132 associates a port number with a MAC address and a VLAN identifier (ID). In these examples, a data packet received by switch 106 includes a source MAC address, a destination MAC address, and a VLAN ID that identifies the VLAN in which the data packet is to be transmitted. Forwarding engine 114 performs a lookup of MAC address table 132 to determine whether the destination MAC address and VLAN ID of the data packet are in MAC address table 132. If there is a matching entry in MAC address table 132, forwarding engine 114 selects a port of switch 106 through which the data packet is sent. The selected port is part of the VLAN identified by the VLAN ID of the data packet.
[0031] According to some implementations of the present disclosure, the switch 106 also includes a loop protection engine 116 that is capable of detecting the presence of a network loop in the network 102 and, according to some implementations of the present disclosure, performing remedial actions to resolve the detected network loop.
[0032] The following discussion involves Figure 1 and 2 As in Figure 2 As shown in FIG. 2 , the ring protection engine 116 generates a ring protection packet 118 that is broadcast by the ring protection engine 116 from a sender port of the switch 106 (at 202). Note that the ring protection engine 116 may broadcast the ring protection packet 118 from multiple ports of the switch 106.
[0033] The sender port of the switch 106 is the port from which the switch 106 sends data packets generated by the switch 106. Figure 1 In the example of FIG. 1 , the sender port for the ring protection packet 118 is the port 112 - 1 (in other examples, the ring protection packet 118 may be sent from multiple sender ports of the switch 106 ).
[0034] The loop protection packets 118 differ from data packets in that the loop protection packets 118 are used for the purpose of detecting network loops, whereas the data packets carry information sent by a source endpoint to a destination endpoint as part of the operation of the source and destination endpoints.
[0035] exist Figure 1 In the example of FIG. 1 , a network loop exists, causing the loop protection packet 118 to be communicated through the switches 108-1, 108-2, 108-3, and 108-4 back to the switch 106. The loop protection packet 118 sent by the switch 108-4 is received (at 204) at the port 112-5 of the switch 106. In general, a network loop exists if a loop protection packet sent from a sender port of a switch is received by the switch at any of the switch's ports, which may include the sender port of the switch or any other port.
[0036] In response to receipt of the loop protection packet 118 at the switch 106, the loop protection engine 116 compares the source MAC address in the received loop protection packet 118 with the switch MAC address 121 of the switch 106. The switch MAC address 121 is a MAC address assigned to the switch 106, such as by an administrator or other type of entity, including a program or machine. The switch MAC address 121 is stored in the memory 130 of the switch 106. If the source MAC address of the loop protection packet 118 matches the switch MAC address 121, the loop protection engine 116 determines (at 206) that a network loop exists in the network 102. The detected network loop includes the sender port 112-1.
[0037] Each port of the switch 106 can be associated with one or more VLANs. A port is associated with a VLAN if it is used to transmit data packets of a VLAN. A port can be associated with multiple VLANs. A first port can be associated with a first VLAN but not a second VLAN, while a second port can be associated with a second VLAN but not the first VLAN. A port that is not associated with a given VLAN will not be used to send data packets through the given VLAN.
[0038] In some examples, network loop protection may be defined for a specific VLAN. For example, network loop detection may be enabled for a first VLAN, but not for a second VLAN. In such an example, loop protection packets will be sent through the first VLAN (for which network loop protection is enabled), but will not be sent through the second VLAN (for which network loop protection is not enabled). If a given port is part of multiple VLANs for which network loop protection is enabled, the loop protection engine 116 may send different loop protection packets from a given port for each of the multiple VLANs. For example, the loop protection engine 116 may send a first loop protection packet from a given port through a first VLAN in the multiple VLANs, the loop protection engine 116 may send a second loop protection packet from a given port through a second VLAN in the multiple VLANs, and so on.
[0039] Network loop protection may be configured for specific ports and VLANs using configuration information provided to the switch 106 (e.g., from the controller 104). For example, the configuration information may be stored in the memory 130 of the switch 106. The configuration may include information such as, for each port, identifying one or more VLANs for which network loop protection is enabled.
[0040] More generally, network loop protection can be enabled or disabled for any port of a switch, regardless of whether VLANs are employed in the network.
[0041] In response to detecting a network loop including the sender port 112-1, the loop protection engine 116 disables (at 208) the sender port 112-1. According to some implementations of the present disclosure, the loop protection engine 116 also determines (at 210) whether the number of detections of network loops on the sender port 112-1 of the switch 106 exceeds a threshold. In the example employing VLANs, the determination made at 210 is whether the number of detections of network loops on the sender port 112-1 for a given VLAN exceeds a threshold. Note that when a sender port is disabled, the switch 106 will not be able to transmit data packets from the sender port for any VLAN of which the sender port is a part.
[0042] The threshold may be a statically configured value (eg, the threshold is set to zero or a non-zero value, such as 1, 2, 3, etc.). In other examples, the threshold may be dynamically adjusted, such as by the controller 104 or another entity. More specific techniques for defining the threshold are provided further below.
[0043] The loop protection engine 116 includes a re-enable timer 120 that can be started based on disabling the sender port 112-1. The re-enable timer 120 is configured to count a specified amount of time (e.g., count a specified number of clock cycles). The re-enable timer 120 can be started at an initial low value (e.g., zero) and continuously increment the value until a timeout condition is met. Alternatively, the re-enable timer 120 can be started at an initial high value and decremented until a timeout condition is met.
[0044] Once the re-enablement timer 120 expires, the loop protection engine 116 re-enables the previously disabled ports, including the sender port 112-1. The disabling of the sender port 112-1 for the time interval counted by the re-enablement timer 120 is to provide an opportunity for a network administrator or another entity to address the network loop (such as by reconfiguring a network path in the network 102 or removing or adding components to remove the network loop). In some examples, the loop protection engine 116 can alert the network administrator, such as by sending a message (e.g., an email message, a text message) or by providing another type of alert. In response to the alert, the network administrator can attempt to resolve the network loop.
[0045] Note that if there are multiple disabled ports of the switch 106 due to detection of network loops on those ports, then the expiration of the re-enable timer 120 will cause the loop protection engine 116 to re-enable each of the previously disabled ports. In some examples, the switch 106 includes one re-enable timer 120. In other examples, the switch 106 may include multiple re-enable timers, where each re-enable timer is associated with a corresponding port or a corresponding group of ports.
[0046] Note that a network administrator or another entity may not be able to resolve a network loop including port 112-1 during the time interval counted by re-enabling timer 120. After re-enabling sender port 112-1 in response to expiration of re-enabling timer 120, if loop protection engine 116 sends another loop protection packet through sender port 112-1, loop protection engine 116 will detect a network loop again. In response to a second detection of a network loop, the loop protection engine will again disable sender port 112-1 and restart re-enabling timer 120. In response to re-enabling timer 120 expiring, sender port 112-1 may be re-enabled again. This process may be repeated multiple times, which switches the sender 112-1 port between enabled and disabled states.
[0047] If the loop protection engine 116 determines (at 210) that the number of detected network loops on the sender port 112-1 of the switch 106 does not exceed the threshold, the loop protection engine 116 starts (at 212) the re-enable timer 120. In response to the expiration (at 214) of the re-enable timer 120, the loop protection engine 116 re-enables (at 216) the sender port 112-1, and the loop protection engine 116 returns to task 202 to generate and send another loop protection packet.
[0048] If the loop protection engine 116 determines (at 210) that the number of detections of network loops on the sender port 112-1 (for a given VLAN) exceeds a threshold, the loop protection engine 116 disables (at 218) the re-enabling timer 120. Disabling the re-enabling timer 120 may refer to not starting the re-enabling timer 120 in response to disabling the sender port (at 208).
[0049] In addition, the loop protection engine 116 generates (at 220) a "trace" loop protection packet in which the loop protection engine 116 adds a trace information element that is used to trace the network loop. Figure 1 In the example of FIG. 1 , the trace information addition (TIA) logic 122 in the loop protection engine 116 adds the trace information element to the trace loop protection packet. Examples of trace information elements are discussed further below. The trace information addition logic 122 may be part of the hardware processing circuitry of the loop protection engine 116, or alternatively, may include machine-readable instructions executable by the loop protection engine 116.
[0050] The loop protection engine 116 broadcasts (at 222) the tracking loop protection packet from the sender port 112-1. As the tracking loop protection packet traverses the network loop including the switches 108-1, 108-2, 108-3, 108-4, each of the switches 108-1, 108-2, 108-3, 108-4 adds a corresponding tracking information element to the tracking loop protection packet.
[0051] More specifically, in response to receiving the tracing loop protection packet, the tracing information adding logic 124-1 in the switch 108-1 adds the tracing information element to the tracing loop protection packet, and broadcasts the tracing loop protection packet from the switch 108-1. Similarly, in response to receiving the tracing loop protection packet, the tracing information adding logic 124-2 in the switch 108-2 adds the tracing information element to the tracing loop protection packet, and broadcasts the tracing loop protection packet from the switch 108-2. In response to receiving the tracing loop protection packet, the tracing information adding logic 124-3 in the switch 108-3 adds the tracing information element to the tracing loop protection packet, and broadcasts the tracing loop protection packet from the switch 108-3. In response to receiving the tracing loop protection packet, the tracing information adding logic 124-4 in the switch 108-4 adds the tracing information element to the tracing loop protection packet, and broadcasts the tracing loop protection packet from the switch 108-4. Each of the trace information adding logics 124 - 1 , 124 - 2 , 124 - 3 , and 124 - 4 may be part of a corresponding ring protection engine (not shown) in a corresponding switch.
[0052] Once the switch 106 receives the tracking loop protection packet (at 224) after the tracking loop protection packet has traversed the network loop including the switches 108-1 to 108-4, the loop protection engine 116 extracts the tracking information elements added to the tracking loop protection packet from the received tracking loop protection packet (at 226), including the tracking information elements added by the switch 106 and the switches 108-1 to 108-4. The loop protection engine 116 sends the extracted tracking information elements from the switch 106 to the controller 104 (at 228) as part of the loop information 150.
[0053] The controller 104 may display network loop information 152 in a user interface 154, which may be displayed by a display device. In some examples, the network loop information 152 may be displayed in graphical form to describe switches and ports in a network loop. The display device may be part of the controller 104, or may be located remotely from the controller 104. A network administrator may use the network loop information 152 to take measures to resolve the network loop. In other examples, instead of or in addition to displaying the network loop information 152, the controller 104 may take automatic measures to resolve the network loop, such as by reconfiguring the network path in the network 102, or removing or adding components to remove the network loop. For example, the controller 104 may send control information 156 to one or more switches in the network 102 to perform reconfiguration or other control measures.
[0054] If the network loop is resolved, the controller 104 can send an indication that the network loop has been resolved for a given port to one or more switches in the network 102. If the switch had previously disabled the re-enable timer due to the number of detected network loops exceeding a threshold, the indication can cause the switch to re-enable the re-enable timer to allow the re-enable timer to be used again in response to detecting a network loop. In addition, the indication that the network loop has been resolved for a given port causes the switch to re-enable the given port that was previously disabled.
[0055] Figure 3 An example of a tracing loop protection packet 300 is shown in which tracing information elements (e.g., 302-1 through 302-N, where N≥1) have been added to a payload 304 of the tracing loop protection packet 300. In an example using VLANs, the payload 304 also includes a VLAN information element 312 that includes information identifying the VLAN (VLAN ID) over which the tracing loop protection packet 300 is transmitted.
[0056] The tracking loop protection packet 300 also includes a header 306. The header 306 includes a destination MAC address field 308 and a source MAC address field 310. The destination MAC address field 308 contains a destination MAC address that identifies the endpoint(s) to which the tracking loop protection packet 300 is transmitted. In some examples, the destination MAC address may include a broadcast address that causes the tracking loop protection packet 300 to be broadcast to all destinations, such as to all destinations accessible by a specified VLAN.
[0057] The source MAC address field 310 includes the source MAC address of the sender endpoint. For the trace loop protection packet 200 transmitted by the switch 106 , the source MAC address field contains the switch MAC address 121 of the switch 106 .
[0058] According to some examples of the present disclosure, the trace information element 302 - 1 added to the payload 304 includes the switch MAC address 121 of the switch 106 that transmits the trace loop protection packet 300 .
[0059] As the tracing loop protection packet 300 traverses the network path through the network 102, each of the switches in the network path recognizes that the tracing loop protection packet 300 is a modified version of a loop protection packet used to trace a network loop, for example, based on the presence of one or more tracing information elements in the payload 304. For example, each tracing information element in the payload 304 includes a type indicator to indicate the type of tracing information element used to trace a network loop. The tracing information element 302-N includes the MAC address of the switch that adds the tracing information element 302-N to the payload 304 of the tracing loop protection packet 300.
[0060] In response to detecting the trace information element, each switch receiving the trace loop protection packet 300 adds the corresponding trace information element to the payload 304 of the trace loop protection packet 300. The switches 108-1 to 108-4 include corresponding trace information adding logic 124-1 to 124-4 that can add the corresponding trace information element to the payload 304.
[0061] Although specific blocks of information are described as being part of the trace loop protection packet 300, in other examples, additional blocks of information may be included, or alternative blocks of information may be included.
[0062] When the switch 106 receives a trace loop protection packet 300 that has traversed a network loop, the loop protection engine 116 can extract the MAC addresses of all switches in the network loop traversed by the loop protection packet 300 from the trace information elements 302-1 to 302-N. The extracted switch MAC addresses can be sent from the switch 106 to the controller 104 as part of the loop information 150.
[0063] In some examples, the number of network loop detections is compared to Figure 2 The threshold value (at 210 in FIG. 1 ) can be dynamically set based on the total number of network loops detected on a given port, which can be determined from historical data collected by the loop protection engine 116. For example, assume that a given port of the switch 106 is part of VLANs X, Y, and Z. The loop protection engine 116 collects historical data of network loops detected on the given port, where the historical data indicates that two network loops were detected for VLAN X, three network loops were detected for VLAN Y, and one network loop was detected for VLAN Z. Based on this, the total number of network loops detected on the given port (M) is 2+3+1=6 (i.e., M=6).
[0064] The threshold may be derived based on M. For example, the threshold may be equal to Mb, where b is a predefined constant. In a specific example, if b=4, then Mb=2 in the above example. In this example, since the number of detected network loops for VLAN Y (3) exceeds the threshold (2), the loop protection engine 116 will disable the given port for VLAN Y. Therefore, when a network loop for VLAN Y is detected three times, the loop protection engine 116 will follow the instructions from Figure 2 The “yes” path of decision diamond 210 .
[0065] As described above, the tracing information element added to the payload of the tracing loop protection packet includes a type indicator that indicates the type of the tracing information element as being used to trace the network loop. In some examples, the tracing information element may include a type-length-value (TLV) information element. TLV refers to a coding scheme used to encode data that may be included in a data packet. The "type" indicated by the TLV information element may identify the type of the information element, and the "length" specifies the length of the TLV information element. The "value" is the actual information included in the TLV information element. In the tracing information element, the "value" is the switch MAC address of the switch to which the tracing information element is added.
[0066] According to some examples, Figure 4 4 is a block diagram of a forwarding device 400. The forwarding device 400 may include a layer 2 switch or another type of forwarding device. The forwarding device 400 includes a port 402 and a controller 404 to perform various tasks of the forwarding device 400. The controller 404 may include one or more hardware processors of the forwarding device 400. The hardware processor may include a microprocessor, a core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, or another hardware processing circuit.
[0067] The tasks of controller 404 include a network loop detection task 406 to detect a network loop for port 402. Detection of a network loop may be based on broadcasting a loop protection packet from port 402 and receiving the loop protection packet at forwarding device 400 after the loop protection packet has traversed the network loop.
[0068] The tasks of the controller 404 include a network loop detection number determination task 408 to determine whether the number of network loop detections for a port exceeds a threshold. The number of network loop detections includes network loop detections detected based on broadcasting corresponding different loop protection packets from the port 402.
[0069] The tasks of the controller 404 include a tracking loop protection packet generation task 410 to add a first information element indicating the identity of the forwarding device to the payload of the tracking loop protection packet based on determining that the number of network loop detections for the port exceeds a threshold. An example of a tracking loop protection packet is Figure 3 The tracking loop protection packet 300. In some examples, the first information element includes a network address of the forwarding device, such as a MAC address of the forwarding device.
[0070] The tasks of the controller 404 include a tracking loop protection packet transmission task 412 for transmitting the tracking loop protection packet including the first information element from the port to the network.
[0071] In some examples, controller 404 receives a tracking loop protection packet at forwarding device 400. Reception of the tracking loop protection packet at forwarding device 400 is caused by a network loop. Controller 404 extracts an information element in a payload of the received tracking loop protection packet, the extracted information element indicating an identity of a forwarding device in the network loop. For example, the extracted information element includes a MAC address of the forwarding device.
[0072] In some examples, the controller 404 disables the port 402 in response to detecting a network loop. The controller 404 disables a re-enable timer for the port 402 based on determining that a number of network loop detections for the port exceeds a threshold.
[0073] In some examples, after disabling of the re-enabling timer, the controller 404 receives an indication to enable the re-enabling timer. For example, a remote entity (e.g., Figure 1 The controller 104 of the forwarding device 400 may send an indication that the network loop has been resolved to the forwarding device 400. In response to such an indication, the controller 404 may re-enable a re-enablement timer that was previously disabled.
[0074] In some examples, controller 404 causes display of a graphical representation of a network path including a network loop based on the extracted information elements. For example, controller 404 may provide a remote entity (e.g., Figure 1 The controller 104) sends the network loop information including the extracted information elements to cause display of a graphical representation.
[0075] In some examples, the controller 404 calculates the threshold based on a total number of network loops detected on the port. The total number of network loops detected on the port can be based on a sum of the number of network loops detected for a plurality of VLANs that include the port.
[0076] In some examples, controller 404 calculates the threshold by subtracting a predefined constant from the total number of network loops detected on the port.
[0077] In some examples, the determination of whether the number of network loop detections for the port exceeds a threshold includes determining whether the number of network loop detections for a VLAN in the plurality of VLANs exceeds a threshold.
[0078] Figure 5 is a block diagram of a non-transitory machine-readable or computer-readable storage medium 500 storing machine-readable instructions that, when executed, cause a switch to perform various tasks.
[0079] The machine-readable instructions include first loop protection packet sending instructions 502 for sending a first loop protection packet from a port of the switch. The machine-readable instructions include network loop detection instructions 504 for detecting a network loop for the port based on receiving the first loop protection packet.
[0080] The machine readable instructions include network loop detection number determination instructions 506 to determine whether the number of network loop detections for a port exceeds a threshold. The machine readable instructions may send consecutive loop protection packets and may count how many network loops are detected for a port based on the loop protection packets.
[0081] The machine-readable instructions include tracing loop protection packet generation instructions 508 to generate a tracing loop protection packet based on determining that the number of network loop detections for the port exceeds a threshold, and add a first tracing information element indicating the identity of the forwarding device to the payload of the tracing loop protection packet. The added first tracing information element may include a network address of the forwarding device.
[0082] The machine readable instructions include a trace loop protection packet sending instruction 510 to send the trace loop protection packet including the first trace information element from the port to the network. If the network loop still exists, the switch will receive the trace loop protection packet after the trace loop protection packet traverses the network loop.
[0083] Figure 6 is a flow diagram of a process 600 performed by a forwarding device such as a switch.
[0084] Process 600 includes sending (at 602), by a forwarding device, a first ring protection packet from a port of the forwarding device, wherein the first ring protection packet includes an identifier of a VLAN.
[0085] Process 600 includes, at 604, detecting, by the forwarding device, a network loop for the port and the VLAN based on receiving the first loop protection packet.
[0086] Process 600 includes determining (at 606), by the forwarding device, whether a number of network loop detections for the port and the VLAN exceeds a threshold.
[0087] Based on determining that the number of network loop detections for the port and the VLAN exceeds a threshold, process 600 includes generating (at 608) a trace loop protection packet by the forwarding device and adding a first trace information element indicating an identity of the forwarding device to a payload of the trace loop protection packet.
[0088] Process 600 includes sending (at 610) from the forwarding device a trace loop protection packet including a first trace information element from the port to the VLAN. Process 600 includes receiving (at 612) the trace loop protection packet at the forwarding device.
[0089] Process 600 includes (at 614) extracting, by a forwarding device, tracing information elements from a received tracing loop protection packet, the extracted tracing information elements including a first tracing information element and one or more other tracing information elements added to the tracing loop protection packet by one or more forwarding devices in the network loop.
[0090] Storage media (e.g., Figure 5 500) may include any or some combination of the following: semiconductor memory devices such as DRAM or SRAM, erasable and programmable read-only memory (EPROM), electrically erasable and programmable read-only memory (EEPROM), and flash memory; magnetic disks, such as fixed disks, floppy disks, and removable disks; another magnetic medium, including tape; optical media, such as compact disks (CDs) or digital video disks (DVDs); or another type of storage device. Note that the instructions discussed above may be provided on one computer-readable or machine-readable storage medium, or alternatively, may be provided on multiple computer-readable or machine-readable storage media distributed in a large system that may have multiple nodes. Such computer-readable or machine-readable storage medium or multiple media are considered part of a work (or article of manufacture). A work or article of manufacture may refer to any manufactured single component or multiple components. The storage medium or multiple media may be located in a machine that runs machine-readable instructions, or at a remote site from which machine-readable instructions may be downloaded over a network for execution.
[0091] In the present disclosure, the use of the terms "a", "an" or "the" is intended to include the plural forms as well, unless the context clearly indicates otherwise. In addition, when used in the present disclosure, the terms "include", "including", "comprise", "comprising", "have", or "having" specify the presence of the elements described, but do not exclude the presence or addition of other elements.
[0092] In the above description, many details are set forth to provide an understanding of the subject matter disclosed herein. However, implementations may be practiced without some of these details. Other implementations may include modifications and changes from the details discussed above. The appended claims are intended to cover such modifications and changes.
Claims
1. A forwarding device for a network, comprising: port; as well as A controller to: Detecting a network loop for the port, determining whether the number of network loop detections for the port exceeds a threshold, based on determining that the number of network loop detections for the port exceeds the threshold, adding a first information element indicating an identity of the forwarding device to a payload of a loop protection packet, and The ring protection packet including the first information element is sent from the port to the network. 2 . The forwarding device according to claim 1 , wherein the first information element comprises a network address of the forwarding device. 3 . The forwarding device according to claim 2 , wherein the network address comprises a media access control (MAC) address of the forwarding device.
4. The forwarding device according to claim 1, wherein the controller is configured to: receiving the ring protection packet at the forwarding device, wherein the receiving of the ring protection packet at the forwarding device is caused by the network loop, and An information element in the payload of the received ring protection packet is extracted, the extracted information element indicating an identity of a forwarding device in the network ring. 5 . The forwarding device of claim 4 , wherein the identity of the forwarding device in the network loop comprises a media access control (MAC) address of the forwarding device in the network loop.
6. The forwarding device according to claim 4, wherein the controller is configured to: In response to detecting the network loop, disabling the port, and Based on determining that the number of network loop detections for the port exceeds the threshold, a re-enabling timer for the port is disabled.
7. The forwarding device according to claim 6, wherein the controller is configured to: After the disabling of the re-enabling timer, an indication is received to enable the re-enabling timer.
8. The forwarding device according to claim 4, wherein the controller is configured to: Based on the extracted information elements, display of a graphical representation of a network path including the network loop is caused.
9. The forwarding device according to claim 4, wherein the information element extracted from the received ring protection packet includes the first information element and at least a second information element added to the ring protection packet by at least one other forwarding device.
10. The forwarding device according to claim 9, wherein the first information element comprises a network address of the forwarding device, and the second information element comprises a network address of the at least one other forwarding device.
11. The forwarding device according to claim 1, wherein the controller is configured to calculate the threshold based on a total number of network loops detected on the port.
12. The forwarding device according to claim 11, wherein the total number of network loops detected on the port comprises: A total number of network loops detected for a plurality of virtual local area networks (VLANs) including the port.
13. The forwarding device of claim 12, wherein the controller is configured to calculate the threshold by subtracting a predetermined constant from the total number of network loops detected on the port.
14. The forwarding device according to claim 12, wherein the determination of whether the number of network loop detections for the port exceeds the threshold comprises: It is determined whether the number of network loop detections for a VLAN among the plurality of VLANs exceeds the threshold.
15. The forwarding device according to claim 1, wherein the controller is configured to: In response to detecting the network loop, disabling the port, based on determining that the number of network loop detections for the port does not exceed the threshold, starting a re-enabling timer for the port, and In response to expiration of the re-enabling timer, the disabled port is re-enabled.
16. A non-transitory machine-readable storage medium comprising instructions that, when executed, cause a switch to: Sending a first ring protection packet from a port of the switch; detecting a network loop for the port based on receiving the first loop protection packet; Determining whether the number of network loop detections for the port exceeds a threshold; generating a tracing loop protection packet based on determining that the number of network loop detections for the port exceeds the threshold, and adding a first tracing information element indicating an identity of the switch to a payload of the tracing loop protection packet; as well as The tracing ring protection packet including the first tracing information element is sent from the port to a network.
17. The non-transitory machine-readable storage medium of claim 16, wherein the instructions, when executed, cause the switch to: receiving the tracking loop protection packet at the switch, wherein the receiving of the loop protection packet at the switch is caused by the network loop; and An information element in the payload of the received ring protection packet is extracted, the extracted information element indicating an identity of a switch in the network ring.
18. The non-transitory machine-readable storage medium of claim 17, wherein the instructions, when executed, cause the switch to: Based on the extracted information element, sending network loop information to a controller; and An indication is received from the controller that the network loop has been resolved.
19. A method comprising: Sending, by a forwarding device, a first ring protection packet from a port of the forwarding device, wherein the first ring protection packet includes an identifier of a virtual local area network VLAN; Based on receiving the first loop protection packet, the forwarding device detects a network loop for the port and the VLAN; Determining, by the forwarding device, whether the number of network loop detections for the port and the VLAN exceeds a threshold; generating, by the forwarding device, a tracing loop protection packet based on determining that the number of network loop detections for the port and the VLAN exceeds the threshold, and adding a first tracing information element indicating an identity of the forwarding device to a payload of the tracing loop protection packet; sending the tracing loop protection packet including the first tracing information element from the port from the forwarding device to the VLAN; receiving the tracking loop protection packet at the forwarding device; as well as A tracing information element is extracted by the forwarding device from the received tracing loop protection packet, the extracted tracing information element comprising the first tracing information element and one or more other tracing information elements added to the tracing loop protection packet by one or more forwarding devices in the network loop.
20. The method of claim 19, wherein each of the tracing information elements in the received tracing loop protection packet comprises a type-length-value (TLV) information element.
Citation Information
Patent Citations
Method and device for detecting loop
CN101102236A
Detection of potential forwarding loops in bridged networks
CN101432721A
Automatic port loop detecting and protecting method based on a plurality of VLANs
CN101848121A
Switch apparatus and network system
US20090219821A1