# US 2018/0026871 A1 · Detecting and preventing network loops

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2018/0026871 A1
- Document ID: US20180026871A1
- Status: Published application
- Kind: A1
- Application number: 15/216,666
- Filed: 2016-07-21
- Published: 2018-01-25
- Earliest claimed: 2016-07-21
- Assignees: Cisco Technology, Inc.
- Applicants: Cisco Technology, Inc.
- Inventors: Natarajan Manthiramoorthy; Venkatesh Srinivasan; Swaminathan Narayanan; Ambrish Niranjan Mehta; Anand Kumar Singh; Anulekha Chodey
- Web page: https://patentgrep.com/patent/US20180026871A1

## CPC

- H04L 47/20: Traffic policing
- H04L 5/0012: {Hopping in multicarrier systems}
- H04L 12/437: Ring fault isolation or reconfiguration {(for SDH/SONET ring networks H04J3/085)}
- H04L 12/4641: {Virtual LANs, VLANs, e.g. virtual private networks [VPN] (LAN interconnection over a bridge based backbone H04L12/462; encapsulation techniques H04L12/4633; routing of packets H04L45/00; packet switches H04L49/00; virtual private networks for security H04L63/0272)}
- H04L 43/20: the monitoring system or the monitored elements being virtualised, abstracted or software-defined entities, e.g. SDN or NFV
- H04L 45/18: Loop-free operations
- H04L 45/28: using route fault recovery
- H04L 45/32: {Flooding (denial of service attacks H04L63/1458)}
- H04L 45/488: using root node determination
- H04L 49/354: for supporting virtual local area networks [VLAN]
- H04L 69/324: in the data link layer [OSI layer 2], e.g. HDLC
- H04L 2101/622: Layer-2 addresses, e.g. medium access control [MAC] addresses
- Y02D 30/00: Reducing energy consumption in communication networks
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

Systems, methods, and non-transitory computer-readable storage media for detecting network loops. In some embodiments, a system can identify a port that is in a blocking state. The blocking state can be for dropping one or more types of packets and preventing the port from forwarding the one or more types of packets. The system can determine a number of packets transmitted through the port by a hardware layer on the system and a number of control packets transmitted through the port by a software layer on the system. The system can determine whether the number of packets is greater than the number of control packets. When the number of packets is greater than the number of control packets, the system can determine that the blocking state has failed to prevent the port from forwarding the one or more types of packets.

## Claims

### Claim 1

A computer-implemented method comprising:
identifying a port, on a network device, that is in a blocking state, the blocking state for dropping one or more types of packets and preventing the port from forwarding the one or more types of packets;
determining a first number of packets transmitted through the port by a hardware element on the network device;
determining a second number of control packets transmitted through the port by a CPU process on the network device;
determining whether the first number of packets is greater than the second number of control packets; and
when the first number of packets is greater than the second number of control packets, determining that the blocking state has failed to prevent the port from forwarding the one or more types of packets.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the control packets comprise at least one of bridge protocol data unit (BPDU) packets, link aggregation control protocol (LACP) packets, link layer discovery protocol (LLDP) packets, and cisco discovery protocol (CDP) packets.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, further comprising:
determining a third number of packets received, by the hardware element, through the port;
determining a fourth number of control packets received, by the CPU process, through the port;
determining a fifth number of received packets associated with the port that are dropped by the hardware element;
determining whether a difference between the third number of packets received by the hardware element and the fifth number of packets dropped by the hardware element, is greater than the fourth number of control packets received by the CPU process; and
when the difference is greater than the fourth number of control packets received, determining that the blocking state has failed to cause the port to drop the one or more types of packets.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein the port is one of an access port or a trunk port, wherein all virtual local area networks (VLANs) configured on the trunk port are marked as blocked.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein the port is associated with a first virtual local area network and a second virtual local area network, wherein the port is configured to block one or more types of packets associated with the virtual local area network and forward the one or more types of packets associated with the second virtual local area network, the method further comprising:
determining a third number of packets associated with the second virtual local area network that are transmitted through the port;
subtracting the third number of packets associated with the second virtual local area network from the first number of packets transmitted through the port by the hardware element, to yield a subtracted number of packets;
determining whether the subtracted number of packets is greater than a fourth number of control packets transmitted by the CPU process through the port that are associated with one or more blocked virtual local area networks; and
when the subtracted number is greater than the fourth number of control packets, determining that the blocking state has failed to prevent the port from forwarding the one or more types of packets.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein the port is associated with a first virtual local area network and a second virtual local area network, wherein the port is configured to block packets associated with the virtual local area network and forward packets associated with the second virtual local area network, the method further comprising:
determining a third number of packets received, by the hardware element, through the port;
determining a fourth number of control packets received, by the CPU process, through the port, the fourth number of control packets being associated with one or more blocked virtual local area networks;
determining a fifth number of received packets associated with the port that are dropped by the hardware element, the fifth number of received packets being associated with the one or more blocked virtual local area networks;
determining a sixth number of packets associated with the second virtual local area network that are received through the port;
subtracting the sixth number of packets associated with the second virtual local area network and the fifth number of received packets associated with the port that are dropped by the hardware element, from the third number of packets received through the port by the hardware element, to yield a subtracted number of packets;
determining whether the subtracted number of packets is greater than the fourth number of control packets received by the CPU process through the port; and
when the subtracted number is greater than the fourth number of control packets received by the CPU process, determining that the blocking state has failed to cause the port to drop the one or more types of packets.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, wherein the first number of packets transmitted comprises a rate of packets transmitted, and wherein the second number of control packets transmitted comprise a rate of control packets received.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, wherein the one or more types of packets comprises all packets excluding the control packets, wherein the hardware element comprises an application specific integrated circuit.

