Forwarding device, method and storage medium for a network
Patent Information
- Application Number
- CN202410454916.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-11
- Filing Date
- 2024-04-16
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2044-04-16
Smart Images

Figure CN119484394B_ABST
Abstract
Description
Background Technology
[0001] A network includes forwarding devices (e.g., switches, routers, or other communication devices) that receive data packets and forward them along selected paths within the network (chosen from multiple possible paths). A data packet can refer to any unit of data that can be transmitted individually over the network. A data packet can also be referred to as a data frame, data segment, or other type of data unit. Attached Figure Description
[0002] The following diagram illustrates some implementations of this disclosure.
[0003] Figure 1 It is based on some examples of block diagram layouts of networks including multiple switches capable of performing network loop protection.
[0004] Figure 2 It is a flowchart of the process of a switch based on some examples.
[0005] Figure 3 It is a block diagram of a tracking loop protection group based on some examples.
[0006] Figure 4 It is a block diagram of a forwarding device for a network, based on some examples.
[0007] Figure 5 It is a block diagram of a storage medium with machine-readable instructions based on some examples of storage.
[0008] Figure 6 It is a flowchart of the process of a forwarding device based on some examples.
[0009] In all the accompanying drawings, the same reference numerals denote similar but not necessarily identical elements. These drawings are not necessarily to scale, and the size of some parts may be exaggerated to more clearly illustrate the examples shown. Furthermore, 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 Implementation
[0010] Misconfigured networks can include network loops. A network loop occurs if there are multiple paths between a source forwarding device and a destination forwarding device. If a network loop exists, data packets sent from the source forwarding device to the destination forwarding device via the first path can return to the source forwarding device via the second path. Note that each path between the source and destination forwarding devices can include zero or more other forwarding devices.
[0011] Network loops can lead to increased network traffic that can further burden the network. For example, if there are a large number of broadcast or multicast data packets, the presence of a network loop can cause a broadcast storm when forwarding devices are constantly rebroadcasting or re-multicasting these packets. A broadcast storm can paralyze the network, causing entities attempting to transmit data or access resources to experience significant delays or lost data packets, or receive errors indicating that the requested resource is unavailable.
[0012] When a network loop is detected in the network, a port on a forwarding device can be disabled to break the loop. In some examples, the forwarding device may include a re-enable timer that starts in response to the detection of a network loop involving that port being disabled. When the re-enable timer expires, the previously disabled port is re-enabled to allow the transmission of data packets from that port. However, if the network loop is not resolved, the forwarding device may detect the loop again, and the port may be disabled again, at which point the re-enable timer starts again. As long as the network loop remains unresolved, the port can repeatedly switch between enabled and disabled states. Switching ports between enabled and disabled states is disruptive to the operation of the forwarding device and can consume its processing resources. Furthermore, re-enabling a port while the network loop is unresolved may lead to increased network traffic due to the presence of the loop.
[0013] The inability to resolve a network loop while the forwarding device's port is disabled may be due to insufficient information about the loop. For example, the network administrator may be notified of the existence of a network loop, but may not know what caused it.
[0014] According to some implementations of this disclosure, the forwarding device detects network loops on its port and determines whether the number of network loop detections on the port exceeds a threshold. If so, the switch adds a first information element indicating the identity of the forwarding device to the payload of the loop protection packet and sends the loop protection packet containing the first information element from the port to the network.
[0015] If a switch receives a loop protection packet (indicating the existence of a network loop), the switch extracts information elements from the received loop protection packet. These extracted information elements may include a first information element and at least a second information element added to the loop protection packet by at least one other forwarding device. The information elements added to the loop protection packet by the forwarding device may include the network address of the forwarding device. In some examples, the information elements include a Type Length Value (TLV) information element.
[0016] 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 the network. The header of a loop protection packet contains the source network address of the forwarding device that sent the 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, which is part of the Open Systems Interconnection (OSI) model. In other examples, the network address may include a Layer 3 network address (such as an Internet Protocol (IP) address) or other types of network addresses used to identify the source and destination of data packets.
[0017] "Forwarding device" can refer to any device, such as a switch (Layer 2 forwarding device), router (Layer 3 forwarding device), or other communication device, that forwards data packets along a selected path based on the network address in the data packet. Examples including switches are referenced in the following discussion. Techniques or mechanisms implemented according to this disclosure are applicable to other types of forwarding devices.
[0018] Figure 1 This is a block diagram of an example arrangement including network 102 and controller 104 coupled to network 102. Controller 104 may include a computer or a group of computers. In some examples, controller 104 is used to manage the operation of switches in network 102.
[0019] Network 102 includes switch 106 and other switches 108-1, 108-2, 108-3, 108-4, 110-1, 110-2, and 110-3. Although in Figure 1 The diagram shows a specific number of switches, but in other examples, network 102 may include a different number of switches.
[0020] Examples of components of switch 106 are in Figure 1 As shown in the diagram. Other switches 108-1, 108-2, 108-3, 110-1, 110-2, and 110-3 may include similar components.
[0021] Switch 106 includes a forwarding engine 114 that forwards data packets received by switch 106 along a selected path. As used herein, "engine" may refer to one or more hardware processing circuits, which may include any or some combination of a microprocessor, the core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, or another hardware processing circuit. Alternatively, "engine" may refer to a combination of one or more hardware processing circuits and machine-readable instructions (software and / or firmware) executable on one or more hardware processing circuits.
[0022] Switch 106 includes various ports connected to paths within network 102. A "path" can refer to a link, trunk, or any communication channel within network 102. Note that a trunk may include multiple links. Figure 1 In the example, switch 106 includes ports 112-1, 112-2, 112-3, 112-4, 112-5, 112-6, and 112-7. Although in Figure 1 The switch 106 shown in the figure has a specific number of ports, but the switch 106 may include a different number of ports in other examples.
[0023] "Port" can refer to the physical communication interface of switch 106. This port includes a physical connector and a transceiver for transmitting and receiving signals via paths connected to that port. In other examples, "port" can refer to a virtual communication interface.
[0024] Switch 106 can receive data packets at a first port, and forwarding engine 114 can forward the data packets to a second port to deliver the data packets toward their destination via the path of network 102. Forwarding engine 114 can select a path from multiple paths in network 102 based on forwarding information stored in memory 130 of switch 106. Memory 130 can 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.
[0025] Forwarding information can be in the form of a MAC address table 132. In other examples, other types of forwarding information can be used by the forwarding engine 114, such as a routing table or another type of forwarding information.
[0026] The MAC address table 132 includes entries, each of which associates a port number (or more generally, a port identifier) with a corresponding MAC address. In some cases, entries in the MAC address table may associate a port number with a MAC address with a Virtual Local Area Network (VLAN) identifier.
[0027] In some examples, VLANs can be defined on network 102. A VLAN refers to a logical network that groups together a subset of devices, such as switches, which are part of, for example, the physical network 102. Multiple VLANs can be defined on network 102. Figure 1 The example describes two VLANs, 140 and 142. VLAN 140 uses the following switches in network 102: 106, 108-1, 108-2, 108-3, and 108-4. VLAN 142 uses the following switches: 106, 110-1, 110-2, and 110-3.
[0028] Forwarding engine 114 uses entries in MAC address table 132 to determine where to send received data packets. Specifically, the data packet may contain a source MAC address (i.e., the endpoint sending the data packet) that identifies the source of the data packet and a destination MAC address (i.e., the endpoint of the data packet's destination) that identifies the destination of the data packet. "Endpoint" may refer to a physical electronic device or a virtual device.
[0029] Forwarding engine 114 can perform a lookup in MAC address table 132 to determine if 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 in MAC address table 132, forwarding engine 114 selects the port associated with the MAC address in the matching entry. The data packet is then sent by forwarding engine 114 through the selected port.
[0030] If no matching entry is found in MAC address table 132, forwarding engine 114 will broadcast data packets to all ports of switch 106.
[0031] In the VLAN-enabled example, each entry in MAC address table 132 associates a port number with a MAC address and a VLAN identifier (ID). In these examples, data packets received by switch 106 include a source MAC address, a destination MAC address, and a VLAN ID identifying the VLAN in which the data packet is to be transmitted. Forwarding engine 114 performs a lookup in MAC address table 132 to determine if the destination MAC address and VLAN ID of the data packet are present in MAC address table 132. If a matching entry exists in MAC address table 132, forwarding engine 114 selects a port on 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.
[0032] According to some implementations of this disclosure, switch 106 also includes loop protection engine 116, which is capable of detecting the presence of network loops in network 102 and performing remedial measures according to some implementations of this disclosure to resolve the detected network loops.
[0033] The following discussion involves Figure 1 and 2 For example, in Figure 2 As shown, loop protection engine 116 generates loop protection packet 118, which is broadcast by loop protection engine 116 from the sender port (at 202) of switch 106. Note that loop protection engine 116 can broadcast loop protection packet 118 from multiple ports of switch 106.
[0034] The sending port of switch 106 is the port from which switch 106 sends data packets generated by switch 106. Figure 1 In the example, the sending port for loop protection packet 118 is port 112-1 (in other examples, loop protection packet 118 can be sent from multiple sending ports of switch 106).
[0035] The loop protection packet 118 differs from the data packet in that the loop protection packet 118 is used for the purpose of detecting network loops, while the data packet carries information sent from the source endpoint to the destination endpoint as part of the operation between the source and destination endpoints.
[0036] exist Figure 1 In the example, a network loop exists, causing loop protection packet 118 to communicate back to switch 106 via switches 108-1, 108-2, 108-3, and 108-4. Loop protection packet 118 sent by switch 108-4 is received at port 112-5 (at 204) of switch 106. Typically, a network loop exists if a loop protection packet sent from a switch's sending port is received by the switch at any port on the switch, which can include the switch's sending port or any other port.
[0037] In response to the reception of loop protection packet 118 at switch 106, loop protection engine 116 compares the source MAC address in the received loop protection packet 118 with switch MAC address 121 of switch 106. Switch MAC address 121 is a MAC address assigned to switch 106, for example by an administrator or other type of entity, including programs or machines. Switch MAC address 121 is stored in memory 130 of switch 106. If the source MAC address of loop protection packet 118 matches switch MAC address 121, loop protection engine 116 (at 206) determines that a network loop exists in network 102. The detected network loop includes the sending port 112-1.
[0038] Each port of 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 for that VLAN. A port can be associated with multiple VLANs. A first port can be associated with a first VLAN but not with a second VLAN, and a second port can be associated with a second VLAN but not with a first VLAN. A port not associated with a given VLAN will not be used to send data packets over that VLAN.
[0039] In some examples, network loop protection can be defined for specific VLANs. For instance, network loop detection can 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 not through the second VLAN (for which network loop protection is not enabled). If a given port is part of multiple VLANs, and network loop protection is enabled for all of those VLANs, the loop protection engine 116 can send different loop protection packets from a given port for each of the multiple VLANs. For example, the loop protection engine 116 can send a first loop protection packet from a given port through the first VLAN of the multiple VLANs, the loop protection engine 116 can send a second loop protection packet from a given port through the second VLAN of the multiple VLANs, and so on.
[0040] Network loop protection can be configured for specific ports and VLANs using configuration information provided to switch 106, for example, from controller 104. For instance, the configuration information can be stored in memory 130 of switch 106. The configuration may include information such as identifying one or more VLANs for each port, against which network loop protection is enabled.
[0041] More typically, network loop protection can be enabled or disabled for any port on a switch, regardless of whether VLANs are used in the network.
[0042] In response to the detection of a network loop including sender port 112-1, loop protection engine 116 (at 208) disables sender port 112-1. According to some implementations of this disclosure, loop protection engine 116 also (at 210) determines whether the number of network loop detections on sender port 112-1 of switch 106 exceeds a threshold. In the VLAN-enabled example, the determination made at 210 concerns whether the number of network loop detections on sender port 112-1 for a given VLAN exceeds a threshold. Note that when the sender port is disabled, switch 106 will be unable to transmit data packets from the sender port for any VLAN to which the sender port is part.
[0043] The threshold can be a statically configured value (e.g., the threshold is set to zero or a non-zero value, such as 1, 2, 3, etc.). In other examples, the threshold can be dynamically adjusted, for example, by controller 104 or another entity. More specific techniques for defining thresholds are further provided below.
[0044] The loop protection engine 116 includes a re-enable timer 120, which can be started based on disabling the transmitter port 112-1. The re-enable timer 120 is configured to count a specified amount of time (e.g., a specified number of clock cycles). The re-enable timer 120 can start at an initial low value (e.g., zero) and increment until a timeout condition is met. Alternatively, the re-enable timer 120 can start at an initial high value and decrement until a timeout condition is met.
[0045] Once the re-enable timer 120 expires, the loop protection engine 116 re-enables the previously disabled ports, including sender port 112-1. The disabling of sender port 112-1 for the time interval counted by the re-enable timer 120 provides an opportunity for the network administrator or another entity to address the network loop (such as by reconfiguring network paths in network 102 or removing or adding components to remove the network loop). In some examples, the loop protection engine 116 may 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 this alert, the network administrator can attempt to resolve the network loop.
[0046] Note that if multiple disabled ports of switch 106 exist due to the detection of network loops on those ports, the timeout of re-enable timer 120 will cause loop protection engine 116 to re-enable each of the previously disabled ports. In some examples, switch 106 includes a single re-enable timer 120. In other examples, switch 106 may include multiple re-enable timers, each associated with a corresponding port or a corresponding group of ports.
[0047] Note that a network administrator or another entity may be unable to resolve a network loop including port 112-1 within the time interval counted by the re-enable timer 120. After re-enabling sender port 112-1 in response to the expiration of the re-enable timer 120, if the loop protection engine 116 sends another loop protection packet through sender port 112-1, the loop protection engine 116 will detect a network loop again. In response to the second detection of the network loop, the loop protection engine will disable sender port 112-1 again and restart the re-enable timer 120. In response to the timer 120 timeout, sender port 112-1 can be re-enabling again. This process can be repeated multiple times, which toggles the sender port 112-1 between enabled and disabled states.
[0048] If the loop protection engine 116 (at 210) determines that the number of network loops detected on the sender port 112-1 of switch 106 has not exceeded the threshold, the loop protection engine 116 (at 212) starts a re-enable timer 120. In response to the expiration of the re-enable timer 120 (at 214), the loop protection engine 116 (at 216) re-enables the sender port 112-1, and the loop protection engine 116 returns to task 202 to generate and send another loop protection packet.
[0049] If the loop protection engine 116 (at 210) determines that the number of network loops detected on sender port 112-1 (for a given VLAN) exceeds a threshold, the loop protection engine 116 disables (at 218) the re-enable timer 120. Disabling the re-enable timer 120 can mean not starting the re-enable timer 120 in response to disabling the sender port (at 208).
[0050] In addition, the loop protection engine 116 (at 220) generates a "tracing" loop protection packet, in which the loop protection engine 116 adds tracing information elements used to trace network loops. Figure 1 In the example, the Trace Information Addition (TIA) logic 122 in the loop protection engine 116 adds trace information elements to the trace loop protection group. Examples of trace information elements will be 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.
[0051] Loop protection engine 116 (at 222) broadcasts a tracing loop protection packet from sender port 112-1. Since the tracing loop protection packet traverses the network loops including switches 108-1, 108-2, 108-3, and 108-4, each of switches 108-1, 108-2, 108-3, and 108-4 adds the corresponding tracing information element to the tracing loop protection packet.
[0052] More specifically, in response to receiving a tracking loop protection packet, tracking information addition logic 124-1 in switch 108-1 adds a tracking information element to the tracking loop protection packet and broadcasts the tracking loop protection packet from switch 108-1. Similarly, in response to receiving a tracking loop protection packet, tracking information addition logic 124-2 in switch 108-2 adds a tracking information element to the tracking loop protection packet and broadcasts the tracking loop protection packet from switch 108-2. In response to receiving a tracking loop protection packet, tracking information addition logic 124-3 in switch 108-3 adds a tracking information element to the tracking loop protection packet and broadcasts the tracking loop protection packet from switch 108-3. In response to receiving a tracking loop protection packet, tracking information addition logic 124-4 in switch 108-4 adds a tracking information element to the tracking loop protection packet and broadcasts the tracking loop protection packet from switch 108-4. Each of the trace information addition logics in 124-1, 124-2, 124-3, and 124-4 can be part of the corresponding loop protection engine (not shown) in the corresponding switch.
[0053] Once switch 106 (at 224) receives a tracing loop protection packet (after the tracing loop protection packet has traversed the network loop including switches 108-1 to 108-4), loop protection engine 116 (at 226) extracts tracing information elements added to the tracing loop protection packet from the received tracing loop protection packet, including tracing information elements added by switch 106 and switches 108-1 to 108-4. Loop protection engine 116 (at 228) sends the extracted tracing information elements from switch 106 to controller 104 as part of loop information 150.
[0054] Controller 104 can display network loop information 152 in user interface 154, which can be displayed by a display device. In some examples, network loop information 152 can be displayed graphically to describe the switches and ports in the network loop. The display device can be part of controller 104 or can be located remotely to controller 104. Network administrators can use network loop information 152 to take measures to resolve network loops. In other examples, instead of or in addition to displaying network loop information 152, controller 104 can take automated measures to resolve network loops, such as removing the network loop by reconfiguring network paths in network 102 or by removing or adding components. For example, controller 104 can issue control information 156 to one or more switches in network 102 to perform reconfiguration or other control measures.
[0055] If a network loop is resolved, controller 104 can send an indication to one or more switches in network 102 that the network loop has been resolved for a given port. If a switch had previously disabled a re-enable timer because the number of detected network loops exceeded a threshold, this indication can cause the switch to re-enable the re-enable timer, allowing it to be used again in response to detected network loops. Furthermore, the indication that a network loop has been resolved for a given port causes the switch to re-enable the previously disabled given port.
[0056] Figure 3 An example of a tracing loop protection packet 300 is shown, in which tracing information elements (e.g., 302-1 to 302-N, where N≥1) have been added to the payload 304 of the tracing loop protection packet 300. In an example using VLANs, the payload 304 also includes a VLAN information element 312, which includes information identifying the VLAN (VLAN ID) through which the tracing loop protection packet 300 is transmitted.
[0057] The tracing 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 the destination MAC address identifying the endpoint(s) to which the tracing loop protection packet 300 is transmitted. In some examples, the destination MAC address may include a broadcast address that causes the tracing loop protection packet 300 to be broadcast to all destinations, such as all destinations accessible by a specified VLAN.
[0058] The source MAC address field 310 includes the source MAC address of the sending endpoint. For the tracing loop protection packet 200 transmitted by switch 106, the source MAC address field contains the switch MAC address 121 of switch 106.
[0059] According to some examples of this disclosure, the tracing information element 302-1 added to the payload 304 includes the switch MAC address 121 of the switch 106 of the transmission tracing loop protection packet 300.
[0060] As the Loop Trace Protection Packet 300 traverses the network path through network 102, each switch in the network path identifies, for example, based on the presence of one or more trace information elements in the payload 304, that the Loop Trace Protection Packet 300 is a modified version of the Loop Trace Protection Packet used to trace network loops. For example, each trace information element in the payload 304 includes a type indicator to indicate the type of trace information element used to trace network loops. Trace information elements 302-N include the MAC address of the switch that adds trace information elements 302-N to the payload 304 of the Loop Trace Protection Packet 300.
[0061] In response to the detection of a tracing information element, each switch receiving the tracing loop protection packet 300 adds the corresponding tracing information element to the payload 304 of the tracing loop protection packet 300. Switches 108-1 to 108-4 include corresponding tracing information addition logic 124-1 to 124-4, which are capable of adding the corresponding tracing information element to the payload 304.
[0062] Although a specific block of information is described as part of the tracing loop protection group 300, in other examples, additional blocks of information may be included, or alternative blocks of information may be included.
[0063] When switch 106 receives a trace loop protection packet 300 that has traversed the network loop, loop protection engine 116 can extract the MAC addresses of all switches in the network loop traversed by the loop protection packet 300 from trace information elements 302-1 to 302-N. The extracted switch MAC addresses can be sent from switch 106 to controller 104 as part of loop information 150.
[0064] In some examples, the number of network loop detections is compared to this (in Figure 2 The threshold (at point 210 in the original text) 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, suppose a given port of switch 106 is part of VLANs X, Y, and Z. The loop protection engine 116 collects historical data on network loops detected on a 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 (M) of network loops detected on a given port is 2+3+1=6 (i.e., M=6).
[0065] The threshold can be derived based on M. For example, the threshold can be equal to Mb, where b is a predefined constant. In a specific example, if b=4, then Mb=2 in the example above. In this example, because the number of network loops detected 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 rule derived from Mb. Figure 2 The decision-making diamond 210's "yes" path.
[0066] As described above, the tracing information element added to the payload of a loop tracing protection packet includes a type indicator that indicates the type of the tracing information element as being used to trace network loops. In some examples, the tracing information element may include a Type Length Value (TLV) information element. A TLV refers to the encoding scheme used to encode data that can be included in a data packet. The "Type" indicated by the TLV information element identifies 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 that added the tracing information element.
[0067] Based on some examples, Figure 4 This is a block diagram of forwarding device 400. Forwarding device 400 may include a Layer 2 switch or another type of forwarding device. Forwarding device 400 includes port 402 and controller 404 to perform various tasks of forwarding device 400. Controller 404 may include one or more hardware processors of forwarding device 400. Hardware processors may include microprocessors, the core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, or other hardware processing circuitry.
[0068] The controller 404 has a network loop detection task 406 for detecting network loops to port 402. Network loop detection can be based on broadcasting loop protection packets from port 402 and receiving loop protection packets at forwarding device 400 after the network loops have been traversed.
[0069] The controller 404 has a task 408 to determine the number of network loop detections for a port, which determines whether the number of network loop detections exceeds a threshold. The number of network loop detections includes those detected based on different loop protection packets broadcast from port 402.
[0070] The controller 404's tasks include a loop tracing protection packet generation task 410, which adds a first information element indicating the identity of the forwarding device to the payload of the loop tracing protection packet based on determining that the number of network loop detections against the port exceeds a threshold. An example of a loop tracing protection packet is... Figure 3 The tracking loop protection packet 300. In some examples, the first information element includes the network address of the forwarding device, such as the MAC address of the forwarding device.
[0071] The controller 404 has a task including a tracking loop protection packet transmission task 412, which sends a tracking loop protection packet containing a first information element from the port to the network.
[0072] In some examples, controller 404 receives a loop tracing protection packet at forwarding device 400. The reception of the loop tracing protection packet at forwarding device 400 is caused by a network loop. Controller 404 extracts information elements from the payload of the received loop tracing protection packet; the extracted information elements indicate the identity of the forwarding device in the network loop. For example, the extracted information elements include the MAC address of the forwarding device.
[0073] In some examples, controller 404 disables port 402 in response to the detection of a network loop. Controller 404 disables the re-enable timer for port 402 based on determining that the number of network loop detections for the port exceeds a threshold.
[0074] In some examples, after the timer is re-enabled, controller 404 receives an instruction to enable the timer re-enabled. For example, a remote entity (e.g., Figure 1 The controller 104 can send an indication to the forwarding device 400 that the network loop has been resolved. In response to this indication, the controller 404 can re-enable a previously disabled re-enable timer.
[0075] In some examples, controller 404 causes the display of a graphical representation of the network path, including network loops, based on the extracted information elements. For example, controller 404 may direct information to remote entities (e.g., Figure 1 The controller 104 sends network loop information including extracted information elements to cause the display of a graphical representation.
[0076] In some examples, controller 404 calculates a threshold based on the total number of network loops detected on the port. This total number of network loops detected on the port may be based on the sum of the number of network loops detected for multiple VLANs including the port.
[0077] In some examples, controller 404 calculates the threshold by subtracting a predefined constant from the total number of network loops detected on the port.
[0078] In some examples, determining whether the number of network loop detections for a port exceeds a threshold includes determining whether the number of network loop detections for VLANs across multiple VLANs exceeds a threshold.
[0079] Figure 5 This is a block diagram of a non-transient machine-readable or computer-readable storage medium 500 that stores machine-readable instructions that enable the switch to perform various tasks when executed.
[0080] The machine-readable instructions include a first loop protection packet transmission instruction 502, used to transmit a first loop protection packet from the port of the switch. The machine-readable instructions also include a network loop detection instruction 504, used to detect network loops for the port based on the received first loop protection packet.
[0081] Machine-readable instructions include a network loop detection count determination instruction 506, used to determine whether the number of network loop detections for a port exceeds a threshold. Machine-readable instructions can send consecutive loop protection packets and can count the number of network loop detections for a port based on these loop protection packets.
[0082] The machine-readable instructions include a tracing loop protection packet generation instruction 508, which generates a tracing loop protection packet based on the determination that the number of network loop detections against the port exceeds a threshold, and adds 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 the network address of the forwarding device.
[0083] The machine-readable instruction includes a trace loop protection packet (transmit instruction 510) to send a trace loop protection packet containing a first trace information element from the port to the network. If a network loop still exists, the switch will receive the trace loop protection packet after the trace loop protection packet has traversed the network loop.
[0084] Figure 6 This is a flowchart of process 600 performed by a forwarding device such as a switch.
[0085] Process 600 includes sending a first loop protection packet from a port of the forwarding device (at 602), wherein the first loop protection packet includes a VLAN identifier.
[0086] Process 600 includes (at 604) the forwarding device detecting a network loop for the port and the VLAN based on the received first loop protection packet.
[0087] Process 600 includes the forwarding device (at 606) determining whether the number of network loop detections for the port and the VLAN exceeds a threshold.
[0088] Based on the determination that the number of network loop detections for the port and the VLAN exceeds a threshold, process 600 includes generating a tracking loop protection packet by the forwarding device (at 608) and adding a first tracking information element indicating the identity of the forwarding device to the payload of the tracking loop protection packet.
[0089] Process 600 includes (at 610) sending a tracing loop protection packet containing a first tracing information element from the port of the forwarding device to the VLAN. Process 600 includes receiving (at 612) the tracing loop protection packet at the forwarding device.
[0090] Process 600 includes (at 614) the extraction of tracing information elements from the received tracing loop protection packet by a forwarding device, 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.
[0091] Storage media (e.g., in) Figure 5 The 500 in the specification can include any or a 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 magnetic tape; optical media, such as optical discs (CDs) or digital video discs (DVDs); or another type of storage device. Note that the instructions discussed above may be provided on a single computer-readable or machine-readable storage medium, or alternatively, on multiple computer-readable or machine-readable storage media distributed across a large system that may have multiple nodes. Such computer-readable or machine-readable storage media or media are considered part of a work (or article of manufacture). A work or article of manufacture may refer to any single component or components manufactured. The storage media or media may be located in a machine that executes the machine-readable instructions, or at a remote site from which the machine-readable instructions may be downloaded for execution via a network.
[0092] In this disclosure, the terms “a,” “an,” or “the” are used to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, when used in this disclosure, the terms “include,” “including,” “comprise,” “comprising,” “have,” or “having” specify the presence of the stated element but do not exclude the presence or addition of other elements.
[0093] In the foregoing description, numerous details have been 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 alterations from the details discussed above. The appended claims are intended to cover such modifications and alterations.
Claims
1. A forwarding device for a network, comprising: port; as well as Controller, used for: Detect network loops for the port. Determine whether the number of network loop detections for a given VLAN on the port exceeds a threshold. Based on the determination that the number of network loop detections for the given VLAN on the port exceeds the threshold, a first tracking information element indicating the identity of the forwarding device is added to the payload of the tracking loop protection packet, and Send the tracing loop protection packet containing the first tracing information element from the port to the given VLAN. The tracking loop protection packet is received at the relay device, and The forwarding device extracts tracking information elements from the received tracking loop protection packet. The extracted tracking information elements include the first tracking information element and one or more other tracking information elements added to the tracking loop protection packet by one or more forwarding devices in the network loop. The controller is used to calculate the threshold based on the total number of network loops detected on the port, and The total number of network loops detected on the port includes the sum of the number of network loops detected for multiple VLANs including the port.
2. The forwarding device according to claim 1, wherein the first tracking information element includes the network address of the forwarding device.
3. The forwarding device according to claim 2, wherein the network address includes the Media Access Control (MAC) address of the forwarding device.
4. The forwarding device of claim 1, wherein the reception of the tracking loop protection packet at the forwarding device is caused by the network loop, and the extracted tracking information element indicates the identity of the forwarding device in the network loop.
5. The forwarding device according to claim 4, wherein the identity of the forwarding device in the network loop includes the 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 the detection of the network loop, the port is disabled, and Based on the determination that the number of network loop detections for the port exceeds the threshold, the re-enable timer for the port is disabled.
7. The forwarding device according to claim 6, wherein the controller is configured to: After the timer is disabled, an instruction to enable the timer is received.
8. The forwarding device according to claim 4, wherein the controller is configured to: Based on the extracted tracking information elements, a graphical representation of the network path, including the network loop, is displayed.
9. The forwarding device of claim 8, wherein the first tracking information element includes the network address of the forwarding device, and the one or more other tracking information elements include the network address of at least one other forwarding device.
10. The forwarding device of claim 1, 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.
11. The forwarding device according to claim 1, wherein the controller is configured to: In response to the detection of the network loop, the port is disabled. Based on the determination that the number of network loop detections for the port does not exceed the threshold, a re-enable timer for the port is started, and In response to the expiration of the re-enable timer, the disabled port is re-enabled.
12. A non-transient machine-readable storage medium comprising instructions that, when executed, cause a switch to: A threshold is calculated based on the total number of network loops detected on the ports of the switch, wherein the total number of network loops detected on the ports includes: The sum of the number of network loops detected for multiple Virtual Local Area Network (VLANs) including the port mentioned above; Send a first loop protection packet from the port of the switch; Based on the received first loop protection packet, detect network loops for the port; Determine whether the number of network loop detections for a given VLAN on the port exceeds a threshold; Based on the determination that the number of network loop detections for the given VLAN on the port exceeds the threshold, a tracking loop protection packet is generated, and a first tracking information element indicating the identity of the switch is added to the payload of the tracking loop protection packet; Send the tracking loop protection packet containing the first tracking information element from the port to the given VLAN; The tracking loop protection packet is received at the switch; as well as The switch extracts tracking information elements from the received tracking loop protection packet. The extracted tracking information elements include the first tracking information element and one or more other tracking information elements added to the tracking loop protection packet by one or more forwarding devices in the network loop.
13. The non-transient machine-readable storage medium of claim 12, wherein the reception of the tracing loop protection packet at the switch is caused by the network loop, and the extracted tracing information element indicates the identity of the switch in the network loop.
14. The non-transient machine-readable storage medium of claim 13, wherein the instructions, when executed, cause the switch to: Based on the extracted tracking information elements, network loop information is sent to the controller; and Receive an indication from the controller that the network loop has been resolved.
15. The non-transient machine-readable storage medium of claim 12, wherein the instructions, when executed, cause the switch to: The threshold is calculated by subtracting a predetermined constant from the total number of network loops detected at the port.
16. A method for a network, comprising: The threshold is calculated based on the total number of network loops detected on the port of the forwarding device, wherein the total number of network loops detected on the port includes the sum of the number of network loops detected for multiple virtual local area network VLANs including the port; The forwarding device sends a first loop protection packet from the port of the forwarding device, the first loop protection packet including the identifier of the Virtual Local Area Network (VLAN); Based on the received first loop protection packet, the forwarding device detects a network loop for a given VLAN on the port; The forwarding device determines whether the number of network loop detections for the given VLAN on the port exceeds the threshold. Based on the determination that the number of network loop detections for the given VLAN on the port exceeds the threshold, the forwarding device generates a tracking loop protection packet and adds a first tracking information element indicating the identity of the forwarding device to the payload of the tracking loop protection packet. The tracing loop protection packet containing the first tracing information element from the port is sent from the forwarding device to the given VLAN; The tracking loop protection packet is received at the relay device; and The forwarding device extracts tracking information elements from the received tracking loop protection packet. The extracted tracking information elements include the first tracking information element and one or more other tracking information elements added to the tracking loop protection packet by one or more forwarding devices in the network loop.
17. The method of claim 16, wherein each of the tracking information elements in the received tracking loop protection packet includes a Type Length Value (TLV) information element.
18. The method of claim 16, wherein: The calculation of the threshold includes subtracting a predetermined constant from the total number of network loops detected on the port.
Citation Information
Patent Citations
Method and device for detecting loop
CN101102236A
Detection of potential forwarding loops in bridged networks
CN101432721A