CN113132202A - Message transmission method and related equipment - Google Patents

Message transmission method and related equipment Download PDF

Info

Publication number
CN113132202A
CN113132202A CN201911415540.5A CN201911415540A CN113132202A CN 113132202 A CN113132202 A CN 113132202A CN 201911415540 A CN201911415540 A CN 201911415540A CN 113132202 A CN113132202 A CN 113132202A
Authority
CN
China
Prior art keywords
message
packet
destination
bum
type indication
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.)
Granted
Application number
CN201911415540.5A
Other languages
Chinese (zh)
Other versions
CN113132202B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201911415540.5A priority Critical patent/CN113132202B/en
Priority to PCT/CN2020/115726 priority patent/WO2021135397A1/en
Publication of CN113132202A publication Critical patent/CN113132202A/en
Application granted granted Critical
Publication of CN113132202B publication Critical patent/CN113132202B/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
    • 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]
    • 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
    • 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

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 application discloses a message transmission method and related equipment. The method comprises the steps that first equipment receives a first message from second equipment, wherein the first message comprises a message type indication used for indicating that the first message is a unicast message or a BUM message; when the first device determines that the first message is the unicast message according to the message type indication, or when the first device determines that the first message is the BUM message according to the message type indication and the first device is the DF of the destination device, the first device sends the second message to the destination device; the second message is obtained after the first message is decapsulated by the first device, the target device is mostly connected to multiple network devices, and the multiple network devices include the first device, so that the target device can receive the message, and only one message with the same content can be received.

Description

