CN114374641B - Three-layer message forwarding method and device - Google Patents

Three-layer message forwarding method and device Download PDF

Info

Publication number
CN114374641B
CN114374641B CN202111588077.1A CN202111588077A CN114374641B CN 114374641 B CN114374641 B CN 114374641B CN 202111588077 A CN202111588077 A CN 202111588077A CN 114374641 B CN114374641 B CN 114374641B
Authority
CN
China
Prior art keywords
message
index
mac address
destination
determining
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
CN202111588077.1A
Other languages
Chinese (zh)
Other versions
CN114374641A (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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202111588077.1A priority Critical patent/CN114374641B/en
Publication of CN114374641A publication Critical patent/CN114374641A/en
Application granted granted Critical
Publication of CN114374641B publication Critical patent/CN114374641B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

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 invention discloses a three-layer message forwarding method and device, which are used for overcoming the limitation of hardware, so that a VTEP device normally obtains an MAC address of a receiving end, correctly selects a route, and realizes the correct forwarding of a message, thereby realizing the three-layer message forwarding. The method comprises the following steps: receiving a first message through a VXLAN tunnel; determining corresponding first next-hop information according to a destination MAC address of the first message and a destination IP address of the first message, wherein the first next-hop information is used for determining an original destination MAC address, a first index and a second index of the first message; determining a physical outlet identification according to the first index; determining a source MAC address of the first message according to the second index; and sending the first message according to the original destination MAC address, the physical exit identifier and the source MAC address of the first message.

Description

Three-layer message forwarding method and device
Technical Field
The present invention relates to the field of data migration technologies, and in particular, to a method and an apparatus for forwarding a three-layer packet.
Background
The widespread deployment of server virtualization technology has greatly increased the computational density of data centers. However, after the server is virtualized, the VM (Virtual Machine) needs to be migrated to other servers due to hardware resource problems (such as too high a CPU, insufficient disk, insufficient memory, etc.), or due to the migration of the Machine room. In order to ensure that the service is not interrupted in the migration process of the virtual machine, the MAC address and the IP address of the virtual machine are required to be unchanged before and after the migration, and a two-layer network environment is required. And the VXLAN (Virtual eXtensible Local Area Network, virtual extension local network) encapsulates the original message sent by the virtual machine and then transmits the encapsulated message through a VXLAN tunnel, and the virtual machines at the two ends of the tunnel do not need to perceive the physical architecture of the transmission network. Thus, a virtual large two-layer network is constructed, and the virtual machine can be planned into the same large two-layer network as long as the route of the virtual machine is reachable.
In the prior art, due to the limitation of the exchange chip, after the VXLAN tunnel is unpacked, the MAC address of the receiving end cannot be normally obtained, the route cannot be hit correctly, the message forwarding fails, and the three-layer VXLAN network cannot be accessed smoothly.
Disclosure of Invention
The invention provides a three-layer message forwarding method and a device, which are used for overcoming the limitation of hardware, so that a VTEP device normally obtains the MAC address of a receiving end, correctly selects a route, and realizes the correct forwarding of a message, thereby realizing the three-layer message forwarding method.
In a first aspect, the present invention provides a method for forwarding a three-layer message, where the method includes: the method comprises the steps that VTEP (VXLAN Tunnel End Point, virtual extension local network tunnel termination node) equipment receives a first message through a VXLAN tunnel, the first message comprises a destination MAC address and a destination IP address, and the destination MAC address is determined by the VTEP equipment for sending the first message according to the original destination MAC address of the first message and is added into the first message; the VTEP equipment determines corresponding first next-hop information according to the destination MAC address of the first message and the destination IP address of the first message, wherein the first next-hop information is used for determining the original destination MAC address, the first index and the second index of the first message; determining a physical outlet identification according to the first index; determining a source MAC address of the first message according to the second index; the VTEP device sends the first message according to the original destination MAC address, the physical exit identifier and the source MAC address of the first message.
In one possible design, the VTEP device determines corresponding first next-hop information according to a destination MAC address of the first packet and a destination IP address of the first packet, and specifically includes: the VTEP device searches the first corresponding relation according to the destination MAC address of the first message and the destination IP address of the first message to obtain first next-hop information.
In one possible design, the first correspondence is included in a virtual route forwarding VRF table stored by the VTEP device.
In one possible design, the VTEP device searches virtual port information stored in the VTEP device according to the first index, and determines a third index corresponding to the first index; and the VTEP equipment searches the second next-hop information stored by the VTEP equipment according to the third index, and determines a physical outlet identifier corresponding to the third index.
In one possible design, the VTEP device searches the second correspondence stored in the VTEP device according to the second index, and determines the source MAC address of the first packet corresponding to the second index.
In a second aspect, the present invention further provides a VTEP device for forwarding three-layer packets, where the VTEP device includes:
the receiving and transmitting module is used for receiving a first message through the VXLAN tunnel, the first message comprises a destination MAC address and a destination IP address, and the destination MAC address is determined by VTEP equipment for sending the first message according to the original destination MAC address of the first message and is added into the first message;
the processing module is used for determining corresponding first next-hop information according to the destination MAC address of the first message and the destination IP address of the first message, and the first next-hop information is used for determining the original destination MAC address, the first index and the second index of the first message;
the processing module is also used for determining a physical outlet identification according to the first index;
the processing module is further used for determining a source MAC address of the first message according to the second index;
the transceiver module is further configured to send the first message according to an original destination MAC address, a physical egress identifier, and a source MAC address of the first message.
In one possible design, the processing module is specifically configured to: and searching the first corresponding relation according to the destination MAC address of the first message and the destination IP address of the first message to obtain first next-hop information.
In one possible design, the first correspondence is included in a virtual route forwarding VRF table stored by the VTEP device.
In one possible design, the processing module is specifically configured to: searching virtual port information stored in the VTEP equipment according to the first index, and determining a third index corresponding to the first index; and searching the second next-hop information stored by the VTEP equipment according to the third index, and determining a physical outlet identifier corresponding to the third index.
In one possible design, the processing module is specifically configured to: and searching a second corresponding relation stored by the VTEP equipment according to the second index, and determining the source MAC address of the first message corresponding to the second index.
In a third aspect, the present invention further provides an electronic device, where the electronic device includes a processor, where the processor is configured to implement the steps of any one of the three-layer packet forwarding methods described above when executing a computer program stored in a memory.
In a fourth aspect, the present invention also provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the three-layer message forwarding methods described above.
In the application, the VTEP device may receive the first message through the VXLAN tunnel; the VTEP equipment can also determine first next-hop information according to a destination MAC address and a destination IP address carried by the first message, wherein the first next-hop information is used for determining an original destination MAC address, a first index and a second index, and determining a physical outlet identifier according to the first index; determining a source MAC address according to the second index; the VTEP device may also send the first message according to the original destination MAC address, the physical egress identifier, and the source MAC address. That is, after the first message is encapsulated and decapsulated, the destination MAC address and other information carried in the first message are no longer used as a basis for data forwarding, and the VTEP device can determine the original destination MAC address through the first next-hop information, so that the hardware limitation can be overcome, the VTEP device can normally obtain the MAC address of the receiving end, correctly select a route, and implement message correct forwarding, thereby implementing three-layer message forwarding.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it will be apparent that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario of a three-layer packet forwarding method according to an embodiment of the present invention;
fig. 2 is a flow chart of a three-layer packet forwarding method according to an embodiment of the present invention;
fig. 3 is a flow chart of another three-layer packet forwarding method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a VTEP device for forwarding three layers of messages according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another VTEP device for forwarding three-layer packets according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to overcome the limitation of hardware, the VTEP equipment normally obtains the MAC address of the receiving end, correctly selects the route, and realizes the correct forwarding of the message, thereby realizing the three-layer message forwarding.
Fig. 1 provides an application scenario of a possible embodiment of the method, where the scenario is composed of a VXLAN tunnel, a source user equipment and a destination user equipment, and the source user equipment is supported to access the VXLAN and the destination user equipment through a three-layer network. The tunnel termination node of the VXLAN tunnel is a VTEP device, and the VTEP device may be configured to encapsulate or decapsulate the first packet, where the VXLAN tunnel is used for packet transmission. Taking fig. 1 as an example, the VTEP device may be a switch 1 or a switch 2, where the switch 1 is configured to encapsulate a first packet, and the switch 2 is configured to decapsulate the first packet.
Specifically, the scenario needs to support the source ue to access the VXLAN tunnel through the three-layer network, and access the destination ue, that is, support the source ue to send the first message, perform VXLAN tunnel encapsulation through the VTEP device (e.g., switch 1), and then perform decapsulation through another VTEP device (e.g., switch 2), so as to obtain the second message and forward the second message to the destination ue. The switch 1 and the switch 2 may be distributed layer switches or integrated access switches. The source ue and the destination ue may be NFV (Network Function Virtualization ) devices or servers.
The scenario supports the source ue to send out the first message, hit the route, encapsulate through the integrated access switch, then decapsulate through the distribution layer switch to obtain the second message, and forward to the destination ue, where the source ue is NFV and the destination ue may be Server; or the scene supports the source user equipment to send out the first message, hit the route, encapsulate through the distributed layer switch, then get the second message after the integrated access switch decapsulation and forward to the destination user equipment, at this time, the source user equipment is the Server, the destination user equipment is the NFV.
The three-layer message forwarding method provided in the embodiment of the present application is described below by taking VTEP equipment as an execution body as an example. For example, if the first message is sent by switch 1 to switch 2, the VTEP device referred to herein may be switch 2.
Fig. 2 is a schematic process diagram of a three-layer packet forwarding method according to an embodiment of the present invention, where the process may be performed by a VTEP device. The process comprises the following steps:
s101: the VTEP device receives a first message through the VXLAN tunnel, wherein the first message comprises a first DMAC (Destination Media Access Control, destination MAC) address and a destination IP address, and the destination MAC address is determined by the VTEP device for sending the first message according to the original destination MAC address of the first message and is added in the first message. The Destination IP address may be a DIP (Destination IP) address.
The VTEP device may be an end VTEP device of the VXLAN tunnel, and the first message may also be sent by an opposite end VTEP device of the VXLAN tunnel through the VXLAN tunnel.
S102: the VTEP device determines first next-hop information according to the destination MAC address and the destination IP address of the first message, wherein the first next-hop information is used for determining an original destination MAC address, a first index and a second index of the first message. Wherein the first NEXT HOP information may be overlapping NEXT HOP (NEXT-HOP) information.
Optionally, the first corresponding relation is searched according to the destination MAC address of the first message and the destination IP address of the first message, so as to obtain the first next-hop information. Wherein the first correspondence is included in a VRF (Virtual Routing and Forwarding, virtual routing forwarding) table, e.g., the first correspondence is a VRF table or is part of a VRF table. The first correspondence may be pre-configured in the VRF table of the VTEP device, for example, locally on the VTEP device, or may be stored after the sender VTEP device and the VTEP device agree. The VRF table may include a correspondence between a combination of an MAC address and an IP address and next hop information, and the VTEP device may search the VRF table according to a destination MAC address of the first packet and a destination IP address of the first packet, and obtain next hop information corresponding to the destination MAC address of the first packet and the destination IP address of the first packet as the first next hop information.
Fig. 3 is a flow chart of a three-layer packet forwarding method according to an embodiment of the present invention.
Optionally, in S101, the VTEP device may query a TCAM (Ternary Content Addressable Memory ) form according to the destination MAC address carried in the first packet, so as to determine whether to execute the three-layer packet forwarding procedure. Taking the first corresponding relation as an example of the VRF table, if the VTEP device queries the TCAM table according to the destination MAC address and obtains the VRF table containing the destination MAC address as the first corresponding relation, it is determined that the three-layer message forwarding flow needs to be executed. Otherwise, if the VRF table containing the destination MAC address is not queried, it is determined that the three-layer packet forwarding flow is not executed, and at this time, the forwarding of the first packet may be performed according to the two-layer packet or other packet forwarding flows.
Since the VXLAN simulates the hardware forwarding flow of a three-port egress, the tunnel decapsulation logic is described in simplified form in this application. It should be appreciated that in the normal flow, the decapsulation may further include: and (3) looking up a table through a VXLAN identifier (VXLAN Network Identifier, VNI) to obtain a mapped virtual forwarding instance (Virtual Forwarding Instance, VFI), inquiring a hit TCAM table through a mapped VFI and an inner layer message DMAC to obtain a first message and triggering three-layer logic, further obtaining a VRF table through a VFI hardware table, and finally inquiring a routing table according to the VRF and a DIP address in the first message to obtain first NEXT-HOP information (namely, OVERLAY-NEXT-HOP).
If the three-layer message forwarding process is executed, the VTEP device may further determine an OVERLAY-NEXT-HOP according to the destination IP address and the first correspondence carried in the first message, where the OVERLAY-NEXT-HOP may be used to determine the original destination MAC address, the first index, and the second index. Where the original destination MAC address may be a DMAC, the first index may be denoted DEST and the second index may be denoted interface array (intf_num), as shown in fig. 3.
For example, the first correspondence includes a correspondence between a destination IP address and an over-NEXT-HOP, where the over-NEXT-HOP may include an original destination MAC address, a first index, and a second index.
S103: the VTEP device determines a physical egress identity from the first index.
Alternatively, the VTEP device may look up virtual port information according to the first index to determine a third index, and look up second next hop information according to the third index to determine the physical egress identification. Wherein the third index is an index of physical exit identities. As shown in fig. 3, the virtual PORT information may be denoted as Virtrurl_port (VP), and the third index may be denoted as NHOP. The second NEXT HOP information may be represented as base NEXT HOP (UL NHOP) information, which may include at least one physical egress identity and a corresponding index. The second next-hop information may be preconfigured in the VTEP device, for example, preconfigured locally to the VTEP device, or may be stored by the VTEP device that receives the first message after the VTEP device that sends the first message and the VTEP device that receives the first message agree. The second next-hop information may include a correspondence between a third index and a physical egress identifier, and the VTEP device may search for the second next-hop information according to the third index to obtain the physical egress identifier.
Specifically, the VTEP device may find virtual port information stored in the VTEP device according to the first index, determine a third index corresponding to the first index, and find second next-hop information stored in the VTEP device according to the third index, and determine a physical exit identifier corresponding to the third index. The virtual port information and/or the second next hop information may be stored in the VTEP device, for example, may be preconfigured locally to the VTEP device, or may be stored by the VTEP device that receives the first message after the VTEP device that sends the first message and the VTEP device that receives the first message agree.
S104: the VTEP device determines the SMAC (Destination Media Access Control, source MAC address) of the first message based on the second index.
Optionally, the VTEP device determines the source MAC address according to a second index and a second correspondence, where the second index is an index of the source MAC address. The second correspondence may be represented as an OVERLAY-INTF (ov_intf) table, where at least one source MAC address and its corresponding index may be included. The second correspondence may be stored in the VTEP device, for example, preconfigured locally in the VTEP device, or may be stored by the VTEP device that receives the first message after the VTEP device that sends the first message and the VTEP device that receives the first message agree. The second correspondence may include a correspondence between the second index and the source MAC address, and the VTEP device may search for the second correspondence according to the second index to obtain the source MAC address.
S105: the VTEP device sends the first message according to the original destination MAC address, the physical exit identifier and the source MAC address of the first message.
Specifically, the VTEP device may forward the first message to the destination user device according to the DMAC, the physical egress identifier, and the SMAC obtained in S102. The VTEP device may perform VXLAN layer decapsulation on the first packet to obtain a second packet, add the original destination MAC address and the source MAC address of the first packet to the second packet, and send the second packet through a physical exit indicated by a physical exit identifier, so that the second packet is forwarded according to the original destination MAC address, and reaches the destination user device.
Based on the same conception as the three-layer message forwarding method, the embodiment of the application also provides a VTEP device for forwarding the three-layer message, which is used for realizing the method.
Fig. 4 is a schematic block diagram of a VTEP device for forwarding three layers of messages according to an embodiment of the present application. Wherein the processing module 401 may be used to perform processing actions and the transceiver module 402 may be used to implement communication actions. For example, when implementing the VTEP device described in the above method embodiment through this structure, the transceiver module 402 may be configured to perform the action of receiving the first packet in S101 and/or perform the action of sending the first packet in S105, and the processing module 401 may be configured to perform all the actions in S102 to S104. The acts and functions that are specifically performed are not specifically expanded herein and reference is made to the description of the embodiments section of the method described above.
Illustratively, the transceiver module 402 is configured to receive a first message through a VXLAN tunnel, where the first message includes a destination MAC address and a destination IP address, where the destination MAC address is determined by a VTEP device that sends the first message according to an original destination MAC address of the first message and is added to the first message; the processing module 401 is configured to determine corresponding first next-hop information according to a destination MAC address of the first packet and a destination IP address of the first packet, where the first next-hop information is used to determine an original destination MAC address, a first index, and a second index of the first packet; the processing module 401 is further configured to determine a physical exit identifier according to the first index; the processing module 401 is further configured to determine a source MAC address of the first packet according to the second index; the transceiver module 402 is further configured to send the first message according to the original destination MAC address, the physical egress identifier, and the source MAC address of the first message.
In one possible design, the processing module 401 is specifically configured to: and searching the first corresponding relation according to the destination MAC address of the first message and the destination IP address of the first message to obtain first next-hop information.
In one possible design, the first correspondence is included in a virtual route forwarding VRF table stored by the VTEP device.
In one possible design, the processing module 401 is also configured to: searching virtual port information stored in the VTEP equipment according to the first index, and determining a third index corresponding to the first index; and searching the second next-hop information stored by the VTEP equipment according to the third index, and determining a physical outlet identifier corresponding to the third index.
In one possible design, the processing module 401 is also configured to: and searching a second corresponding relation stored by the VTEP equipment according to the second index, and determining the source MAC address of the first message corresponding to the second index.
Fig. 5 shows a schematic structural diagram of a VTEP device for forwarding a three-layer packet according to an embodiment of the present application.
The electronic device in embodiments of the present application may include a processor 501. The processor 501 is the control center of the VTEP device and may connect the various parts of the VTEP device using various interfaces and lines by running or executing instructions stored in the memory 502 and invoking data stored in the memory 502. Alternatively, the processor 501 may include one or more processing units, and the processor 501 may integrate an application processor and a modem processor, wherein the application processor primarily processes an operating system and application programs, etc., and the modem processor primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 501. In some embodiments, processor 501 and memory 502 may be implemented on the same chip, or they may be implemented separately on separate chips in some embodiments.
The processor 501 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, and may implement or perform the methods, steps and logic blocks disclosed in embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps performed in connection with the VTEP apparatus disclosed in the embodiments of the present application may be performed directly by a hardware processor or may be performed by a combination of hardware and software modules in the processor.
In the embodiment of the present application, the memory 502 stores instructions executable by the at least one processor 501, and the at least one processor 501 may be configured to perform the aforementioned communication process performed by the VTEP device by executing the instructions stored in the memory 502.
The memory 502, as a non-volatile computer readable storage medium, may be used to store non-volatile software programs, non-volatile computer executable programs, and modules. The Memory 502 may include at least one type of storage medium, and may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory), magnetic Memory, magnetic disk, optical disk, and the like. Memory 502 is 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, but is not limited to such. The memory 502 in the present embodiment may also be circuitry or any other device capable of implementing a memory function for storing program instructions and/or data.
In the embodiment of the application, the VTEP device may further include a communication interface 503, and the electronic device may transmit data through the communication interface 503. For example, the electronic device is a VTEP device, and the communication interface 503 may be configured to receive the first message and/or transmit the first message.
Optionally, the processing module 401 shown in fig. 4 may be implemented by the processor 501 (or the processor 501 and the memory 502) shown in fig. 5, and/or the transceiver module 402 shown in fig. 4 may be implemented by the communication interface 503.
Based on the same inventive concept, the present embodiments also provide a computer-readable storage medium in which instructions may be stored, which when run on a computer, cause the computer to perform the operational steps provided by the above-described method embodiments. The computer readable storage medium may be the memory 502 shown in fig. 5.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application 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 the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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.
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. It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (10)

