# US 2022/0045934 A1 · Method and apparatus of automatic route optimization in a private virtual network for client devices of a local network

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

- Number: US 2022/0045934 A1
- Document ID: US20220045934A1
- Status: Published application
- Kind: A1
- Application number: 17/509,904
- Filed: 2021-10-25
- Published: 2022-02-10
- Earliest claimed: 2019-04-17
- Assignees: Cloudflare, Inc.
- Applicants: Cloudflare, Inc.
- Inventors: Christopher Philip Branch
- Web page: https://patentgrep.com/patent/US20220045934A1

## CPC

- H04L 45/02: Topology update or discovery
- H04L 45/123: {Evaluation of link metrics (techniques for monitoring network metrics H04L43/08)}
- H04L 45/124: {using a combination of metrics}
- H04L 45/74: Address processing for routing
- H04L 63/0272: {Virtual private networks}
- H04L 63/08: {for authentication of entities (cryptographic mechanisms or cryptographic arrangements for entity authentication H04L9/32)}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method and a VPN server for VPN route optimization are described. The VPN server establishes a first VPN connection with a first client device and a second VPN connection with a second client device. The VPN server determines that the first and second client devices are part of a same local network; and responsive to determining that the first and the second client devices are part of the same local network, transmits, to the first client device through the first VPN connection, a second public network address of the second client device, and to the second client device through the second VPN connection, a first public network address of the first client device. The transmission of the first and second public network addresses causes the first client device to determine an optimal route from the first client device to the second client device for the traffic in the VPN.

## Claims

### Claim 1

A method, in a virtual private network (VPN) server, of route optimization in a VPN, the method comprising:
establishing a first VPN connection with a first client device, wherein the VPN server is remote from the first client device;
establishing a second VPN connection with a second client device, wherein the VPN server is remote from the second client device;
receiving, through the first VPN connection, traffic from the first client device that is destined to the second client device;
transmitting the traffic to the second client device through the second VPN connection;
determining that the first client device and the second client device are part of a same local network; and
responsive to determining that the first client device and the second client device are part of the same local network, performing the following:
transmitting, to the first client device and through the first VPN connection, a second public network address of the second client device,
transmitting, to the second client device and through the second VPN connection, a first public network address of the first client device, and
wherein transmitting the first public network address and the second public network address causes the first client device to determine an optimal route from the first client device to the second client device for the traffic in the VPN.

### Claim 2 (depends on 1)

The method of claim 1 further comprising:
receiving from the first client device a first local network address identifying the first client device in the local network;
receiving from the second client device a second local network address identifying the second client device in the local network; and
wherein determining that the first client device and the second client device are in the same local network is performed based on the first local network address and the second local network address.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
receiving from the first client device a first set of one or more local network addresses identifying a first set of one or more client devices located in the local network that the first client device desires to communicate with in the VPN;
receiving from the second client device a second set of one or more local network addresses identifying a second set of one or more client devices located in the local network that the second client device desires to communicate with in the VPN; and
wherein determining that the first client device and the second client device are part of the same local network is performed based on the first set of local network addresses and the second set of local network addresses.

### Claim 4 (depends on 1)

The method of claim 1 further comprising:
transmitting, to the first client device, routing metrics related to the traffic transmitted through the first VPN connection and the second VPN connection; and
wherein causing the first client device to determine an optimal route for the traffic in the VPN is performed at least in part based on the routing metrics.

### Claim 5 (depends on 4)

The method of claim 4, wherein the routing metrics include for each one of the first VPN connection and the second VPN connection one or more of a measure of link utilization, an indication of a number of hops, a measure of speed, a measure of packet loss, a measure of latency, a measure of path reliability, a measure of path bandwidth, and a measure of throughput.

### Claim 6 (depends on 1)

The method of claim 1, wherein to determine the optimal route for the traffic in the VPN includes to determine a route in the local network for a third VPN connection for transmitting traffic between the first client device and the second client device wherein the third VPN connection avoids the VPN server.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
transmitting, to the second client device, first VPN credentials of the first client device; and
transmitting, to the first client device, second VPN credentials of the second client device; and
wherein the third VPN connection is to be established based on the first VPN credentials and the second VPN credentials.

### Claim 8 (depends on 7)

The method of claim 7, wherein the first VPN credentials include first cryptographic credentials allowing secure communication through the first VPN connection and the second VPN credentials include second cryptographic credentials allowing secure communication through the second VPN connection, and the transmitting of the first VPN credentials and the second VPN credentials allow for communication through the third VPN connection to be cryptographically secured based on the first cryptographic credentials and the second cryptographic credentials.

### Claim 9

A virtual private network (VPN) server for traffic optimization in a virtual private network (VPN), the VPN server comprising:
one or more processors; and
a non-transitory computer readable storage medium that stores code, which when executed by the one or more processors causes the VPN server to perform the following operations:
establishing a first VPN connection with a first client device, wherein the VPN server is remote from the first client device;
establishing a second VPN connection with a second client device, wherein the VPN server is remote from the second client device;
receiving, through the first VPN connection, traffic from the first client device that is destined to the second client device;
transmitting the traffic to the second client device through the second VPN connection;
determining that the first client device and the second client device are part of a same local network; and
responsive to determining that the first client device and the second client device are part of the same local network, performing the following:
transmitting, to the first client device and through the first VPN connection, a second public network address of the second client device,
transmitting, to the second client device and through the second VPN connection, a first public network address of the first client device, and
wherein transmitting the first public network address and the second public network address causes the first client device to determine an optimal route from the first client device to the second client device for the traffic in the VPN.

