CN106161253B - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN106161253B
CN106161253B CN201610487900.2A CN201610487900A CN106161253B CN 106161253 B CN106161253 B CN 106161253B CN 201610487900 A CN201610487900 A CN 201610487900A CN 106161253 B CN106161253 B CN 106161253B
Authority
CN
China
Prior art keywords
vtep
mac address
forwarding
message
unicast
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201610487900.2A
Other languages
Chinese (zh)
Other versions
CN106161253A (en
Inventor
宋小恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201610487900.2A priority Critical patent/CN106161253B/en
Publication of CN106161253A publication Critical patent/CN106161253A/en
Application granted granted Critical
Publication of CN106161253B publication Critical patent/CN106161253B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]

Landscapes

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

Abstract

The embodiment of the invention discloses a message processing method and a device, wherein the method comprises the following steps: after the first VTEP receives the unicast message sent by the virtual machine, if the forwarding information corresponding to the destination address of the unicast message is not stored locally, the unicast message is forwarded to the second VTEP according to the preset default forwarding information, so that the second VTEP forwards the unicast message continuously. Therefore, in the embodiment of the invention, all the VTEPs do not need to store the forwarding information of all the virtual machines, and only one VTEP needs to store the forwarding information of all the virtual machines, so that the effects of saving the address space of part of the VTEPs in networking, reducing the requirement on the address space of part of the VTEPs in networking, saving network resources, reducing the cost of the VTEPs and further reducing the cost of networking are achieved.

Description