1. The three-layer message forwarding method is characterized by being applied to a virtual extension local network tunnel termination node (VTEP) device, and comprises the following steps:
receiving a first message through a VXLAN tunnel, wherein the first message comprises a destination MAC address and a destination IP address, and the destination MAC address is determined by VTEP equipment for sending the first message according to the original destination MAC address of the first message and is added into the first message;
determining corresponding first next-hop information according to a destination MAC address of the first message and a destination IP address of the first message, wherein the first next-hop information is used for determining the original destination MAC address, a first index and a second index of the first message;
determining a physical outlet identification according to the first index;
determining a source MAC address of the first message according to the second index;
and sending the first message according to the original destination MAC address, the physical exit identifier and the source MAC address of the first message.
2. The method of claim 1, wherein the determining the corresponding first next-hop information based on the destination MAC address of the first message and the destination IP address of the first message comprises:
and searching a first corresponding relation according to the destination MAC address of the first message and the destination IP address of the first message to obtain the first next-hop information.
3. The method of claim 2, wherein the first correspondence is included in a virtual route forwarding VRF table stored in the VTEP device.
4. The method of claim 1, wherein the determining a physical exit identity from the first index comprises:
searching virtual port information stored by the VTEP equipment according to the first index, and determining a third index corresponding to the first index;
and searching second next-hop information stored by the VTEP equipment according to the third index, and determining the physical outlet identification corresponding to the third index.
5. The method of claim 1, wherein the determining the source MAC address of the first message from the second index comprises:
and searching a second corresponding relation stored by the VTEP equipment according to the second index, determining an MAC address corresponding to the second index, and taking the MAC address as the source MAC address.
6. A VTEP device for three-layer message forwarding, comprising:
the receiving and transmitting module is used for receiving a first message through a VXLAN tunnel, the first message comprises a destination MAC address and a destination IP address, and the destination MAC address is determined by VTEP equipment for sending the first message according to the original destination MAC address of the first message and is added in the first message;
the processing module is used for determining corresponding first next-hop information according to a destination MAC address of the first message and a destination IP address of the first message, and the first next-hop information is used for determining the original destination MAC address, a first index and a second index of the first message;
the processing module is further configured to determine a physical exit identifier according to the first index;
the processing module is further configured to determine a source MAC address of the first packet according to the second index;
the transceiver module is further configured to send the first message according to the original destination MAC address, the physical egress identifier, and the source MAC address of the first message.
7. The VTEP device of claim 6, wherein the processing module is specifically configured to:
and searching a first corresponding relation according to the destination MAC address of the first message and the destination IP address of the first message to obtain the first next-hop information.
8. The VTEP device of claim 6, wherein the processing module is specifically configured to:
searching virtual port information stored by the VTEP equipment according to the first index, and determining a third index corresponding to the first index;
and searching second next-hop information stored by the VTEP equipment according to the third index, and determining the physical outlet identification corresponding to the third index.
9. An electronic device comprising a processor for implementing the steps of the method according to any of claims 1-5 when executing a computer program stored in a memory.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the steps of the method according to any of claims 1-5.
CN202111588077.1A 2021-12-23 2021-12-23 Three-layer message forwarding method and device Active CN114374641B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111588077.1A CN114374641B (en) 2021-12-23 2021-12-23 Three-layer message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111588077.1A CN114374641B (en) 2021-12-23 2021-12-23 Three-layer message forwarding method and device

