WO2014135024A1 - Procédé et passerelle d'acheminement de paquet - Google Patents

Procédé et passerelle d'acheminement de paquet Download PDF

Info

Publication number
WO2014135024A1
WO2014135024A1 PCT/CN2014/072604 CN2014072604W WO2014135024A1 WO 2014135024 A1 WO2014135024 A1 WO 2014135024A1 CN 2014072604 W CN2014072604 W CN 2014072604W WO 2014135024 A1 WO2014135024 A1 WO 2014135024A1
Authority
WO
WIPO (PCT)
Prior art keywords
mac address
address field
gateway
virtual machine
value
Prior art date
Application number
PCT/CN2014/072604
Other languages
English (en)
Chinese (zh)
Inventor
郑合文
汪洋
吴钦
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2014135024A1 publication Critical patent/WO2014135024A1/fr

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/59Network arrangements, protocols or services for addressing or naming using proxies for addressing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Definitions

  • the existing carrier network has multi-tenant isolation requirements, and multiple tenants have parallel address spaces and do not affect each other.
  • DC data center
  • DC network included in different operators is different, and one operator can have multiple DC networks.
  • Different DC networks can be different tenants.
  • a tenant can have multiple virtual machines (Virtual Machines, VMs), multiple VMs can be distributed on different physical servers, and different physical servers may represent different DC networks, that is, DC networks are physical.
  • the network where the server is located, multiple VMs can communicate through the tunnel established by the server. Because different physical servers use different tunnel technologies, communication between multiple VMs requires a heterogeneous virtual network gateway to implement different DC networks. Interoperability.
  • the first gateway modifies the value of the first source MAC address field in the Ethernet frame of the first bearer IP address from the MAC address of the first virtual machine to the identifier of the first gateway, Obtaining an Ethernet frame carrying the second IP packet;
  • the first gateway receives the first bearer IP packet sent by the first virtual machine Before the Ethernet frame, the method further includes:
  • the first gateway receives an Ethernet frame of the first bearer ARP response packet sent by the second gateway, where the Ethernet frame of the first bearer ARP response packet carries a third source MAC address field and a third destination MAC address. a field, a third sender IP address field, a third sender MAC address field, a third Target IP address field, and a third Target MAC address field, wherein the value of the third sender IP address field is an IP address of the second virtual machine
  • the value of the third source MAC address field and the value of the third sender MAC address field are the identifiers of the second gateway, and the value of the third Target IP address field is the value of the first virtual machine.
  • An IP address, a value of the third destination MAC address field and a value of the third target MAC address field are identifiers of the first gateway;
  • the Ethernet frame of the request packet carries the fourth source MAC address field, the fourth destination MAC address field, the fourth sender IP address field, the fourth sender MAC address field, and the third frame of the third bearer ARP request packet.
  • the first gateway sends a first request message for acquiring a MAC address of the second virtual machine to the information collection server, where the first request message carries an IP address of the second virtual machine; the first gateway receives The information collection server carries the first response message returned by the identifier of the second gateway and the IP address corresponding to the second virtual machine, and the identifier of the second gateway is carried in the first response message. ;
  • the second gateway is configured according to an IP address of the second virtual machine and the second virtual machine
  • an Ethernet frame of the second bearer address resolution protocol ARP request packet sent by the first gateway where the second frame of the second bearer ARP request packet carries the second source MAC address field, and the second a destination MAC address field, a second sender IP address field, a second sender MAC address field, a second target Target IP address field, and a second target Target MAC address field, wherein the value of the second sender IP address field is the first The IP address of the virtual machine, the value of the second source MAC address field and the value of the second sender MAC address field are all identifiers of the first gateway, and the value of the second target Target IP address field is An IP address of the second virtual machine, where the value of the second destination MAC address field is a broadcast MAC address; and the value of the second Target MAC address field is an unknown MAC address;
  • the second gateway by using the value of the third source MAC address field and the value of the third sender MAC address field in the Ethernet frame of the third bearer ARP response packet, by the MAC of the second virtual machine
  • the address is changed to the identifier of the second gateway, and the first bearer ARP response report is obtained.
  • the second gateway sends the Ethernet frame of the first bearer ARP response packet to the first gateway.
  • the second gateway by using the value of the fifth source MAC address field and the value of the fifth sender MAC address field in the Ethernet frame of the fourth bearer ARP request packet, by the MAC of the second virtual machine
  • the address is changed to the identifier of the second gateway, and the fourth message is sent to the information collection server, where the fourth message carries the correspondence between the identifier of the second gateway and the IP address of the second virtual machine.
  • the information collecting server records the correspondence between the identifier of the second gateway and the IP address of the second virtual machine.
  • the method before the second gateway receives the Ethernet frame of the second bearer Internet Protocol IP packet sent by the first gateway, the method also includes:
  • the first receiving module is configured to receive an Ethernet frame that is sent by the first virtual machine, and the first source IP address field is carried in the Ethernet frame of the first bearer IP packet.
  • a source media access control MAC address field, a first destination MAC address field, and a first destination IP address field where the value of the first source IP address field is an IP address of the first virtual machine,
  • the value of the source MAC address field is the MAC address of the first virtual machine, and the value of the first destination MAC address field is the identifier of the second gateway corresponding to the second virtual machine, where the first destination IP address field is The value is an IP address of the second virtual machine;
  • a first modifying module configured to modify, by the MAC address of the first virtual machine, the value of the first source MAC address field in the Ethernet frame of the first bearer IP packet to the identifier of the first gateway Obtaining an Ethernet frame carrying the second IP packet;
  • the first sending module is configured to send an Ethernet frame of the second bearer IP packet to the second gateway according to the identifier of the second gateway.
  • the gateway further includes:
  • a first recording module configured to: after receiving an Ethernet frame of the first bearer IP packet sent by the first virtual machine, record the first virtual machine according to the received Ethernet frame of the first bearer IP packet Corresponding relationship between the IP address and the MAC address of the first virtual machine is the first virtual machine.
  • the second receiving module is configured to receive an Ethernet frame of the first bearer address resolution protocol ARP request packet sent by the first virtual machine before receiving the Ethernet frame of the first bearer IP packet sent by the first virtual machine
  • the Ethernet frame of the first bearer ARP request packet carries a second source MAC address field, a second destination MAC address field, a second sender sender IP address field, a second sender MAC address field, and a second target Target IP.
  • a broadcast module configured to broadcast an Ethernet frame of the second bearer ARP request packet to a second gateway, where the second gateway is located in a second data center DC network, where the first gateway and the first virtual machine are located A first DC network, the tenant rents the first virtual machine and leases virtual machines in the second DC network.
  • the gateway further includes:
  • a third receiving module configured to: after the Ethernet frame of the second bearer ARP request packet is broadcast to the second gateway, receive an Ethernet frame of the first bearer ARP response packet sent by the second gateway, where the An Ethernet frame carrying an ARP response packet carries a third source MAC address field, a third destination MAC address field, a third sender IP address field, a third sender MAC address field, a third Target IP address field, and a third Target MAC.
  • An address field where the value of the third sender IP address field is an IP address of the second virtual machine, and a value of the third source MAC address field and a value of the third sender MAC address field are the An identifier of the second gateway, where the value of the third Target IP address field is an IP address of the first virtual machine, and the value of the third destination MAC address field and the value of the third target MAC address field are both Said the first gateway;
  • a third modifying module configured to: according to the pre-stored correspondence between the IP address of the first virtual machine and the MAC address of the first virtual machine, the same as the Ethernet frame of the first bearer ARP response packet The value of the third destination MAC address field and the value of the third target MAC address field are modified by the identifier of the first gateway to be the MAC address of the first virtual machine, and the second bearer ARP response packet is obtained. frame;
  • the second sending module is configured to send, by using the IP address of the first virtual machine and the MAC address of the first virtual machine, the Ethernet frame of the second bearer ARP response packet to the first virtual machine.
  • the gateway further includes:
  • a fourth receiving module configured to receive, after receiving the Ethernet frame of the first bearer IP packet sent by the first virtual machine, a third bearer address resolution protocol ARP request packet sent by the first virtual machine
  • the Ethernet frame carries the fourth source in the Ethernet frame of the third bearer ARP request packet.
  • a MAC address field, a fourth destination MAC address field, a fourth sender IP address field, a fourth sender MAC address field, a fourth Target IP address field, and a fourth Target MAC address field, and the value of the fourth sender IP address field is The IP address of the first virtual machine, the value of the fourth source MAC address field, and the value of the fourth sender MAC address field are both the MAC address of the first virtual machine, and the fourth target Target IP
  • the value of the address field is the IP address of the second virtual machine, the value of the fourth destination MAC address field is a broadcast MAC address, and the value of the fourth target MAC address segment is an unknown MAC address;
  • a third sending module configured to send, to the information collecting server, a first request message for acquiring a MAC address of the second virtual machine, where the first request message carries an IP address of the second virtual machine;
  • a fifth receiving module configured to receive, by the information collecting server, a first response message that is returned according to the pre-stored identifier of the second gateway and the IP address corresponding to the second virtual machine, where the first response message is Carrying the identifier of the second gateway;
  • a fourth sending module configured to send, to the first virtual machine, an Ethernet frame carrying a fourth ARP response packet, where the fourth bearer ARP responds with an identifier of the second gateway in an Ethernet frame And causing, by the first virtual machine, the value of the first destination MAC address field in the Ethernet frame of the first bearer IP packet to be the identifier of the second gateway.
  • a fourth aspect of the embodiments of the present invention provides a gateway, including:
  • a first receiving module configured to receive an Ethernet frame that is sent by the first gateway, and that is configured by the first gateway, where the Ethernet frame carries the first source IP address field and the first source media interface
  • the value of the first destination MAC address field is the identifier of the second gateway corresponding to the second virtual machine, and the value of the first destination IP address field is the second identifier.
  • the IP address of the virtual machine
  • a first modifying module configured to: first, according to a pre-stored correspondence between an IP address of the second virtual machine and a MAC address of the second virtual machine, the first of the Ethernet frames of the second bearer IP packet The value of the destination MAC address field is modified by the identifier of the second gateway to be the MAC address of the second virtual machine, to obtain an Ethernet frame of the third bearer IP packet;
  • the first sending module is configured to send the Ethernet frame of the third bearer IP packet to the second virtual machine according to the IP address of the second virtual machine and the MAC address of the second virtual machine.
  • the gateway further includes:
  • a second receiving module configured to receive an Ethernet frame of the second bearer address resolution protocol ARP request packet sent by the first gateway, before receiving the Ethernet frame of the second bearer Internet Protocol IP packet sent by the first gateway,
  • the Ethernet frame carrying the second ARP request packet carries the second source MAC address field, the second destination MAC address field, the second sender IP address field, the second sender MAC address field, the second target target IP address field, and a second target Target MAC address field, where the value of the second sender IP address field is an IP address of the first virtual machine, a value of the second source MAC address field, and a value of the second sender MAC address field
  • the identifier of the first gateway, the value of the second target Target IP address field is an IP address of the second virtual machine, and the value of the second destination MAC address field is a broadcast MAC address;
  • the value of the second Target MAC address field is an unknown MAC address;
  • a first broadcast module configured to broadcast an Ethernet frame of the second bearer ARP request packet to a virtual machine in a second data center DC network, where the first gateway and the first virtual machine are located in a first DC network
  • the second gateway and the second virtual machine are located in the second DC network, and the tenant rents the first virtual machine and leases a virtual machine in the second DC network.
  • a third receiving module configured to: after the Ethernet frame of the second bearer ARP request packet is broadcast to the virtual machine in the second data center DC network, receive the third bearer ARP response sent by the second virtual machine
  • the Ethernet frame of the third bearer ARP response packet carries the third source MAC address field, the third destination MAC address field, the third sender IP address field, the third sender MAC address field, and the third a target IP address field and a third Target MAC address field, where the value of the third sender IP address field is an IP address of the second virtual machine, a value of the third source MAC address field, and the third sender MAC address
  • the value of the address field is the MAC address of the second virtual machine
  • the value of the third Target IP address field is the IP address of the first virtual machine, the value of the third destination MAC address field
  • the value of the third Target MAC address field is an identifier of the first gateway
  • a second modifying module configured to: use, by the second virtual machine, a value of the third source MAC address field and a value of the third sender MAC address field in an Ethernet frame of the third bearer ARP response packet
  • the MAC address is changed to the identifier of the second gateway, and the first bearer ARP is obtained. Responding to the Ethernet frame of 4 ⁇ ;
  • a second sending module configured to send the Ethernet frame of the first bearer ARP response packet to the first gateway.
  • the gateway further includes:
  • a fourth receiving module configured to receive an Ethernet frame of the fourth bearer ARP request packet sent by the second virtual machine, before receiving the Ethernet frame of the second bearer Internet Protocol IP packet sent by the first gateway
  • the Ethernet frame of the fourth bearer ARP request packet carries a fifth source MAC address field, a fifth destination MAC address field, a fifth sender MAC address field, a fifth Target MAC address field, a fifth sender IP address field, and
  • the value of the fifth source MAC address field and the value of the fifth sender MAC address field are both the MAC address of the second virtual machine, and the value of the destination MAC address field is broadcast.
  • the value of the fifth sender IP address field is an IP address of the second virtual machine
  • the value of the fifth Target IP address field is an IP address of the first virtual machine
  • the fifth purpose The value of the MAC address field is an unknown MAC address
  • a third sending module configured to: use, by the second virtual machine, a value of the fifth source MAC address field and a value of the fifth sender MAC address field in an Ethernet frame of the fourth bearer ARP request packet
  • the MAC address is modified to the identifier of the second gateway
  • the fourth message is sent to the information collection server, where the fourth message carries the identifier of the second gateway and the corresponding IP address of the second virtual machine.
  • the relationship is such that the information collection server records the identifier of the second gateway and the IP address of the second virtual machine.
  • the gateway further includes:
  • a fourth sending module configured to send a fifth message to the information collection server before receiving the Ethernet frame of the second bearer Internet Protocol IP packet sent by the first gateway, where the fifth message carries the Corresponding relationship between the MAC address of the second virtual machine and the IP address of the second virtual machine and the identifier of the second gateway, so that the information collecting server records the identifier of the second gateway and the second virtual machine The corresponding IP address.
  • the first gateway replaces the MAC address in the Ethernet frame of the first IP packet with the identifier of the first gateway, and forwards the identifier to the second gateway, where the first bearer IP packet is sent.
  • the destination MAC address of the Ethernet frame is the identifier of the second gateway, so that the second network
  • the value of the destination MAC address field in the Ethernet frame of the second bearer IP packet is modified from the identifier of the second gateway to the identifier of the second gateway according to the pre-stored correspondence between the IP address of the second virtual machine and the MAC address of the second virtual machine.
  • the MAC address of the second virtual machine is sent to the second virtual machine, thereby greatly reducing the MAC entries learned by the DC gateway, saving DC gateway resources, and improving forwarding efficiency.
  • FIG. 1 is a schematic flowchart of a first embodiment of a packet forwarding method according to the present invention
  • FIG. 2 is a schematic flowchart of a third embodiment of a packet forwarding method according to the present invention
  • FIG. 4 is a schematic flowchart of Embodiment 5 of a packet forwarding method according to Embodiment 5 of the present invention
  • FIG. 4 is a schematic flowchart of Embodiment 6 of a packet forwarding method according to the present invention
  • FIG. 6 is a schematic flowchart of Embodiment 7 of a packet forwarding method according to the present invention
  • FIG. 7 is a schematic flowchart of Embodiment 8 of a packet forwarding method according to the present invention
  • FIG. 9 is a schematic flowchart of Embodiment 10 of a packet forwarding method according to the present invention
  • FIG. 10 is a schematic structural diagram of Embodiment 1 of a packet forwarding gateway according to the present invention
  • FIG. 11 is a schematic structural diagram of Embodiment 2 of a packet forwarding gateway according to the present invention
  • FIG. 12 is a schematic structural diagram of Embodiment 3 of a packet forwarding gateway according to the present invention
  • FIG. 13 is a schematic structural diagram of Embodiment 4 of a packet forwarding gateway according to the present invention
  • FIG. 14 is a schematic structural diagram of Embodiment 5 of a packet forwarding gateway according to the present invention
  • FIG. 10 is a schematic structural diagram of Embodiment 1 of a packet forwarding gateway according to the present invention
  • FIG. 11 is a schematic structural diagram of Embodiment 2 of a packet forwarding gateway according to the present invention
  • FIG. 12 is a schematic structural diagram of Embodiment 3 of a packet forwarding
  • FIG. 16 is a schematic structural diagram of Embodiment 7 of a packet forwarding gateway according to the present invention
  • FIG. 17 is a schematic structural diagram of Embodiment 8 of a packet forwarding gateway according to the present invention
  • FIG. 18 is a schematic structural diagram of Embodiment 9 of a message forwarding gateway according to the present invention.
  • FIG. 1 is a schematic flowchart of Embodiment 1 of a packet forwarding method according to the present invention. As shown in FIG. 1, the method includes:
  • the first gateway receives an Ethernet frame of the first Internet Protocol (Internet Protocol), and the first source IP address of the Ethernet frame of the first bearer IP4 An address field, a first source media access control (Media Access Control, MAC address) address field, a first destination MAC address field, and a first destination IP address field, where the value of the first source IP address field is The IP address of the virtual machine, the value of the first source MAC address field is the MAC address of the first virtual machine, and the value of the first destination MAC address field is the identifier of the second gateway corresponding to the second virtual machine, the first The value of the destination IP address field is the IP address of the second virtual machine.
  • Internet Protocol Internet Protocol
  • MAC address Media Access Control
  • the first gateway modifies, by the first gateway, the value of the first source MAC address field in the Ethernet frame of the first bearer IP4 by the MAC address of the first virtual machine to the identifier of the first gateway, Obtain an Ethernet frame carrying the second IP packet.
  • the first gateway sends the Ethernet frame of the second bearer IP packet to the second gateway according to the identifier of the second gateway.
  • the first gateway is a gateway of the DC1 network
  • the second gateway is a gateway of the DC2 network, where the DC 1 network and the DC2 network each adopt different tunnel technologies; and the first virtual machine exists on the server in the DC1 network.
  • the second virtual machine exists on the server in the DC2 network, where the first virtual machine can be the source virtual machine, and the second virtual machine can be the destination virtual machine; here, we assume that the first virtual machine is VM1, and second The virtual machine is VM2, because VM1 and VM2 need to communicate with each other, and the virtual machines communicate with each other through the tunnel established by the server.
  • the tunnel technology used by the DC1 network and the DC2 network is different, so VM1 and VM2 must be mutually connected.
  • the IP address of the DC1 network and the DC2 network need to be communicated through the heterogeneous virtual network gateway.
  • VM1 refers to the first virtual machine
  • VM2 refers to the second virtual machine. machine.
  • the transmission of IP packets between VM1 and VM2 is transmitted in the form of an Ethernet frame, that is, the IP packet is carried on the Ethernet frame, and the Ethernet frame is transmitted by the Ethernet frame header and the Ethernet.
  • the frame load and the frame check are composed of three parts.
  • the Ethernet frame header is composed of a source MAC address field, a destination MAC address field, and a 2-byte Ethernet frame type field. When the content value in the Ethernet frame type field is hexadecimal.
  • the first virtual machine sends an Ethernet frame carrying an IP packet to the first gateway, where the Ethernet frame carrying the IP packet carries the first source IP address field, the first source MAC address field, a first destination MAC address field and a first destination IP address field, and the value of the first source MAC address field of the Ethernet frame is the MAC address of VM1, which is assumed to be MAC1, and VM1 mentioned in all subsequent embodiments
  • the MAC address is MAC1
  • the value of the first source IP address field is the IP address of VM1, which is assumed to be 10.0.0.10, and the IP address of VM1 mentioned in all subsequent embodiments is 10.0.0.10; Head
  • the value of the IP address field is the IP address of VM2, which is assumed to be 10.0.0.20, and the IP address of VM2 mentioned in all subsequent embodiments is
  • the first gateway modifies the Ethernet frame of the first bearer IP packet, where the modification of the Ethernet frame carrying the IP packet is performed.
  • the value of the source MAC address field of the Ethernet frame is modified, that is, the identifier of the first gateway is modified, and the Ethernet frame of the second IP packet is obtained.
  • the identifier of the first gateway may be the MAC address of the second gateway.
  • the other gateway sends the Ethernet frame of the second IP address to the second gateway, and the identifier of the second gateway may be the MAC address of the second gateway, or may be another identifier.
  • the identifier of the second gateway is exemplified by the MAC address of the second gateway; the second gateway receives the Ethernet frame of the second bearer IP address sent by the first gateway, and the second gateway according to the IP address of the VM2 pre-stored by the second gateway
  • the correspondence between the address and the MAC address of the VM2, that is, the correspondence between the 10.0.0.20 and the MAC4, and the value of the first destination MAC address field in the Ethernet frame of the second bearer IP packet is
  • the MAC address of the second gateway is modified to be the MAC address of the VM2, that is, the MAC address is modified from the MAC3 to the MAC4, and the second gateway sends the Ethernet frame of the second bearer IP packet to the VM2, and the communication between the VM1 and the VM2 is completed. It is.
  • the VM1 sends the Ethernet frame carrying the first IP packet to the first gateway, and the first gateway needs to learn the MAC address of the VM1 in the DC1 network;
  • the Ethernet frame carrying the IP packet is sent to the VM2 because neither the first gateway nor the VM1 knows the MAC address of the VM2, and it does not know which gateway passes through the VM2.
  • the first gateway needs to learn the opposite end.
  • the MAC address of the VM2 under the DC2 network can accurately send the Ethernet frame carrying the IP packet to the VM2.
  • the first gateway learns the MAC address of the VM1 under the DC1 network. It is necessary to learn the MAC address of the VM3 under the DC2 network, that is, when the VM1 under the DC1 network communicates with a different VM under the peer DC2 network, the first gateway must learn the MAC address of the different VM at the opposite end; H is nothing but a situation. If VM3 belongs to the DC3 network, the first gateway needs to learn the gateway address of DC3 and the gateway address of VM3. In the worst case, the first gateway needs to learn all DC networks of the peer.
  • the destination MAC address is only the MAC address of the second gateway, and does not need to learn the MAC address of all the virtual machines in the peer DC network. Therefore, the MAC address learned by the first gateway is only the MAC address of the VM under the DC 1 network.
  • the MAC address of the peer DC network gateway which greatly reduces the MAC entry to be learned by the first gateway.
  • the first gateway replaces the MAC address in the Ethernet frame of the first bearer IP packet with the identifier of the first gateway, and forwards the identifier to the second gateway, where the first bearer IP packet is in an Ethernet frame.
  • the destination MAC address is the identifier of the second gateway, so that the second gateway sends the second bearer IP4 in the Ethernet frame according to the pre-stored correspondence between the IP address of the second virtual machine and the MAC address of the second virtual machine.
  • the value of the destination MAC address field is changed from the identifier of the second gateway to the second virtual machine by the identifier of the second gateway, thereby greatly reducing the MAC entries learned by the DC gateway and saving DC gateway resources. Improve forwarding efficiency.
  • the first gateway may also access the first virtual machine. Recording the correspondence between the IP address and the MAC address, including: the first gateway recording the IP address of the first virtual machine and the first virtual machine according to the received Ethernet frame of the first bearer IP packet Correspondence of the MAC address.
  • the Ethernet frame further carries a first source IP address field and a first source MAC address field, where the value of the first source IP address field is an IP address of the first virtual machine, that is, an IP address of the VM1, that is, 10.0.0.10
  • the value of the first source MAC address field is the MAC address of the first virtual machine, that is, the MAC address of VM1, that is, MAC1.
  • the first gateway After receiving the Ethernet frame of the first bearer IP packet sent by the VM1, the first gateway records the correspondence between the IP address of the VM1 and the MAC address of the VM1, that is, records the correspondence between 10.0.0.10 and MAC1.
  • FIG. 2 is a schematic flowchart of a third embodiment of a packet forwarding method according to the present invention.
  • the embodiment further provides that the first virtual machine confirms the second virtual machine MAC address.
  • the process is specifically: sending, by the first virtual machine, an Ethernet frame carrying the first ARP request packet to the first gateway, the first gateway broadcasting the Ethernet frame, and the second virtual machine returns the Ethernet frame of the third bearer ARP response packet.
  • the way to determine, the method specifically includes:
  • the first gateway receives the Ethernet frame of the first bearer ARP request packet sent by the first virtual machine, where the Ethernet frame of the first bearer ARP request packet carries the second source MAC address field and the second destination MAC address. a field, a second sender IP address field, a second sender MAC address field, a second Target IP address field, and a second Target MAC address field, wherein the value of the second sender IP address field is an IP address of the first virtual machine, The value of the second source MAC address field and the value of the second sender MAC address field are both the MAC address of the first virtual machine, and the value of the second Target IP address field is the IP address of the second virtual machine, the foregoing The value of the second destination MAC address field is a broadcast MAC address, and the value of the second target MAC address field is an unknown MAC address.
  • VM1 needs to know the MAC address of VM2 in the peer network in addition to the IP address of VM2 in the peer network. Therefore, the first bearer IP is sent. Before the Ethernet frame of the packet, the Ethernet frame carrying the first ARP request packet needs to be sent to obtain the MAC address of the VM2 in the peer network.
  • the VM1 sends an Ethernet frame carrying the first ARP request packet to the first gateway, and the Ethernet frame carrying the ARP request packet is composed of an Ethernet frame header, an Ethernet frame payload, and a frame check field, and the Ethernet frame header is composed of The source MAC address field, the destination MAC address field, and the 2-byte Ethernet frame type field.
  • the content value in the Ethernet frame type field is 0x0806 in hexadecimal
  • the following Ethernet frame payload is an ARP request packet.
  • the ARP request packet carries the second sender IP address field and the second sender MAC address field.
  • the second Target IP address field and the second Target MAC address field, the second source MAC address field and the second destination MAC address field are in the address field of the Ethernet frame header; wherein the value of the second sender IP address field is the IP of the VM1 The address, that is, 10.0.0.10; the value of the second source MAC address field and the value of the second sender MAC address field are both the MAC address of VM1, that is, MAC1; the value of the second Target IP address field is the IP address of VM2, that is, 10.0 .0.20; The value of the second destination MAC address field is the broadcast MAC address, here FF: FF: FF: FF: FF: FF; the value of the second Target MAC address field is the unknown MAC address, ie 00:00:00 :00:00:00.
  • the first gateway records, according to the received Ethernet frame of the first bearer ARP packet, a correspondence between an IP address of the first virtual machine and a MAC address of the first virtual machine.
  • the first gateway modifies the value of the second source MAC address field and the second sender MAC address field in the Ethernet frame of the first bearer ARP request packet from the MAC address of the first virtual machine to the foregoing
  • the identifier of the first gateway is obtained by the modified Ethernet frame of the second bearer ARP request packet.
  • the first gateway broadcasts an Ethernet frame of the second bearer ARP request packet to the second gateway, where the second gateway is located in the second data center DC network, where the first gateway and the first virtual machine are located in the first DC network.
  • the tenant rents the first virtual machine and rents the virtual machine in the second DC network.
  • the first gateway receives the Ethernet frame of the first bearer ARP request packet sent by the VM1, and records the correspondence between the IP address of the VM1 and the MAC address of the VM1, that is, records the correspondence between 10.0.0.10 and MAC1;
  • the first gateway modifies the value of the second source MAC address field and the second sender MAC address field in the Ethernet frame of the first bearer ARP request packet by the MAC address of the first virtual machine to the first gateway.
  • the identifier of the first gateway that is, the MAC address of the second source MAC address field and the value of the second sender MAC address field are modified from MAC1 to MAC2, and the Ethernet frame check field is recalculated, and other fields are not modified;
  • the identifier may be the MAC address of the gateway itself, or may be generated based on the unique IP address of the entire network or generated by other rules, as long as it is unique within the network, that is, the entire network can be uniquely identified;
  • the text can be an IPv4 packet or an IPv6 packet.
  • the first gateway broadcasts the Ethernet frame of the second bearer ARP request packet to the second gateway, where the second gateway is located in the second DC network, the first gateway and the first virtual machine are located in the first DC network, and the tenant rents the first The virtual machine and the virtual machine in the second DC network are leased; the second gateway can receive the Ethernet frame of the second bearer ARP request packet, and broadcast the Ethernet frame of the second bearer ARP request packet to the DC2.
  • VM2 receives the second bearer ARP After requesting the Ethernet frame of the 4th message, the MAC address of the VM1 corresponding to the IP address 10.0.0.10 is considered to be MAC2; the second gateway and VM2 consider that the value of the MAC address field of the VM1 is MAC2, and subsequently sent to the address.
  • the destination MAC address field of the Ethernet frame carrying the IP packet is also filled with the MAC2. For example, when the VM2 sends the Ethernet frame carrying the IP packet to the second gateway, the second gateway receives the Ethernet packet carrying the IP packet sent by the VM2.
  • the value of the source MAC address field of the Ethernet frame carrying the IP packet is changed from MAC4 to MAC3, and the value of the destination MAC address field of the Ethernet frame carrying the IP packet is MAC2, that is, the MAC address of the first gateway.
  • the destination IP address is the IP address of the VM1, that is, 10.0.0.10, and the second gateway directly sends the modified Ethernet frame of the bearer IP packet to the first according to the value of the destination MAC address field of the Ethernet frame carrying the IP packet.
  • the gateway, and the first gateway determines the final reception of the Ethernet frame carrying the IP packet according to the value of the destination IP address field of the modified Ethernet frame carrying the IP packet and the pre-stored correspondence between 10.0.0.10 and MAC1.
  • the virtual machine is VM1, which in turn The carrier a gateway Ethernet frame destination MAC address field of the IP packet is modified MACl, then, the IP packets are transmitted Ethernet frame to the VM1.
  • the value of the source MAC address field of all the Ethernet frames carrying the ARP request message sent by any first virtual machine from the first gateway is MAC2, that is, VM1
  • the MAC address is hidden from the second gateway and VM2 by the modification of the first gateway.
  • the first virtual machine sends an Ethernet frame carrying the ARP request packet to the first gateway, and the first gateway records the MAC address and the IP address of the first virtual machine after receiving the Ethernet frame.
  • the first gateway records the MAC address and the IP address of the first virtual machine after receiving the Ethernet frame.
  • the second gateway modifies the value of the second source MAC address field of the Ethernet frame and the value of the second sender MAC address field to the MAC address of the first gateway, so that the MAC address of the first virtual machine learned by the second gateway
  • the MAC address of the first gateway is not the MAC address of the first virtual machine itself. That is, for the second gateway, all bearer ARPs sent by the first virtual machine from the first virtual machine in the DC1 network.
  • the value of the second source MAC address field and the second sender MAC address field of the Ethernet frame of the request message are both the MAC address of the first gateway, that is, the second gateway does not need to learn the MAC addresses of all other virtual machines under the DC1 network. It is only necessary to learn the MAC address of the virtual machine under the DC2 network and the MAC address of the first gateway, thereby reducing the learned MAC entry of the second gateway, thereby saving DC gateway resources. Improve forwarding efficiency.
  • FIG. 3 is a schematic flowchart of Embodiment 4 of a packet forwarding method according to the present invention, as shown in FIG. 3
  • the embodiment further provides a process for the first virtual machine to confirm the MAC address of the second virtual machine, where the second gateway receives the second bearer sent by the first gateway. After the ARP request packet is in the Ethernet frame, the second gateway returns the first Ethernet frame carrying the ARP response message to the first gateway.
  • the method includes:
  • the first gateway receives the Ethernet frame of the first bearer ARP response packet sent by the second gateway, where the first bearer ARP responds to the Ethernet frame carrying the third source MAC address field and the third destination MAC address.
  • a field, a third sender IP address field, a third sender MAC address field, a third Target IP address field, and a third Target MAC address field wherein the value of the third sender IP address field is an IP address of the second virtual machine
  • the value of the third source MAC address field and the value of the third sender MAC address field are the identifiers of the second gateway, and the value of the third Target IP address field is the IP address of the first virtual machine, the third purpose
  • the value of the MAC address field and the value of the third Target MAC address field described above are the identifiers of the first gateway.
  • the second gateway After the first gateway broadcasts the Ethernet frame of the second bearer ARP request packet to the gateway in the DC network of the tenant to which the VM1 belongs, the second gateway also receives the Ethernet frame of the second bearer ARP request packet. Broadcasting the Ethernet frame of the second bearer ARP request packet to all the virtual machines in the DC2 network, but the second Target IP address field is included in the Ethernet frame of the second bearer ARP request packet, and the second The value of the Target IP address field is the IP address of the VM2, that is, 10.0.0.20. Therefore, only the VM2 sends the Ethernet frame carrying the ARP response packet to the first gateway, but the Ethernet frame of the first bearer ARP response packet.
  • the second gateway must pass through the second gateway, and the second gateway will modify the values in the third source MAC address field and the third sender MAC address field in the Ethernet frame, so the first gateway will receive the The first frame that carries the ARP response packet sent by the second gateway, and the third source MAC address field and the third destination MAC address are carried in the Ethernet frame of the first bearer ARP response packet.
  • the address field, the third sender IP address field, the third sender MAC address field, the third Target IP address field, and the third Target MAC address field, and the value of the third sender IP address field is the IP address of VM2, that is, 10.0.0.20
  • the value of the third source MAC address field and the value of the third sender MAC address field are both the MAC address of the second gateway, that is, MAC3, and the value of the third Target IP address field is the IP address of VM1, that is, 10.0.0.10
  • the value of the third destination MAC address field and the value of the third Target MAC address field are the MAC address of the first gateway, that is, MAC2.
  • the first gateway is configured according to the IP address of the first virtual machine that is stored in advance. Corresponding relationship of the MAC address of the first virtual machine, the value of the third destination MAC address field of the Ethernet frame of the first bearer ARP response packet and the value of the third Target MAC address field are identified by the identifier of the first gateway The MAC address of the first virtual machine is modified to obtain the Ethernet frame of the second bearer ARP response packet.
  • the first gateway sends the Ethernet frame of the second bearer ARP response packet to the first virtual machine according to the IP address of the first virtual machine and the MAC address of the first virtual machine.
  • the first gateway records the correspondence between the IP address of the VM1 and the MAC address of the VM1, that is, the correspondence between 10.0.0.10 and MAC1, and the first gateway receives the second gateway.
  • the MAC1 is found according to the value of the third Target IP address field in the Ethernet frame, and the pre-stored correspondence between 10.0.0.10 and MAC1, and the first bearer ARP response is obtained.
  • the value of the third destination MAC address field and the value of the third target MAC address field of the Ethernet frame of the packet are changed by the MAC address of the first gateway to the MAC address of the first virtual machine, that is, the first bearer ARP response packet is sent.
  • the value of the third destination MAC address field of the Ethernet frame and the value of the third Target MAC address field are modified from the original MAC2 to MAC1 to obtain the Ethernet frame of the second bearer ARP response message.
  • the first gateway sends the Ethernet frame of the second bearer ARP response message to the VM1 according to the IP address of the VM1 and the MAC address of the VM1; after receiving the Ethernet frame of the second bearer ARP response, the VM1 receives the Ethernet frame If the MAC address of the second virtual machine whose IP address is 10.0.0.20 is MAC3, the destination MAC address of the IP packet sent to the address will be filled with MAC3. For example: When VM1 sends an Ethernet frame carrying IP packets, In the first gateway, after receiving the Ethernet frame carrying the IP address, the first gateway changes the value of the source MAC address field of the Ethernet frame carrying the IP address from MAC1 to MAC2, and carries the IP packet.
  • the value filled in the destination MAC address field of the Ethernet frame is MAC3, and the destination IP is the IP address of VM2, that is, 10.0.0.20.
  • the first gateway directly uses the value of the destination MAC address field of the Ethernet frame carrying the IP packet.
  • the modified Ethernet frame carrying the IP packet is sent to the second gateway, and the corresponding relationship between the 10.0.0.20 and the MAC4 of the second gateway determines that the finally received virtual machine of the Ethernet frame carrying the IP address is VM2. and then
  • the destination MAC address field of the Ethernet frame carrying the IP packet is modified to the MAC address by the second gateway, and then the Ethernet frame carrying the IP packet is sent to the VM2.
  • any one from the second gateway is MAC3.
  • the first gateway receives the Ethernet frame of the first bearer ARP response packet sent by the second gateway, so that the MAC address of the second virtual machine learned by the first gateway is only the MAC address of the second gateway. And not the MAC address of the second virtual machine itself, that is, for the first gateway, all the Ethernet frames carrying the ARP response message sent by any second virtual machine under the DC2 network from the second gateway.
  • the value of the third destination MAC address field and the value of the third target MAC address field are both the MAC address of the second gateway, that is, the first gateway does not need to learn the MAC address of all virtual machines in the DC2 network, and only needs to learn the virtuality under the DC1 network.
  • the MAC address of the machine and the MAC address of the second gateway are sufficient, thereby reducing the learned MAC entry of the first gateway, thereby saving DC gateway resources and improving forwarding efficiency.
  • FIG. 4 is a schematic flowchart of Embodiment 5 of a packet forwarding method according to the present invention.
  • this embodiment provides another process for the first virtual machine to confirm the MAC address of the second virtual machine, specifically
  • the first virtual machine sends an Ethernet frame carrying an ARP request packet to the first gateway, and the first gateway modifies the value of the fourth source MAC address field in the Ethernet frame to the identifier of the first gateway, and sends the information to the information collection.
  • the server determines the manner in which the information collection server sends the first response message to the first gateway, where the method specifically includes:
  • the first gateway receives the Ethernet frame of the third bearer address resolution protocol ARP request packet sent by the first virtual machine, and the fourth source MAC address field and the fourth frame of the third bearer ARP request packet a destination MAC address field, a fourth sender IP address field, a fourth sender MAC address field, a fourth Target IP address field, and a fourth Target MAC address field, where the value of the fourth sender IP address field is the IP of the first virtual machine.
  • the value of the fourth source MAC address field and the value of the fourth sender MAC address field are both the MAC address of the first virtual machine, and the value of the fourth Target IP address field is the IP address of the second virtual machine.
  • the value of the fourth destination MAC address field is an unknown MAC address.
  • the VM1 needs to know the MAC address of the VM2 in the peer network in addition to the IP address of the VM2 in the peer network. Therefore, the bearer IP packet is sent. Before the Ethernet frame, the Ethernet frame carrying the ARP request packet needs to be sent to obtain the MAC address of the VM2 under the peer network.
  • the VM1 sends an Ethernet frame carrying the third ARP request packet to the first gateway, where the Ethernet frame of the third bearer ARP request message is composed of an Ethernet frame header, an Ethernet frame payload, and a frame check field.
  • the three-part composition, the Ethernet frame header is composed of a source MAC address field, a destination MAC address field, and a 2-byte Ethernet frame type field.
  • the Ethernet frame payload is an ARP request packet, and the ARP request packet carries a fourth source MAC address field, a fourth destination MAC address field, a fourth sender IP address field, a fourth sender MAC address field, and a fourth Target IP address field.
  • the fourth Target MAC address field, the fourth source MAC address field and the fourth destination MAC address field are in the Ethernet frame header address field; wherein, the value of the fourth sender IP address field is the IP address of VM1, that is, 10.0.0.10; The value of the fourth source MAC address field and the value of the fourth sender MAC address field are both the MAC address of VM1, that is, MAC1; the value of the fourth Target IP address field is the IP address of VM2, that is, 10.0.0.20; The value of the address field is the broadcast MAC address, here FF: FF: FF: FF: FF: FF; the value of the fourth Target MAC address field is the unknown MAC address, ie 00:00:00:00:00:00.
  • the first gateway sends a first request message for acquiring a MAC address of the second virtual machine to the information collection server, where the first request message carries an IP address of the second virtual machine.
  • the first gateway receives the first response message that is returned by the information collection server according to the pre-stored identifier of the second gateway and the IP address of the second virtual machine, where the first response message carries the second gateway. logo.
  • the first gateway sends an Ethernet frame carrying a fourth ARP response packet to the first virtual machine, where the Ethernet frame carrying the second gateway carries the identifier of the second gateway, so that the first virtual machine is The value of the first destination MAC address field in the Ethernet frame carrying the IP packet is filled with the identifier of the second gateway.
  • the first gateway receives the Ethernet frame of the third bearer ARP request packet sent by the VM1, and records the correspondence between the IP address of the VM1 and the MAC address of the VM1, that is, records the correspondence between 10.0.0.10 and MAC1;
  • the first gateway modifies the value of the fourth source MAC address field and the fourth sender MAC address field in the Ethernet frame of the third bearer ARP request packet by the MAC address of the first virtual machine to the first gateway.
  • the identifier of the first gateway that is, the value of the fourth source MAC address field and the value of the fourth sender MAC address field are modified from MAC1 to MAC2, wherein the local identifier may be the gateway's own MAC address, or based on
  • the unique IP address generation or other rule generation of the entire network can be performed as long as it is unique within the network, that is, the entire network can be uniquely identified; the IP 4 text here can be IPv4.
  • the packet can also be an IPv6 packet.
  • the first gateway sends a first request message for acquiring the MAC address of the second virtual machine to the information collecting server, where the first request message carries the IP address of the second virtual machine; the information collecting server receives the first request message. Querying the MAC address of the corresponding second gateway according to the IP address of the second virtual machine carried in the first request message and the identifier of the second gateway pre-stored by the information collection server and the IP address of the second virtual machine. And sending the MAC address of the second gateway to the first gateway in the first response message.
  • the first gateway re-constructs the Ethernet frame carrying the fourth ARP response packet according to the first response message sent by the information collection server, and sends the Ethernet frame to the VM1, where the Ethernet frame carrying the ARP response packet carries the second gateway.
  • the VM1 After the VM1 receives the Ethernet frame of the fourth bearer ARP response packet, the VM1 considers that the MAC address of the second virtual machine whose IP address is 10.0.0.20 is MAC3, and then the destination of the IP packet sent to the address.
  • the MAC address is filled with the MAC address. For example, when the VM1 sends the Ethernet frame carrying the IP packet to the first gateway, the first gateway receives the Ethernet frame that carries the IP address and sends the IP address of the IP address.
  • the value of the source MAC address field of the Ethernet frame is changed from MAC1 to MAC2, and the field value filled in the destination MAC address field of the Ethernet frame carrying the IP packet is MAC3, and the Target IP is the IP address of VM2, that is, 10.0.0.20.
  • the first gateway directly sends the modified Ethernet frame carrying the IP packet to the second gateway according to the value of the destination MAC address field of the Ethernet frame carrying the IP packet, and the second gateway according to the repair
  • the second gateway modifies the destination MAC address field of the Ethernet frame carrying the IP packet to the MAC address, and then sends the Ethernet frame carrying the IP packet to the VM2.
  • the MAC address of the second virtual machine learned by the information collection server is only the MAC address of the second gateway, that is, the MAC address of the VM2 is hidden from the VM1 and the first gateway. That is, the source MAC address and the sender MAC address of the Ethernet frame carrying the ARP request packet sent by any virtual machine in the peer DC2 network to the second gateway and forwarded to the server by the second gateway are all MAC3.
  • the third gateway sends an Ethernet frame carrying an ARP request packet to the information collection server, and the information collection server is configured according to the pre-stored IP address of the second virtual machine and the MAC address of the second gateway.
  • the MAC address of the machine itself that is, the first gateway does not need to learn the MAC address of all the virtual machines in the DC2 network, and only needs to learn the MAC address of the virtual machine under the DC1 network and the MAC address of the second gateway, thereby reducing the first gateway. Learning MAC entries, thereby saving DC gateway resources and improving forwarding efficiency.
  • FIG. 5 is a schematic flowchart of Embodiment 6 of a packet forwarding method according to the present invention. As shown in FIG. 5, the method includes:
  • the second gateway receives the Ethernet frame of the second bearer IP packet sent by the first gateway, where the Ethernet frame of the second bearer IP packet carries the first source IP address field, the first MAC address field, and the first destination MAC address.
  • An address field and a first destination IP address field where the value of the first source IP address field is an IP address of the first virtual machine, and the value of the first source MAC address field is an identifier of the first gateway, and the first destination MAC address field
  • the value of the second virtual machine corresponds to the identifier of the second gateway, and the value of the first destination IP address field is the IP address of the second virtual machine.
  • the first gateway is a gateway of the DC1 network
  • the second gateway is a gateway of the DC2 network, where the DC 1 network and the DC2 network each adopt different tunnel technologies; and the first virtual machine exists on the server in the DC1 network.
  • the second virtual machine exists on the server in the DC2 network, where the first virtual machine can be the source virtual machine, and the second virtual machine can be the destination virtual machine; here, we assume that the first virtual machine is VM1, and second The virtual machine is VM2, because VM1 and VM2 need to communicate with each other, and the virtual machines communicate with each other through the tunnel established by the server.
  • the tunnel technology used by the DC1 network and the DC2 network is different, so VM1 and VM2 must be mutually connected. To transmit IP packets, you need to implement interworking between the DC1 network and the DC2 network through a heterogeneous virtual network gateway.
  • the transmission of IP packets between VM1 and VM2 is transmitted in the form of an Ethernet frame, that is, the IP packet is carried on the Ethernet frame, and the Ethernet frame is transmitted by the Ethernet frame header, the Ethernet frame payload, and the frame.
  • the Ethernet frame header consists of the source MAC address field, the destination MAC address field, and the 2-byte Ethernet frame type.
  • the Ethernet frame type is hexadecimal 0x0806
  • the following Ethernet frame payload is ARP.
  • a packet, and the ARP packet carries the Sender IP field and the Target IP field.
  • the Ethernet frame payload is an IP packet.
  • the first virtual machine sends the first packet to the first gateway.
  • the Ethernet frame carrying the IP packet carries the first source IP address field, the first source MAC address field, the first destination MAC address field, and the first destination IP address field in the Ethernet frame carrying the second IP packet.
  • the value of the first source IP address field is the IP address of the first virtual machine
  • the value of the first source MAC address field is the identifier of the first gateway
  • the value of the first destination MAC address field is the second corresponding to the second virtual machine.
  • the identifier of the gateway where the value of the first destination IP address field is the IP address of the second virtual machine.
  • S502 The second gateway, according to the pre-stored correspondence between the IP address of the second virtual machine and the MAC address of the second virtual machine, the first destination MAC address field in the Ethernet frame of the second bearer IP packet The value of the second gateway is modified by the identifier of the second gateway to be the MAC address of the second virtual machine, and the Ethernet frame of the third bearer IP packet is obtained.
  • the second gateway sends the Ethernet frame of the third bearer IP packet to the second virtual machine according to the IP address of the second virtual machine and the MAC address of the second virtual machine.
  • the second gateway after receiving the Ethernet frame of the second bearer IP packet sent by the first gateway, the second gateway, according to the value of the first destination IP address field in the Ethernet frame of the second bearer IP packet, and the second gateway pre-stored Corresponding relationship between the IP address and the MAC address of the second virtual machine, that is, the correspondence between 10.0.0.20 and MAC4, and the value of the first destination MAC address field in the Ethernet frame of the second bearer IP packet is second.
  • the MAC address of the gateway is modified to be the MAC address of VM2, that is, the MAC address is modified from MAC3 to MAC4, and the second gateway sends the Ethernet frame of the second bearer IP packet to VM2, and the communication between VM1 and VM2 is completed. It is.
  • the VM1 sends an Ethernet frame carrying the IP packet to the first gateway, and the first gateway needs to learn the MAC address of the VM1 in the DC1 network; when the first gateway needs to send the Ethernet frame carrying the IP packet Give VM2, because neither the first gateway nor VM1 knows the MAC address of VM2 at this time, nor does it know which gateway to go to VM2.
  • each The gateway also has multiple VMs. Therefore, there are multiple virtual machines (VM2, VM3, VM4, etc.) under the peer network DC2. In this communication, the first gateway needs to learn the MAC of the VM2 under the peer DC2 network. The address can be used to accurately send the Ethernet frame of the IP packet to the VM2.
  • the first gateway When the next VM1 communicates with the VM3, the first gateway needs to learn the MAC address of the VM3 under the DC2 network in addition to the MAC address of the VM1 under the DC1 network. Address, that is, when VM1 under the DC1 network communicates with a different VM under the peer DC2 network, the first gateway must learn the MAC address of the different VMs at the opposite end; Situation, if VM3 belongs to DC3 network The first gateway needs To learn the gateway address of DC3 and the gateway address of VM3, the worst case is that the first gateway needs to learn the MAC addresses of all virtual machines under all DC networks on the peer end, and the prior art cannot support such a large MAC at all.
  • the destination MAC address of the Ethernet frame carrying the IP packet learned by the first gateway is only the MAC address of the second gateway, without learning the pair.
  • the Ethernet interface of the second bearer IP packet is forwarded to the second gateway by using the first gateway, and the value of the first destination MAC address field of the Ethernet frame of the second bearer IP packet is
  • the MAC address of the second gateway is not the MAC address of the second virtual machine of the peer end, so that the second gateway sets the second bearer IP according to the correspondence between the IP address of the second virtual machine stored in advance and the MAC address of the second virtual machine.
  • the value of the first destination MAC address field in the Ethernet frame of the packet is changed from the MAC address of the second gateway to the MAC address of the second virtual machine, and the Ethernet frame of the third bearer IP packet is obtained, thereby the third bearer IP.
  • the Ethernet frame of the packet is accurately sent to the second virtual machine, thereby greatly reducing the MAC entry to be learned by the first gateway, thereby saving DC gateway resources and improving forwarding efficiency.
  • the second gateway receives the Ethernet frame of the second bearer ARP request packet sent by the first gateway, where the second frame of the second bearer ARP request packet carries the second source MAC address field and the second destination MAC address.
  • a field, a second sender IP address field, a second sender MAC address field, a second Target IP address field, and a second Target MAC address field wherein the value of the second sender IP address field is an IP address of the first virtual machine,
  • the value of the second source MAC address field and the value of the second sender MAC address field are the identifiers of the first gateway, and the value of the second Target IP address field is the IP address of the second virtual machine, the second purpose
  • the value of the MAC address field is a broadcast MAC address; the value of the second Target MAC address field is an unknown MAC address.
  • the second gateway broadcasts the Ethernet frame of the second bearer ARP request packet to the virtual machine in the second DC network, where the first gateway and the first virtual machine are located in the first DC network, and the second The gateway and the second virtual machine are located in the second DC network, and the tenant rents the first virtual machine and leases the virtual machine in the second DC network.
  • the first gateway receives the Ethernet frame of the first bearer ARP request packet sent by the VM1, and the Ethernet frame carrying the ARP request packet carries the first source MAC address field, the first destination MAC address field, and the first sender.
  • the IP address field, the first sender MAC address field, the first Target IP address field, and the first Target MAC address field, and the value of the first sender IP address field is the IP address of VM1, which is assumed to be 10.0.0.10, and is followed by In all embodiments, the IP address of VM1 is 10.0.0.10; the value of the first source MAC address field and the value of the first sender MAC address field are both the MAC address of VM1, which is assumed to be MAC1, and all subsequent implementations In the example, the MAC address of VM1 is MAC1; the value of the first Target IP address field is the IP address of VM2, that is, 10.0.0.20; the value of the first destination MAC address field is the broadcast MAC address; the first target MAC address field is The
  • the first gateway After receiving the Ethernet frame of the first bearer ARP request packet sent by the VM1, the first gateway records the correspondence between the MAC address and the IP address of the VM1, that is, records the correspondence between the 10.0.0.10 and the MAC1, and modifies the bearer ARP request.
  • the value of the first source MAC address field and the value of the first sender MAC address field in the Ethernet frame of the message are the MAC address of the first gateway, which is assumed to be MAC2, and the MAC address of the first gateway in all subsequent embodiments is For the MAC2, the second Ethernet frame carrying the ARP request packet is obtained.
  • the value of the address field is the MAC address of the first gateway, that is, MAC2; the value of the second Target IP address field is the IP address of the second virtual machine, that is, 10.0.0.20; the value of the second destination MAC address field is the broadcast MAC address.
  • the value of the second Target MAC address field is an unknown MAC address.
  • the second gateway receives the Ethernet frame of the third bearer ARP response packet sent by the second virtual machine, where the third frame of the third bearer ARP response packet carries the third source MAC address field and the third destination MAC address.
  • a field, a third sender IP address field, a third sender MAC address field, a third Target IP address field, and a third Target MAC address field wherein the value of the third sender IP address field is an IP address of the second virtual machine.
  • the value of the third source MAC address field and the value of the third sender MAC address field are both the MAC address of the second virtual machine, and the value of the third Target IP address field is the IP address of the first virtual machine, the foregoing
  • the value of the three-destination MAC address field and the value of the third Target MAC address field are the identifiers of the first gateway.
  • the value of the second virtual machine VM2 is 10.0.0.20; the value of the third source MAC address field and the value of the third sender MAC address field are both
  • the value of the third virtual machine VM2 is the IP address of the first virtual machine VM1, that is, 10.0.0.10; the value of the third destination MAC address field and the above
  • the value of the third Target MAC address field is the MAC address of the first gateway, that is, MAC2.
  • the value of the destination MAC address field of the Ethernet frame of the IP packet is filled with the MAC3, and the value of the destination IP address field is the IP address of the VM2, that is, 10.0.0.20, and the first gateway directly uses the Ethernet frame carrying the IP packet.
  • the value of the MAC address field sends the modified Ethernet frame carrying the IP packet to the second gateway, and the second gateway determines, according to the modified bearer correspondence, the final reception of the Ethernet frame carrying the IP address.
  • the virtual machine is VM2,
  • the destination MAC address field of the Ethernet frame carrying the IP packet is modified to MAC4 by the second gateway, and then the Ethernet frame carrying the IP packet is sent to the VM2.
  • the fourth gateway sends a fourth message or a fifth message to the information collection server, so that the information collection server records the correspondence between the identifier of the second gateway and the IP address of the second virtual machine.
  • the information collection server sends a response message carrying the correspondence between the IP address of the second virtual machine and the MAC address of the second gateway to the first gateway.
  • the field and the second destination MAC address field are in the address field of the Ethernet frame header; wherein, the value of the second sender IP address field is the IP address of VM1, that is, 10.0.0.10; the value of the first source MAC address field and the second sender The value of the MAC address field is the MAC address of VM1, that is, MAC1; the value of the second Target IP address field is the IP address of VM2, that is, 10.0.0.20; It is broadcast MAC address field, here FF: FF: FF: FF: FF: FF; value of the second field of the Target MAC address unknown MAC addresses, i.e., 00: 00: 00: 00: 00: 00. 00.
  • the first gateway records the correspondence between the IP address of the first virtual machine and the MAC address of the first virtual machine according to the received Ethernet frame of the first bearer ARP packet.
  • the second gateway broadcasts the Ethernet frame of the second bearer ARP request message to the virtual machine in the second DC network, where the first gateway and the first virtual machine are located in the first DC network, and the second gateway and the second gateway The second virtual machine is located in the second DC network, and the tenant rents the first virtual machine and leases the virtual machine in the second DC network; after the VM2 receives the Ethernet frame of the second bearer ARP request packet,
  • the MAC address of VM1 corresponding to the IP address 10.0.0.10 is considered to be MAC2, that is, the second gateway and VM2 consider that the value of the MAC address field of VM1 is MAC2, and then the Ethernet frame carrying the IP packet sent to the address is subsequently sent.
  • the destination MAC address field is also filled with the MAC2.
  • VM1 and then the first gateway modifies the destination MAC address field of the Ethernet frame carrying the IP packet to MAC1, and then sends the Ethernet frame carrying the IP packet to VM1.
  • the value of the third sender IP address field is an IP address of the second virtual machine VM2, that is, 10.0.0.20; the value of the third source MAC address field and the value of the third sender MAC address field are both the second The MAC address of the virtual machine VM2, that is, MAC2; the value of the third Target IP address field is the IP address of the first virtual machine VM1, that is, 10.0.0.10; the value of the third destination MAC address field and the third Tar
  • the value of the get MAC address field is the MAC address of the above first gateway, that is, MAC2.
  • the second gateway modifies the value of the third source MAC address field in the Ethernet frame of the third bearer ARP response packet and the value of the third sender MAC address field by the MAC address of the second virtual machine to The identifier of the second gateway is obtained, and the Ethernet frame of the first bearer ARP response packet is obtained.
  • the second gateway sends the Ethernet frame of the first bearer ARP response packet to the first gateway.
  • the MAC address that is, the value of the destination MAC address field of the Ethernet frame of the first bearer ARP response packet and the value of the Target MAC address field are changed from the original MAC2 to the MAC 1 to obtain the Ethernet frame of the second bearer ARP response packet. .
  • the first gateway sends the Ethernet frame of the second bearer ARP response packet to the first virtual machine according to the IP address of the first virtual machine and the MAC address of the first virtual machine, that is, the first gateway sends the message to the VM1;
  • the second frame of the second virtual machine with the IP address of 10.0.0.20 is the MAC address of the second ARP response packet
  • the destination MAC address of the IP packet sent to the address is filled with MAC3, for example:
  • the first gateway receives the Ethernet frame of the first bearer IP4 sent by the VM1 and then the Ethernet frame carrying the IP packet.
  • the value of the source MAC address field of all the Ethernet frames carrying the ARP response message sent by any second virtual machine from the second gateway is MAC3.
  • the first gateway receives the Ethernet frame of the first bearer ARP request packet sent by the first virtual machine, and sets the value of the second source MAC address field and the second sender MAC address field of the Ethernet frame.
  • the value of the first gateway is changed to the MAC address of the first gateway, so that the MAC address of the first virtual machine learned by the second gateway is only the MAC address of the first gateway, not the MAC address of the first virtual machine itself; and the second gateway After receiving the Ethernet frame of the third bearer ARP response packet sent by the second virtual machine, the correspondence between the MAC address of the second virtual machine and the IP address is recorded, and the value of the third source MAC address field of the Ethernet frame and the third The value of the Sender MAC address field is changed to the MAC address of the second gateway, so that the second virtual device learned by the first gateway The MAC address of the machine is only the MAC address of the second gateway, and is not the MAC address of the second virtual machine itself.
  • FIG. 10 is a schematic structural diagram of Embodiment 1 of a packet forwarding gateway according to the present invention.
  • the gateway includes: a first receiving module 101, a first modifying module, and a first sending module 103.
  • the first receiving module 101 is configured to receive an Ethernet frame that is sent by the first virtual machine and that carries the first source IP address field, where the Ethernet frame of the first bearer IP 4 carries the first source IP address field.
  • FIG. 11 is a schematic structural diagram of Embodiment 2 of a packet forwarding gateway according to the present invention.
  • the gateway further includes: a first recording module 201, After receiving the Ethernet frame of the first bearer IP packet sent by the first virtual machine, recording the IP address of the first virtual machine according to the received Ethernet frame of the first bearer IP packet address
  • FIG. 12 is a schematic structural diagram of Embodiment 3 of a packet forwarding gateway according to the present invention.
  • the gateway further includes: a second receiving module 301, receiving the first virtual Receiving an Ethernet frame of the first bearer address resolution protocol ARP request packet sent by the first virtual machine, and the ethernet of the first bearer ARP request packet, before the Ethernet frame of the first bearer IP packet sent by the device
  • the frame carries a second source MAC address field, a second destination MAC address field, a second sender sender IP address field, a second sender MAC address field, a second target Target IP address field, and a second target Target MAC address field.
  • the value of the second sender IP address field is an IP address of the first virtual machine, and the value of the second source MAC address field and the value of the second sender MAC address field are both the first virtual machine a MAC address, a value of the second target Target IP address field is an IP address of the second virtual machine, and a value of the second destination MAC address field is a broadcast MAC address, where the The value of the target MAC address field is an unknown MAC address.
  • the second recording module 302 is configured to record an IP address of the first virtual machine and an address of the first virtual machine according to the received Ethernet frame of the first bearer ARP request message.
  • third sender MAC address field number a third Target IP address field and a third Target MAC address field
  • the value of the third sender IP address field is an IP address of the second virtual machine, a value of the third source MAC address field, and the third sender
  • the value of the MAC address field is the identifier of the second gateway
  • the value of the third Target IP address field is the IP address of the first virtual machine
  • the value of the third destination MAC address field is the number
  • the value of the third Target MAC address field is the identifier of the first gateway
  • the third modification module 402 is configured to correspond to the MAC address of the first virtual machine according to the pre-stored IP address of the first virtual machine.
  • the value of the third destination MAC address field of the Ethernet frame of the first bearer ARP response packet and the value of the third target MAC address field are modified by the identifier of the first gateway to the
  • the MAC address of the first virtual machine is obtained as the second Ethernet frame carrying the ARP response packet;
  • the second sending module 403 is configured to: according to the IP address of the first virtual machine and the MAC address of the first virtual machine, The second bearer ARP responds to a virtual machine
  • the identifier of the second gateway is carried in the fourth sending module 503, configured to send a fourth bearer ARP response to the first virtual machine
  • the Ethernet frame of the fourth bearer ARP is configured to carry the identifier of the second gateway in the Ethernet frame, so that the first virtual machine sends the first bearer IP packet in the Ethernet frame.
  • the value of the first destination MAC address field is filled with the identifier of the second gateway.
  • FIG. 14 is a schematic structural diagram of Embodiment 5 of a packet forwarding gateway according to the present invention.
  • the gateway includes: a first receiving module 601, configured to receive a second bearer Internet Protocol IP sent by the first gateway.
  • the Ethernet frame of the second IP-bearing packet carries the first source IP address field, the first source media access control MAC address field, the first destination MAC address field, and the first destination IP address field.
  • the value of the first source IP address field is an IP address of the first virtual machine
  • the value of the first source MAC address field is an identifier of the first gateway
  • the first destination MAC address field is The value is the identifier of the second gateway corresponding to the second virtual machine
  • the value of the first destination IP address field is an IP address of the second virtual machine
  • the first modification module 602 is configured to use the pre-stored Corresponding relationship between the IP address of the second virtual machine and the MAC address of the second virtual machine, and the value of the first destination MAC address field in the Ethernet frame of the second bearer IP packet is used by the second gateway Standard Modifying the MAC address of the second virtual machine to obtain an Ethernet frame of the third bearer IP packet
  • the first sending module 603 configured to use, according to the IP address of the second virtual machine, the MAC address of the second virtual machine And sending, by the address, the Ethernet frame of the third bearer IP packet to the second virtual machine.
  • FIG. 15 is a schematic structural diagram of Embodiment 6 of a packet forwarding gateway according to the present invention.
  • the gateway further includes: a second receiving module 701, configured to send at the first gateway.
  • the frame carries a second source MAC address field, a second destination MAC address field, a second sender IP address field, a second sender MAC address field, a second target Target IP address field, and a second target Target MAC address field, where
  • the value of the second sender IP address field is the IP address of the first virtual machine, and the value of the second source MAC address field and the value of the second sender MAC address field are the identifiers of the first gateway.
  • the value of the second target Target IP address field is an IP address of the second virtual machine, and the second purpose
  • the value of the MAC address field is a broadcast MAC address;
  • the value of the second Target MAC address field is an unknown MAC address;
  • the first broadcast module 702 is configured to send the Ethernet frame of the second bearer ARP request packet to the second data.
  • a virtual machine broadcasts in the central DC network, the first gateway and the first virtual machine are located in a first DC network, and the second gateway and the second virtual machine are located in the second DC network, a tenant rental office Describe the first virtual machine and lease the virtual machine in the second DC network
  • the gateway may further include: a third receiving module 801, configured to send an Ethernet frame of the second bearer ARP request packet to the second data center DC network After the virtual machine is broadcasted, the third frame of the ARP response message sent by the second virtual machine is received, and the third frame of the ARP response packet carries the third source MAC address field, and the third a destination MAC address field, a third sender IP address field, a third sender MAC address field, a third Target IP address field, and a third Target MAC address field, where the value of the third sender IP address field is the second virtual machine IP address, the value of the third source MAC address field and the value of the third sender MAC address field are both the MAC address of the second virtual machine, and the value of the third Target IP address field is the The IP address of the first virtual machine, the value of the third destination MAC address field and the value of the third Target MAC address field are identifiers of the first gateway; and a second receiving module 801, configured to send an Ethernet frame of the second bearer
  • FIG. 16 is a schematic structural diagram of Embodiment 7 of a packet forwarding gateway according to the present invention.
  • the gateway includes: a fourth receiving module 901, a third sending module 902, where the fourth receiving module 901, And receiving an Ethernet frame of the fourth bearer ARP request packet sent by the second virtual machine, before receiving the Ethernet frame of the second bearer Internet Protocol IP packet sent by the first gateway, where the fourth Carrying the fifth source MAC address word in the Ethernet frame carrying the ARP request packet a segment, a fifth destination MAC address field, a fifth sender MAC address field, a fifth Target MAC address field, a fifth sender IP address field, and a fifth Target IP address field, the value of the fifth source MAC address field and the
  • the value of the fifth sender MAC address field is the MAC address of the second virtual machine
  • the value of the destination MAC address field is a broadcast MAC address
  • the value of the fifth sender IP address field is the second virtual machine.
  • the gateway may further include: a fourth sending module 903, configured to receive, by the first gateway, the ethernet of the second bearer Internet Protocol IP packet Before the frame, the fifth message is sent to the information collection server, where the fifth message carries the correspondence between the MAC address of the second virtual machine and the IP address of the second virtual machine, and the identifier of the second gateway.
  • the information collection server records the correspondence between the identifier of the second gateway and the IP address of the second virtual machine.
  • FIG. 17 is a schematic structural diagram of Embodiment 8 of a packet forwarding gateway according to the present invention, as shown in FIG. 17, a receiver 11, a processor 12, and a transmitter 13;
  • the receiver 11 is configured to receive an Ethernet frame that is sent by the first virtual machine, and the first source IP address field and the first source media interface are carried in the Ethernet frame of the first bearer IP packet.
  • the value of the field is the MAC address of the first virtual machine
  • the value of the first destination MAC address field is the identifier of the second gateway corresponding to the second virtual machine
  • the value of the first destination IP address field is the The IP address of the second virtual machine
  • the processor 12 is configured to modify, by the MAC address of the first virtual machine, the value of the first source MAC address field in the Ethernet frame of the first bearer IP packet to the identifier of the first gateway, Obtaining an Ethernet frame carrying the second IP packet;
  • the sender 13 is configured to send an Ethernet frame of the second bearer IP packet to the second gateway according to the identifier of the second gateway.
  • the processor 12 is further configured to: after receiving the Ethernet frame of the first bearer IP packet sent by the first virtual machine, according to the received Ethernet frame record of the first bearer IP packet Correspondence between the IP address of the first virtual machine and the MAC address of the first virtual machine.
  • the MAC address, the value of the second Target MAC address field is an unknown Unknow MAC address; the processor 12 is further configured to: record the Ethernet frame according to the received first bearer ARP request message Corresponding relationship between the IP address of the first virtual machine and the MAC address of the first virtual machine; the processor 12 is further configured to: use the first part in the Ethernet frame of the first bearer ARP request message
  • the value of the second source MAC address field and the value of the second sender MAC address field are modified by the MAC address of the first virtual machine to be the identifier of the first gateway, and the modified second bearer ARP request packet is obtained.
  • Ethernet frame
  • the receiver 13 is further configured to: after the Ethernet frame of the second bearer ARP request packet is broadcast to the second gateway, receive the ethernet of the first bearer ARP response packet sent by the second gateway. a frame, the third source MAC is carried in the Ethernet frame of the first bearer ARP response packet. Address field, third destination MAC address field, third sender IP address field, third sender
  • the value of the MAC address field and the value of the third sender MAC address field are the identifiers of the second gateway, and the value of the third Target IP address field is the IP address of the first virtual machine, where the The value of the three-destination MAC address field and the value of the third Target MAC address field are identifiers of the first gateway;
  • the processor 12 is further configured to: according to the pre-stored correspondence between the IP address of the first virtual machine and the MAC address of the first virtual machine, the first bearer ARP response packet The value of the third destination MAC address field of the Ethernet frame and the third Target
  • the MAC address is obtained, and the second Ethernet frame carrying the ARP response packet is obtained;
  • the sender 13 may be further configured to: send the Ethernet frame of the second bearer ARP response packet to the first virtual machine according to the IP address of the first virtual machine and the MAC address of the first virtual machine .
  • the receiver 11 is further configured to: receive the third bearer address resolution protocol sent by the first virtual machine, before receiving the Ethernet frame of the first bearer IP packet sent by the first virtual machine.
  • the Ethernet frame of the ARP request packet carries the fourth source MAC address field, the fourth destination MAC address field, the fourth sender IP address field, and the fourth sender MAC address field in the Ethernet frame of the third bearer ARP request packet.
  • the value of the fourth sender IP address field is an IP address of the first virtual machine, a value of the fourth source MAC address field, and the fourth The value of the Sender MAC address field is the MAC address of the first virtual machine, and the value of the fourth target Target IP address field is the IP address of the second virtual machine, and the value of the fourth destination MAC address field.
  • the value of the fourth Target MAC address segment is an unknown MAC address;
  • the optional transmitter 13 is further configured to: send, to the information collection server, a first request message that acquires a MAC address of the second virtual machine, where the first request message carries an IP address of the second virtual machine;
  • the receiver 11 is further configured to: receive, by the information collection server, a first response message that is returned according to the pre-stored identifier of the second gateway and the IP address corresponding to the second virtual machine, where The identifier of the second gateway is carried in the first response message;
  • the sender 13 is further configured to: send, to the first virtual machine, an Ethernet frame with a fourth bearer ARP response message, where the fourth bearer ARP response carries the first frame in the Ethernet frame An identifier of the second gateway, so that the first virtual machine fills the value of the first destination MAC address field in the Ethernet frame of the first bearer IP address as the identifier of the second gateway.
  • the implementation principle and technical effects are similar, and are not described here.
  • FIG. 18 is a schematic structural diagram of Embodiment 9 of a message forwarding gateway according to the present invention, as shown in FIG. 18, a receiver 21, a processor 22, and a transmitter 23;
  • the receiver 21 is configured to receive an Ethernet frame of the second Internet Protocol (IP) packet sent by the first gateway, where the Ethernet frame carrying the first source IP address field and the first source media access Controlling a MAC address field, a first destination MAC address field, and a first destination IP address field, where the value of the first source IP address field is an IP address of the first virtual machine, and the value of the first source MAC address field
  • IP Internet Protocol
  • the sender 23 is configured to send the Ethernet frame of the third bearer IP packet to the second virtual machine according to the IP address of the second virtual machine and the MAC address of the second virtual machine.
  • the receiver 21 is further configured to: receive the second bearer address resolution protocol ARP sent by the first gateway, before receiving the Ethernet frame of the second bearer Internet Protocol IP packet sent by the first gateway
  • the Ethernet frame of the request packet carries the second source MAC address field, the second destination MAC address field, the second sender IP address field, the second sender MAC address field, and the second frame of the second bearer ARP request packet.
  • the transmitter 23 may be further configured to broadcast the Ethernet frame of the second bearer ARP request packet to a virtual machine in the second data center DC network, where the first gateway and the first virtual machine are located in the first DC The network, the second gateway and the second virtual machine are located in the second DC network, and the tenant rents the first virtual machine and leases a virtual machine in the second DC network.
  • the receiver 21 is further configured to: after the Ethernet frame of the second bearer ARP request packet is broadcast to the virtual machine in the second data center DC network, receive the second virtual machine to send
  • the third Ethernet frame carrying the ARP response packet carries the third source MAC address field, the third destination MAC address field, the third sender IP address field, and the third sender.
  • a MAC address field, a third Target IP address field, and a third Target MAC address field where the value of the third sender IP address field is an IP address of the second virtual machine, and the value of the third source MAC address field is The value of the third sender MAC address field is the MAC address of the second virtual machine, and the value of the third Target IP address field is the IP address of the first virtual machine, and the third destination MAC address
  • the value of the field and the value of the third Target MAC address field are identifiers of the first gateway;
  • the processor 22 is further configured to: use, by the second virtual, the value of the third source MAC address field and the value of the third sender MAC address field in an Ethernet frame of the third bearer ARP response packet
  • the MAC address of the machine is modified to the identifier of the second gateway, and the Ethernet frame of the first bearer ARP response message is obtained;
  • the transmitter 23 is further configured to send the Ethernet frame of the first bearer ARP response packet to the first gateway.
  • the receiver 21 may be configured to receive the fourth bearer ARP request report sent by the second virtual machine before receiving the Ethernet frame of the second bearer Internet Protocol IP packet sent by the first gateway.
  • the Ethernet frame of the fourth ARP request packet carries the fifth source MAC address field, the fifth destination MAC address field, the fifth sender MAC address field, the fifth Target MAC address field, and the fifth sender.
  • the IP address field and the fifth Target IP address field, the value of the fifth source MAC address field and the value of the fifth sender MAC address field are both the MAC address of the second virtual machine, and the destination MAC address field
  • the value of the fifth sender IP address field is the IP address of the second virtual machine, and the value of the fifth Target IP address field is the IP address of the first virtual machine.
  • the value of the fifth destination MAC address field is an unknown MAC address;
  • the sender 21 may be configured to: use the Ethernet frame of the fourth bearer ARP request packet
  • the value of the fifth source MAC address field and the value of the fifth sender MAC address field are modified by the MAC address of the second virtual machine to be the identifier of the second gateway, and the fourth message is sent to An information collecting server, the fourth message carrying a correspondence between the identifier of the second gateway and an IP address of the second virtual machine, so that the information collecting server records the identifier of the second gateway and the The IP address correspondence of the second virtual machine.
  • the sender 23 may be configured to send a fifth message to the information collection server, in the fifth message, before receiving the Ethernet frame of the second bearer Internet Protocol IP packet sent by the first gateway. Carrying the correspondence between the IP address of the second virtual machine and the identifier of the second gateway of the second virtual machine, so that the information collecting server records the identifier of the second gateway and the IP of the second virtual machine Address correspondence.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Un mode de réalisation de la présente invention porte sur un procédé et une passerelle d'acheminement de paquet, le procédé comprenant les opérations suivantes : une première passerelle reçoit une première trame Ethernet véhiculant un paquet IP envoyée par une première machine virtuelle (VM), la trame Ethernet contenant un premier champ d'adresse IP de source, un premier champ d'adresse MAC de source, un premier champ d'adresse MAC de destination et un premier champ d'adresse IP de destination, la valeur du premier champ d'adresse IP de source étant l'adresse IP de la première VM, la valeur du premier champ d'adresse MAC de source étant l'adresse MAC de la première VM, la valeur du premier champ d'adresse MAC de destination étant l'identificateur d'une seconde passerelle, et la valeur du premier champ d'adresse IP de destination étant l'adresse IP d'une seconde VM; la première passerelle change la valeur du premier champ d'adresse MAC de source de la première trame Ethernet véhiculant un paquet IP en un identificateur de la première passerelle de manière à obtenir une seconde trame Ethernet véhiculant un paquet IP; et la première passerelle envoie la seconde trame Ethernet véhiculant un paquet IP à la seconde passerelle. La présente invention économise des ressources de passerelle et améliore l'efficacité d'acheminement de paquet.