Message processing method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for processing a packet.
Background
In an existing EVPN (Ethernet Virtual Private Network) Network, a MAC address table and an IP forwarding table stored in each VTEP (VXLAN Tunnel End Point, VXLAN: Virtual eXtensible Local Area Network) all store MAC (Media Access Control) address table entries and IP address table entries corresponding to all Virtual machines in the EVPN Network.
For the existing EVPN network, each VTEP needs to have enough address space to store MAC address table entries and IP address table entries of all virtual machines in the entire network, thereby ensuring normal processing of services. When the address space is insufficient and the MAC address table entries and IP address table entries of all the virtual machines cannot be saved, the following problems occur: when the storage space of the MAC address table of the VTEP is insufficient, and the VTEP receives the unicast message, the forwarding information corresponding to the destination MAC address of the unicast message cannot be found in the MAC address table, and at the moment, an unknown unicast message can be generated and can flood the whole EVPN network; when the storage space of the IP forwarding table of the VTEP is insufficient and the VTEP receives the unicast message, the forwarding information corresponding to the destination IP address of the unicast message is not found from the stored IP forwarding table, and the unicast message is discarded at this time.
Therefore, each VTEP in the networking network (EVPN network) must have sufficient address space, and must meet corresponding performance requirements, and particularly when the number of virtual machines in the networking network is large, the address space requirement for each VTEP is higher, and the corresponding performance requirement is also higher, which undoubtedly brings certain limitations to the deployment of the EVPN network, and the cost of the networking network (EVPN network) construction is also relatively higher.
Disclosure of Invention
The embodiment of the invention discloses a message processing method and a message processing device, which are used for saving the address space of part of VTEP in networking and reducing the requirement on the address space of VTEP in networking. The specific scheme is as follows:
in one aspect, an embodiment of the present invention provides a packet processing method, which is applied to a tunnel endpoint VTEP in a first extensible virtual local area network VXLAN, where the method includes:
receiving a unicast message sent by a virtual machine;
if the forwarding information corresponding to the destination address of the unicast message is not stored locally, forwarding the unicast message to a second VTEP according to preset default forwarding information, so that the second VTEP forwards the unicast message.
In one aspect, an embodiment of the present invention provides a packet processing apparatus, which is applied to a tunnel endpoint VTEP in a first extensible virtual local area network VXLAN, where the apparatus includes: a receiving module and a forwarding module;
the receiving module is used for receiving a unicast message sent by the virtual machine;
the forwarding module is configured to forward the unicast packet to a second VTEP according to preset default forwarding information if the forwarding information corresponding to the destination address of the unicast packet is not locally stored, so that the second VTEP forwards the unicast packet.
In the scheme, after receiving a unicast message sent by a virtual machine, a first VTEP finds that forwarding information corresponding to a destination address of the unicast message is not stored locally, and forwards the unicast message to a second VTEP according to preset default forwarding information, so that the second VTEP forwards the unicast message continuously, and the second VTEP forwards the unicast message to a destination party corresponding to the destination address. Therefore, in the embodiment of the invention, all the VTEPs do not need to store the forwarding information of all the virtual machines, and only one VTEP needs to store the forwarding information of all the virtual machines, so that the address space of part of the VTEPs in networking is saved, the requirement on the address space of part of the VTEPs in networking is reduced, the network resources are saved, the cost of the VTEPs is reduced, and the cost of networking is further reduced.
Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a message processing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a BGP message according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating forwarding of a packet between VTEPs according to an embodiment of the present invention;
fig. 5 is a schematic diagram of packet forwarding between VTEPs according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a message processing method and a message processing device, which are used for saving the address space of a part of VTEP in networking and reducing the requirement on the address space of the part of VTEP in the networking.
A message processing method provided in the embodiment of the present invention is described below.
It should be noted that, the packet processing method provided in the embodiment of the present invention may be applied to a tunnel endpoint VTEP in a first extensible virtual local area network VXLAN, where in a networking, the first VTEP may only store forwarding information corresponding to an address of a local side virtual machine, and the second VTEP stores forwarding information corresponding to addresses of all virtual machines in the networking, so that address query may be centralized in the second VTEP, and the second VTEP may normally forward a received unicast packet. In practical applications, the second VTEP may be a BGP (Border Gateway Protocol) route reflector, and the network may be an EVPN network. The unicast message may be a unicast data message or a protocol message. In networking, the unicast messages are all messages encapsulated by VXLAN in the forwarding process. After receiving the message, the VTEP decapsulates the VXLAN, and before forwarding the unicast message, the VTEP encapsulates the unicast message by VXLAN.
As shown in fig. 1, a method for processing a packet according to an embodiment of the present invention may include:
s101: receiving a unicast message sent by a virtual machine;
s102: if the forwarding information corresponding to the destination address of the unicast message is not stored locally, forwarding the unicast message to a second VTEP according to preset default forwarding information, so that the second VTEP forwards the unicast message.
The first VTEP has pre-stored the preset default forwarding information, and when the first VTEP receives the unicast message and finds that the forwarding information corresponding to the destination address of the received unicast message is not locally stored, the first VTEP forwards the received unicast message to the second VTEP according to the preset default forwarding information, and the second VTEP forwards the unicast message continuously.
Therefore, in the embodiment of the invention, all the VTEPs do not need to store the forwarding information of all the virtual machines, and only one VTEP needs to store the forwarding information of all the virtual machines, so that the address space of part of the VTEPs in networking is saved, the requirement on the address space of part of the VTEPs in networking is reduced, the network resources are saved, the cost of the VTEPs is reduced, and the cost of networking is further reduced.
It can be understood that the networking may perform both two-layer forwarding and three-layer forwarding of the packet, and when the unicast packet needs to be subjected to the two-layer forwarding, may determine whether the first VTEP device locally stores the destination MAC address of the unicast packet; when the unicast message needs to be forwarded in three layers, it may be determined whether the first VTEP device locally stores the destination IP address of the unicast message.
In a specific implementation manner, the MAC address table locally stored by the first VTEP includes a preset default MAC address table entry, where the default MAC address table entry includes: forwarding information for instructing to forward the packet to the second VTEP;
if the forwarding information corresponding to the destination address of the unicast message is not stored locally, forwarding the unicast message to a second VTEP (S102) according to preset default forwarding information, which specifically includes:
and if the destination MAC address of the unicast message is not the destination MAC address of the first VTEP and the MAC address table does not comprise the destination MAC address, forwarding the unicast message to the second VTEP according to the default MAC address table item.
It should be noted that, when the destination MAC address of the unicast packet is not the destination MAC address of the first VTEP, the first VTEP may determine that the unicast packet needs to be forwarded in two layers, the first VTEP searches a locally stored MAC address table, determines that the destination MAC address of the unicast packet is not stored in the locally stored MAC address table, that is, forwarding information corresponding to the destination MAC address of the unicast packet is not stored, and forwards the unicast packet to the second VTEP according to the default MAC address table entry including the forwarding information for instructing to forward the packet to the second VTEP, so that the second VTEP continues to forward the unicast packet.
In a specific implementation manner, the MAC address of the second VTEP is preset in the first VTEP, and an IP forwarding table locally stored in the first VTEP includes a preset default IP forwarding table entry, where the default IP forwarding table entry includes: forwarding information for instructing to forward the packet to the second VTEP;
if the forwarding information corresponding to the destination address of the unicast message is not stored locally, forwarding the unicast message to the second VTEP according to preset default forwarding information, which specifically includes:
if the destination MAC address of the unicast message is the destination MAC address of the first VTEP and the IP forwarding table does not include the destination IP address of the unicast message, modifying the destination MAC address of the unicast message into the MAC address of the second VTEP, and forwarding the modified unicast message to the second VTEP according to the default IP forwarding table.
It can be understood that, when the first VTEP finds that the destination MAC address in the unicast message is the destination MAC address of its own (first VTEP), it may determine that three-layer forwarding needs to be performed on the unicast message, where the first VTEP searches for a locally stored IP forwarding table, finds that the IP forwarding table does not store the destination IP address of the unicast message, that is, forwarding information corresponding to the destination IP address of the unicast message is not stored, modifies the destination MAC address of the unicast message to the MAC address of the second VTEP, and forwards the modified unicast message to the second VTEP according to the default IP forwarding table entry including the forwarding information for instructing to forward the message to the second VTEP, so that the second VTEP continues to forward the modified unicast message.
In a specific implementation manner, the forwarding information locally stored by the first VTEP does not include the forwarding information corresponding to the address of the remote virtual machine.
Specifically, the forwarding information locally stored in the first VTEP at least stores forwarding information corresponding to the address of the first VTEP local virtual machine, or the first VTEP locally stores at least address information (including the MAC address and IP address of the corresponding virtual machine and corresponding forwarding information) of the first VTEP local virtual machine. It can be understood that, when receiving an Address Resolution Protocol (ARP) message sent by a local side virtual machine, the first VTEP learns Address information of the virtual machine carried in the ARP message, and generates a corresponding MAC Address entry and an IP forwarding entry; and when the first VTEP receives the ARP message sent by the remote virtual machine, the first VTEP does not learn the address information of the virtual machine carried in the ARP message.
In a specific implementation manner, the first VTEP may determine whether to learn the address information of the remote virtual machine according to the remaining space of its own address space. After the first VTEP receives the ARP packet sent by the remote virtual machine, the first VTEP may first determine whether the address space left locally is lower than a space remaining threshold, and if not, may learn the address information about the remote virtual machine carried in the ARP packet sent by the remote virtual machine, and when determining that the address space left locally is lower than the space remaining threshold, may set the threshold about the address space to 0, that is, the address information about the remote virtual machine is not always saved by default. The space remaining threshold is a value determined according to self-configuration information of the VTEP, and the space remaining threshold may be statically configured.
In a specific implementation manner, in order to prevent a broadcast loop phenomenon, that is, a forwarded message, from occurring in a networking, the message is forwarded continuously in the networking because a destination party cannot be found. Each VTEP in the group network must support the horizontal segmentation function of the unicast packet, that is, after receiving the packet forwarded from the network side, the VTEP is not allowed to forward the packet again through the network side (that is, the VTEP receives the packet sent from other VTEPs and does not forward the packet to other VTEPs), that is, in general, after receiving the unicast packet sent from the first VTEP, the second VTEP is only able to forward the unicast packet to the local side virtual machine and is not allowed to forward the unicast packet to other VTEPs in the group network, but in the embodiment of the present invention, the second VTEP sometimes needs to forward the received unicast packet again through the network side (receive the unicast packet sent from the first VTEP and forward the unicast packet to other VTEPs corresponding to the destination address of the unicast packet), at this time, in order to ensure normal forwarding of the unicast packet, the second VTEP needs to know in advance which VTEPs need to perform the horizontal segmentation function on the unicast packet, which VTEPs need to suppress the horizontal segmentation function for the unicast message (i.e. when forwarding the unicast message, the horizontal segmentation function of the corresponding VTEP is cancelled, and when forwarding the broadcast message and the multicast message, the horizontal segmentation function is still executed). Specifically, if each VTEP in the networking where the first VTEP and the second VTEP are located supports the horizontal splitting function, the method may further include:
and sending a Border Gateway Protocol (BGP) message to the second VTEP, wherein the BGP message carries a horizontal segmentation suppression identifier, and the horizontal segmentation suppression identifier is used for indicating the second VTEP to forward unicast messages which are received from other VTEPs and need to be sent to the first VTEP or indicating the second VTEP to forward unicast messages which are received from the first VTEP and need to be sent to other VTEPs.
In a specific implementation, the BGP message may be a BGP NLRI (Network Layer availability Information) message. In a default situation, the BGP message does not carry the horizontal segmentation suppression flag for the Unicast message, and when the first VTEP needs to instruct the second VTEP to Forward the Unicast message that is received from another VTEP and needs to be sent to the first VTEP, or when the second VTEP forwards the Unicast message that is received from the first VTEP and needs to be sent to another VTEP, the BGP message carrying the horizontal segmentation suppression flag is sent to the second VTEP, and a specific format of the BGP NLRI message carrying the horizontal segmentation suppression flag is shown in fig. 3, where the "un Unicast single IP Address Forward Enable" identifies horizontal segmentation suppression on the Unicast message that is sent by the first VTEP and is forwarded by the second layer, and the "un Unicast single IP Address Forward Enable" identifies horizontal suppression on the Unicast message that is sent by the first VTEP and is forwarded by the third layer.
In a specific implementation, when the second VTEP device does not update the forwarding information of the locally stored virtual machine in the networking in time and the second VTEP device does not locally store the forwarding information corresponding to the destination address of the unicast message, the second VTEP device may perform two-layer broadcasting (when performing two-layer forwarding on the unicast message) or three-layer discarding (when performing three-layer forwarding on the unicast message) on the unicast message according to a processing flow in the prior art.
The following describes a message processing method according to an embodiment of the present invention with reference to a specific embodiment.
As shown in fig. 4, the EVPN network includes VTEP and switches, and in fig. 4, device 1, device 2, device 3, and device 4 are VTEPs, and R device 1 and R device 2 are switches. The MAC address tables stored in the device 1, the device 2, and the device 3 store the following information: a default MAC address entry, the default MAC address entry comprising: forwarding information for instructing to forward the packet to the device 4, where the stored IP forwarding tables respectively store: a default IP forwarding table entry, the default IP forwarding table entry comprising: forwarding information for instructing to forward the packet to the device 4, and the MAC address of the device 4 is stored in advance in the device 1, the device 2, and the device 3; the MAC address table stored in the device 4 stores: in the MAC address table entries of all virtual machines in the EVPN network, the IP forwarding table stored in the device 4 stores: IP address table entries of all virtual machines in the EVPN network. The following description will be given by taking the two-layer forwarding of the message between the virtual machine 10 and the virtual machine 30 in the EVPN network as an example:
before forwarding unicast messages, forwarding ARP messages:
the virtual machine 10 sends out an ARP message for acquiring a destination MAC address of the virtual machine 30, where a source MAC address carried in the ARP message is a MAC address (denoted as MAC10) of the virtual machine 10, a source IP address is an IP address (denoted as IP10) of the virtual machine 10, and a target IP address is an IP address (denoted as IP30) of the virtual machine 30;
the device 1 receives the ARP message sent by the virtual machine 10, learns the MAC address and the IP address of the virtual machine 10 carried by the ARP message, generates a corresponding MAC address table entry and an IP address table entry, and broadcasts the ARP message in the EVPN network, and at this time, the devices 2, 3, and 4 can receive the ARP message after VXLAN encapsulation, and the processing flows are substantially the same (the ARP message is broadcast to the local side virtual machine);
the device 1 informs the MAC address and the IP address of the virtual machine 10 to the device 4 through a BGP message; the BGP message also carries a horizontal split suppression flag. Unlike the prior art, this BGP message is only announced to device 4;
the device 4 receives the BGP message sent by the device 1, parses out the MAC10 and the IP10, generates an MAC address table entry and an IP address table entry corresponding to the virtual machine 10, and suppresses the horizontal segmentation function of the unicast message for the device 1 according to the horizontal segmentation suppression flag carried in the BGP message;
the equipment 4 receives the ARP message from the equipment 1, carries out VXLAN decapsulation on the ARP message, broadcasts the ARP message to the local side virtual machine, and the processing of the equipment 2 and the processing of the equipment 3 are approximately the same (the ARP message is broadcast); it should be noted that, if the device 4 does not learn the corresponding forwarding information of the virtual machine 10, it needs to learn according to the ARP packet, locally generate the MAC address entry and the IP forwarding entry corresponding to the virtual machine 10, and locally broadcast the ARP packet; if the device 4 has learned the corresponding forwarding information of the virtual machine 10, broadcasting the ARP packet locally;
after the virtual machine 30 receives the ARP packet through the device 3, if it finds that the target IP address of the ARP packet is itself, it generates an ARP reply packet according to the ARP packet, where the destination MAC address of the ARP reply packet is MAC10, the destination IP address is IP10, the source MAC address is the MAC address of the virtual machine 30 (denoted as MAC30), the source IP address is the IP address of the virtual machine 30 (denoted as IP30), and sends the ARP reply packet to the device 3;
after receiving the ARP reply message, the device 3 searches the stored MAC address table, does not find the forwarding information corresponding to the destination MAC address MAC10 of the ARP reply message, performs VXLAN encapsulation on the ARP reply message according to the default MAC address table entry, and sends the encapsulated ARP reply message to the device 4;
the device 3 notifies the MAC address and the IP address of the virtual machine 30 to the device 4 through a BGP message; the BGP message also carries a horizontal split suppression flag. Unlike the prior art, this BGP message is only announced to device 4;
the device 4 receives the BGP message sent by the device 3, analyzes the MAC30 and the IP30 to generate an MAC address table entry and an IP address table entry corresponding to the virtual machine 30, and suppresses the horizontal segmentation function of the unicast message for the device 3 according to the horizontal segmentation suppression flag carried in the BGP message;
the device 4 receives the VXLAN tunnel message (the packaged ARP reply message) from the device 3, decapsulates the VXLAN tunnel message, searches the stored MAC address table, determines the forwarding information corresponding to the destination MAC address MAC10, performs VXLAN packaging on the ARP reply message according to the forwarding information, and forwards the VXLAN packet to the device 1;
the device 1 receives the VXLAN tunnel message (the ARP reply message after encapsulation), decapsulates the VXLAN tunnel message, searches the stored MAC address table, determines the forwarding information corresponding to the destination MAC address, forwards the ARP reply message to the virtual machine 10 according to the forwarding information, and the virtual machine 10 obtains the MAC address of the virtual machine 30.
Then, forwarding the unicast message is performed, and the process is as follows:
when the virtual machine 10 needs to access the virtual machine 30, the virtual machine 10 sends a unicast message, where a destination MAC address of the unicast message is MAC30, and a source MAC address is MAC 10;
after receiving the unicast message, the device 1 finds that the destination MAC address of the unicast message is not the destination MAC address of the device itself, searches the stored MAC address table, finds that the destination MAC address search fails (i.e., it is determined that forwarding information corresponding to the destination MAC address is not stored in the MAC address table), and forwards the unicast message to the device 4 after VXLAN encapsulation according to a default MAC address table entry;
the device 4 receives a VXLAN tunnel message (encapsulated unicast message), performs VXLAN decapsulation on the received VXLAN tunnel message to obtain a unicast message, finds that a destination MAC address of the unicast message is not a destination MAC address of the device, searches a stored MAC address table, determines forwarding information corresponding to the destination MAC address, performs VXLAN encapsulation on the unicast message again according to the forwarding information, and forwards the unicast message to the device 3;
the device 3 receives a VXLAN tunnel message (a unicast message after encapsulation), performs VXLAN decapsulation on the received VXLAN tunnel message to obtain a unicast message, finds that a destination MAC address of the unicast message is not a destination MAC address of the device, searches a stored MAC address table, finds forwarding information corresponding to the destination MAC address, and forwards the unicast message to the virtual machine 30 according to the forwarding information;
the unicast message forwarding to virtual machine 10 by virtual machine 30 is similar.
Based on fig. 4, as shown in fig. 5, the following description will be given by taking packet three-layer forwarding between the virtual machine 10 and the virtual machine 20 in the EVPN network as an example:
when the virtual machine 10 needs to access the virtual machine 20, if it is found that the virtual machine 20 and the virtual machine 10 are not in the same network segment, the virtual machine 10 sends a unicast message, where a destination MAC address of the unicast message is a destination MAC of the device 1, a destination IP address is a destination IP20 of the virtual machine 20, a source MAC address is MAC10, and a source IP address is IP 10;
the device 1 receives the unicast message, finds that the destination MAC address of the unicast message is the destination MAC address of the device itself, searches for a locally stored IP forwarding table, and if the destination IP address search fails (i.e., it is determined that forwarding information corresponding to the destination IP address is not locally stored), modifies the destination MAC address of the unicast message from the destination MAC address of the device 1 to the MAC address of the preset device 4, and forwards the modified unicast message to the device 4 after VXLAN encapsulation according to a preset default IP forwarding table entry;
the device 4 receives a VXLAN tunnel message (a unicast message which is encapsulated and modified), performs VXLAN decapsulation on the VXLAN tunnel message, obtains a modified unicast message, finds that a destination MAC address of the modified unicast message is a destination MAC address of the device itself, determines forwarding information corresponding to the destination IP address (destination IP20) from a locally stored IP forwarding table, modifies the destination MAC address of the modified unicast message into a destination MAC20 of the virtual machine 20 (since the device 4 stores forwarding information corresponding to all virtual machines in the EVPN networking, correspondingly, the ARP table also stores ARP table entries corresponding to all virtual machines, the device 4 can learn a MAC address, namely MAC20, corresponding to IP20 through the ARP table entry corresponding to the virtual machine 20, and forwards the modified unicast message to the device 2 after performing VXLAN encapsulation according to the forwarding information corresponding to the destination IP 20;
the device 2 receives the VXLAN tunnel message (the encapsulated and modified unicast message), decapsulates the VXLAN tunnel message to obtain the modified unicast message, finds that the destination MAC address of the modified unicast message is not the destination MAC address of the device itself, searches the stored MAC address table, finds forwarding information corresponding to the destination MAC address (destination MAC20), and forwards the unicast message to the virtual machine 20. At this time, the unicast message is successfully forwarded.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a packet processing apparatus, which may be applied to a tunnel endpoint VTEP in a first extensible virtual local area network VXLAN, as shown in fig. 2, where the apparatus may include: a receiving module 201 and a forwarding module 202;
the receiving module 201 is configured to receive a unicast message sent by a virtual machine;
the forwarding module 202 is configured to forward the unicast packet to a second VTEP according to preset default forwarding information if the forwarding information corresponding to the destination address of the unicast packet is not locally stored, so that the second VTEP forwards the unicast packet.
By applying the embodiment of the invention, after receiving the unicast message sent by the virtual machine, the first VTEP finds that the forwarding information corresponding to the destination address of the unicast message is not stored locally, and forwards the unicast message to the second VTEP according to the preset default forwarding information, so that the second VTEP forwards the unicast message continuously, and the second VTEP forwards the unicast message to the destination party corresponding to the destination address. Therefore, in the embodiment of the invention, all the VTEPs do not need to store the forwarding information of all the virtual machines, and only one VTEP needs to store the forwarding information of all the virtual machines, so that the address space of part of the VTEPs in networking is saved, the requirement on the address space of part of the VTEPs in networking is reduced, the network resources are saved, the cost of the VTEPs is reduced, and the cost of networking is further reduced.
In a specific implementation manner, a MAC address table locally stored in the first VTEP includes a preset default MAC address table entry, where the default MAC address table entry includes: forwarding information for instructing to forward the packet to the second VTEP;
the forwarding module 202 is specifically configured to, if the destination MAC address of the unicast packet is not the destination MAC address of the first VTEP, and the MAC address table does not include the destination MAC address, forward the unicast packet to the second VTEP according to the default MAC address table entry.
In a specific implementation manner, the MAC address of the second VTEP is preset in the first VTEP, and an IP forwarding table locally stored in the first VTEP includes a preset default IP forwarding table entry, where the default IP forwarding table entry includes: forwarding information for instructing to forward the packet to the second VTEP;
the forwarding module 202 is specifically configured to, if the destination MAC address of the unicast packet is the destination MAC address of the first VTEP and the IP forwarding table does not include the destination IP address of the unicast packet, modify the destination MAC address of the unicast packet to the MAC address of the second VTEP, and forward the modified unicast packet to the second VTEP according to the default IP forwarding table entry.
In a specific implementation manner, the forwarding information locally stored by the first VTEP does not include the forwarding information corresponding to the address of the remote virtual machine.
In a specific implementation manner, the apparatus may further include a message sending module;
the message sending module is configured to send a Border Gateway Protocol (BGP) message to the second VTEP if each VTEP in the networking where the first VTEP and the second VTEP are located supports a horizontal segmentation function, where the BGP message carries a horizontal segmentation suppression identifier, and the horizontal segmentation suppression identifier is used to instruct the second VTEP to forward a unicast message that is received from another VTEP and needs to be sent to the first VTEP, or instruct the second VTEP to forward a unicast message that is received from the first VTEP and needs to be sent to another VTEP.
For the system/apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, which is referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A message processing method is applied to a first extensible virtual local area network tunnel endpoint (VTEP), and comprises the following steps:
receiving a unicast message sent by a virtual machine;
under the condition of carrying out two-layer forwarding on the unicast message, if an MAC address table entry corresponding to the destination address of the unicast message is not stored locally, carrying out VXLAN packaging on the unicast message according to a preset default MAC address table entry, and then forwarding the unicast message to a second VTEP;
under the condition of three-layer forwarding of the unicast message, if an IP address table entry corresponding to the destination address of the unicast message is not locally stored, carrying out VXLAN encapsulation on the unicast message according to the MAC address of the second VTEP and a preset default IP address table entry, and then forwarding the unicast message to the second VTEP;
the second VTEP is configured to forward the unicast packet, and forward the unicast packet to a destination party corresponding to a destination address of the unicast packet, where the first VTEP only stores forwarding information corresponding to an address of a local side virtual machine and the default forwarding information, and the second VTEP stores forwarding information corresponding to addresses of all virtual machines in a networking.
2. The method of claim 1, wherein the MAC address table locally stored by the first VTEP includes a preset default MAC address table entry, and wherein the default MAC address table entry includes: forwarding information for instructing to forward the packet to the second VTEP;
if the MAC address table entry corresponding to the destination address of the unicast message is not locally stored, the unicast message is forwarded to the second VTEP after VXLAN encapsulation according to a preset default MAC address table entry, which specifically includes:
and if the destination MAC address of the unicast message is not the destination MAC address of the first VTEP and the MAC address table does not comprise the destination MAC address, carrying out VXLAN packaging on the unicast message according to the default MAC address table entry and then forwarding the unicast message to the second VTEP.
3. The method according to claim 1, wherein the first VTEP is preset with a MAC address of the second VTEP, and an IP forwarding table locally stored in the first VTEP includes a preset default IP forwarding table entry, where the default IP forwarding table entry includes: forwarding information for instructing to forward the packet to the second VTEP;
if the local IP address table entry corresponding to the destination address of the unicast message is not stored, the unicast message is forwarded to the second VTEP after VXLAN encapsulation according to the MAC address of the second VTEP and a preset default IP address table entry, which specifically includes:
if the destination MAC address of the unicast message is the destination MAC address of the first VTEP and the IP forwarding table does not include the destination IP address of the unicast message, modifying the destination MAC address of the unicast message into the MAC address of the second VTEP, and forwarding the modified unicast message to the second VTEP after carrying out VXLAN encapsulation according to the default IP forwarding table.
4. The method of claim 1, wherein the forwarding information stored locally by the first VTEP does not include forwarding information corresponding to an address of a remote virtual machine.
5. The method according to any of claims 1-4, wherein if each VTEP in the networking where the first VTEP and the second VTEP are located supports a horizontal splitting function, the method further comprises:
and sending a Border Gateway Protocol (BGP) message to the second VTEP, wherein the BGP message carries a horizontal segmentation suppression identifier, and the horizontal segmentation suppression identifier is used for indicating the second VTEP to forward unicast messages which are received from other VTEPs and need to be sent to the first VTEP or indicating the second VTEP to forward unicast messages which are received from the first VTEP and need to be sent to other VTEPs.
6. A message processing apparatus, applied to a first extensible virtual local area network tunnel endpoint, VTEP, the apparatus comprising: a receiving module and a forwarding module;
the receiving module is used for receiving a unicast message sent by the virtual machine;
the forwarding module is configured to, under the condition that two-layer forwarding is performed on the unicast message, perform VXLAN encapsulation on the unicast message according to a preset default MAC address table entry and forward the unicast message to a second VTEP if the MAC address table entry corresponding to the destination address of the unicast message is not locally stored;
under the condition of three-layer forwarding of the unicast message, if an IP address table entry corresponding to the destination address of the unicast message is not locally stored, carrying out VXLAN encapsulation on the unicast message according to the MAC address of the second VTEP and a preset default IP address table entry, and then forwarding the unicast message to the second VTEP;
the second VTEP is configured to forward the unicast packet, and forward the unicast packet to a destination party corresponding to a destination address of the unicast packet, where the first VTEP only stores forwarding information corresponding to an address of a local side virtual machine and the default forwarding information, and the second VTEP stores forwarding information corresponding to addresses of all virtual machines in a networking.
7. The apparatus of claim 6, wherein the MAC address table locally stored by the first VTEP includes a preset default MAC address table entry, and wherein the default MAC address table entry includes: forwarding information for instructing to forward the packet to the second VTEP;
the forwarding module is specifically configured to, if the destination MAC address of the unicast packet is not the destination MAC address of the first VTEP and the MAC address table does not include the destination MAC address, forward the unicast packet to the second VTEP after VXLAN encapsulation according to the default MAC address table entry.
8. The apparatus according to claim 6, wherein the first VTEP is preset with a MAC address of the second VTEP, and an IP forwarding table locally stored in the first VTEP includes a preset default IP forwarding table entry, where the default IP forwarding table entry includes: forwarding information for instructing to forward the packet to the second VTEP;
the forwarding module is specifically configured to, if the destination MAC address of the unicast packet is the destination MAC address of the first VTEP and the IP forwarding table does not include the destination IP address of the unicast packet, modify the destination MAC address of the unicast packet to the MAC address of the second VTEP, and forward the modified unicast packet to the second VTEP after VXLAN encapsulation according to the default IP forwarding table entry.
9. The apparatus of claim 6, wherein the forwarding information stored locally by the first VTEP does not include forwarding information corresponding to an address of a remote virtual machine.
10. The apparatus according to any one of claims 6-9, wherein the apparatus further comprises a message sending module;
the message sending module is configured to send a Border Gateway Protocol (BGP) message to the second VTEP if each VTEP in the networking where the first VTEP and the second VTEP are located supports a horizontal segmentation function, where the BGP message carries a horizontal segmentation suppression identifier, and the horizontal segmentation suppression identifier is used to instruct the second VTEP to forward a unicast message that is received from another VTEP and needs to be sent to the first VTEP, or instruct the second VTEP to forward a unicast message that is received from the first VTEP and needs to be sent to another VTEP.
CN201610487900.2A 2016-06-23 2016-06-23 Message processing method and device Active CN106161253B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610487900.2A CN106161253B (en) 2016-06-23 2016-06-23 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610487900.2A CN106161253B (en) 2016-06-23 2016-06-23 Message processing method and device

Publications (2)

Publication Number Publication Date
CN106161253A CN106161253A (en) 2016-11-23
CN106161253B true CN106161253B (en) 2020-12-25

Family

ID=57350091

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610487900.2A Active CN106161253B (en) 2016-06-23 2016-06-23 Message processing method and device

Country Status (1)

Country Link
CN (1) CN106161253B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4068697A1 (en) * 2021-03-31 2022-10-05 Juniper Networks, Inc. Fast reroute for ethernet virtual private networks - virtual extensible local area network

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106911547B (en) * 2017-02-10 2020-09-25 新华三技术有限公司 Message forwarding method and device
CN106921577B (en) * 2017-03-10 2019-06-07 新华三技术有限公司 MAC address learning method and device
CN106878168B (en) * 2017-03-20 2021-03-19 新华三技术有限公司 Message forwarding method and device
CN111327545B (en) * 2018-12-14 2021-10-15 北京金山云网络技术有限公司 Data sending method and device, network system and switch
CN112866119B (en) * 2020-12-30 2022-04-08 迈普通信技术股份有限公司 Virtual extensible local area network communication method and device, electronic equipment and storage medium
US11570086B2 (en) 2021-02-22 2023-01-31 Juniper Networks, Inc. Fast reroute for BUM traffic in ethernet virtual private networks
CN113726658B (en) * 2021-08-09 2022-10-18 中国联合网络通信集团有限公司 Route forwarding method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101521631A (en) * 2009-04-14 2009-09-02 华为技术有限公司 Treatment method, equipment and system for VPLS network messages
CN103269299A (en) * 2013-04-22 2013-08-28 杭州华三通信技术有限公司 Packet forwarding method and device in SPBM network
CN103647853A (en) * 2013-12-04 2014-03-19 华为技术有限公司 Method for sending ARP message in VxLAN, VTEP and VxLAN controller
CN103731353A (en) * 2013-12-26 2014-04-16 华为技术有限公司 Physical address acquiring method of virtual machine
CN104283980A (en) * 2014-10-09 2015-01-14 杭州华三通信技术有限公司 Address resolution protocol (ARP) reply on-behalf method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8553691B2 (en) * 2011-02-22 2013-10-08 Alcatel Lucent Efficient multicasting in a distributed system architecture
US9270589B2 (en) * 2012-04-04 2016-02-23 Marvell Israel (M.I.S.L) Ltd. Transparent RBridge
CN103888386B (en) * 2012-12-24 2017-10-17 华为技术有限公司 The transmission method and device, system of expansible virtual local area network packet
WO2015085523A1 (en) * 2013-12-11 2015-06-18 华为技术有限公司 Communication method, device and system for virtual extensible local area network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101521631A (en) * 2009-04-14 2009-09-02 华为技术有限公司 Treatment method, equipment and system for VPLS network messages
CN103269299A (en) * 2013-04-22 2013-08-28 杭州华三通信技术有限公司 Packet forwarding method and device in SPBM network
CN103647853A (en) * 2013-12-04 2014-03-19 华为技术有限公司 Method for sending ARP message in VxLAN, VTEP and VxLAN controller
CN103731353A (en) * 2013-12-26 2014-04-16 华为技术有限公司 Physical address acquiring method of virtual machine
CN104283980A (en) * 2014-10-09 2015-01-14 杭州华三通信技术有限公司 Address resolution protocol (ARP) reply on-behalf method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4068697A1 (en) * 2021-03-31 2022-10-05 Juniper Networks, Inc. Fast reroute for ethernet virtual private networks - virtual extensible local area network

Also Published As

Publication number Publication date
CN106161253A (en) 2016-11-23

Similar Documents

Publication Publication Date Title
CN106161253B (en) Message processing method and device
CN110830352B (en) Method and device for realizing VPN cross-domain and boundary node
CN109257265B (en) Flooding suppression method, VXLAN bridge, gateway and system
US9448821B2 (en) Method and system for realizing virtual machine mobility
US8990371B2 (en) Interconnecting data centers for migration of virtual machines
CN108964940B (en) Message sending method and device and storage medium
CN109660442B (en) Method and device for multicast replication in Overlay network
US8842577B2 (en) Enabling media access control address mobility in an ethernet virtual private network
WO2017197885A1 (en) Communication method and device for use in virtual extensible local area network
CN107800625B (en) Message forwarding method and device
US10122548B2 (en) Services execution
CN106878288B (en) message forwarding method and device
US20160028624A1 (en) Virtual machine migration
US9641417B2 (en) Proactive detection of host status in a communications network
CN109412926B (en) Tunnel establishment method and device
CN108632147B (en) Message multicast processing method and device
CN107770294B (en) Processing method and device for IP address conflict in EVPN
WO2022121466A1 (en) Data processing method and device for ethernet virtual private network, and storage medium
CN107040441B (en) Cross-data-center data transmission method, device and system
CN111277482B (en) Message processing method and device
CN106911547B (en) Message forwarding method and device
CN106911549B (en) Data message processing method and device
CN106899706B (en) Flooding inhibition method and device
CN106130865B (en) Communication method and device between terminals
CN113507425B (en) Overlay multicast method, device and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou science and Technology Industrial Park, high tech Industrial Development Zone, Zhejiang Province, No. six and road, No. 310

Applicant before: Huasan Communication Technology Co., Ltd.

CB02 Change of applicant information
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant