# US 12,120,017 B1 · Equal cost multipath forwarding using ingress port

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

- Number: US 12,120,017 B1
- Document ID: US12120017B1
- Status: Granted
- Kind: B1
- Application number: 18/299,328
- Filed: 2023-04-12
- Published: 2024-10-17
- Granted: 2024-10-15
- Earliest claimed: 2023-04-12
- Assignees: Arista Networks, Inc.
- Applicants: Arista Networks, Inc.
- Inventors: Satish Kumar Selvaraj
- Web page: https://patentgrep.com/patent/US12120017B1

## CPC

- H04L 45/24: Multipath
- H04L 47/125: by balancing the load, e.g. traffic engineering
- H04L 45/20: {Hop count for routing purposes, e.g. TTL}
- H04L 45/243: using M+N parallel active paths
- H04L 45/566: {Routing instructions carried by the data packet, e.g. active networks}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

ECMP forwarding includes identifying and selecting an ECMP group of equal cost paths to a destination using destination information contained in a received packet. A member from the selected ECMP group is selected based on the ingress port on which the packet was received. The received packet is forwarded on the port that can reach the next hop associated with the selected member.

## Claims

### Claim 1

A method for selecting an egress port in a network device configured with ECMP (Equal Cost Multi-Path), the method comprising the network device:
receiving a packet on a port from among a plurality of ports of the network device;
determining an index value associated with the port on which the packet was received, wherein each of the plurality of ports is associated with an index value;
accessing an ECMP group associated with the received packet, the ECMP group comprising ECMP members that represent next hop devices;
determining a next hop from a load-balanced group comprising the ECMP members of the ECMP group, the determining of the next hop comprising:
accessing a slot from among a plurality of slots of a load-balanced group comprising the ECMP members of the ECMP group, the slot being associated with the index value;
upon determining that the slot is populated with an ECMP member of the ECMP group, determining that the ECMP member in the slot is the next hop; and
upon determining that the slot is empty:
identifying an ECMP member of the ECMP group based on one or more criteria;
storing the identified ECMP member in the slot; and
upon storing the identified ECMP member in the slot, determining that the identified ECMP member is the next hop; and
forwarding the received packet on a port of the network device associated with the next hop.

### Claim 2 (depends on 1)

The method of claim 1, further comprising computing a lookup index using H mod N, wherein H is the index value associated with the port on which the packet was received and N is the number of ECMP members in the ECMP group, wherein the computed lookup index is used to select the slot from among the plurality of slots of the load-balanced group.

### Claim 3 (depends on 1)

The method of claim 1 wherein the one or more criteria include levels of utilization of the ECMP members of the ECMP group.

### Claim 4 (depends on 1)

The method of claim 1, wherein the load-balanced group is initially empty.

### Claim 5 (depends on 1)

The method of claim 1, further comprising deleting an ECMP member from a slot in the load-balanced group when the ECMP member in the slot ages out.

### Claim 6 (depends on 1)

The method of claim 1, further comprising selecting the ECMP group from a plurality of ECMP groups based on a destination of the received packet.

### Claim 7 (depends on 1)

The method of claim 1, further comprising computing a hash value based on content of the received packet, wherein determining the next hop from the load-balanced group uses either:
the index value associated with the port on which the packet is received, when the network device is operating in a first configuration, or
the hash value, when the network device is operating in a second configuration.

### Claim 8

A network device comprising:
a plurality of ports;
one or more computer processors;
a computer-readable storage device comprising instructions for controlling the one or more computer processors to:
receive a packet on one of the plurality of ports of the network device;
access an ECMP group associated with the received packet, the ECMP group comprising ECMP members that represents next hops to a destination of the received packet;
determine a next hop from a load-balanced group comprising the ECMP members of the ECMP group by:
accessing a slot from among a plurality of slots of a load-balanced group comprising the ECMP members of the ECMP group, the slot being associated with an index value associated with the port on which the packet was received;
upon determining that the slot is populated with an ECMP member of the ECMP group, determining that the ECMP member in the slot is the next hop; and
upon determining that the slot is empty:
identifying an ECMP member of the ECMP group based on one or more criteria;
storing the identified ECMP member in the slot; and
upon storing the identified ECMP member in the slot, determining that the identified ECMP member is the next hop; and
forward the received packet on a port of the network device associated with the next hop.

### Claim 9 (depends on 8)

The network device of claim 8, wherein the network device further comprises a port-to-index mapping table, wherein the computer-readable storage device further comprises instructions for controlling the one or more computer processors to identify the index value from the port-to-index mapping table based on the port on which the packet was received.

### Claim 10 (depends on 8)

The network device of claim 8, wherein the computer-readable storage device further comprises instructions for controlling the one or more computer processors to compute a lookup index using H mod N, wherein H is the index value associated with the port on which the packet was received and N is the number of members in the ECMP group, wherein the computed lookup index is used to select the slot from among the plurality of slots of the load-balanced group.

### Claim 11 (depends on 8)

The network device of claim 8, wherein the one or more criteria include levels of utilization of the ECMP members of the ECMP group.

### Claim 12 (depends on 8)

The network device of claim 8, wherein the load-balanced group is initially empty.

### Claim 13 (depends on 8)

The network device of claim 8, wherein the computer-readable storage device further comprises instructions for controlling the one or more computer processors to delete an ECMP member from a slot in the load-balanced group when the ECMP member in the slot ages out.

### Claim 14 (depends on 8)

The network device of claim 8, wherein the computer-readable storage device further comprises instructions for controlling the one or more computer processors to select the ECMP group from a plurality of ECMP groups based on a destination of the received packet.

### Claim 15 (depends on 8)

The network device of claim 8, wherein the computer-readable storage device further comprises instructions for controlling the one or more computer processors to select the ECMP group from a plurality of ECMP groups based on a destination of the received packet.

### Claim 16 (depends on 8)

The network device of claim 8, wherein the computer-readable storage device further comprises instructions for controlling the one or more computer processors to:
compute a hash value based on content of the received packet; and
determine the next hop from the load-balanced group using either:
the index value associated with the port on which the packet is received, when the network device is operating in a first configuration, or
the computed hash value, when the network device is operating in a second configuration.

### Claim 17

A method for selecting an egress port in a network device configured with ECMP forwarding, the method comprising:
receiving a packet on one of the plurality of ports of the network device;
accessing an ECMP group from a plurality of ECMP groups, the accessed ECMP group comprising a plurality of next hops to the destination;
computing a hash value based on one or more portions of the received packet;
determining a value associated with the port on which the packet is received;
retrieving a configuration specified by a user of the network device that indicates whether the network device should perform hash-based ECMP forwarding or port-based ECMP forwarding;
selecting, based on the retrieved configuration, either the hash value or the value associated with the port as an index value for the received packet;
identifying a member in the accessed ECMP group based on the index value; and
forwarding the received packet on a port of the network that can reach the next hop associated with the identified member in the accessed ECMP group.

### Claim 18 (depends on 17)

The method of claim 17, wherein identifying the member in the accessed ECMP group comprises:
computing an index using H mod N, wherein H is the index value and N is the number of members in the accessed ECMP group; and
using the index to identify the member in the accessed ECMP group.

### Claim 19 (depends on 17)

The method of claim 17, further comprising selecting the ECMP group from the plurality of ECMP groups based on a destination of the received packet.