### Claim 9

A network device comprising:
one or more processors; and
a computer-readable storage medium having stored therein instructions which, when executed by the one or more processors, cause the one or more processors to perform operations comprising:
identifying a port on the network device that is in a blocking state, the blocking state for dropping one or more types of packets and preventing the port from forwarding the one or more types of packets;
determining a first number of packets transmitted through the port by a hardware element on the network device;
determining a second number of control packets transmitted through the port by a CPU process on the network device;
determining whether the first number of packets is greater than the second number of control packets; and
when the first number of packets is greater than the second number of control packets, detecting an error associated with the blocking state, the error comprising a failure to prevent the port from forwarding the one or more types of packets.

### Claim 10 (depends on 9)

The system of claim 9, wherein the control packets comprise at least one of bridge protocol data unit (BPDU) packets, link aggregation control protocol (LACP) packets, link layer discovery protocol (LLDP) packets, and cisco discovery protocol (CDP) packets.

### Claim 11 (depends on 9)

The system of claim 9, the computer-readable medium having stored therein instructions which, when executed by the one or more processors, cause the one or more processors to perform operations comprising:
determining a third number of packets received, by the hardware element, through the port;
determining a fourth number of control packets received, by the CPU process, through the port;
determining a fifth number of received packets associated with the port that are dropped by the hardware element;
determining whether a difference between the third number of packets received by the hardware element and the fifth number of packets dropped by the hardware element, is greater than the fourth number of control packets received by the CPU process; and
when the difference is greater than the fourth number of control packets received, detecting an error associated with the blocking state, the error comprising a failure by the port to drop the one or more types of packets during the blocking state.

### Claim 12 (depends on 9)

The system of claim 9, wherein the port is associated with a first virtual local area network and a second virtual local area network, wherein the port is configured to block one or more types of packets associated with the first virtual local area network and forward the one or more types of packets associated with the second virtual local area network, the computer-readable medium having stored therein instructions which, when executed by the one or more processors, cause the one or more processors to perform operations comprising:
determining a third number of packets associated with the second virtual local area network that are transmitted through the port;
subtracting the third number of packets associated with the second virtual local area network from the first number of packets transmitted through the port by the hardware element, to yield an adjusted number of packets;
determining whether the adjusted number of packets is greater than a fourth number of control packets transmitted by the CPU process through the port that are associated with one or more blocked virtual local area networks; and
when the adjusted number is greater than the second number, detecting an error during the blocking state, the error comprising a failure to prevent the port from forwarding the one or more types of packets.

### Claim 13 (depends on 9)

The system of claim 9, wherein the port is associated with a first virtual local area network and a second virtual local area network, wherein the port is configured to block one or more types of packets associated with the first virtual local area network and forward one or more types of packets associated with the second virtual local area network.

### Claim 14 (depends on 13)