### Claim 10 (depends on 9)

The VPN server of claim 9, wherein the operations further comprise:
receiving from the first client device a first local network address identifying the first client device in the local network;
receiving from the second client device a second local network address identifying the second client device in the local network; and
wherein determining that the first client device and the second client device are in the same local network is performed based on the first local network address and the second local network address.

### Claim 11 (depends on 9)

The VPN server of claim 9, wherein the operations further comprise:
receiving from the first client device a first set of one or more local network addresses identifying a first set of one or more client devices located in the local network that the first client device desires to communicate with in the VPN;
receiving from the second client device a second set of one or more local network addresses identifying a second set of one or more client devices located in the local network that the second client device desires to communicate with in the VPN; and
wherein determining that the first client device and the second client device are part of the same local network is performed based on the first set of local network addresses and the second set of local network addresses.

### Claim 12 (depends on 9)

The VPN server of claim 9, wherein the operations further comprise:
transmitting, to the first client device, routing metrics related to the traffic transmitted through the first VPN connection and the second VPN connection; and
wherein causing the first client device to determine an optimal route for the traffic in the VPN is performed at least in part based on the routing metrics.

### Claim 13 (depends on 12)

The VPN server of claim 12, wherein the routing metrics include for each one of the first VPN connection and the second VPN connection one or more of a measure of link utilization, an indication of a number of hops, a measure of speed, a measure of packet loss, a measure of latency, a measure of path reliability, a measure of path bandwidth, and a measure of throughput.

### Claim 14 (depends on 9)

The VPN server of claim 9, wherein to determine the optimal route for the traffic in the VPN includes to determine a route in the local network for a third VPN connection for transmitting traffic between the first client device and the second client device wherein the third VPN connection avoids the VPN server.

### Claim 15 (depends on 14)

The VPN server of claim 14, wherein the operations further comprise:
transmitting, to the second client device, first VPN credentials of the first client device; and
transmitting, to the first client device, second VPN credentials of the second client device; and
wherein the third VPN connection is to be established based on the first VPN credentials and the second VPN credentials.

### Claim 16 (depends on 15)

The VPN server of claim 15, wherein the first VPN credentials include first cryptographic credentials allowing secure communication through the first VPN connection and the second VPN credentials include second cryptographic credentials allowing secure communication through the second VPN connection, and the transmitting of the first VPN credentials and the second VPN credentials allow for communication through the third VPN connection to be cryptographically secured based on the first cryptographic credentials and the second cryptographic credentials.

### Claim 17

A non-transitory computer readable storage medium that stores instructions which when executed by one or more processors of a Virtual Private Network (VPN) server cause said processors to perform the following operations for traffic optimization in a VPN, the operations comprising:
establishing a first VPN connection with a first client device, wherein the VPN server is remote from the first client device;
establishing a second VPN connection with a second client device, wherein the VPN server is remote from the second client device;
receiving, through the first VPN connection, traffic from the first client device that is destined to the second client device;
transmitting the traffic to the second client device through the second VPN connection;
determining that the first client device and the second client device are part of a same local network; and
responsive to determining that the first client device and the second client device are part of the same local network, performing the following:
transmitting, to the first client device and through the first VPN connection, a second public network address of the second client device,
transmitting, to the second client device and through the second VPN connection, a first public network address of the first client device, and
wherein transmitting the first public network address and the second public network address causes the first client device to determine an optimal route from the first client device to the second client device for the traffic in the VPN.

### Claim 18 (depends on 17)

The non-transitory computer readable storage medium of claim 17, wherein the operations further comprise:
receiving from the first client device a first local network address identifying the first client device in the local network;
receiving from the second client device a second local network address identifying the second client device in the local network; and
wherein determining that the first client device and the second client device are in the same local network is performed based on the first local network address and the second local network address.

### Claim 19 (depends on 17)

The non-transitory computer readable storage medium of claim 17, wherein the operations further comprise:
receiving from the first client device a first set of one or more local network addresses identifying a first set of one or more client devices located in the local network that the first client device desires to communicate with in the VPN;
receiving from the second client device a second set of one or more local network addresses identifying a second set of one or more client devices located in the local network that the second client device desires to communicate with in the VPN; and
wherein determining that the first client device and the second client device are part of the same local network is performed based on the first set of local network addresses and the second set of local network addresses.

### Claim 20 (depends on 17)

The non-transitory computer readable storage medium of claim 17, wherein the operations further comprise:
transmitting, to the first client device, routing metrics related to the traffic transmitted through the first VPN connection and the second VPN connection; and
wherein causing the first client device to determine an optimal route for the traffic in the VPN is performed at least in part based on the routing metrics.