Message transmission method and related equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a message transmission method and a related device.
Background
In a data center network, server virtualization is increasingly widely applied, and with the development of enterprise business, the rapid increase of the number of virtual machines and the migration of the virtual machines become a normal business. On this basis, a virtual extensible local area network (VXLAN) comes along. VXLAN is one of the standard technologies of three-Layer Network Virtualization over Layer 3 (NVO 3), which is essentially a tunneling technology. When forwarding a message in a VXLAN network, a VXLAN Tunnel End Point (VTEP) connected to a sending end (virtual machine or physical machine) may add a VXLAN header to an original message to obtain a VXLAN message, and forward the VXLAN message to a VTEP connected to a receiving end (virtual machine or physical machine) in a transmission manner of a conventional Internet Protocol (IP) network; the VTEP connected to the receiving end may remove the outer encapsulation portion of the VXLAN message and send the original message to the receiving end.
However, in practical applications, after migrating or adding a virtual machine in a VXLAN network, a situation that a destination device migrated or added virtual machine cannot receive a message or receives a plurality of same messages at the same time is likely to occur.
Disclosure of Invention
In order to solve the above problem, the present application provides a message transmission method and related device, so that a receiving end can receive a message sent by a sending end, and only one message with the same content can be received.
In a first aspect, the present application provides a method for transmitting a packet. A first device receives a first message from a second device, wherein the first message comprises a message type indication, and the message type indication is used for indicating that the first message is a unicast message or a broadcast unknown unicast multicast BUM message; when the first device determines that the first message is the unicast message according to the message type indication, or when the first device determines that the first message is the BUM message according to the message type indication and the first device is an appointed forwarder DF of a destination device, the first device sends a second message to the destination device; the second message is obtained after the first device decapsulates the first message, and the destination device is accessed to multiple network devices, where the multiple network devices include the first device. In this embodiment, when determining that the received packet is a unicast packet, the first device directly sends the unicast packet to the destination device, so that the destination device can receive the packet, and when determining that the received packet is a multicast packet, the first device only sends the packet to the destination device when serving as the DF of the destination device, so that the destination device can receive only one packet, and thus the destination device can receive the packet sent by the sending end, and only one packet with the same content can be received.
Optionally, the message type indicator is located in a target field in the first message, and/or the message type indicator is a multicast address carried by the first message after being encapsulated by a multicast tunnel. In this embodiment, the first device may determine whether the first packet is a unicast packet or a multicast packet according to a value of a target field in the first packet, or determine whether the first packet is a unicast packet or a multicast packet according to an IP address in the first packet, and when the IP address represents an IP address of a single device, the first packet is characterized as a unicast packet, and when the IP address is a multicast IP address, the first packet is characterized as a BUM packet, so that the first device may determine a packet type of the first packet according to the IP address in the first packet.
Optionally, the first message is a VXLAN message including a virtual extensible local area network VXLAN header, and the target field is specifically a reserved field in the VXLAN header. In this embodiment, the first message may be a VXLAN message that includes a VXLAN header, such that the message type of whether the first message is a unicast message or a BUM message may be indicated by defining the value of a reserved field in the VXLAN header. In this way, the first device can determine the type of the first message according to the value of the specific reserved field in the VXLAN header of the first message. For example, a BUM flag bit may be defined in the VXLAN header, and when the value of the BUM flag bit is defined as 0, the first packet is characterized as a unicast packet, and when the value of the BUM flag bit is defined as 1, the first packet is characterized as a BUM packet.
Optionally, the method further comprises: and when the first equipment determines that the first message is the BUM message according to the message type indication and the first equipment is not a designated forwarder DF of the destination equipment, the first equipment does not send a second message to the destination equipment. In this embodiment, when the first device determines that the first message is a BUM message but is not a DF message of the destination device, the characterizing destination device may obtain a message from other devices (DF of the destination device), so that the first device does not send a message to the destination device, for example, the message may be discarded, so that the destination device does not repeatedly receive at least two messages with the same content.
In a second aspect, the present application further provides a packet transmission apparatus, where the apparatus includes a receiving module, a processing module, and a sending module:
the receiving module is configured to receive a first packet from a second device, where the first packet includes a packet type indication, and the packet type indication is used to indicate that the first packet is a unicast packet or a broadcast-unknown unicast multicast BUM packet;
the processing module is configured to send a second packet to a destination device through the sending module when the first packet is determined to be the unicast packet according to the packet type indication, or when the first packet is determined to be the BUM packet according to the packet type indication and the first device is an appointed forwarder DF of the destination device; the second message is obtained after the first device decapsulates the first message, and the destination device is accessed to multiple network devices, where the multiple network devices include the first device.
Optionally, the message type indicator is located in a target field in the first message, and/or the message type indicator is a multicast address carried by the first message after being encapsulated by a multicast tunnel.
Optionally, the first message is a VXLAN message including a virtual extensible local area network VXLAN header, and the target field is specifically a reserved field in the VXLAN header.
Optionally, the apparatus further comprises: the processing module is further configured to determine not to send a second packet to the destination device when the first device determines, according to the packet type indication, that the first packet is the BUM packet and the first device is not the DF of the destination device.
The message transmission apparatus described in the second aspect corresponds to the message transmission method described in the first aspect, and therefore, reference may be made to relevant descriptions of corresponding implementation manners and beneficial effects in the first aspect for various possible implementation manners and beneficial effects of the second aspect, which are not described herein again.
In a third aspect, the present application also provides a computer device. The device computer includes a processor and a memory, the memory is used for storing a computer program or an instruction, and the processor is used for executing the computer program or the instruction, so that the computer device executes the message transmission method described in the first aspect or any one of the embodiments of the first aspect.
In a fourth aspect, the present application provides a computer storage medium storing a program for implementing the message transmission method according to the first aspect or any one of the embodiments of the first aspect. When the program runs in a device for message transmission, the device is caused to execute the message transmission method according to the first aspect or any one of the embodiments of the first aspect.
In a fifth aspect, the present application provides a computer program product, which includes a program, and when the program is executed, the message transmission method according to the first aspect or any one of the embodiments of the first aspect is executed.
According to the technical scheme, in the application, a first device receives a first message from a second device, wherein the first message comprises a message type indication, and the message type indication is used for indicating that the first message is a unicast message or a broadcast unknown unicast multicast BUM message; when the first device determines that the first message is the unicast message according to the message type indication, or when the first device determines that the first message is the BUM message according to the message type indication and the first device is an appointed forwarder DF of a destination device, the first device sends a second message to the destination device; the second message is obtained after the first device decapsulates the first message, and the destination device is accessed to multiple network devices, where the multiple network devices include the first device. It can be seen that, when determining that the received message is a unicast message, the first device directly sends the unicast message to the destination device, so that the destination device can receive the message, and when determining that the received message is a BUM message, the first device sends the message to the destination device only when serving as the DF of the destination device, so that the destination device can receive only one message, and therefore, the destination device can receive the message sent by the sending end, and the message with the same content can receive only one message.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a schematic diagram of an exemplary VXLAN network architecture in an embodiment of the present application;
fig. 2 is a schematic signaling interaction diagram of a message transmission method in an embodiment of the present application;
fig. 3 is a schematic diagram of a VXLAN message format;
fig. 4 is a schematic diagram of a hardware structure of a main control board of a device in the embodiment of the present application;
FIG. 5 is a diagram illustrating a hardware structure of an interface board of a device according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a hardware structure of an apparatus in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a message transmission apparatus in an embodiment of the present application.
Detailed Description
The application provides a message transmission method, which is used for solving the problem that a scene terminal device (such as a virtual machine, a server, a personal computer, a palm computer and the like) which is accessed into a plurality of access devices by a plurality of terminals receives a plurality of messages. The following describes the message transmission method provided by the present application by taking a VXLAN network as an example, with reference to the accompanying drawings.
Fig. 1 is a schematic structural diagram of a VXLAN network according to an embodiment of the present application. The VXLAN network is overlaid on a data center network of leaf-spine (leaf-spine) architecture. The data center network includes a leaf layer that includes a plurality of leaf devices, such as leaf1 through leaf4 in the figure, and a backbone layer that includes one or more spine devices (one shown in the figure) through which each leaf device communicates with the other leaf devices. Each terminal device may access one leaf device (referred to as single homing) or multiple leaf devices simultaneously (referred to as multi homing). The present application focuses on a scenario in which one terminal device accesses multiple leaf devices, for example, a Virtual Machine (VM) 1 accesses leaf1 and leaf2 in multiple homes, and VM2 accesses leaf3 and leaf4 in multiple homes, then leaf1 and leaf2 belong to the same multiple-home access group, and leaf3 and leaf4 belong to the same multiple-home access group.
In a VXLAN network as shown in fig. 1, a corresponding VTEP (VTEP 1, VTEP2, VTEP3, and VTEP4, respectively) may be deployed on each of leaf1 through leaf 4. Wherein, different VTEPs have different IP addresses, and the message in communication between VM1 and VM2 is transmitted through the VTEP on the leaf node.
Taking the example that the VM1 transmits a message to the VM2, the VM1 may send the original message to the VTEP1 on the leaf1 node (of course, the original message may also be sent to the VTEP2 on the leaf2 node, which is exemplarily illustrated by the VTEP 1), the VTEP1 may encapsulate a VXLAN header in the received original message to obtain a VXLAN message, and then, by looking up the local MAC table, it may be determined to send the VXLAN message to the VTEP3 (the message may be transmitted to the VTEP3 via the spine in fig. 1, where it is assumed to be sent to the VTEP3, and it may also be sent to the VTEP4 in practical applications). The VTEP3 decapsulates the received VXLAN message to obtain an original message, and determines to send the original message to the VM2 by searching a corresponding table entry in the local MAC table, thereby enabling the original message sent by the VM1 to be transmitted to the VM 2.
In general, if there is a forwarding entry for VM2 in the local MAC tables of VTEP1 and VTEP3, the packet may be successfully transmitted to VM2 based on the corresponding entries in the local MAC tables of VTEP1 and VTEP 3. However, when there is no forwarding entry for VM2 in the local MAC table of VTEP1, VTEP1 generally searches the head-end replication list, replicates and VXLAN encapsulates the packet according to the head-end replication list, generates a broadcast-agnostic unicast-multicast (BUM) packet sent to VTEP3 and VTEP4, and sends the BUM packet to VTEP3 and VTEP 4. In this way, VTEP3 and VTEP4 may both receive one BUM message, and if the MAC entries local to VTEP3 and VTEP4 both store forwarding entries for VM2, VTEP3 and VTEP4 may respectively forward the messages to VM2, so that VM2 receives two duplicate messages, which results in waste of network resources.
Alternatively, when a forwarding table entry for VM2 is stored in the local MAC table of VTEP1, VTEP1 may send a unicast message to VTEP3 or VTEP4, for example, may determine to send the unicast message to VTEP3 or to VTEP4 in a load sharing manner. At this time, if VTEP3 receives a message and a forwarding entry for VM2 is not stored in the local MAC table of VTEP3, VTEP3 usually triggers a Designated Forwarder (DF) function, and when VTEP3 is not the DF of VM2, VTEP3 does not send a message to VM2, and VTEP4, which is the DF of VM2, cannot send a message to VM2 because it does not receive a unicast message sent by VTEP1, so that VM2 finally cannot receive the message sent by VM 1. The DF function refers to assigning a VTEP as DF for each VM in a multi-homed access group, and is responsible for forwarding a message to the VM, and other VTEPs not having DF will not send messages to the accessed VM.
In practical applications, when the VM2 is a migrated VM or a newly added VM, the VTEP1 and the VTEP3 may not learn the MAC address of the VM2, and a situation that a forwarding entry corresponding to the VM2 does not exist in the local MAC table of the VTEP1 or the local MAC table of the VTEP3 is likely to occur, so that the VM2 may receive multiple repeated messages or may not receive a message. However, in the message forwarding process, situations of sending multiple messages or discarding messages are avoided.
Based on this, the embodiment of the present application provides a message transmission method, so that the VM2 can receive the message sent by the VM1, and only one message is received. In specific implementation, after the VM1 sends the original packet to the VTEP1, the VTEP1 may encapsulate a VXLAN header in the received original packet to obtain a VXLAN packet, and set a packet type indication for indicating whether the first packet is a unicast packet or a BUM packet in the VXLAN packet. VTEP1 may then send the completed encapsulated VXLAN message to VTEP 3. VTEP3 may obtain the message type indication from the VXLAN message after receiving the VXLAN message.
Thus, when the VTEP3 determines that the VXLAN message received by the VTEP3 is a unicast message according to the message type indication, it indicates that the VTEP1 only sends one VXLAN message, and only the VTEP3 receives the VXLAN message, at this time, the VTEP3 may decapsulate the VXLAN message and directly send the obtained original message to the VM2, so that the VM2 can obtain the original message, otherwise, the VM2 cannot obtain the original message from other VTEPs, thereby avoiding message loss.
However, when VTEP3 determines that the VXLAN packet is a BUM packet according to the packet type indication, it indicates that VTEP1 has sent multiple VXLAN packets, that is, in addition to VTEP3 receiving the packet, there are other VTEPs also receiving the packet, so that VTEP3 may send an original packet obtained by decapsulating the VXLAN packet to VM2 if VTEP3 is determined to be the DF of VM2, and VTEP3 may not send the original packet to VM2 if VTEP3 is determined not to be the DF of VM 2. In this way, VM2 receives only primitive messages from the VTEP acting as DF, and does not receive primitive messages from other VTEPs, thereby avoiding receiving multiple identical messages.
It is noted that the VXLAN network shown in fig. 1 is by way of example only and is not intended to be limiting. For example, in practical application, the multi-homed access device in the VXLAN network applied in the embodiment of the present application may be a virtual machine VM, and may also be a physical machine or other devices; for another example, the VXLAN network to which the embodiment of the present application is applied may also support single-homing, triple-homing, or quadruple-homing access of a virtual machine or a physical machine. For another example, the network to which the embodiment of the present application is applied may also be a campus network or an enterprise network.
Various non-limiting specific implementation manners of a message transmission method in the embodiments of the present application are described in detail below with reference to the accompanying drawings. Referring to fig. 2, fig. 2 shows a signaling interaction diagram of a message transmission method in the embodiment of the present application, where the method may be applied to a VXLAN network shown in fig. 1, and specifically may include:
s201: and the source equipment sends the second message to the second equipment.
In this embodiment, as shown in fig. 2, when a source device needs to send a packet to another device (a destination device), the source device may transmit the packet to the destination device sequentially through an intermediate second device and a first device. For example, when this embodiment is applied to the VXLAN network shown in fig. 1, the source device may specifically be the VM1 that needs to send a message to the VM2 in fig. 1, and the destination device may be the VM2, the first device may be the VTEP3 in fig. 1 or a leaf3 device that carries the VTEP3 (of course, may also be the VTEP4 or a leaf4 device that carries the VTEP4), and the second device may be the VTEP1 in fig. 1 or a leaf1 device that carries the VTEP1 (of course, may also be the VTEP2 or a leaf2 device that carries the VTEP 2).
In the message transmission process, the source device may send an original message (hereinafter referred to as a second message) to be transmitted to the destination device to the second device, so that the second device performs corresponding processing and forwarding on the second message.
S202: and the second equipment packages the second message to obtain a first message, wherein the first message comprises a message type indication which is used for indicating whether the first message is a unicast message or a BUM message.
In a specific implementation, the second device and the first device may perform packet transmission based on a tunneling technique. The second device, as a tunnel endpoint, may encapsulate a VXLAN header for the second packet, and set a corresponding packet type indication in the VXLAN header according to whether the first packet to be sent belongs to a unicast packet or a BUM packet in the encapsulation process, so that the first packet obtained by encapsulation includes the type indication of the first packet.
In an exemplary embodiment, the message type indication may specifically be a reserved field located in the VXLAN header. As shown in fig. 3, when the second device encapsulates the second packet, a VXLAN header, a User Datagram Protocol (UDP) header, an outer IP header, and an outer ethernet header may be sequentially added to an original data frame, where the VXLAN header may include a VXLAN Network Identifier (VNI) field with 24 bits and a VXLAN flag bit field with 8 bits, and the remaining fields are reserved fields, and then one or more fields in the reserved fields may be used to indicate whether the first packet is a unicast packet or a BUM packet. For example, an 8-bit reserved field after the VXLAN flag bit field may be defined as a BUM flag bit, and when the value of the BUM flag bit is defined as 0, the first packet is indicated as a unicast packet, and when the value of the reserved field is defined as 1 or other value other than 0, the first packet is indicated as a BUM packet. Correspondingly, when encapsulating the VXLAN header for the first packet, the second device may set a corresponding value (0 or a value other than 0) in the reserved field according to whether the packet to be sent is a unicast packet or a BUM packet, so that the first packet includes the packet type indication.
In the above embodiments, the type of the first packet is indicated by defining the value of the field, but in other possible embodiments, it may also be indicated whether the received packet is a unicast packet or a BUM packet based on the outer destination IP address of the first packet. As shown in fig. 3, the outer IP header of the first packet encapsulated by the second device may include an IP address of the destination VTEP (of course, the IP address of the active VTEP may also be included at the same time). If the second device wants to send a unicast message, the IP address of the destination VTEP in the outer IP header of the first message may be a single IP address, so that the second device may send the unicast message to only one device; if the second device wants to send the BUM message, the IP address of the destination VTEP in the IP header of the first message is the IP address range, that is, the IP address of the destination VTEP is specifically the IP addresses of the VTEPs included in the IP address range, so that the second device can send the BUM message to the VTEPs.
The second device may specifically determine whether to send the unicast message or the BUM message according to a query result of the local MAC table, that is, if the second device can find the entry corresponding to the destination MAC address from the local MAC table, the second device may send the unicast message, and if the second device cannot find the entry corresponding to the destination MAC address, the second device may send the BUM message.
In specific implementation, after receiving a second message sent by a source device, a second device may obtain a destination MAC address of the second message, for example, the destination MAC address may be obtained by parsing the second message, and whether an entry corresponding to the destination MAC address is recorded in an MAC table stored locally, where the entry corresponding to the destination MAC address may include, for example, an IP address of a destination VTEP; when the second device finds the entry corresponding to the target address from the MAC table, the second device may determine to send a unicast message to the egress port device corresponding to the found entry, and accordingly, the message type indication included in the first message may specifically indicate that the first message is a unicast message; and when the second device does not find the table entry corresponding to the destination MAC address from the MAC table, the second device can determine to send the BUM message.
Taking the example shown in fig. 1 that VM1 sends a message to VM2, after VM1 sends an original message (i.e., the second message) to VTEP1 (i.e., the second device), VTEP1 may query a local MAC table shown in table 1, and since a table entry (an egress port of which points to an IP address of VTEP3, that is, an egress port is a tunnel entry) corresponding to a destination MAC address (i.e., the MAC address of VM 2) is queried, VTEP1 may determine to send a unicast message to VTEP3, and a message (i.e., the first message) obtained by encapsulating the original message includes a message type indication indicating that the message is a unicast message.
TABLE 1
MAC table item Output port
MAC Address of VM2 IP Address of VTEP3
Of course, if no entry corresponding to the MAC address of the VM2 is recorded in the local MAC table of the VTEP, the VTEP1 may determine that the BUM message is to be sent, and generate the BUM messages (i.e., the first messages) respectively sent to the VTEP3 and the VTEP4, where the generated BUM messages may include a message type indication indicating that the message is a BUM message.
In practical application, when the message type indication is located in the VXLAN header, if the second device finds the entry corresponding to the destination MAC address from the MAC table, the second device may set a message type indication for indicating a unicast message at the corresponding reserved field in the VXLAN header, and if the entry corresponding to the destination MAC address is not found, the second device may set a message type indication for indicating a BUM message at the corresponding reserved field in the VXLAN header.
When the message type indicates an outer layer destination IP address of the first message, if the second device finds a table entry corresponding to the destination MAC address from the MAC table, the second device may use the IP address corresponding to the found table entry as the outer layer destination IP address, and complete message encapsulation, so that the single destination IP address may be used to indicate that the first message is a unicast message, and if a table entry corresponding to the destination MAC address is not found, the multicast IP address may be used as the outer layer destination IP address, so that the multicast IP address may be used to indicate that the first message is a BUM message.
It should be noted that, in practical applications, the second device may also determine whether to send a unicast message or a BUM message by other means. For example, when the second device is configured to broadcast in the domain, the BUM packet may be directly generated, and the type of the transmission packet may not be determined by looking up the MAC entry.
Correspondingly, before the second device sends the first message, it may also be determined in advance to which device the message is sent. As an example, when the second device finds a single entry corresponding to the destination MAC address from the MAC table, the egress port device indicated by the entry is the first device. In practical applications, there may be a plurality of entries corresponding to the destination MAC address, which are searched from the MAC table by the second device, and the entries correspond to a plurality of egress port devices. For example, in the VXLAN network shown in fig. 1, VTEP1 may find the IP address of VTEP3 and the IP address of VTEP4 as the entries corresponding to the MAC address of VM2 from the local MAC table. At this time, a load may be imposed on the plurality of egress port devices, specifically, a device that receives the first packet may be determined from the plurality of egress port devices based on a HASH (HASH) algorithm, where the determined device is the first device. And when the second device cannot find the table entry corresponding to the destination MAC address from the MAC table, the second device may use a layer two network device communicating with the second device as the first device. The two-layer network device is a network device which can realize communication with the second device through MAC addressing.
S203: and the second equipment sends the first message to the first equipment.
In this embodiment, after the second device obtains the first packet through encapsulation, the second device may send the first packet to the first device based on a conventional IP protocol.
S204: the first device decapsulates the received first message, acquires a second message, and determines whether the first message is a unicast message or a BUM message according to a message type indication included in the first message.
Since the first packet is obtained by encapsulating the second packet, the first device may perform corresponding decapsulation processing on the first packet after receiving the first packet, to obtain the second packet.
And if the message type indication is predefined or negotiated in the target field of the first message, such as a reserved field in the VXLAN header of the first message, the message type indication can be obtained from the target field of the first message, and it is determined whether the first message is a unicast message or a BUM message according to the message type indication. For example, one or more reserved fields in the VXLAN header may be predefined as a BUM flag bit, and when the value of the BUM flag bit is 1, the first packet may be determined to be a BUM packet, and when the value of the BUM flag bit is 0, the first packet may be determined to be a unicast packet.
If the predefined or negotiated message type indicates that the message is specifically a destination IP address in the first message, it can be analyzed from the first message whether the destination IP address represents a single IP address or a multicast IP address (i.e. represents a range segment of multiple IP addresses). When the destination IP address is a single IP address, the first device may determine that the first packet is a unicast packet, and when the destination IP address is a multicast IP address, the first device may determine that the first packet is a BUM packet.
S205: when the first device determines that the first message is a unicast message, or the first device determines that the first message is a BUM message and the first device is a DF of a destination device, the first device sends a second message to the destination device.
In this embodiment, when the first device determines that the first packet is a unicast packet, it indicates that the second device has only sent the first packet to the first device, and therefore, to improve the success rate of the destination device obtaining the second packet sent by the source device, the first device may directly send the second packet obtained by decapsulating the first packet to the destination device. Specifically, after the first device finds the entry corresponding to the destination MAC address from the local MAC table, the second packet may be sent to the destination device according to the entry, and after the first device fails to find the entry corresponding to the destination MAC address, the second packet may be sent to all the accessed devices.
Therefore, the destination device can receive the second message no matter whether the local MAC table of the first device includes the entry corresponding to the destination MAC address, so that when the entry of the destination MAC address is not recorded in the local MAC table, the situation that the first device does not send the second message to the destination device due to the fact that the first device is not the DF of the destination device can be avoided, and thus the message loss (that is, the destination device cannot receive the message) can be avoided.
When the first device determines that the first message is a BUM message, it indicates that the second device has sent the BUM message to multiple devices at the same time, and at this time, because the destination device is accessed to multiple network devices (including the first device) more, the destination device may receive messages from multiple network devices. Based on this, in order to avoid that the destination device receives multiple second messages from multiple network devices, the DF election function may be triggered, that is, one network device is designated for the destination device to forward the message (the designated network device is DF), and the other network devices to which the destination device is multi-homed cannot send the message to the destination device. Based on this, when determining that the first packet is the BUM packet, the first device may further determine whether the first device is a DF corresponding to the destination device represented by the destination MAC address, if so, the first device may send the second packet to the destination device, and if not, the first device may not send the second packet to the destination device, for example, the second packet may be discarded. In this way, although the destination device has multiple accesses to multiple network devices, it usually only receives the second packet from the DF corresponding to the destination device, so as to avoid the occurrence of multiple packets (i.e. the destination device receives multiple duplicate packets).
It can be understood that, when determining that the received first packet is a unicast packet, the first device may send the second packet to the destination device regardless of whether the entry corresponding to the destination MAC address is recorded in the local MAC table, and when determining that the received first packet is a BUM packet, the first device sends the second packet to the destination device only when the first device is used as the DF of the destination device, so that the destination device may receive the second packet and only receive one copy of the second packet regardless of whether the entries corresponding to the destination MAC addresses are recorded in the local MAC tables of the first device and the second device, thereby avoiding a situation of packet loss or multiple packets.
For a scenario in which an entry corresponding to a destination MAC address is recorded in an MAC table of a first device and a second device, the first device and the second device may have a combination of multiple packet sending behaviors, which is specifically shown in table 2:
TABLE 2
Figure BDA0002351106510000081
Figure BDA0002351106510000091
Wherein, the table "record of the first MAC table" and "record of the first MAC table" respectively represent that the table entry corresponding to the destination MAC address is recorded and the table entry corresponding to the destination MAC address is not recorded in the MAC table on the first device, "record of the second MAC table" and "record of the second MAC table" respectively represent that the table entry corresponding to the destination MAC address and the table entry corresponding to the destination MAC address are not recorded in the MAC table on the second device, "unicast message" in the forwarding behavior of the second device represents that the second device sends a unicast message to the first device, "BUM message" represents that the second device sends a BUM message to the first device, "unicast message" in the forwarding behavior of the first device represents that the first device sends a message to the destination device according to the corresponding table entry in the first MAC table, "DF sends" represents that the first device sends a message to the destination device when the DF corresponding to the destination device, the 'DF check sending skipping' represents that whether the first equipment is the DF corresponding to the target equipment or not sends the message to the target equipment.
It is to be noted that, in an implementation, the first device and/or the second device in the foregoing method embodiment may include a main control board and an interface board, where the main control board and a processor in the interface board may cooperate to perform the above actions performed by the first device or the second device, and control a packet forwarding behavior of an ethernet switch chip (LSW) in the interface board. Specifically, referring to fig. 4 and 5, fig. 4 shows a hardware structure diagram of the main control board, and fig. 5 shows a hardware structure diagram of the interface board.
As shown in fig. 4, the main control board may include a processor 1, an ethernet interface (for managing network ports), a physical layer ethernet interface 1, an ethernet interface connected to the interface board processor, a volatile memory 1 (such as a random access memory RAM, etc.), and a non-volatile memory 1 (such as a flash memory, etc.). The processor 1 is respectively connected with the volatile memory 1, the nonvolatile memory 1, the ethernet interface (for managing the network port) and the ethernet interface of the connection interface board processor 1, the ethernet interface (for managing the network port) is connected with the physical layer ethernet interface 1, and the ethernet interface of the connection interface board processor 2 is connected with the physical layer ethernet interface 2.
As shown in fig. 5, the interface board may include a processor 2, an ethernet interface connecting the main control board processor 1, an LSW, a physical layer ethernet interface 3, a volatile memory 2, and a non-volatile memory 2. The processor 2 is respectively connected with the volatile memory 2, the nonvolatile memory 2, the LSW and an Ethernet interface connected with the main control board processor 1, and the volatile memory 3 is connected with the LSW.
The processor 1 and the processor 2 may be control units of a main control board and an interface board, respectively, a program run by the processor and static configuration parameters may be stored in corresponding nonvolatile memories, and codes executed when the program runs and related data may be placed in corresponding volatile memories. The processor 1 and the processor 2 may cooperatively complete the related operations of the first device or the second device in the above method embodiment, and effectively control the forwarding behavior of the LSW, and at the same time, may also control the LSW to perform initialization, service table entry issue, protocol packet transceiving, various interrupts (including port on-line and off-line state processing), and the like. Furthermore, the LSW may be provided with an external volatile memory 3, and the volatile memory 3 may be used to store messages that need to be sent by the first device or the second device. In some application scenarios, the volatile memory 3 may also alleviate the problem of internal cache starvation of the LSW chip. The physical layer ethernet interface 3 connected to the LSW may complete ethernet interface interfacing of an optical interface or an electrical interface with the physical layer ethernet interface 2 on the main control board.
In addition, a schematic diagram of another hardware structure of the first device and/or the second device is also provided in the embodiment of the present application. Referring to fig. 6, fig. 6 shows a hardware structure diagram of another device in the embodiment of the present application.
The device may be the first device in the above method embodiments, and the device may comprise at least one processor 601 and at least one memory 602. The processor 601 may be connected to a memory 602, for example, via a bus 603 as shown in FIG. 6. Of course, in practical applications, the connection between the processor 601 and the memory 602 may include various interfaces, transmission lines, or buses, which is not limited in this embodiment.
The memory 602 may be used to store computer programs or instructions;
the processor 601 may be configured to execute the computer program or instructions and perform the following steps according to the computer program or instructions:
receiving a first message from a second device, wherein the first message comprises a message type indication, and the message type indication is used for indicating that the first message is a unicast message or a broadcast unknown unicast multicast BUM message;
when the first message is determined to be the unicast message according to the message type indication, or when the first message is determined to be the BUM message according to the message type indication and the first device is an appointed forwarder DF of a target device, sending a second message to the target device;
the second message is obtained after the first device decapsulates the first message, and the destination device is accessed to multiple network devices, where the multiple network devices include the first device.
In some possible embodiments, the message type indicator is located in a target field in the first message, and/or the message type indicator is a multicast address carried by the first message after being encapsulated by a multicast tunnel.
In some possible embodiments, the first message is a VXLAN message including a virtual extensible local area network VXLAN header, and the target field is specifically a reserved field in the VXLAN header.
In some possible embodiments, the processor 601 may further perform the following steps according to the computer program or the instructions:
and when the first message is determined to be the BUM message according to the message type indication and the first device is not the DF of the target device, not sending a second message to the target device.
It should be noted that the processor in the present application may include, but is not limited to, at least one of the following: various computing devices that run software, such as a Central Processing Unit (CPU), a microprocessor, a Digital Signal Processor (DSP), a Microcontroller (MCU), or an artificial intelligence processor, may each include one or more cores for executing software instructions to perform operations or processing. The processor may be a single semiconductor chip, or may be integrated with other circuits to form a system-on-a-chip (system-on-a-chip), or may be integrated as a built-in processor of an application-specific integrated circuit (ASIC), which may be packaged separately or packaged together with other circuits. The processor may further include necessary hardware accelerators such as Field Programmable Gate Arrays (FPGAs), Programmable Logic Devices (PLDs), or logic circuits implementing dedicated logic operations, in addition to cores for executing software instructions to perform operations or processes.
The memory in the embodiment of the present application may include at least one of the following types: read-only memory (ROM) or other types of static memory devices that may store static information and instructions, Random Access Memory (RAM) or other types of dynamic memory devices that may store information and instructions, and may also be electrically erasable programmable read-only memory (EEPROM). In some scenarios, the memory may also be, but is not limited to, a compact disk-read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory may be separate and coupled to the processor. The memory can store program codes for executing the technical solutions of the embodiments of the present application, and the processor controls the execution of the program codes. For example, the processor is configured to execute the computer program code stored in the memory, so as to implement the technical solution in the embodiment of the present application.
In addition, an embodiment of the present application further provides a message transmission apparatus, where the apparatus 700 may be applied to the first device in the foregoing method embodiment, and the apparatus 700 may specifically include a receiving module 701, a processing module 702, and a sending module 703:
a receiving module 701, configured to receive a first packet from a second device, where the first packet includes a packet type indication, and the packet type indication is used to indicate that the first packet is a unicast packet or a broadcast-unknown unicast-multicast BUM packet;
a processing module 702, configured to send a second packet to a destination device through a sending module 703 when the first packet is determined to be the unicast packet according to the packet type indication, or when the first packet is determined to be the BUM packet according to the packet type indication and the first device is an appointed forwarder DF of the destination device;
the second message is obtained after the first device decapsulates the first message, and the destination device is accessed to multiple network devices, where the multiple network devices include the first device.
In some possible embodiments, the message type indicator is located in a target field in the first message, and/or the message type indicator is a multicast address carried by the first message after being encapsulated by a multicast tunnel.
In some possible embodiments, the first message is a VXLAN message including a virtual extensible local area network VXLAN header, and the target field is specifically a reserved field in the VXLAN header.
In some possible embodiments, the processing module 702 is further configured to determine not to send a second packet to the destination device when the first device determines, according to the packet type indication, that the first packet is the BUM packet and the first device is not the DF of the destination device.
It should be noted that, for the information interaction, the execution process, and other contents between the modules of the apparatus, since the same concept is based on the method embodiment in the embodiment of the present application, the technical effect brought by the information interaction, the execution process, and the like is the same as that of the method embodiment in the embodiment of the present application, and specific contents may refer to the description in the foregoing method embodiment in the embodiment of the present application, and are not described herein again.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, modules and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the present application, "of", corresponding "(compatible)" and "corresponding" (compatible) "may be sometimes used in combination, and it should be noted that the intended meanings are consistent when the differences are not emphasized.
It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the present application, "at least one" means one or more. "plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple. In addition, in order to facilitate clear description of technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items having substantially the same functions and actions. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
The system architecture and the service scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not form a limitation on the technical solution provided in the embodiment of the present application, and as a person of ordinary skill in the art knows that along with the evolution of the network architecture and the appearance of a new service scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method for packet transmission, the method comprising:
a first device receives a first message from a second device, wherein the first message comprises a message type indication, and the message type indication is used for indicating that the first message is a unicast message or a broadcast unknown unicast multicast BUM message;
when the first device determines that the first message is the unicast message according to the message type indication, or when the first device determines that the first message is the BUM message according to the message type indication and the first device is an appointed forwarder DF of a destination device, the first device sends a second message to the destination device;
the second message is obtained after the first device decapsulates the first message, and the destination device is accessed to multiple network devices, where the multiple network devices include the first device.
2. The method according to claim 1, wherein the packet type indicator is located in a destination field in the first packet, and/or wherein the packet type indicator is a multicast address carried by the first packet after being encapsulated by a multicast tunnel.
3. The method according to claim 2, wherein the first message is a VXLAN message comprising a virtual extensible local area network VXLAN header, and wherein the destination field is specifically a reserved field in the VXLAN header.
4. The method according to any one of claims 1 to 3, further comprising:
and when the first equipment determines that the first message is the BUM message according to the message type indication and the first equipment is not the DF of the destination equipment, the first equipment does not send a second message to the destination equipment.
5. The message transmission device is applied to first equipment, and comprises a receiving module, a processing module and a sending module:
the receiving module is configured to receive a first packet from a second device, where the first packet includes a packet type indication, and the packet type indication is used to indicate that the first packet is a unicast packet or a broadcast-unknown unicast multicast BUM packet;
the processing module is configured to send a second packet to a destination device through the sending module when the first packet is determined to be the unicast packet according to the packet type indication, or when the first packet is determined to be the BUM packet according to the packet type indication and the first device is an appointed forwarder DF of the destination device;
the second message is obtained after the first device decapsulates the first message, and the destination device is accessed to multiple network devices, where the multiple network devices include the first device.
6. The apparatus according to claim 5, wherein the packet type indicator is located in a destination field in the first packet, and/or wherein the packet type indicator is a multicast address carried by the first packet after being encapsulated by a multicast tunnel.
7. The apparatus according to claim 6, wherein the first message is a VXLAN message comprising a VXLAN header, and wherein the destination field is specifically a reserved field in the VXLAN header.
8. The apparatus of any one of claims 5 to 7, further comprising:
and the processing module is further configured to determine not to send a second message to the destination device when it is determined that the first message is the BUM message and the first device is not the DF of the destination device according to the message type indication.
9. A computer device comprising a processor and a memory;
the memory is for storing a computer program or instructions;
the processor is configured to execute the computer program or instructions to cause the computer device to perform the message transmission method according to any one of claims 1 to 4.
10. A storage medium comprising instructions which, when run on a computer, cause the computer to perform the message transmission method according to any one of claims 1 to 4.
CN201911415540.5A 2019-12-31 2019-12-31 Message transmission method and related equipment Active CN113132202B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911415540.5A CN113132202B (en) 2019-12-31 2019-12-31 Message transmission method and related equipment
PCT/CN2020/115726 WO2021135397A1 (en) 2019-12-31 2020-09-17 Message transfer method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911415540.5A CN113132202B (en) 2019-12-31 2019-12-31 Message transmission method and related equipment

