CN107547395B - Message transmission method and device and machine-readable storage medium - Google Patents

Message transmission method and device and machine-readable storage medium Download PDF

Info

Publication number
CN107547395B
CN107547395B CN201710497932.5A CN201710497932A CN107547395B CN 107547395 B CN107547395 B CN 107547395B CN 201710497932 A CN201710497932 A CN 201710497932A CN 107547395 B CN107547395 B CN 107547395B
Authority
CN
China
Prior art keywords
interface
message
specific mark
specific
vxlan tunnel
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
CN201710497932.5A
Other languages
Chinese (zh)
Other versions
CN107547395A (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 CN201710497932.5A priority Critical patent/CN107547395B/en
Publication of CN107547395A publication Critical patent/CN107547395A/en
Application granted granted Critical
Publication of CN107547395B publication Critical patent/CN107547395B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present disclosure provides a message transmission method, a device and a machine readable storage medium, wherein the method comprises the following steps: after a message is received through a first interface, determining a specific mark corresponding to the message; determining a VXLAN tunnel corresponding to the specific mark; and sending the message carrying the specific mark to the second equipment through the VXLAN tunnel so that the second equipment determines a second interface corresponding to the specific mark and sends the message through the second interface. By the technical scheme, message transmission can be realized through the specific mark without depending on learning and forwarding of the MAC address, so that the table lookup forwarding pressure of equipment is greatly reduced, the possibility of message transmission errors is reduced, and the problem of message transmission abnormity caused by the conditions that the storage space of an MAC forwarding table is occupied, the MAC addresses of different hosts conflict and the like is avoided.

Description

Message transmission method and device and machine-readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for packet transmission, and a machine-readable storage medium.
Background
VXLAN (Virtual eXtensible Local Area Network) is a two-layer VPN (Virtual Private Network) technology based on IP Network and adopting a "MAC (Media Access Control) in UDP (User Datagram Protocol)" encapsulation form. VXLAN can provide two-layer interconnection for decentralized sites based on existing service provider or enterprise IP networks and can provide service isolation for different tenants.
In VXLAN, the message is usually transmitted based on the destination MAC address of the message, for example, VTEP (VXLAN Tunnel End Point) learns the MAC forwarding table, and after receiving the message with the destination MAC address MAC1, the message is forwarded through the interface a, and after receiving the message with the destination MAC address MAC2, the message is forwarded through VXLAN Tunnel 1.
TABLE 1
MAC address Outlet interface
MAC1 Interface A
MAC2 VXLAN tunnel 1
However, when there are a large number of hosts, because the specification of the MAC forwarding table is limited, if the storage space of the MAC forwarding table is already occupied, the MAC forwarding table entries of all the hosts cannot be stored, and then the message transmission is abnormal. Moreover, if MAC addresses of different hosts collide, message transmission is also abnormal.
Disclosure of Invention
The present disclosure provides a packet transmission method, applied to a first device, the method including:
after a message is received through a first interface, determining a specific mark corresponding to the message;
determining an extensible virtual local area network (VXLAN) tunnel corresponding to the specific mark; wherein the VXLAN tunnel is a VXLAN tunnel between the first device and a second device;
and sending the message carrying the specific mark to the second equipment through the VXLAN tunnel so that the second equipment determines a second interface corresponding to the specific mark and sends the message through the second interface.
The present disclosure provides a packet transmission method, applied to a second device, the method including:
receiving a message which is sent by first equipment through an extensible virtual local area network VXLAN tunnel and carries a specific mark; the message is sent by the first equipment through a VXLAN tunnel corresponding to the specific mark after the first equipment receives the message through a first interface and the specific mark corresponding to the message is determined;
analyzing the specific mark from the message, and determining a second interface corresponding to the specific mark;
and sending the message through the second interface.
The present disclosure provides a packet transmission apparatus, applied to a first device, the apparatus including:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a specific mark corresponding to a message after the message is received through a first interface; determining an extensible virtual local area network (VXLAN) tunnel corresponding to the specific mark; wherein the VXLAN tunnel is a VXLAN tunnel between the first device and a second device;
and the sending module is used for sending the message carrying the specific mark to the second equipment through the VXLAN tunnel so that the second equipment determines a second interface corresponding to the specific mark and sends the message through the second interface.
The present disclosure provides a packet transmission apparatus, applied to a second device, the apparatus including:
the receiving module is used for receiving a message which is sent by the first equipment through an extensible virtual local area network VXLAN tunnel and carries a specific mark; the message is sent by the VXLAN tunnel corresponding to the specific mark after the first device receives the message through the first interface and determines the specific mark corresponding to the message;
the determining module is used for analyzing the specific mark from the message and determining a second interface corresponding to the specific mark; and the sending module is used for sending the message through the second interface.
The present disclosure provides a machine-readable storage medium applied to a first device, the machine-readable storage medium having stored thereon a number of computer instructions, which when executed perform the following processes:
after a message is received through a first interface, determining a specific mark corresponding to the message;
determining an extensible virtual local area network (VXLAN) tunnel corresponding to the specific mark; wherein the VXLAN tunnel is a VXLAN tunnel between the first device and a second device;
and sending the message carrying the specific mark to the second equipment through the VXLAN tunnel so that the second equipment determines a second interface corresponding to the specific mark and sends the message through the second interface.
The present disclosure provides a machine-readable storage medium applied to a second device, the machine-readable storage medium having stored thereon a number of computer instructions, which when executed perform the following:
receiving a message which is sent by first equipment through an extensible virtual local area network VXLAN tunnel and carries a specific mark; the message is sent by the first equipment through a VXLAN tunnel corresponding to the specific mark after the first equipment receives the message through a first interface and the specific mark corresponding to the message is determined;
analyzing the specific mark from the message, and determining a second interface corresponding to the specific mark;
and sending the message through the second interface.
Based on the technical scheme, in the embodiment of the disclosure, on the devices at two ends of the VXLAN tunnel, message transmission can be realized through a specific mark without depending on learning and forwarding of the MAC address, so that the table lookup forwarding pressure of the devices is greatly reduced, the possibility of message transmission errors is reduced, and the problem of message transmission abnormality caused by the conditions that the storage space of the MAC forwarding table is occupied, the MAC addresses of different hosts conflict and the like is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present disclosure or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present disclosure.
Fig. 1A and 1B are schematic diagrams of an application scenario in an embodiment of the present disclosure;
fig. 2 is a flowchart of a message transmission method in an embodiment of the present disclosure;
fig. 3A and 3B are schematic diagrams of an application scenario in another embodiment of the present disclosure;
fig. 4 is a block diagram of a message transmission apparatus according to an embodiment of the present disclosure;
FIG. 5 is a hardware block diagram of a first device in one embodiment of the disclosure;
fig. 6 is a block diagram of a message transmission apparatus according to another embodiment of the present disclosure;
fig. 7 is a hardware configuration diagram of a second device in an embodiment of the present disclosure.
Detailed Description
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. Also, as used in this disclosure and the claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. Depending on the context, moreover, the word "if" is used may be interpreted as "at … …," or "when … …," or "in response to a determination.
The embodiment of the present disclosure provides a message transmission method, which may be applied to a VXLAN, where the VXLAN may include a plurality of edge devices, and the edge devices are connected to a host. Referring to fig. 1A, a schematic view of an application scenario of the embodiment of the present disclosure is shown, taking an example that an edge device is a VTEP device. VTEP111 is connected to host 101 via interface 111, VTEP111 is connected to host 104 via interface 114, VTEP112 is connected to host 102 via interface 112, and VTEP113 is connected to host 103 via interface 113. A VXLAN tunnel 1 is established between VTEP111 and VTEP112, a VXLAN tunnel 2 is established between VTEP111 and VTEP113, and a VXLAN tunnel 3 is established between VTEP112 and VTEP 113. The establishment mode for the VXLAN tunnel may be manual establishment or automatic establishment based on a protocol, which is not described in detail herein.
In fig. 1A, each interface of the VTEP device is taken as an example to be connected with only one host, in practical applications, one interface of the VTEP device may also be connected with multiple hosts, as shown in fig. 1B, VTEP111 is connected to the access stratum switch through interface 111, and the access stratum switch is connected with multiple hosts (in the figure, host 101 and host 105 are taken as an example), VTEP113 is connected to the access stratum switch through interface 113, and the access stratum switch is connected with multiple hosts (in the figure, host 103 and host 106 are taken as an example). When the interface of the VTEP device is connected to a plurality of hosts, the processing flow is similar to that of the VTEP device when the interface is connected to one host, and for convenience of description, the application scenario shown in fig. 1A is described as an example.
For the message transmission between two hosts (hereinafter referred to as a first host and a second host), in the conventional manner, the message transmission is implemented based on the MAC address, but in the embodiment of the present disclosure, the message transmission between the first host and the second host may be implemented by a specific tag without relying on the learning and forwarding of the MAC address.
In an example, the application scenario of the message transmission method may be as follows: a host (e.g., one or more hosts, which will be referred to hereinafter as a first host) under a certain interface (which will be referred to hereinafter as a first interface) of a VTEP device (which will be referred to hereinafter as a first device) accesses only a host (e.g., one or more hosts, which will be referred to hereinafter as a second host) under a certain interface (which will be referred to hereinafter as a second interface) of another VTEP device (which will be referred to hereinafter as a second device). Moreover, the second host under the second interface of the second device only accesses the first host under the first interface of the first device. For example, a host under interface 111 of VTEP111 (e.g., host 101 in fig. 1A, or host 101 and host 105 in fig. 1B) only accesses a host under interface 112 of VTEP112 (e.g., host 102 in fig. 1A or 1B). Furthermore, hosts under interface 112 of VTEP112 only access hosts under interface 111 of VTEP 111.
In one example, to implement the transmission of the message, a specific flag may be configured for a first interface of the first device, and the same specific flag may be configured for a second interface of the second device. For example, when there is a message transmission requirement between the host under the interface 111 and the host under the interface 112, the corresponding relationship between the specific tag a and the interface 111 may be configured in the VTEP111, and the corresponding relationship between the specific tag a and the interface 112 may be configured in the VTEP 112. For another example, when there is a message transmission requirement between the host under the interface 113 and the host under the interface 114, the corresponding relationship between the specific flag B and the interface 114 may be configured in the VTEP111, and the corresponding relationship between the specific flag B and the interface 113 may be configured in the VTEP 113.
To implement the above process, a controller, such as an SDN (Software Defined Network) controller, may be further included in the VXLAN, and the controller may be connected to each VTEP device. In fig. 1A, neither the controller nor the connection relationship of the controller to the VTEP apparatus is shown.
Based on this, when the controller learns that the first interface of the first device and the second interface of the second device have a message transmission requirement, a specific mark can be set for the first interface and the second interface. Then, the controller may send a configuration command to the first device, where the configuration command carries a corresponding relationship between the specific mark and the first interface, and the first device may establish the corresponding relationship between the specific mark and the first interface after receiving the configuration command. In addition, the controller may send a configuration command to the second device, where the configuration command carries a corresponding relationship between the specific mark and the second interface, and the second device may establish the corresponding relationship between the specific mark and the second interface after receiving the configuration command.
For example, when there is a message transmission requirement between the host under the interface 111 and the host under the interface 112, the controller sets a specific flag a for the interface 111 and the interface 112. Then, the controller sends a configuration command to the VTEP111, where the configuration command carries a corresponding relationship between the specific tag a and the interface 111, and the VTEP111 establishes the corresponding relationship between the specific tag a and the interface 111 after receiving the configuration command. The controller sends a configuration command to the VTEP112, where the configuration command carries a corresponding relationship between the specific tag a and the interface 112, and after receiving the configuration command, the VTEP112 establishes a corresponding relationship between the specific tag a and the interface 112.
For another example, when there is a message transmission requirement between the host under the interface 113 and the host under the interface 114, the controller sets a specific flag a for the interface 113 and the interface 114. Then, the controller sends a configuration command to the VTEP111, where the configuration command carries a corresponding relationship between the specific tag B and the interface 114, and after receiving the configuration command, the VTEP111 establishes a corresponding relationship between the specific tag B and the interface 114. The controller sends a configuration command to VTEP113, where the configuration command carries a corresponding relationship between the specific mark B and the interface 113, and after receiving the configuration command, VTEP113 establishes a corresponding relationship between the specific mark B and the interface 113.
In the above process, a process of configuring the specific mark for the interface by the controller is described in detail, in practical applications, in order to implement message transmission, the configuration is not limited to configuring the specific mark for the interface, for example, the controller may configure the specific mark for the specific attribute, as long as a unique interface can be found through the specific attribute. The specific attribute may include, but is not limited to, user information, aggregation member information, data center information, and the like.
For example, the controller may associate a specific flag a with the interface 111 and the interface 112 by configuring the specific flag a for the specific attribute a, having a correspondence between the specific attribute a and the interface 111 on the VTEP111, and having a correspondence between the specific attribute a and the interface 112 on the VTEP 112.
In summary, in the embodiment of the present application, a process of configuring a specific mark for a controller is not limited, and the controller is a process of configuring a specific mark for an interface, which is only an example of the present application and is not described herein again.
In one example, since the message is transmitted through the VXLAN tunnel when the message is transmitted between the first device and the second device, in order to implement the message transmission by using the specific tag, a corresponding relationship between the specific tag and the VXLAN tunnel may be established. Moreover, the first device can actively send a negotiation request message to establish a corresponding relationship between the specific mark and the VXLAN tunnel in the first device/the second device; the second device may also send a negotiation request message actively to establish a correspondence between the specific tag and the VXLAN tunnel in the first device/second device. For convenience of description, the following takes the example that the first device actively sends the negotiation request message.
In one example, the process of establishing a correspondence between a specific tag and a VXLAN tunnel for the "first device/second device" may include, but is not limited to, the following: the first device may send a negotiation request message to the second device through a VXLAN tunnel between the first device and the second device, where the negotiation request message may carry a specific tag. After receiving the negotiation request message through the VXLAN tunnel, the second device firstly inquires whether a second interface corresponding to the specific mark is configured locally; if not, the process may end; if so, the second device may establish a corresponding relationship between the specific tag and the VXLAN tunnel, and send a negotiation success message to the first device through the VXLAN tunnel, where the negotiation success message may carry the specific tag. Further, after receiving the negotiation success message through the VXLAN tunnel, the first device may establish a corresponding relationship between the specific tag and the VXLAN tunnel.
For example, VTEP111 may send a negotiation request message carrying a specific tag a through each VXLAN tunnel, for example, send a negotiation request message carrying a specific tag a to VTEP112 through VXLAN tunnel 1, and send a negotiation request message carrying a specific tag a to VTEP113 through VXLAN tunnel 2. After receiving the negotiation request message, VTEP113 ends the flow because the second interface corresponding to specific flag a is not locally configured. After receiving the negotiation request message through the VXLAN tunnel 1, the VTEP112 establishes a correspondence between the specific tag a and the VXLAN tunnel 1 because the interface 112 corresponding to the specific tag a is locally configured, and sends a negotiation success message carrying the specific tag a to the VTEP111 through the VXLAN tunnel 1. After receiving the negotiation success message through VXLAN tunnel 1, VTEP111 may establish a corresponding relationship between specific tag a and VXLAN tunnel 1.
In a similar manner as described above, VTEP111 may establish a correspondence of specific tag B with VXLAN tunnel 2, and VTEP113 may establish a correspondence of specific tag B with VXLAN tunnel 2.
The types of the negotiation request message and the negotiation success message may be selected according to actual needs, for example, the negotiation request message and the negotiation success message may be based on MP-BGP (multi Protocol-Border Gateway Protocol), and the types of the messages are not limited.
In an example, the specific mark may be a Virtual Local Area Network (VLAN) identifier, a corresponding relationship between a VLAN identifier and a VXLAN identifier, or other contents, such as a specific mark a and a specific mark B, where a type of the specific mark is not limited.
In the application scenario, referring to fig. 2, a flowchart of the message transmission method is shown.
Step 201, after receiving a message through a first interface, a first device determines a specific tag corresponding to the message.
The first device establishes the corresponding relationship between the specific mark and the first interface, so that the first device can obtain the specific mark corresponding to the first interface by querying the corresponding relationship through the first interface receiving the message, and determines the specific mark corresponding to the first interface as the specific mark corresponding to the message. Of course, the first device may also determine the specific tag corresponding to the packet in other manners, for example, the first device directly parses the specific tag (such as a VLAN identifier) from the packet, which is not limited to this.
For example, after receiving a message sent by the host 101 through the interface 111, the VTEP111 may query the correspondence relationship through the interface 111, so as to obtain the specific tag a corresponding to the interface 111. For another example, after receiving the message sent by the host 104 through the interface 114, the VTEP111 may query the correspondence relationship through the interface 114, so as to obtain the specific label B corresponding to the interface 114.
At step 202, the first device determines the VXLAN tunnel corresponding to the particular tag. Since the first device already establishes the corresponding relationship between the specific mark and the VXLAN tunnel, the VXLAN tunnel corresponding to the specific mark can be determined by querying the corresponding relationship through the specific mark.
For example, since VTEP111 already establishes the correspondence between the specific marker a and the VXLAN tunnel 1 and the correspondence between the specific marker B and the VXLAN tunnel 2, if the specific marker a is obtained in step 201, the VXLAN tunnel 1 corresponding to the specific marker a can be identified, and if the specific marker B is obtained in step 201, the VXLAN tunnel 2 corresponding to the specific marker B can be identified.
Step 203, the first device sends the message carrying the specific mark to the second device through the VXLAN tunnel. If VTEP111 sends a message carrying a specific tag a to VTEP112 through VXLAN tunnel 1, VTEP111 sends a message carrying a specific tag B to VTEP113 through VXLAN tunnel 2.
Step 204, the second device receives the message sent by the first device through the VXLAN tunnel.
In step 205, the second device parses the specific tag from the packet, and determines a second interface corresponding to the specific tag.
Since the second device has already established the corresponding relationship between the specific tag and the second interface, the second device can determine the second interface corresponding to the specific tag by querying the corresponding relationship through the specific tag carried in the packet. Of course, the second device may also determine the second interface corresponding to the specific mark in other manners, which is not limited to this.
For example, after receiving a message carrying a specific tag a through VXLAN tunnel 1, VTEP112 parses the specific tag a from the message. Since VTEP112 has established a correspondence relationship between a specific token a and an interface 112, it is determined that the second interface corresponding to the specific token a is the interface 112.
For another example, after receiving a message carrying the specific tag B through the VXLAN tunnel 2, the VTEP113 parses the specific tag B from the message. Since VTEP113 has already established a correspondence relationship between specific flag B and interface 113, it is determined that the second interface corresponding to the specific flag B is interface 113.
Step 206, the second device sends the message through the second interface.
For example, VTEP112 sends a message to host 102 through interface 112, and by this time, successfully sends a message from host 101 to host 102, in the process, the message transmission is completed through specific tag a.
For another example, VTEP113 sends a message to host 103 through interface 113, and thus, successfully sends a message from host 104 to host 103, and in the process, the message transmission is completed through specific tag B.
In the above process, a flow of sending a message from the first host to the second host is described in detail, and similar to the above process, the process of sending a message from the second host to the first host is not repeated here.
Aiming at the process that the first equipment sends the message to the second equipment through the VXLAN tunnel, the first equipment can encapsulate a VXLAN head, a UDP head and an IP head corresponding to the VXLAN tunnel for the message and send the encapsulated message to the second equipment, and the second equipment firstly de-encapsulates the message after receiving the message and processes the de-encapsulated message, and the encapsulation process and the de-encapsulation process are not limited.
Aiming at the process that the second equipment sends the message to the first equipment through the VXLAN tunnel, the second equipment can encapsulate a VXLAN head, a UDP head and an IP head corresponding to the VXLAN tunnel for the message and send the encapsulated message to the first equipment, and the first equipment firstly de-encapsulates the message by VXLAN after receiving the message and processes the de-encapsulated message, and the encapsulation process and the de-encapsulation process are not limited.
Based on the technical scheme, in the embodiment of the disclosure, the message transmission can be realized through the specific mark without depending on the learning and forwarding of the MAC address, so that the table lookup forwarding pressure of the device is greatly reduced, the possibility of message transmission errors is reduced, and the problem of message transmission abnormity caused by the conditions that the storage space of the MAC forwarding table is occupied, the MAC addresses of different hosts conflict and the like is avoided.
In practical applications, if the VTEP device is not directly connected to the host but connected to the host through the access layer switch, an interface where the VTEP device is connected to the access layer switch is determined as an interface where the VTEP device is connected to the host. Referring to fig. 3A, which is a schematic diagram of an application scenario of the embodiment of the present disclosure, the VTEP112 is connected to the access stratum switch through the interface 112, and the access stratum switch is connected to the host 102.
In this application scenario, for the data transmission process, the same as the flow shown in fig. 2 is performed, except that after the VTEP112 sends the packet to the access layer switch through the interface 112, the access layer switch does not transmit the packet based on the specific tag a, but transmits the packet based on the destination MAC address of the packet, and details of the transmission process are not repeated.
In the above application scenario, the first device and the second device are both VTEP devices as an example, however, the application scenario of the present application is not limited to VTEP devices, and the first device and the second device may also be other types of devices, and the application scenario is not limited thereto. For example, as shown in fig. 3B, when the host under the interface a has a communication requirement with the host under the interface B, the first device may also be a convergence layer switch, and the second device may be a data center access switch, and the first interface is the interface a and the second interface is the interface B, in this application scenario, the above technical solution may also be adopted for processing.
Specifically, a VXLAN tunnel may be established between the convergence layer switch and the data center access switch, and the convergence layer switch may establish a corresponding relationship between the specific tag and the VXLAN tunnel and a corresponding relationship between the specific tag and the interface a, and the data center access switch may also establish a corresponding relationship between the specific tag and the VXLAN tunnel and a corresponding relationship between the specific tag and the interface B.
Based on this, after receiving the message through the interface a, the convergence layer switch may query the specific tag, and send the message to the data center access switch through the VXLAN tunnel corresponding to the specific tag. Then, after receiving the message, the data center access switch may send the message through the interface B corresponding to the specific tag carried in the message, and the processing flow is similar to that in the above embodiment, and is not described herein again.
Obviously, the above manner is to send the message to the data center access switch based on a specific label, rather than sending the message to the data center access switch based on the MAC address. Therefore, the message can be sent to the data center access switch without depending on the learning and forwarding of the MAC address, so that the table lookup forwarding pressure of the convergence layer switch is greatly reduced, the possibility of message transmission errors is reduced, and the problem of message transmission abnormity caused by the conditions that the storage space of an MAC forwarding table is occupied, the MAC addresses of different hosts conflict and the like is avoided.
Based on the same concept as the above method, an embodiment of the present disclosure further provides a packet transmission apparatus, applied to a first device, and shown in fig. 4, which is a structural diagram of the apparatus, where the apparatus includes:
a determining module 401, configured to determine, after receiving a packet through a first interface, a specific tag corresponding to the packet; determining an extensible virtual local area network (VXLAN) tunnel corresponding to the specific mark; wherein the VXLAN tunnel is a VXLAN tunnel between the first device and a second device;
a sending module 402, configured to send the packet carrying the specific tag to the second device through the VXLAN tunnel, so that the second device determines a second interface corresponding to the specific tag, and sends the packet through the second interface.
The sending module 402 is further configured to send a negotiation request message to the second device through a VXLAN tunnel between the first device and the second device, where the negotiation request message carries the specific tag;
the device further comprises (not represented in the figures): the establishing module is used for establishing the corresponding relation between the specific mark and the VXLAN tunnel when receiving a negotiation success message returned by the second equipment; and the negotiation success message is sent when the second device inquires that a second interface corresponding to the specific mark is locally configured.
The device further comprises (not represented in the figures): a receiving module, configured to receive a configuration command sent by a controller, where the configuration command carries a correspondence between the specific tag and the first interface;
the establishing module is used for establishing the corresponding relation between the specific mark and the first interface;
the determining module 401 is specifically configured to, in the process of determining the specific mark corresponding to the packet, query the corresponding relationship through the first interface that receives the packet to obtain the specific mark corresponding to the first interface, and determine the specific mark corresponding to the first interface as the specific mark corresponding to the packet.
In terms of hardware, a hardware architecture diagram of the first device provided in the embodiment of the present disclosure may specifically refer to fig. 5, where the hardware structure may include: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the message transmission operation disclosed by the above examples of the present disclosure is realized by communicating with a machine-readable storage medium, reading and executing the instruction codes stored in the machine-readable storage medium.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Based on the same concept as the above method, an embodiment of the present disclosure further provides a packet transmission apparatus, which is applied to a second device, and is shown in fig. 6 as a structural diagram of the apparatus, where the apparatus includes:
a receiving module 601, configured to receive a message that is sent by a first device through a VXLAN tunnel and carries a specific tag; the message is sent by the VXLAN tunnel corresponding to the specific mark after the first device receives the message through the first interface and determines the specific mark corresponding to the message; a determining module 602, configured to parse the specific tag from the packet, and determine a second interface corresponding to the specific tag; a sending module 603, configured to send the packet through the second interface.
The receiving module 601 is further configured to receive a negotiation request message sent by the first device through the VXLAN tunnel, where the negotiation request message carries a specific tag;
the device further comprises (not represented in the figures): the establishing module is used for inquiring whether a second interface corresponding to the specific mark is configured locally; if so, establishing a corresponding relation between the specific mark and the VXLAN tunnel; the sending module 603 is further configured to send a negotiation success message to the first device through the VXLAN tunnel, so that the first device establishes a correspondence between the specific tag and the VXLAN tunnel according to the negotiation success message.
The receiving module 601 is further configured to receive a configuration command sent by a controller, where the configuration command carries a corresponding relationship between the specific mark and the second interface;
the establishing module is further configured to establish a corresponding relationship between the specific mark and the second interface;
the determining module 602 is specifically configured to, in the process of determining the second interface corresponding to the specific tag, query the correspondence through the specific tag carried by the packet to obtain the second interface corresponding to the specific tag.
In terms of hardware, the hardware architecture diagram of the second device provided in the embodiment of the present disclosure may specifically refer to fig. 7, and the hardware structure may include: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the message transmission operation disclosed by the above examples of the present disclosure is realized by communicating with a machine-readable storage medium, reading and executing the instruction codes stored in the machine-readable storage medium.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Based on the same concept as the method, the embodiment of the present disclosure further provides a machine-readable storage medium, which is applied to the first device, where the machine-readable storage medium stores a plurality of computer instructions, and when the computer instructions are executed, the computer instructions perform the following processes:
after a message is received through a first interface, determining a specific mark corresponding to the message;
determining an extensible virtual local area network (VXLAN) tunnel corresponding to the specific mark; wherein the VXLAN tunnel is a VXLAN tunnel between the first device and a second device;
and sending the message carrying the specific mark to the second equipment through the VXLAN tunnel so that the second equipment determines a second interface corresponding to the specific mark and sends the message through the second interface.
Based on the same concept as the method, the embodiment of the present disclosure further provides a machine-readable storage medium, which is applied to the second device, where the machine-readable storage medium stores a plurality of computer instructions, and when the computer instructions are executed, the computer instructions perform the following processes:
receiving a message which is sent by first equipment through an extensible virtual local area network VXLAN tunnel and carries a specific mark; the message is sent by the first equipment through a VXLAN tunnel corresponding to the specific mark after the first equipment receives the message through a first interface and the specific mark corresponding to the message is determined;
analyzing the specific mark from the message, and determining a second interface corresponding to the specific mark;
and sending the message through the second interface.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in practicing the disclosure.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the disclosed embodiments may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations of this disclosure will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure should be included in the scope of the claims of the present disclosure.

Claims (14)

1. A message transmission method is applied to a first device, when a first interface of the first device and a second interface of a second device have message transmission requirements, the first interface and the second interface are provided with the same specific mark, and the method comprises the following steps:
after a message is received through a first interface, determining a specific mark corresponding to the message; the specific mark corresponding to the message is a specific mark corresponding to the first interface;
determining an extensible virtual local area network (VXLAN) tunnel corresponding to the specific mark; wherein the VXLAN tunnel is a VXLAN tunnel between the first device and a second device;
and sending the message carrying the specific mark to the second equipment through the VXLAN tunnel so that the second equipment determines a second interface corresponding to the specific mark and sends the message through the second interface.
2. The method of claim 1,
prior to the determining the VXLAN tunnel corresponding to the particular tag, the method further comprises:
sending a negotiation request message to the second device through a VXLAN tunnel between the first device and the second device, wherein the negotiation request message carries the specific mark;
if a negotiation success message returned by the second equipment is received, establishing a corresponding relation between the specific mark and the VXLAN tunnel; and the negotiation success message is sent when the second device inquires that a second interface corresponding to the specific mark is locally configured.
3. The method of claim 1, further comprising:
receiving a configuration command sent by a controller, wherein the configuration command carries a corresponding relation between the specific mark and the first interface, and establishing the corresponding relation between the specific mark and the first interface;
the process of determining the specific tag corresponding to the packet specifically includes:
and inquiring the corresponding relation through a first interface receiving the message to obtain a specific mark corresponding to the first interface, and determining the specific mark corresponding to the first interface as the specific mark corresponding to the message.
4. A message transmission method is applied to a second device, when a first interface of a first device and a second interface of the second device have message transmission requirements, the first interface and the second interface are provided with the same specific mark, and the method comprises the following steps:
receiving a message which is sent by first equipment through an extensible virtual local area network VXLAN tunnel and carries a specific mark; the message is sent by the first equipment through a VXLAN tunnel corresponding to the specific mark after the first equipment receives the message through a first interface and the specific mark corresponding to the message is determined; the specific mark corresponding to the message is a specific mark corresponding to the first interface;
analyzing the specific mark from the message, and determining a second interface corresponding to the specific mark;
and sending the message through the second interface.
5. The method of claim 4, further comprising:
receiving a negotiation request message sent by the first device through a VXLAN tunnel, wherein the negotiation request message carries a specific mark, and inquiring whether a second interface corresponding to the specific mark is configured locally;
if so, establishing the corresponding relation between the specific mark and the VXLAN tunnel, and sending a negotiation success message to the first device through the VXLAN tunnel, so that the first device establishes the corresponding relation between the specific mark and the VXLAN tunnel according to the negotiation success message.
6. The method of claim 4, further comprising:
receiving a configuration command sent by a controller, wherein the configuration command carries a corresponding relation between the specific mark and the second interface, and establishing the corresponding relation between the specific mark and the second interface;
the process of determining the second interface corresponding to the specific mark specifically includes: and querying the corresponding relation through the specific mark carried by the message to obtain a second interface corresponding to the specific mark.
7. A message transmission device is applied to a first device, when a first interface of the first device and a second interface of a second device have message transmission requirements, the first interface and the second interface are provided with the same specific mark, and the device comprises:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a specific mark corresponding to a message after the message is received through a first interface; determining an extensible virtual local area network (VXLAN) tunnel corresponding to the specific mark; wherein the VXLAN tunnel is a VXLAN tunnel between the first device and a second device; the specific mark corresponding to the message is a specific mark corresponding to the first interface;
and the sending module is used for sending the message carrying the specific mark to the second equipment through the VXLAN tunnel so that the second equipment determines a second interface corresponding to the specific mark and sends the message through the second interface.
8. The apparatus of claim 7,
the sending module is further configured to send a negotiation request message to the second device through a VXLAN tunnel between the first device and the second device, where the negotiation request message carries the specific tag;
the device further comprises:
the establishing module is used for establishing the corresponding relation between the specific mark and the VXLAN tunnel when receiving a negotiation success message returned by the second equipment; and the negotiation success message is sent when the second device inquires that a second interface corresponding to the specific mark is locally configured.
9. The apparatus of claim 7,
the device further comprises: a receiving module, configured to receive a configuration command sent by a controller, where the configuration command carries a correspondence between the specific tag and the first interface;
the establishing module is used for establishing the corresponding relation between the specific mark and the first interface;
the determining module is specifically configured to, in a process of determining the specific mark corresponding to the packet, query the correspondence through a first interface that receives the packet to obtain the specific mark corresponding to the first interface, and determine the specific mark corresponding to the first interface as the specific mark corresponding to the packet.
10. A message transmission device is applied to a second device, when a first interface of the first device and a second interface of the second device have message transmission requirements, the first interface and the second interface are provided with the same specific mark, and the device comprises:
the receiving module is used for receiving a message which is sent by the first equipment through an extensible virtual local area network VXLAN tunnel and carries a specific mark; the message is sent by the VXLAN tunnel corresponding to the specific mark after the first device receives the message through the first interface and determines the specific mark corresponding to the message; the specific mark corresponding to the message is a specific mark corresponding to the first interface;
the determining module is used for analyzing the specific mark from the message and determining a second interface corresponding to the specific mark;
and the sending module is used for sending the message through the second interface.
11. The apparatus of claim 10,
the receiving module is further configured to receive a negotiation request message sent by the first device through the VXLAN tunnel, where the negotiation request message carries a specific tag;
the device further comprises: the establishing module is used for inquiring whether a second interface corresponding to the specific mark is configured locally; if so, establishing a corresponding relation between the specific mark and the VXLAN tunnel;
the sending module is further configured to send a negotiation success message to the first device through the VXLAN tunnel, so that the first device establishes a correspondence between the specific tag and the VXLAN tunnel according to the negotiation success message.
12. The apparatus of claim 10,
the receiving module is further configured to receive a configuration command sent by a controller, where the configuration command carries a corresponding relationship between the specific tag and the second interface;
the establishing module is further used for establishing the corresponding relation between the specific mark and the second interface;
the determining module is specifically configured to, in the process of determining the second interface corresponding to the specific tag, query the correspondence through the specific tag carried by the packet, and obtain the second interface corresponding to the specific tag.
13. A machine-readable storage medium applied to a first device, wherein when a first interface of the first device and a second interface of a second device have a message transmission requirement, the first interface and the second interface are provided with a same specific flag, and the machine-readable storage medium has stored thereon a plurality of computer instructions, which when executed perform the following processes:
after a message is received through a first interface, determining a specific mark corresponding to the message; the specific mark corresponding to the message is a specific mark corresponding to the first interface;
determining an extensible virtual local area network (VXLAN) tunnel corresponding to the specific mark; wherein the VXLAN tunnel is a VXLAN tunnel between the first device and a second device;
and sending the message carrying the specific mark to the second equipment through the VXLAN tunnel so that the second equipment determines a second interface corresponding to the specific mark and sends the message through the second interface.
14. A machine-readable storage medium applied to a second device, wherein when a first interface of a first device and a second interface of the second device have a message transmission requirement, the first interface and the second interface are provided with a same specific flag, and the machine-readable storage medium has stored thereon a plurality of computer instructions, and when the computer instructions are executed, the computer instructions perform the following processes:
receiving a message which is sent by first equipment through an extensible virtual local area network VXLAN tunnel and carries a specific mark; the message is sent by the first equipment through a VXLAN tunnel corresponding to the specific mark after the first equipment receives the message through a first interface and the specific mark corresponding to the message is determined; the specific mark corresponding to the message is a specific mark corresponding to the first interface;
analyzing the specific mark from the message, and determining a second interface corresponding to the specific mark;
and sending the message through the second interface.
CN201710497932.5A 2017-06-27 2017-06-27 Message transmission method and device and machine-readable storage medium Active CN107547395B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710497932.5A CN107547395B (en) 2017-06-27 2017-06-27 Message transmission method and device and machine-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710497932.5A CN107547395B (en) 2017-06-27 2017-06-27 Message transmission method and device and machine-readable storage medium

Publications (2)

Publication Number Publication Date
CN107547395A CN107547395A (en) 2018-01-05
CN107547395B true CN107547395B (en) 2020-12-04

Family

ID=60970949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710497932.5A Active CN107547395B (en) 2017-06-27 2017-06-27 Message transmission method and device and machine-readable storage medium

Country Status (1)

Country Link
CN (1) CN107547395B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103957160A (en) * 2014-05-12 2014-07-30 华为技术有限公司 Message sending method and device
CN104104747A (en) * 2014-07-28 2014-10-15 杭州华三通信技术有限公司 Method and device for message transmission
WO2016050158A1 (en) * 2014-09-29 2016-04-07 Hangzhou H3C Technologies Co., Ltd. Learning a mac address in vxlan
CN106209557A (en) * 2016-06-30 2016-12-07 杭州迪普科技有限公司 Message forwarding method and device
CN106254256A (en) * 2015-06-04 2016-12-21 杭州华三通信技术有限公司 Data message forwarding methods based on three layers of VXLAN gateway and equipment
CN106330719A (en) * 2016-10-26 2017-01-11 杭州迪普科技有限公司 VXLAN message forwarding method and device
CN106878181A (en) * 2016-12-29 2017-06-20 新华三技术有限公司 A kind of message transmitting method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103957160A (en) * 2014-05-12 2014-07-30 华为技术有限公司 Message sending method and device
CN104104747A (en) * 2014-07-28 2014-10-15 杭州华三通信技术有限公司 Method and device for message transmission
WO2016050158A1 (en) * 2014-09-29 2016-04-07 Hangzhou H3C Technologies Co., Ltd. Learning a mac address in vxlan
CN106254256A (en) * 2015-06-04 2016-12-21 杭州华三通信技术有限公司 Data message forwarding methods based on three layers of VXLAN gateway and equipment
CN106209557A (en) * 2016-06-30 2016-12-07 杭州迪普科技有限公司 Message forwarding method and device
CN106330719A (en) * 2016-10-26 2017-01-11 杭州迪普科技有限公司 VXLAN message forwarding method and device
CN106878181A (en) * 2016-12-29 2017-06-20 新华三技术有限公司 A kind of message transmitting method and device

Also Published As

Publication number Publication date
CN107547395A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN107070691B (en) Cross-host communication method and system of Docker container
CN108259299B (en) Forwarding table item generating method and device and machine-readable storage medium
CN107733670B (en) Forwarding strategy configuration method and device
EP3605972B1 (en) Packet transmission method, edge device, and machine readable storage medium
CN108718278B (en) Message transmission method and device
EP3148149A1 (en) Service flow processing method, apparatus and device
CN109104364B (en) Designated forwarder election method and device
CN107579900B (en) Method, device and system for accessing VX L AN network from V L AN network
CN106878199B (en) Configuration method and device of access information
CN109361606B (en) Message processing system and network equipment
CN107547391B (en) Message transmission method and device
EP3451592B1 (en) Packet transmission between vxlan domains
CN108600109B (en) Message forwarding method and device
CN109412926B (en) Tunnel establishment method and device
EP3091713A1 (en) Method, switch, and controller for implementing arp
CN110430076B (en) Route management method and device
CN106921578B (en) Method and device for generating forwarding table item
CN107968749B (en) Method for realizing QinQ route termination, switching chip and switch
CN109412949B (en) Data message transmission method and device
CN111010329B (en) Message transmission method and device
EP3435691B1 (en) Communication control device, wireless machine, communication control system, communication control method and program
CN108718276B (en) Message forwarding method and device
CN108259295B (en) MAC address synchronization method and device
CN110708275B (en) Protocol message processing method and device
EP3618407B1 (en) Method for implementing three-layer communication

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