Publications (2)

Publication Number Publication Date
CN114374641A CN114374641A (en) 2022-04-19
CN114374641B true CN114374641B (en) 2023-06-16

Family

ID=81141145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111588077.1A Active CN114374641B (en) 2021-12-23 2021-12-23 Three-layer message forwarding method and device

Country Status (1)

Country Link
CN (1) CN114374641B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116647414B (en) * 2023-07-26 2023-10-31 深圳大学 Message port filtering method, terminal equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005011197A1 (en) * 2003-07-31 2005-02-03 Huawei Technologies Co., Ltd. Method of multi-port virtual local area network (vlan) supported by multi-protocol label switch (mpls)
CN109639552A (en) * 2018-12-24 2019-04-16 新华三技术有限公司 A kind of three-layer forwarding method and device
CN110661710A (en) * 2019-09-20 2020-01-07 锐捷网络股份有限公司 Message transmission method and device of virtualization system
WO2020108531A1 (en) * 2018-11-27 2020-06-04 新华三技术有限公司 Packet forwarding
CN111934969A (en) * 2020-07-28 2020-11-13 锐捷网络股份有限公司 Maintenance method and device of MAC forwarding table
CN112134776A (en) * 2019-06-25 2020-12-25 华为技术有限公司 Method for generating multicast forwarding table item and access gateway

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9036639B2 (en) * 2012-11-29 2015-05-19 Futurewei Technologies, Inc. System and method for VXLAN inter-domain communications
US20160359720A1 (en) * 2015-06-02 2016-12-08 Futurewei Technologies, Inc. Distribution of Internal Routes For Virtual Networking

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005011197A1 (en) * 2003-07-31 2005-02-03 Huawei Technologies Co., Ltd. Method of multi-port virtual local area network (vlan) supported by multi-protocol label switch (mpls)
WO2020108531A1 (en) * 2018-11-27 2020-06-04 新华三技术有限公司 Packet forwarding
CN109639552A (en) * 2018-12-24 2019-04-16 新华三技术有限公司 A kind of three-layer forwarding method and device
CN112134776A (en) * 2019-06-25 2020-12-25 华为技术有限公司 Method for generating multicast forwarding table item and access gateway
CN110661710A (en) * 2019-09-20 2020-01-07 锐捷网络股份有限公司 Message transmission method and device of virtualization system
CN111934969A (en) * 2020-07-28 2020-11-13 锐捷网络股份有限公司 Maintenance method and device of MAC forwarding table

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李翔 ; .基于VXLAN和SDN的云数据中心解决方案.电子科学技术.2015,(第05期),全文. *