The system of claim 13, wherein the computer-readable medium stores additional instructions which, when executed by the one or more processors, cause the one or more processors to perform operations comprising:
determining a number of packets received, by the hardware element, through the port;
determining a number of control packets received, by the CPU process, through the port, the number of control packets received by the CPU process being associated with one or more blocked virtual local area networks;
determining a number of received packets associated with the port that are dropped by the hardware element, the received packets being associated with one or more blocked virtual local area networks;
determining a number of packets associated with the second virtual local area network that are received through the port;
subtracting the number of packets associated with the second virtual local area network and the number of received packets associated with the port that are dropped by the hardware element, from the number of packets received through the port by the hardware element, to yield a subtracted number of packets;
determine whether the subtracted number of packets is greater than the number of control packets received by the CPU process through the port; and
when the subtracted number is greater than the number of control packets received by the CPU process, determining that the blocking state has failed to cause the port to drop the one or more types of packets.

### Claim 15 (depends on 14)

The system of claim 14, wherein the one or more types of packets comprises all packets excluding the control packets, wherein the hardware element comprises an application specific integrated circuit.

### Claim 16

A non-transitory computer-readable storage medium having stored therein instructions which, when executed by a processor, cause the processor to perform operations comprising:
identifying a port on a network device that is in a blocking state, the blocking state causing the port to drop one or more types of packets and preventing the port from forwarding the one or more types of packets;
determining a first number of packets received, by a hardware element of the network device, through the port;
determining a second number of control packets received, by a CPU process of the network device, through the port;
determining a third number of packets received via the port and dropped by the hardware element;
determining whether a difference between the first number of packets received by the hardware element and the third number of packets dropped by the hardware element, is greater than the second number of control packets received by the CPU process; and
when the difference is greater than the second number of control packets received, determining that the port has failed to drop the one or more types of packets during the blocking state.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, storing additional instructions which, when executed by the processor cause the processor to perform operations comprising:
determining a fourth number of packets transmitted through the port by the hardware element on the network device;
determining a fifth number of control packets transmitted through the port by the CPU process on the network device;
determining whether the fourth number of packets transmitted is greater than the fifth number of control packets; and
when the fourth number of packets is greater than the fifth number of control packets, detecting a problem with the blocking state of the port, the problem being based on a determination that the port has forwarded the one or more types of packets during the blocking state.

### Claim 18 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the port is associated with a first virtual local area network and a second virtual local area network, wherein the port is configured to block one or more types of packets associated with the first virtual local area network and forward one or more types of packets associated with the second virtual local area network, the non-transitory computer-readable storage medium storing additional instructions which, when executed by the processor, cause the processor to perform operations comprising:
determining a fourth number of packets associated with the second virtual local area network that are transmitted through the port;
subtract the fourth number of packets associated with the second virtual local area network from a fifth number of packets transmitted through the port by the hardware element, to yield an adjusted number of packets;
determine whether the adjusted number of packets is greater than a sixth number of control packets transmitted by the CPU process through the port, wherein the sixth number of control packets are associated with one or more blocked virtual local area networks; and
when the adjusted number is greater than the sixth number of control packets transmitted by the CPU process, detecting an error during the blocking state, the error being based on a determination that the port has forwarded the one or more types of packets during the blocking state.

### Claim 19 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the port is associated with a first virtual local area network and a second virtual local area network, wherein the port is configured to block one or more types of packets associated with the first virtual local area network and forward one or more types of packets associated with the second virtual local area network, the non-transitory computer-readable storage medium storing additional instructions which, when executed by the processor, cause the processor to perform operations comprising:
determining a fourth number of packets associated with the second virtual local area network that are received through the port;
subtracting the fourth number of packets associated with the second virtual local area network and the third number of received packets associated with the port that are dropped by the hardware element, from the first number of packets received through the port by the hardware element, to yield an adjusted number of packets;
determining whether the adjusted number of packets is greater than the second number of control packets received by the CPU process through the port, wherein the second number of control packets is associated with one or more blocked virtual local area networks; and
when the adjusted number is greater than the second number of control packets received by the CPU process, determining that the port has encountered an error, the error comprising a failure by the port to drop the one or more types of packets during the blocking state.

### Claim 20 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the one or more types of packets comprise all types of packets except the control packets, wherein the control packets comprise at least one of bridge protocol data unit (BPDU) packets, link aggregation control protocol (LACP) packets, link layer discovery protocol (LLDP) packets, and cisco discovery protocol (CDP) packets.