Publications (2)

Publication Number Publication Date
CN113132202A true CN113132202A (en) 2021-07-16
CN113132202B CN113132202B (en) 2023-12-08

Family

ID=76686886

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911415540.5A Active CN113132202B (en) 2019-12-31 2019-12-31 Message transmission method and related equipment

Country Status (2)

Country Link
CN (1) CN113132202B (en)
WO (1) WO2021135397A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113872847B (en) * 2021-11-18 2023-05-30 浪潮思科网络科技有限公司 Message forwarding method, device and medium based on VXLAN network
CN114422064B (en) * 2021-12-15 2023-09-12 北京罗克维尔斯科技有限公司 Message forwarding method and device
CN114520778A (en) * 2022-01-13 2022-05-20 深信服科技股份有限公司 Connectivity detection method, connectivity detection device, electronic equipment and storage medium
CN117675657A (en) * 2022-08-31 2024-03-08 华为技术有限公司 Transmission detection method, device and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150009995A1 (en) * 2013-07-08 2015-01-08 Nicira, Inc. Encapsulating Data Packets Using an Adaptive Tunnelling Protocol
CN108259291A (en) * 2016-12-29 2018-07-06 华为技术有限公司 VXLAN message processing methods, equipment and system
US10142129B1 (en) * 2016-09-27 2018-11-27 Juniper Networks, Inc. Bum packet filtering in multi-homed EVPN overlay networks
WO2019105462A1 (en) * 2017-11-30 2019-06-06 中兴通讯股份有限公司 Method and apparatus for sending packet, method and apparatus for processing packet, pe node, and node

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107566265B (en) * 2017-10-16 2018-08-21 中国联合网络通信有限公司广东省分公司 A kind of EVPN VXLAN gateway ESI redundancy cut-in methods under symmetrical forwarding model
CN108259303B (en) * 2017-12-25 2020-12-04 新华三技术有限公司 Message forwarding method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150009995A1 (en) * 2013-07-08 2015-01-08 Nicira, Inc. Encapsulating Data Packets Using an Adaptive Tunnelling Protocol
US10142129B1 (en) * 2016-09-27 2018-11-27 Juniper Networks, Inc. Bum packet filtering in multi-homed EVPN overlay networks
CN108259291A (en) * 2016-12-29 2018-07-06 华为技术有限公司 VXLAN message processing methods, equipment and system
WO2019105462A1 (en) * 2017-11-30 2019-06-06 中兴通讯股份有限公司 Method and apparatus for sending packet, method and apparatus for processing packet, pe node, and node

