# US 2020/0403922 A1 · Load balancing of l2vpn traffic over multiple ipsec vpn tunnels

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

- Number: US 2020/0403922 A1
- Document ID: US20200403922A1
- Status: Published application
- Kind: A1
- Application number: 16/450,026
- Filed: 2019-06-24
- Published: 2020-12-24
- Earliest claimed: 2019-06-24
- Assignees: VMware, Inc.
- Applicants: VMware, Inc.
- Inventors: Jia Yu; Yong Wang; Xinhua Hong; Fang Peng; Zhifeng Xia
- Web page: https://patentgrep.com/patent/US20200403922A1

## CPC

- H04L 47/125: by balancing the load, e.g. traffic engineering
- H04L 12/4633: {Interconnection of networks using encapsulation techniques, e.g. tunneling}
- 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 45/586: of virtual routers
- H04L 63/0272: {Virtual private networks}
- H04L 69/22: Parsing or analysis of headers
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

In an embodiment, a computer-implemented method provides mechanisms for load balancing of L2VPN traffic over multiple IPsec VPN tunnels. In an embodiment, a method comprises: performing, by a gateway, a lookup of available virtual tunnel interfaces (“VTIs”) implemented in the gateway to determine a plurality of VTIs; generating a hash value from contents of one or more inner headers of the packet; based on the hash value, determining a VTI device identifier; wherein the VTI device identifier uniquely identifies a particular VTI from the plurality of VTIs; and relaying the packet on a gateway output port that is associated with the particular VTI to allow forwarding of the packet via a particular IPsec VPN tunnel of a plurality of IPsec VPN tunnels.

## Claims

### Claim 1

A computer-implemented method for load balancing of L2VPN traffic over multiple IPsec VPN tunnels, the method comprising:
performing, by a gateway, a lookup of available virtual tunnel interfaces (“VTIs”) implemented in the gateway to determine a plurality of VTIs;
generating a hash value from contents of one or more inner headers of a packet;
based on the hash value, determining a VTI device identifier;
wherein the VTI device identifier uniquely identifies a particular VTI from the plurality of VTIs; and
relaying the packet on a gateway output port that is associated with the particular VTI to allow forwarding of the packet via a particular IPsec VPN tunnel of a plurality of IPsec VPN tunnels.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the hash value for the packet is determined based on contents of one or more of: an inner IP header of the packet or an inner TCP/UDP header of the packet;
wherein the hash value for the packet is determined based on a 5-tuple included in the one or more inner headers;
wherein the hash value for the packet is determined by applying an XOR operator to elements of the 5-tuple; and
wherein the hash value is used as an index in a lookup table to determine the particular VTI; and
wherein the lookup table comprises mappings between hash values and VTI device identifiers.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein the hash value for the packet is determined based on contents of an inner VLAN header of the packet.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein an IPsec VPN tunnel of the plurality of IPsec VPN tunnels is associated with a corresponding VPN session and is defined at least by two endpoints, each of the endpoints having a unique underlay VPN address; and
wherein a VTI of the plurality of VTIs has an associated VTI address which is uniquely mapped onto one of two VPN addresses of an IPsec VPN tunnel of the plurality of IPsec VPN tunnels.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, further comprising:
before relaying the packet on the gateway output port associated with the particular VTI:
extracting from the packet the contents of the one or more inner headers;
storing the contents of the one or more inner headers in a memory buffer to be used to compute the hash value;
determining one or more outer headers for the packet; and
encapsulating the packet with the one or more outer headers.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, further comprising:
detecting the packet;
parsing the packet to determine whether a network identifier included in the packet indicates that the packet is intended to a stretched network implemented in a remote site; and
in response to determining that the network identifier included in the packet indicates that the packet is intended to the stretched network implemented in the remote site,
relaying the packet on a logical router port of a logical router communicatively coupled to the gateway and indicating that the packet is to be communicated via the particular IPsec VPN tunnel of the plurality of IPsec VPN tunnels to the remote site.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, further comprising:
in response to determining that the network identifier included in the packet indicates that the packet is not intended to the stretched network implemented in the remote site,
relaying the packet on the logical router port of the logical router communicatively coupled to the gateway and indicating that the packet is to be conventionally communicated via an IPsec VPN tunnel to the remote site.

### Claim 8

One or more non-transitory computer-readable storage media storing one or more computer instructions which, when executed by one or more processors, cause the one or more processors to perform:
performing, by a gateway, a lookup of available virtual tunnel interfaces (“VTIs”) implemented in the gateway to determine a plurality of VTIs;
generating a hash value from contents of one or more inner headers of a packet;
based on the hash value, determining a VTI device identifier;
wherein the VTI device identifier uniquely identifies a particular VTI from the plurality of VTIs; and
relaying the packet on a gateway output port that is associated with the particular VTI to allow forwarding of the packet via a particular IPsec VPN tunnel of a plurality of IPsec VPN tunnels.

### Claim 9 (depends on 8)

The one or more non-transitory computer-readable storage media of claim 8, wherein the hash value for the packet is determined based on contents of one or more of: an inner IP header of the packet or an inner TCP/UDP header of the packet;
wherein the hash value for the packet is determined based on a 5-tuple included in the one or more inner headers;
wherein the hash value for the packet is determined by applying an XOR operator to elements of the 5-tuple; and
wherein the hash value is used as an index in a lookup table to determine the particular VTI; and
wherein the lookup table comprises mappings between hash values and VTI device identifiers.

### Claim 10 (depends on 8)

The one or more non-transitory computer-readable storage media of claim 8, wherein the hash value for the packet is determined based on contents of an inner VLAN header of the packet.

### Claim 11 (depends on 8)

The one or more non-transitory computer-readable storage media of claim 8, wherein an IPsec VPN tunnel of the plurality of IPsec VPN tunnels is associated with a corresponding VPN session and is defined at least by two endpoints, each of the endpoints having a unique underlay VPN address; and
wherein a VTI of the plurality of VTIs has an associated VTI address which is uniquely mapped onto one of two VPN addresses of an IPsec VPN tunnel of the plurality of IPsec VPN tunnels.

### Claim 12 (depends on 8)

The one or more non-transitory computer-readable storage media of claim 8, storing additional instructions which, when executed by the one or more processors cause the one or more processors to perform:
before relaying the packet on the gateway output port associated with the particular VTI:
extracting from the packet the contents of the one or more inner headers;
storing the contents of the one or more inner headers in a memory buffer to be used to compute the hash value;
determining one or more outer headers for the packet; and
encapsulating the packet with the one or more outer headers.

### Claim 13 (depends on 8)

The one or more non-transitory computer-readable storage media of claim 8, storing additional instructions which, when executed by the one or more processors cause the one or more processors to perform:
detecting the packet;
parsing the packet to determine whether a network identifier included in the packet indicates that the packet is intended to a stretched network implemented in a remote site; and
in response to determining that the network identifier included in the packet indicates that the packet is intended to the stretched network implemented in the remote site,
relaying the packet on a logical router port of a logical router communicatively coupled to the gateway and indicating that the packet is to be communicated via the particular IPsec VPN tunnel of the plurality of IPsec VPN tunnels to the remote site.

### Claim 14 (depends on 13)

The one or more non-transitory computer-readable storage media of claim 13, storing additional instructions which, when executed by the one or more processors cause the one or more processors to perform:
in response to determining that the network identifier included in the packet indicates that the packet is not intended to the stretched network implemented in the remote site,
relaying the packet on the logical router port of the logical router communicatively coupled to the gateway and indicating that the packet is to be conventionally communicated via an IPsec VPN tunnel to the remote site.

### Claim 15

An edge service gateway implemented in a computer network and configured to implement mechanisms for load balancing of L2VPN traffic over multiple IPsec VPN tunnels, the edge service gateway comprising:
one or more processors;
one or more memory units; and
one or more non-transitory computer-readable storage media storing one or more computer instructions which, when executed by the one or more processors, cause the one or more processors to perform:
performing, by a gateway, a lookup of available virtual tunnel interfaces (“VTIs”) implemented in the gateway to determine a plurality of VTIs;
generating a hash value from contents of one or more inner headers of a packet;
based on the hash value, determining a VTI device identifier;
wherein the VTI device identifier uniquely identifies a particular VTI from the plurality of VTIs; and
relaying the packet on a gateway output port that is associated with the particular VTI to allow forwarding of the packet via a particular IPsec VPN tunnel of a plurality of IPsec VPN tunnels.

### Claim 16 (depends on 15)

The edge service gateway of claim 15, wherein the hash value for the packet is determined based on contents of one or more of: an inner IP header of the packet or an inner TCP/UDP header of the packet;
wherein the hash value for the packet is determined based on a 5-tuple included in the one or more inner headers;
wherein the hash value for the packet is determined by applying an XOR operator to elements of the 5-tuple; and
wherein the hash value is used as an index in a lookup table to determine the particular VTI; and
wherein the lookup table comprises mappings between hash values and VTI device identifiers.

### Claim 17 (depends on 15)

The edge service gateway of claim 15, wherein the hash value for the packet is determined based on contents of an inner VLAN header of the packet.

### Claim 18 (depends on 15)

The edge service gateway of claim 15, wherein an IPsec VPN tunnel of the plurality of IPsec VPN tunnels is associated with a corresponding VPN session and is defined at least by two endpoints, each of the endpoints having a unique underlay VPN address; and
wherein a VTI of the plurality of VTIs has an associated VTI address which is uniquely mapped onto one of two VPN addresses of an IPsec VPN tunnel of the plurality of IPsec VPN tunnels.

### Claim 19 (depends on 15)

The edge service gateway of claim 15, storing additional instructions which, when executed by the one or more processers, cause the one or more processors to perform:
before relaying the packet on the gateway output port associated with the particular VTI:
extracting from the packet the contents of the one or more inner headers;
storing the contents of the one or more inner headers in a memory buffer to be used to compute the hash value;
determining one or more outer headers for the packet; and
encapsulating the packet with the one or more outer headers.

### Claim 20 (depends on 15)

The edge service gateway of claim 15, storing additional instructions which, when executed by the one or more processers, cause the one or more processors to perform:
detecting the packet;
parsing the packet to determine whether a network identifier included in the packet indicates that the packet is intended to a stretched network implemented in a remote site; and
in response to determining that the network identifier included in the packet indicates that the packet is intended to the stretched network implemented in the remote site,
relaying the packet on a logical router port of a logical router communicatively coupled to the gateway and indicating that the packet is to be communicated via the particular IPsec VPN tunnel of the plurality of IPsec VPN tunnels to the remote site.
