IP Library › Granted Patent US 10,911,398
Granted Patent B2
US 10,911,398 · App. 16/052,923 · Granted Feb 2, 2021

Packet generation method based on server cluster and load balancer

Inventors: Qimeng Wei (Shenzhen, CN); Fei Gong (Shenzhen, CN); Min Hu (Shenzhen, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
H04L61/103H04L45/02H04L45/74H04L61/2007H04L61/6022H04L67/1004
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,911,398
App. No.
16/052,923
Granted
Feb 2, 2021
Kind
B2
Abstract

A packet generation method based on a server cluster and a load balancer, where the method includes receiving a client request packet, determining a destination server according to a preset load balancing policy, sending an Address Resolution Protocol (ARP) request packet according to the destination Internet Protocol (IP) address, obtaining an ARP response packet according to the ARP request packet, the initial Media Access Control (MAC) address is different from an actual MAC address of the destination server, and updating the destination IP address according to the initial MAC address to obtain an updated client request packet, where the updated client request packet includes the source IP address and an updated destination IP address. In this way, in a process of transmitting a packet, a source IP address of a client is detected on a network layer without changing a source IP address in a request packet.

Claims (45)

1. A packet generation method based on a server cluster and performed by a load balancer, the packet generation method comprising:

obtaining a client request packet comprising a source Internet Protocol (IP) address and a destination IP address;

determining a destination server according to a preset load balancing policy;

sending an Address Resolution Protocol (ARP) request packet according to the destination IP address;

intercepting and processing the ARP request packet within the load balancer;

obtaining an ARP response packet according to the ARP request packet by:

translating an IP address of the destination server according to a preset algorithm to obtain an initial Media Access Control (MAC) address of the destination server from a preset form according to the IP address of the destination server, wherein the preset form stores a correspondence between an IP address of a server and a MAC address; and

obtaining the ARP response packet according to the initial MAC address of the destination server, wherein the ARP response packet comprises the initial MAC address of the destination server, wherein the initial MAC address of the destination server is different from an actual MAC address of the destination server, and wherein the initial MAC address of the destination server is translated from the actual MAC address of the destination server; and

updating the destination IP address according to the initial MAC address of the destination server to obtain an updated client request packet, wherein the updated client request packet comprises the source IP address and an updated destination IP address.

2. The packet generation method of claim 1 , wherein the load balancer and at least one server in the server cluster are parts of different virtual local area networks (VLANs).

3. The packet generation method of claim 2 , wherein the load balancer and each server within the server cluster share a virtual IP (VIP) address.

4. The packet generation method of claim 1 , further comprising storing an ARP proxy response flow table, an address translation flow table, and a learning flow table.

5. The packet generation method of claim 4 , further comprising calculating the actual MAC address of the destination server using the address translation flow table and the initial MAC address.

6. The packet generation method of claim 1 , wherein the load balancer is coupled to a client through the Internet and is coupled to the server cluster through a wide area network (WAN).

7. The packet generation method of claim 1 , wherein the load balancer is coupled to a client through the Internet and is coupled to the server cluster through a local area network (LAN).

8. The packet generation method of claim 1 , wherein the load balancer operates in a direct routing (DR) mode.

9. The packet generation method of claim 1 , wherein the load balancer is disposed at an edge of the server cluster.

10. The packet generation method of claim 1 , further comprising selecting a server from the server cluster for the client request packet.

11. A load balance apparatus, comprising:

a memory configured to store a plurality of instructions; and

a processor coupled to the memory, wherein the instructions cause the processor to be configured to:

obtain a client request packet comprising a source Internet Protocol (IP) address and a destination IP address;

determine a destination server according to a preset load balancing policy;

send an Address Resolution Protocol (ARP) request packet according to the destination IP address;

intercept and process the ARP request packet within the load balancing apparatus;

obtain an ARP response packet according to the ARP request packet, wherein to obtain the ARP response packet according to the ARP request packet, the instructions further cause the processor to be configured to:

translate an IP address of the destination server according to a preset algorithm to obtain an initial Media Access Control (MAC) address of the destination server from a preset form according to the IP address of the destination server, wherein the preset form stores a correspondence between an IP address of a server and a MAC address; and

obtain the ARP response packet according to the initial MAC address of the destination server, wherein the ARP response packet comprises the initial MAC address of the destination server, wherein the initial MAC address is different from an actual MAC address of the destination server is translated from the actual MAC address of the destination server; and

update the destination IP address according to the initial MAC address of the destination server to obtain an updated client request packet, wherein the updated client request packet comprises the source IP address and an updated destination IP address.

12. The load balance apparatus of claim 11 , wherein the updated destination IP address is a same as the IP address of the destination server.

13. The load balance apparatus of claim 11 , wherein the load balancer apparatus is disposed at an edge of a server cluster, and wherein at least one server in the server cluster is part of a different virtual local area network (VLAN).

14. The load balance apparatus of claim 11 , wherein the instructions further cause the processor to be configured to store an ARP proxy response flow table, an address translation flow table, and a learning flow table.

15. The load balance apparatus of claim 14 , wherein the instructions further cause the processor to be configured to calculate the actual MAC address of the destination server using the address translation flow table and the initial MAC address.

16. A non-transitory computer-readable storage medium comprising instructions which, when executed by a computer, cause the computer to perform a packet generation method, comprising:

obtaining a client request packet comprising a source Internet Protocol (IP) address and a destination IP address;

determining a destination server according to a preset load balancing policy;

sending an Address Resolution Protocol (ARP) request packet according to the destination IP address;

intercepting and processing the ARP request packet within the computer;

obtaining an ARP response packet according to the ARP request packet by:

translating an IP address of the destination server according to a preset algorithm to obtain an initial Media Access Control (MAC) address of the destination server from a preset form according to the IP address of the destination server, wherein the preset form stores a correspondence between an IP address of a server and a MAC address; and

obtaining the ARP response packet according to the initial MAC address of the destination server, wherein the ARP response packet comprises the initial MAC address of the destination server, wherein the initial MAC address is different from an actual MAC address of the destination server, and wherein the initial MAC address of the destination server is translated from the actual MAC address of the destination server; and

updating the destination IP address according to the initial MAC address of the destination server to obtain an updated client request packet, wherein the updated client request packet comprises the source IP address and an updated destination IP address.

17. The non-transitory computer-readable storage medium of claim 16 , wherein the load balancer apparatus is disposed at an edge of a server cluster, and wherein at least one server in the server cluster is part of a different virtual local area network (VLAN).

18. The non-transitory computer-readable storage medium of claim 16 , wherein the packet generation method further comprises storing an ARP proxy response flow table, an address translation flow table, and a learning flow table.

19. The non-transitory computer-readable storage medium of claim 18 , wherein the packet generation method further comprises calculating the actual MAC address of the destination server using the address translation flow table and the initial MAC address.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 17, 2018
From: WEI, QIMENG; GONG, FEI; HU, MIN
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 046890/0875 →
Priority Claims (2)
CN 2016 1 0072967 · Feb 2, 2016 · national
CN 2016 1 0944661 · Nov 2, 2016 · national
Continuity (2)
Continuation PCTCN2016105230 · Nov 9, 2016
Related Publication 20180343228A1 · Nov 29, 2018
Cited By (1)
US 12,199,940