PCT/CN2014/072604 2013-03-08 2014-02-27 Procédé et passerelle d'acheminement de paquet WO2014135024A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310074555.6 2013-03-08
CN201310074555.6A CN104038422B (zh) 2013-03-08 2013-03-08 报文转发方法和网关

Publications (1)

Publication Number Publication Date
WO2014135024A1 true WO2014135024A1 (fr) 2014-09-12

Family

ID=51469014

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/072604 WO2014135024A1 (fr) 2013-03-08 2014-02-27 Procédé et passerelle d'acheminement de paquet

Country Status (2)

Country Link
CN (2) CN107920020B (fr)
WO (1) WO2014135024A1 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016182288A1 (fr) 2015-05-08 2016-11-17 Samsung Electronics Co., Ltd. Appareil et procédé de détection de signal de synchronisation

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3386157B1 (fr) 2015-12-30 2020-03-04 Huawei Technologies Co., Ltd. Procédé, dispositif et système de transmission de paquet
CN109495570B (zh) * 2018-11-20 2022-04-26 锐捷网络股份有限公司 采样报文的转发方法、装置及数据中心
CN110753109B (zh) * 2019-10-21 2022-04-29 深信服科技股份有限公司 网关互联方法、网关设备、存储介质及装置
CN111385293B (zh) * 2020-03-04 2021-06-22 腾讯科技(深圳)有限公司 一种网络风险检测方法和装置
CN113922987B (zh) * 2021-07-12 2022-12-06 北京北斗弘鹏科技有限公司 数据安全传输方法、设备、系统和存储介质
CN113726658B (zh) * 2021-08-09 2022-10-18 中国联合网络通信集团有限公司 一种路由转发方法及装置
CN116055446B (zh) * 2023-01-30 2023-11-17 杭州优云科技有限公司 跨网络的报文转发方法、电子设备及机器可读存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924707A (zh) * 2010-09-27 2010-12-22 杭州华三通信技术有限公司 地址解析协议报文的处理方法和设备
CN102480420A (zh) * 2010-11-29 2012-05-30 北京系统工程研究所 报文发送方法以及报文接收方法、装置及系统
US20120182992A1 (en) * 2011-01-14 2012-07-19 International Business Machines Corporation Hypervisor routing between networks in a virtual networking environment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7881208B1 (en) * 2001-06-18 2011-02-01 Cisco Technology, Inc. Gateway load balancing protocol
KR100568178B1 (ko) * 2003-07-18 2006-04-05 삼성전자주식회사 게이트웨이 장치 및 그 제어방법
EP2482502B1 (fr) * 2011-05-24 2017-05-10 Huawei Technologies Co., Ltd. Procédé et appareil de traitement de messages

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924707A (zh) * 2010-09-27 2010-12-22 杭州华三通信技术有限公司 地址解析协议报文的处理方法和设备
CN102480420A (zh) * 2010-11-29 2012-05-30 北京系统工程研究所 报文发送方法以及报文接收方法、装置及系统
US20120182992A1 (en) * 2011-01-14 2012-07-19 International Business Machines Corporation Hypervisor routing between networks in a virtual networking environment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016182288A1 (fr) 2015-05-08 2016-11-17 Samsung Electronics Co., Ltd. Appareil et procédé de détection de signal de synchronisation