Also Published As

Publication number Publication date
CN114374641A (en) 2022-04-19

Similar Documents

Publication Publication Date Title
CN106998286B (en) VX L AN message forwarding method and device
CN107070691B (en) Cross-host communication method and system of Docker container
CN106254256B (en) Data message forwarding method and equipment based on three layers of VXLAN gateway
CN113207192B (en) Message forwarding method and device
CN111092801B (en) Data transmission method and device
CN108768866B (en) Cross-card forwarding method and device for multicast message, network equipment and readable storage medium
CN109617995B (en) Management system and method for VPC (virtual private network) internal container of tenant cluster and electronic equipment
CN107645431B (en) Message forwarding method and device
CN108965092B (en) Data message transmission method and device
CN107317832B (en) Message forwarding method and device
CN113132202B (en) Message transmission method and related equipment
JP2019517168A (en) Interconnection between physical and virtual networks
CN107315690A (en) The record repaired after analyzing and packaging and the method and system used
CN107645433B (en) Message forwarding method and device
CN102857414A (en) Forwarding table writing method and device and message forwarding method and device
CN107948077B (en) Method and device for forwarding data message
CN114374641B (en) Three-layer message forwarding method and device
CN106992918B (en) Message forwarding method and device
CN104780201A (en) Data packet processing method and device for use in IPVS (Internet Protocol Virtual Server) cluster
CN111130978B (en) Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
CN108156066B (en) Message forwarding method and device
CN111756629B (en) Method, device, equipment, network and medium for accessing equipment to overlay network and communication
CN114629844B (en) Message forwarding method and device and electronic equipment
CN107800628B (en) Data forwarding device and data forwarding method for software defined network
CN115514702A (en) Method and device for quickly switching link, electronic equipment and storage 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