# US 2016/0261500 A1 · Method and apparatus for load balancing in network switches

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

- Number: US 2016/0261500 A1
- Document ID: US20160261500A1
- Status: Published application
- Kind: A1
- Application number: 15/061,755
- Filed: 2016-03-04
- Published: 2016-09-08
- Earliest claimed: 2015-03-06
- Assignees: Marvell World Trade Ltd.
- Applicants: Marvell World Trade Ltd.
- Inventors: Yoram REVAH; David MELMAN; Tal MIZRAHI; Rami ZEMACH; Carmi ARAD
- Web page: https://patentgrep.com/patent/US20160261500A1

## CPC

- H04L 45/7453: using hashing
- H04L 45/22: {Alternate routing}
- H04L 45/245: {Link aggregation, e.g. trunking}
- H04L 45/28: using route fault recovery
- H04L 45/745: Address table lookup; Address filtering
- H04L 47/125: by balancing the load, e.g. traffic engineering
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A forwarding engine in a network device selects one or more groups of multiple egress interfaces of the network device for forwarding packets received by the network device. An egress interface selector in the network device selects individual egress interfaces within the one or more groups selected by the forwarding engine. The egress interface selector includes a table associated with a first group of multiple egress interfaces, wherein elements in the table include values indicate individual egress interfaces in the first group. When the forwarding engine selects the first group, a table element selector of selects an element in the table to identify the individual egress interface for forwarding the packet.

## Claims

### Claim 1

A network device, comprising:
a plurality of egress interfaces configured to transmit packets;
a forwarding engine configured to select one or more groups of multiple egress interfaces for forwarding packets received by the network device; and
an egress interface selector configured to select individual egress interfaces within the one or more groups selected by the forwarding engine, the egress interface selector including:
a table associated with a first group of multiple egress interfaces, wherein elements in the table include values indicating individual egress interfaces in the first group, and
a table element selector configured to, when the forwarding engine selects the first group of multiple egress interfaces for forwarding a packet, select an element in the table to identify the individual egress interface for forwarding the packet.

### Claim 2 (depends on 1)

The network device of claim 1, wherein:
the table dement selector includes a hash calculator configured to generate an output using i) a hashing function and ii) header information of the packet, wherein the output indicates the element in the table that is to be selected.

### Claim 3 (depends on 2)

The network device of claim 2, wherein:
the table includes N elements, wherein N is suitable positive integer; and
the hash calculator is configured to generate the output so that the output is from a set of N possible values.

### Claim 4 (depends on 3)

The network device of claim 3, wherein:
the hash calculator is configured to perform a modulo-N operation on an initial output.

### Claim 5 (depends on 1)

The network device of claim 1, further comprising:
an egress interface group manager configured to, in response to determining that an additional egress interface is to be added to the first group of multiple egress interfaces, replace values in a subset of elements in the table with new values that indicate the additional egress interface.

### Claim 6 (depends on 5)

The network device of claim 5, wherein the egress interface group manager is configured to select the subset of elements so that elements in the table are balanced across the first group of multiple egress interfaces including the additional egress interface.

### Claim 7 (depends on 1)

The network device of claim 1, further comprising:
an egress interface group manager configured to, in response to determining that a current egress interface is to be removed from the first group of multiple egress interfaces, replace first values in the table that indicate the current egress interface with second values that indicate other egress interfaces in the first group.

### Claim 8 (depends on 7)

The network device of claim 7, wherein the egress interface group manager is further configured to, when replacing the first values in the table, randomly select the second values that are to replace the first values.

### Claim 9 (depends on 7)

The network device of claim 7, wherein the egress interface group manager is further configured to, when replacing the first values in the table, select the second values that are to replace the first values in a round-robin manner.

### Claim 10 (depends on 7)

The network device of claim 7, wherein the egress interface group manager is farther configured to, when replacing the first values in the table, select the second values that are to replace the first values based on respective traffic loads of the other egress interfaces in the group.

### Claim 11

A method for selecting an egress interface, comprising:
receiving a packet at a network device;
selecting, at the network device, a group of multiple egress interfaces for transmitting the packet, the group from a plurality of egress interfaces of the network device;
in response to selecting the group, selecting, at the network device, an element in a table corresponding to the group, wherein entries in the table indicate individual egress interfaces in the group; and
transferring the packet to an egress interface in the group indicated by a value in the selected dement of the table so that the packet can be transmitted by the egress interface in the group indicated by the value in the selected element of the table.

### Claim 12 (depends on 11)

The method of claim 11, wherein selecting the element in the table comprises:
calculating, at the network device, a hash value using header information of the packet; and
using the hash value as an index into the table.

### Claim 13 (depends on 12)

The method of claim 12, wherein:
the table includes N elements;
N is suitable positive integer; and
calculating the hash value comprises at least one of:
i) calculating the hash value so that the hash value is from a set of N possible values, and
ii) calculating an initial hash value and performing a modulo-N operation on the initial hash value.

### Claim 14 (depends on 11)

The method of claim 11, further comprising:
determining, at the network device, that an additional egress interface is to be added to the group of multiple egress interfaces; and
in response to determining that the additional egress interface is to be added to the group of multiple egress interfaces, replacing values in a subset of elements in the table with a new value that indicates the additional egress interface.

### Claim 15 (depends on 14)

The method of claim 14, further comprising selecting the subset of elements so that elements in the table are balanced across the group of multiple egress interfaces including the additional egress interface.

### Claim 16 (depends on 11)

The method of claim 11, further comprising:
determining, at the network device, that a current egress interface is to be removed from the group of multiple egress interfaces; and
in response to determining that the current egress interface is to be removed from the group of multiple egress interfaces, replacing first values in the table that indicate the current egress interface with second values that indicate other egress interfaces in the group.

### Claim 17 (depends on 16)

The method of claim 16, wherein replacing the first values comprises randomly selecting the second values that are to replace the first values.

### Claim 18 (depends on 16)

The method of claim 16, wherein replacing the first values comprises selecting the second values that are to replace the first values in a round-robin manner.

### Claim 19 (depends on 16)

The method of claim 16, wherein replacing the first values comprises selecting the second values that are to replace the first values based on respective traffic loads of the other egress interfaces in the group.