Also Published As

Publication number Publication date
CN104038422B (zh) 2017-11-17
CN107920020A (zh) 2018-04-17
CN104038422A (zh) 2014-09-10
CN107920020B (zh) 2021-01-15

Similar Documents

Publication Publication Date Title
WO2014135024A1 (fr) Procédé et passerelle d'acheminement de paquet
US20210258190A1 (en) Method and system for virtual and physical network integration
EP2905930B1 (fr) Procédé de traitement, appareil et système destinés à la multidiffusion
JP5551247B2 (ja) マルチnat64環境のための方法及びホストノード
US10193707B2 (en) Packet transmission method and apparatus
KR101785760B1 (ko) 사설 ipv4 도달가능성으로 ds-라이트 향상을 위한 방법 및 네트워크 요소
WO2012142750A1 (fr) Procédé, appareil et système pour résolution d'adresse
US9461868B2 (en) System and apparatus for router advertisement options for configuring networks to support IPv6 to IPv4 multicast translation
US10148458B2 (en) Method to support multi-protocol for virtualization
WO2012031487A1 (fr) Procédé adapté pour transmettre une relation de correspondance d'adresses dans un protocole de couche 2 utilisant le routage d'état de liaison
WO2018214809A1 (fr) Procédé et dispositif de transmission de message, et support de stockage
US10313224B2 (en) Seamless host mobility
WO2014201974A1 (fr) Procédé de traitement de paquets d'acheminement de service, dispositif et système de réseau
WO2011113393A2 (fr) Procédé et appareil de transformation d'identité de réseau local virtuel
WO2019137355A1 (fr) Procédé et dispositif de transmission de données, et système de réseau
KR20170038124A (ko) Ue들 및 고정 액세스 네트워크에서 작동하는 방법
WO2021073555A1 (fr) Procédé et système de fourniture de service, et passerelle d'accélération à distance
WO2013082947A1 (fr) Procédé et dispositif périphérique pour réacheminer un message multicast ipv6 dans un réseau ipv4
WO2015043550A1 (fr) Procédé de partage multimédia, procédé d'enregistrement, serveur et serveur mandataire
US20120300776A1 (en) Method for creating virtual link, communication network element, and ethernet network system
WO2011116710A2 (fr) Procédé, appareil et système de découverte de voisins
CN107547691B (zh) 地址解析协议报文代理方法和装置
WO2016074354A1 (fr) Procédé et système de partage de wifi, passerelle domestique et passerelle de réseau local sans fil
WO2011072549A1 (fr) Procédé, appareil et système permettant une communication entre des sites qui ne sont pas sous protocole à séparation entre localisateur et identifiant (non-lisp) et des sites lisp
WO2021077991A1 (fr) Procédé de détection de message, procédé d'établissement de relation de négociation de connectivité, et dispositif associé

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14760999

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14760999

Country of ref document: EP

Kind code of ref document: A1