Also Published As

Publication number Publication date
CN113132202B (en) 2023-12-08
WO2021135397A1 (en) 2021-07-08

Similar Documents

Publication Publication Date Title
CN108259291B (en) VXLAN message processing method, device and system
CN111885075B (en) Container communication method, device, network equipment and storage medium
CN106998286B (en) VX L AN message forwarding method and device
CN113132202A (en) Message transmission method and related equipment
CN112702252B (en) Message processing method, system and related equipment
CN103095546B (en) A kind of method, device and data center network processing message
CN107070691B (en) Cross-host communication method and system of Docker container
CN109617995B (en) Management system and method for VPC (virtual private network) internal container of tenant cluster and electronic equipment
EP3282649B1 (en) Data packet forwarding
US20150358232A1 (en) Packet Forwarding Method and VXLAN Gateway
US9774532B2 (en) Information processing system, information processing apparatus and control method of information processing system
CN113326228B (en) Message forwarding method, device and equipment based on remote direct data storage
CN107948077B (en) Method and device for forwarding data message
US11444874B2 (en) Packet transmission method, and communications apparatus and system
JP2019521619A (en) Packet forwarding
CN106330719A (en) VXLAN message forwarding method and device
JP7448597B2 (en) Message generation method and device and message processing method and device
CN106992918B (en) Message forwarding method and device
CN113660164A (en) Message forwarding method and network equipment
CN112422444B (en) Method and device for forwarding message across cards
CN114374641B (en) Three-layer message forwarding method and device
WO2023010730A1 (en) Data packet parsing method and server
CN113542112B (en) Message forwarding method and network equipment
CN114629844A (en) Message forwarding method and device and electronic equipment
CN113765794B (en) Data transmission method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant