# US 2023/0143157 A1 · Logical switch level load balancing of l2vpn traffic

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

- Number: US 2023/0143157 A1
- Document ID: US20230143157A1
- Status: Published application
- Kind: A1
- Application number: 17/564,274
- Filed: 2021-12-29
- Published: 2023-05-11
- Earliest claimed: 2021-11-08
- Assignees: VMware, Inc.
- Applicants: Vmware, Inc.
- Inventors: Deepika Solanki; Yong Wang; Sarthak Ray
- Web page: https://patentgrep.com/patent/US20230143157A1

## CPC

- H04L 63/029: {Firewall traversal, e.g. tunnelling or, creating pinholes}
- H04L 63/0272: {Virtual private networks}
- H04L 63/0428: {wherein the data content is protected, e.g. by encrypting or encapsulating the payload}
- H04L 63/162: {at the data link layer}
- H04L 63/164: {at the network layer}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The disclosure provides an approach for logical switch level load balancing of Layer 2 virtual private network (L2VPN) traffic. A method of securing communications with a peer gateway generally includes establishing, at a virtual tunnel interface of a local gateway, a plurality of security tunnels with the peer gateway. Each of the plurality of security tunnels is associated with a different set of one or more layer 2 segments and with one or more security associations (SAs) with the peer gateway. The method generally includes receiving a packet, at the local gateway, via a first L2 segment. The method generally includes selecting one of the plurality of security tunnels and an SA associated with the selected security tunnel based on the L2 segment via which the packet was received. The method generally includes encrypting and encapsulating the packet based on the selected security tunnel and SA.

## Claims

### Claim 1

A method of securing communications with a peer gateway, comprising:
establishing, at a virtual tunnel interface (VTI) of a local gateway, a plurality of security tunnels with the peer gateway by engaging with the peer gateway in a tunnel creation according to a security protocol, wherein each of the plurality of security tunnels is associated with a different set of one or more layer 2 (L2) segments, and wherein each of the plurality of security tunnels is associated with one or more security associations (SAs) with the peer gateway;
receiving a packet, at the local gateway, via a first L2 segment;
selecting one of the plurality of security tunnels and an SA associated with the selected security tunnel based on the L2 segment via which the packet was received; and
encrypting and encapsulating the packet based on the selected security tunnel and SA.

### Claim 2 (depends on 1)

The method of claim 1, wherein each of the plurality of security tunnels is associated with a single L2 segment, and wherein, after encrypting and encapsulating the packet, the packet does not contain an identifier of the L2 segment.

### Claim 3 (depends on 1)

The method of claim 1, wherein:
each set of one or more L2 segments is associated with an L2 identifier (ID); and
the method further comprises, after establishing each security tunnel, of the plurality of security tunnels, storing a hash of the L2 ID of the set of one or more L2 segments associated with the security tunnel, and a mapping of the hash to a tunnel ID of the security tunnel.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
encapsulating the packet with a generic routing encapsulation (GRE) header comprising a source Internet Protocol (IP) address corresponding to an IP address of the local gateway and a destination IP address corresponding to an IP address of the peer gateway,
wherein storing the hash of the L2 ID comprises storing a hash of the L2 ID and one or more of the source IP address in the GRE header or the destination IP address in the GRE header.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
receiving a second packet via a second L2 segment;
determining the second L2 segment is not associated with a security tunnel with the peer gateway; and
discarding the second packet based on the determination.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
receiving a second packet via a second L2 segment;
determining the second L2 segment is not associated with a security tunnel with the peer gateway; and
selecting a default security tunnel based on the determination.

### Claim 7 (depends on 1)

The method of claim 1, wherein a first security tunnel of the plurality of security tunnels is associated with a first set of L2 segments comprising a plurality of L2 segments.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
establishing, at a second VTI of the local gateway, a second plurality of security tunnels with a second peer gateway by engaging with the peer gateway in a tunnel creation according to a security protocol, wherein one or more of the second plurality of security tunnels is associated with the one or more L2 segments;
receiving a second packet, at the local gateway, via the first L2 segment, wherein the second packet is for the second peer gateway;
selecting one of the second plurality of security tunnels and an SA associated with the selected security tunnel based on the L2 segment via which the packet was received; and
encrypting and encapsulating the packet based on the selected security tunnel and SA.

### Claim 9

A system comprising:
one or more processors; and
at least one memory, the one or more processors and the at least one memory configured to:
establish, at a virtual tunnel interface (VTI) of a local gateway, a plurality of security tunnels with a peer gateway by engaging with the peer gateway in a tunnel creation according to a security protocol, wherein each of the plurality of security tunnels is associated with a different set of one or more layer 2 (L2) segments, and wherein each of the plurality of security tunnels is associated with one or more security associations (SAs) with the peer gateway;
receive a packet, at the local gateway, via a first L2 segment;
select one of the plurality of security tunnels and an SA associated with the selected security tunnel based on the L2 segment via which the packet was received; and
encrypt and encapsulate the packet based on the selected security tunnel and SA.

### Claim 10 (depends on 9)

The system of claim 9, wherein each of the plurality of security tunnels is associated with a single L2 segment, and wherein, after encrypting and encapsulating the packet, the packet does not contain an identifier of the L2 segment.

### Claim 11 (depends on 9)

The system of claim 9, wherein:
each set of one or more L2 segments is associated with an L2 identifier (ID); and
the one or more processors and the at least one memory further configured to, after establishing each security tunnel, of the plurality of security tunnels, store a hash of the L2 ID of the set of one or more L2 segments associated with the security tunnel, and a mapping of the hash to a tunnel ID of the security tunnel.

### Claim 12 (depends on 11)

The system of claim 11, the one or more processors and the at least one memory further configured to:
encapsulate the packet with a generic routing encapsulation (GRE) header comprising a source Internet Protocol (IP) address corresponding to an IP address of the local gateway and a destination IP address corresponding to an IP address of the peer gateway,
wherein the one or more processors and the at least one memory are configured to store the hash of the L2 ID and one or more of the source IP address in the GRE header or the destination IP address in the GRE header.

### Claim 13 (depends on 9)

The system of claim 9, the one or more processors and the at least one memory further configured to:
receive a second packet via a second L2 segment;
determine the second L2 segment is not associated with a security tunnel with the peer gateway; and
discard the second packet based on the determination.

### Claim 14 (depends on 9)

The system of claim 9, the one or more processors and the at least one memory further configured to:
receive a second packet via a second L2 segment;
determine the second L2 segment is not associated with a security tunnel with the peer gateway; and
select a default security tunnel based on the determination.

### Claim 15 (depends on 9)

The system of claim 9, wherein a first security tunnel of the plurality of security tunnels is associated with a first set of L2 segments comprising a plurality of L2 segments.

### Claim 16 (depends on 9)

The system of claim 9, the one or more processors and the at least one memory further configured to:
establish, at a second VTI of the local gateway, a second plurality of security tunnels with a second peer gateway by engaging with the peer gateway in a tunnel creation according to a security protocol, wherein one or more of the second plurality of security tunnels is associated with the one or more L2 segments;
receive a second packet, at the local gateway, via the first L2 segment, wherein the second packet is for the second peer gateway;
select one of the second plurality of security tunnels and an SA associated with the selected security tunnel based on the L2 segment via which the packet was received; and
encrypt and encapsulate the packet based on the selected security tunnel and SA.

### Claim 17

A non-transitory computer-readable medium comprising instructions that, when executed by one or more processors of a computing system, cause the computing system to perform operations for securing communications with a peer gateway, the operations comprising:
establishing, at a virtual tunnel interface (VTI) of a local gateway, a plurality of security tunnels with the peer gateway by engaging with the peer gateway in a tunnel creation according to a security protocol, wherein each of the plurality of security tunnels is associated with a different set of one or more layer 2 (L2) segments, and wherein each of the plurality of security tunnels is associated with one or more security associations (SAs) with the peer gateway;
receiving a packet, at the local gateway, via a first L2 segment;
selecting one of the plurality of security tunnels and an SA associated with the selected security tunnel based on the L2 segment via which the packet was received; and
encrypting and encapsulating the packet based on the selected security tunnel and SA.

### Claim 18 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein each of the plurality of security tunnels is associated with a single L2 segment, and wherein, after encrypting and encapsulating the packet, the packet does not contain an identifier of the L2 segment.

### Claim 19 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein:
each set of one or more L2 segments is associated with an L2 identifier (ID); and
the operations further comprise, after establishing each security tunnel, of the plurality of security tunnels, storing a hash of the L2 ID of the set of one or more L2 segments associated with the security tunnel, and a mapping of the hash to a tunnel ID of the security tunnel.

### Claim 20 (depends on 19)

The non-transitory computer-readable medium of claim 19, the operations further comprising:
encapsulating the packet with a generic routing encapsulation (GRE) header comprising a source Internet Protocol (IP) address corresponding to an IP address of the local gateway and a destination IP address corresponding to an IP address of the peer gateway,
wherein storing the hash of the L2 ID comprises storing a hash of the L2 ID and one or more of the source IP address in the GRE header or the destination IP address in the GRE header.
