CN110505138A - Message forwarding method, device, electronic equipment and machine readable storage medium - Google Patents

Message forwarding method, device, electronic equipment and machine readable storage medium Download PDF

Info

Publication number
CN110505138A
CN110505138A CN201910786464.2A CN201910786464A CN110505138A CN 110505138 A CN110505138 A CN 110505138A CN 201910786464 A CN201910786464 A CN 201910786464A CN 110505138 A CN110505138 A CN 110505138A
Authority
CN
China
Prior art keywords
target
network packet
vxlan
forwarding
network
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.)
Pending
Application number
CN201910786464.2A
Other languages
Chinese (zh)
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 DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech 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 DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201910786464.2A priority Critical patent/CN110505138A/en
Publication of CN110505138A publication Critical patent/CN110505138A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/66Layer 2 routing, e.g. in Ethernet based MAN's
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

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 application provides a kind of message forwarding method, device, electronic equipment and machine readable storage medium.In this application, network packet in target is received, determines whether network packet needs to be implemented VXLAN encapsulation in the target by the CPU;If network packet needs to be implemented VXLAN encapsulation in the target, it is inserted into package identification in network packet in the target, network packet in the target is sent to the forwarding chip by the CPU;It is executed after VXLAN is encapsulated and is forwarded for network packet in the target by the forwarding chip.Avoid it is original need CPU execute VXLAN encapsulation, reduce the consumption of CPU, improve message forwarding speed.

Description

Message forwarding method, device, electronic equipment and machine readable storage medium
Technical field
This application involves field of communication technology more particularly to message forwarding method, device, electronic equipment and machine readable deposit Storage media.
Background technique
VXLAN (Virtual Extensible LAN, virtual expansible local area network), is a kind of network virtualization technology, IP based network and the two-layer VPN technology for using " MAC in UDP " packing forms.
VXLAN technology creates a large amount of virtual expansible local area network, no by establishing the tunnel VXLAN on existing network Same virtual expansible local area network uses VNI (VXLAN Network Identifier, virtual expansible local net network mark Symbol) it is identified.It is well known that the head due to VLAN is limited, only 12bit, leading to the limitation number of VLAN is 2^12= 4096, it is unable to satisfy growing demand.And have 24bit in the head of VXLAN message at present, it can support 2^24 power VNI number (being identified in VXLAN by VNI, be equivalent to VLAN ID).
VXLAN can be applied in different scenes as a result, such as: VPN scene can be existing service based on VXLAN The dispersion physical site of provider or enterprise IP network provides two layers of interconnection, and business isolation can be provided for different tenants; Another example is: cloud computing scene, provides the extended deployment based on two layers for the large-scale cloud computing environment across three layers of deployment.
Summary of the invention
The application provides a kind of message forwarding method, and the method is applied to enable the network equipment of VXLAN;The network Equipment includes at least the CPU for Message processing, for the forwarding chip of message fast-forwarding;Wherein, the CPU with described turn It sends out chip and passes through the connected communication of hardware bus, which comprises
Network packet in target is received, determines whether network packet needs to be implemented VXLAN encapsulation in the target by the CPU;
If network packet needs to be implemented VXLAN encapsulation in the target, encapsulation is inserted into network packet in the target Mark, is sent to the forwarding chip for network packet in the target by the CPU;
It is executed after VXLAN is encapsulated and is forwarded for network packet in the target by the forwarding chip.
Optionally, described to be executed after VXLAN is encapsulated and forwarded for network packet in the target by the forwarding chip, it wraps It includes:
Check that network packet whether there is package identification in the target by the forwarding chip;
If there are package identifications for network packet in the target, by the forwarding chip to network packet base in the target In the preset VXLAN tunnel configuration of correspondence, network packet in the target is executed into corresponding VXLAN and is encapsulated, obtains VXLAN report Text;
The VXLAN message is transferred through the corresponding tunnel VXLAN by the forwarding chip.
Optionally, network packet in the reception target determines whether network packet needs to be implemented in the target by the CPU VXLAN encapsulation, comprising:
Network packet in the target is received, determines the corresponding inbound port of network packet and VLAN in the target;
If the corresponding inbound port of network packet and VLAN match with preset configuration in the target, it is determined that in the target Network packet needs to be implemented VXLAN encapsulation.
Optionally, further includes:
The purpose MAC for determining network packet in the target checks the purpose MAC and the network of network packet in the target Whether the MAC Address of equipment matches;
If the MAC Address of the purpose MAC of network packet and the network equipment mismatches in the target, executes two layers and turn Hair;
If the purpose MAC of network packet is matched with the MAC Address of the network equipment in the target, executes three layers and turn Hair;
In preset VXLAN forwarding conversational list, forwarding session entry corresponding with network packet in the target is saved;Its In, the forwarding session entry includes at least the corresponding inbound port of network packet in the target, network packet is corresponding in the target IP five-tuple information, the corresponding outer envelope message IP five-tuple information of network packet, the outer envelope report in the target The exit port of the corresponding VNI of text, the outer envelope message.
The application also provides a kind of apparatus for forwarding message, and described device is applied to enable the network equipment of VXLAN;The net Network equipment includes at least the CPU for Message processing, for the forwarding chip of message fast-forwarding;Wherein, the CPU with it is described Forwarding chip is connected by hardware bus to be communicated, and described device includes:
Preprocessing module receives network packet in target, determines whether network packet needs to be implemented in the target by the CPU VXLAN encapsulation;
Mark module, if network packet needs to be implemented VXLAN encapsulation in the target, in the target in network packet It is inserted into package identification, network packet in the target is sent to the forwarding chip by the CPU;
Forwarding module is executed after VXLAN is encapsulated and is forwarded for network packet in the target by the forwarding chip.
Optionally, the forwarding module further,
Check that network packet whether there is package identification in the target by the forwarding chip;
If there are package identifications for network packet in the target, by the forwarding chip to network packet base in the target In the preset VXLAN tunnel configuration of correspondence, network packet in the target is executed into corresponding VXLAN and is encapsulated, obtains VXLAN report Text;
The VXLAN message is transferred through the corresponding tunnel VXLAN by the forwarding chip.
Optionally, the preprocessing module further,
Network packet in the target is received, determines the corresponding inbound port of network packet and VLAN in the target;
If the corresponding inbound port of network packet and VLAN match with preset configuration in the target, it is determined that in the target Network packet needs to be implemented VXLAN encapsulation.
Optionally, the preprocessing module further,
The purpose MAC for determining network packet in the target checks the purpose MAC and the network of network packet in the target Whether the MAC Address of equipment matches;
If the MAC Address of the purpose MAC of network packet and the network equipment mismatches in the target, executes two layers and turn Hair;
If the purpose MAC of network packet is matched with the MAC Address of the network equipment in the target, executes three layers and turn Hair;
In preset VXLAN forwarding conversational list, forwarding session entry corresponding with network packet in the target is saved;Its In, the forwarding session entry includes at least the corresponding inbound port of network packet in the target, network packet is corresponding in the target IP five-tuple information, the corresponding outer envelope message IP five-tuple information of network packet, the outer envelope report in the target The exit port of the corresponding VNI of text, the outer envelope message.
The application also provides a kind of electronic equipment, including communication interface, processor, memory and bus, and the communication connects Pass through bus between mouth, the processor and the memory to be connected with each other;
Machine readable instructions are stored in the memory, the processor is executed by calling the machine readable instructions Above-mentioned method.
The application also provides a kind of machine readable storage medium, and the machine readable storage medium is stored with machine readable finger It enables, the machine readable instructions realize the above method when being called and being executed by processor.
By above embodiments, package identification is inserted into target based on CPU in network packet;And it will be deposited by forwarding core In the target of package identification network packet execute VXLAN encapsulation and forwarding, avoid it is original need CPU execute VXLAN encapsulation, The consumption for reducing CPU improves the speed of message forwarding.
Detailed description of the invention
Fig. 1 is a kind of system architecture for network equipment that an exemplary embodiment provides;
Fig. 2 is a kind of flow chart for message forwarding method that an exemplary embodiment provides;
Fig. 3 is a kind of block diagram for apparatus for forwarding message that an exemplary embodiment provides;
Fig. 4 is the hardware structure diagram for a kind of electronic equipment that an exemplary embodiment provides.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only to be not intended to be limiting the application merely for for the purpose of describing particular embodiments in term used in this application. It is also intended in the application and the "an" of singular used in the attached claims, " described " and "the" including majority Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from In the case where the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determination ".
In order to make those skilled in the art more fully understand the technical solution in the embodiment of the present application, below first to this Shen Please embodiment be related to message forwarding the relevant technologies, be briefly described.
Referring to Figure 1, Fig. 1 is a kind of system architecture for network equipment that one embodiment of this specification provides.
VXLAN is supported and enabled to the network equipment as shown in Figure 1, and the network equipment is at least used for the CPU of Message processing, is used for The forwarding chip of message fast-forwarding;Wherein, CPU and forwarding chip are connected communication by hardware bus.
As shown in Figure 1, the network equipment further include inbound port (PIN1, PIN2, PIN3), exit port (POUT1, POUT2, POUT3);After the message entered from inbound port is executed VLAN encapsulation by the CPU of the network equipment, and transferred from exit port.It needs Illustrate, it is not fixed that inbound port and exit port, which are described by the direction of the message disengaging network equipment,;That is, message 2 is right The inbound port answered, can be the corresponding exit port of message 2, and the corresponding exit port of message 1 is also possible to the corresponding outlet of message 2 Mouthful.
Based on the system architecture of the network equipment as shown in Figure 1, in some scenes, the network equipment for enabling VXLAN exists Receive in target after network packet, need the CPU of the target Intranet message up sending network equipment, with by CPU to target Intranet report Text carries out VXLAN encapsulation.Based on above-mentioned scene as it can be seen that a large amount of CPU and memory can be consumed when target Intranet message amount increases Etc. resources, so as to cause message forward efficiency reduction.
On the basis of based on the system architecture of the above network equipment, and the application is directed to one kind, by the network equipment Network packet is inserted into package identification in the target that CPU encapsulates pending VXLAN;And by the network equipment forwarding chip to it The technical solution of VXLAN message forwarding after executing VXLAN encapsulation and encapsulation.
When realizing, the network equipment for enabling VXLAN includes at least the CPU for Message processing, quickly turns for message The forwarding chip of hair;Wherein, the CPU and the forwarding chip are connected communication by hardware bus.
Further, the network equipment receives network packet in target, determines whether network packet needs in the target by the CPU Execute VXLAN encapsulation;If network packet needs to be implemented VXLAN encapsulation in the target, in the target in network packet It is inserted into package identification, network packet in the target is sent to the forwarding chip by the CPU;It is directed to by the forwarding chip Network packet is executed after VXLAN is encapsulated and is forwarded in the target.
In above scheme, package identification is inserted into target based on CPU in network packet;And it will be present by forwarding core In the target of package identification network packet execute VXLAN encapsulation and forwarding, avoid it is original need CPU execute VXLAN encapsulation, drop The low consumption of CPU improves the speed of message forwarding.
The application is described below by specific embodiment and in conjunction with specific application scenarios.
Referring to FIG. 2, Fig. 2 is a kind of flow chart for message forwarding method that one embodiment of the application provides, the method Applied to the network equipment for enabling VXLAN;The network equipment include at least for Message processing CPU, for message it is quick The forwarding chip of forwarding;Wherein, the CPU and the forwarding chip are connected communication by hardware bus, the above method execute with Lower step:
Step 202 receives network packet in target, determines whether network packet needs to be implemented in the target by the CPU VXLAN encapsulation.
If network packet needs to be implemented VXLAN encapsulation in step 204, the target, in the target in network packet It is inserted into package identification, network packet in the target is sent to the forwarding chip by the CPU.
Step 206 is executed after VXLAN is encapsulated and is forwarded for network packet in the target by the forwarding chip.
In the present specification, the above-mentioned network equipment includes any form of network equipment for supporting and enabling VXLAN.
For example, in practical applications, the above-mentioned network equipment may include the interchanger for supporting and enabling VXLAN, router, Firewall etc..
In the present specification, the above-mentioned network equipment includes at least the CPU for Message processing, for message fast-forwarding Forwarding chip;Wherein, above-mentioned CPU and above-mentioned forwarding chip are connected communication by hardware bus.
For example, the system architecture of the above-mentioned network equipment, shown in Figure 1, Fig. 1 is being described in detail above, here not It repeats again.
In order to facilitate understanding, the message structure of lower VXLAN message is first introduced here, is referred to exemplified by table 1:
Table 1
VXLAN message as shown in Table 1 includes: outer layer network head, UDP, outer layer network, internal layer network data.
Outer layer network head includes: outer layer network MAC header, outer layer network IP head again;Wherein, outer layer network MAC header, outer layer net Network IP be respectively VXLAN message the L2 address information for corresponding to outer layer network and three layer address information.
Such as: outer layer network MAC header includes: the purpose MAC and source MAC of outer layer network, and IP, outer layer network include: outer The destination IP and source IP of layer network.
UDP, outer layer network are the corresponding udp port information of VXLAN message, such as: UDP, outer layer network include: UDP Source port, UDP destination port (to parsing VXLAN message is applied to).
Internal layer network data includes: internal layer network MAC header, IP, internal layer network, DATA again;Wherein, internal layer network MAC Head, IP, internal layer network respectively VXLAN message the L2 address information for corresponding to internal layer network and three layer address information; The data content that DATA is carried by internal layer network.
Such as: internal layer network MAC header includes: the purpose MAC and source MAC of internal layer network, and IP, outer layer network include: interior The destination IP and source IP of layer network.
It should be noted that the above VXLAN message structure is only schematical, detailed field definition refers to existing Protocol specification specifically repeats no more.
In the present specification, network packet in above-mentioned target, refer to it is from Intranet, be sent in the above-mentioned network equipment two Layer network message.
Wherein, the double layer network message namely internal layer network data as shown in table 1.
For example, in practical applications, network packet can be in a cloud computation data center Intranet in above-mentioned target The carried virtual machine 1 of physical server to the carried virtual machine of physical server in another cloud computation data center Intranet 2 double layer network message;Network packet is also possible to the clothes of the physics in a cloud computation data center Intranet in above-mentioned target Double layer network of business the carried virtual machine 1 of device to the carried virtual machine 3 of physical server in the cloud computation data center Intranet Message.
In the present specification, the above-mentioned network equipment receives network packet in above-mentioned target, is integrated by the above-mentioned network equipment Above-mentioned CPU determines whether network packet needs to be implemented VXLAN encapsulation in above-mentioned target.
In a kind of embodiment shown, the above-mentioned network equipment receives network packet in above-mentioned target, determines above-mentioned target The corresponding inbound port of interior network packet and VLAN.
For example, shown in Figure 1, the above-mentioned network equipment receives network packet in above-mentioned target and determines above-mentioned target Intranet report The corresponding inbound port of text is PIN1 as shown in Figure 1 and its corresponding VLAN is 20.In another example shown in Figure 1, above-mentioned network Equipment receive network packet in above-mentioned target determine the corresponding inbound port of network packet in above-mentioned target be PIN2 as shown in Figure 1 and its Corresponding VLAN is 30.For another example shown in Figure 1, the above-mentioned network equipment receives network packet in above-mentioned target and determines above-mentioned mesh The corresponding inbound port of network packet is PIN3 as shown in Figure 1 in marking and its corresponding VLAN is 50.
In the present specification, further, if the corresponding inbound port of network packet and VLAN and preset configuration in above-mentioned target Match, then determines that network packet needs to be implemented VXLAN encapsulation in above-mentioned target by the CPU of the above-mentioned network equipment.
Then above example continues to illustrate, and the corresponding inbound port PIN3 of network packet and its corresponding VLAN is 50 in above-mentioned target Match with preset configuration, it is determined that network packet needs to be implemented VXLAN encapsulation in above-mentioned target.
In a kind of embodiment shown, further, it is determined that in above-mentioned target network packet purpose MAC, in inspection Whether the purpose MAC for stating network packet in target matches with the MAC Address of the above-mentioned network equipment;
Wherein, the MAC Address of the above-mentioned network equipment may include the corresponding MAC Address of all of the port of the above-mentioned network equipment Set.
Then above example continues to illustrate, shown in Figure 1, and the MAC Address of the network equipment may include the network equipment Corresponding 6 MAC Address of all of the port (PIN1, PIN2, PIN3, POUT1, POUT2, POUT3) set.
In the present specification, further, if in above-mentioned target the purpose MAC of network packet and the above-mentioned network equipment MAC Address mismatches, then executes two layers of forwarding.
Then above example continues to illustrate, the MAC Address of the purpose MAC of network packet and the above-mentioned network equipment in above-mentioned target It mismatches, then executes two layers of forwarding based on MAC table.It is specifically based on the repeating process of two layers of forwarding of MAC table, is referred to existing The forwarding explanation of two layers of VXLAN, which is not described herein again.
In the present specification, if the purpose MAC of network packet is matched with the MAC Address of the above-mentioned network equipment in above-mentioned target, Then execute three layers of forwarding.
Then above example continues to illustrate, the MAC Address of the purpose MAC of network packet and the above-mentioned network equipment in above-mentioned target Matching then needs to send on network packet (two layer message) in above-mentioned target to three layers of processing, simply lower three layers for the treatment of process packet Include: determining the corresponding outgoing interface of network packet in above-mentioned target by searching for routing table, and further determine that the outgoing interface whether be VLXAN interface.It is specifically based on the repeating process of three layers of forwarding of routing table, refers to the forwarding explanation of existing three layers of VXLAN, this In repeat no more.
In the present specification, further, it in preset VXLAN forwarding conversational list, saves and above-mentioned target Intranet report The corresponding forwarding session entry of text;
Wherein, above-mentioned forwarding session entry includes at least the corresponding inbound port of network packet in above-mentioned target, in above-mentioned target It is the corresponding outer envelope message IP five-tuple information of network packet in the corresponding IP five-tuple information of network packet, above-mentioned target, above-mentioned The exit port of the corresponding VNI of outer envelope message, above-mentioned outer envelope message.
For example, above-mentioned VXLAN forwards conversational list, example shown in Figure 2:
Table 2
In above-mentioned target the corresponding forwarding session entry of network packet correspond to occurrence can be as shown in table 2.
It should be noted that after above-mentioned network equipment creation preset VXLAN forwarding conversational list as shown in Table 2, when It is subsequent with above-mentioned target in network packet be same flow subsequent packet be re-introduced into the above-mentioned network equipment after, then the subsequent report Text can be by forwarding matching forwarding-table item corresponding with network packet in above-mentioned target in conversational list in VXLAN, directly by upper It states chip and carries out VXLAN encapsulation, to realize fast packing and fast-forwarding process.
In the present specification, after determining whether network packet needs to be implemented VXLAN encapsulation in above-mentioned target, if above-mentioned mesh Network packet needs to be implemented VXLAN encapsulation in marking, then above-mentioned package identification is inserted into network packet in above-mentioned target, by above-mentioned CPU Network packet in above-mentioned target is sent to above-mentioned forwarding chip;
Wherein, which is used to indicate network packet in above-mentioned target and needs to be implemented VXLAN encapsulation.
For example, the CPU of the above-mentioned network equipment heading of network packet or message can be carried in above-mentioned target when realizing Preset package identification is inserted into lotus designated position;The specific location and content of the package identification, length etc. in the present specification, no Do concrete restriction.
It in the present specification, will be in above-mentioned target by above-mentioned CPU after being inserted into package identification in network packet in above-mentioned target Network packet is sent to above-mentioned forwarding chip.
In the present specification, it is received in above-mentioned target after network packet in above-mentioned forwarding chip, to network packet in above-mentioned target It executes after VXLAN is encapsulated and forwards.
For example, above-mentioned forwarding chip can forward conversational list according to above-mentioned VXLAN as shown in Table 2 when realizing, it will be upper It states network packet in target and is encapsulated as VXLAN message.
It should be noted that by above-mentioned forwarding chip in target network packet execute VXLAN encapsulation, avoid it is original by CPU executes VXLAN encapsulation to network packet in target, reduces the consumption of CPU.
In a kind of embodiment shown, check that network packet is with the presence or absence of above-mentioned in above-mentioned target by above-mentioned forwarding chip Package identification;If there are package identifications for network packet in above-mentioned target, above-mentioned forwarding chip is to network packet base in above-mentioned target In the preset VXLAN tunnel configuration of correspondence, network packet in above-mentioned target is executed into corresponding VXLAN and is encapsulated, obtains VXLAN report Text;Above-mentioned VXLAN message is transferred through the corresponding tunnel VXLAN by above-mentioned forwarding chip.
For example, there are package identifications for network packet in above-mentioned target, then above-mentioned forwarding chip is to network packet base in above-mentioned target In the preset VXLAN tunnel configuration of correspondence (such as: the VXLAN tunnel configuration include at least it is corresponding with network packet in above-mentioned target The IP address of next-hop VXLAN gateway and port indicated by VNI), network packet in above-mentioned target is executed into corresponding VXLAN and is sealed Dress, obtains VXLAN message;Above-mentioned VXLAN message is transferred through the corresponding tunnel VXLAN by above-mentioned forwarding chip.
In above technical scheme, package identification is inserted into target based on CPU in network packet;And it will by forwarding core There are in the target of package identification network packet execute VXLAN encapsulation and forwarding, avoid it is original need CPU execute VXLAN envelope Dress, reduces the consumption of CPU, improves the speed of message forwarding.
Fig. 3 is a kind of block diagram for apparatus for forwarding message that one exemplary embodiment of the application provides.Implement with the above method Example is corresponding, and present invention also provides a kind of embodiment of apparatus for forwarding message, described device is applied to enable the network of VXLAN Equipment;The network equipment includes at least the CPU for Message processing, for the forwarding chip of message fast-forwarding;Wherein, institute It states CPU and the forwarding chip to be connected communication by hardware bus, please refers to a kind of apparatus for forwarding message 30 exemplified by Fig. 3, Described device includes:
Preprocessing module 301 receives network packet in target, determines whether network packet needs in the target by the CPU Execute VXLAN encapsulation;
Mark module 302, if network packet needs to be implemented VXLAN encapsulation in the target, in the target Intranet report It is inserted into package identification in text, network packet in the target is sent to the forwarding chip by the CPU;
Forwarding module 303 is executed after VXLAN is encapsulated and is forwarded for network packet in the target by the forwarding chip.
In the present embodiment, the forwarding module 303 further,
Check that network packet whether there is package identification in the target by the forwarding chip;
If there are package identifications for network packet in the target, by the forwarding chip to network packet base in the target In the preset VXLAN tunnel configuration of correspondence, network packet in the target is executed into corresponding VXLAN and is encapsulated, obtains VXLAN report Text;
The VXLAN message is transferred through the corresponding tunnel VXLAN by the forwarding chip.
In the present embodiment, the preprocessing module 301 further,
Network packet in the target is received, determines the corresponding inbound port of network packet and VLAN in the target;
If the corresponding inbound port of network packet and VLAN match with preset configuration in the target, it is determined that in the target Network packet needs to be implemented VXLAN encapsulation.
In the present embodiment, the preprocessing module 301 further,
The purpose MAC for determining network packet in the target checks the purpose MAC and the network of network packet in the target Whether the MAC Address of equipment matches;
If the MAC Address of the purpose MAC of network packet and the network equipment mismatches in the target, executes two layers and turn Hair;
If the purpose MAC of network packet is matched with the MAC Address of the network equipment in the target, executes three layers and turn Hair;
In preset VXLAN forwarding conversational list, forwarding session entry corresponding with network packet in the target is saved;Its In, the forwarding session entry includes at least the corresponding inbound port of network packet in the target, network packet is corresponding in the target IP five-tuple information, the corresponding outer envelope message IP five-tuple information of network packet, the outer envelope report in the target The exit port of the corresponding VNI of text, the outer envelope message.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit The module of explanation may or may not be physically separated, and the component shown as module can be or can also be with It is not physical module, it can it is in one place, or may be distributed on multiple network modules.It can be according to actual The purpose for needing to select some or all of the modules therein to realize application scheme.Those of ordinary skill in the art are not paying Out in the case where creative work, it can understand and implement.
System, device, module or the module that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment The combination of any several equipment.
The embodiment of the apparatus for forwarding message of the application can be using on electronic equipment shown in Fig. 4.Installation practice It can also be realized by way of hardware or software and hardware combining by software realization.Taking software implementation as an example, as one Device on a logical meaning is by the processor of electronic equipment where it by calculating corresponding in machine readable storage medium Machine program instruction runs the machine-executable instruction of formation after reading.For hardware view, as shown in figure 4, for the application's A kind of hardware structure diagram of electronic equipment where apparatus for forwarding message, in addition to processor shown in Fig. 4, communication interface, bus with And except machine readable storage medium, the practical function of electronic equipment in embodiment where device generally according to the electronic equipment Can, it can also include other hardware, this is repeated no more.
Accordingly, it the embodiment of the present application also provides the hardware configuration of a kind of electronic equipment of Fig. 3 shown device, refers to Fig. 4, Fig. 4 are the hardware structural diagram of a kind of electronic equipment provided by the embodiments of the present application.The equipment includes: communication interface 401, processor 402, machine readable storage medium 403 and bus 404;Wherein, communication interface 401, processor 402, machine can It reads storage medium 403 and mutual communication is completed by bus 404.Wherein, communication interface 401, for carrying out network communication.Place Reason device 402 can be a central processing unit (CPU), and processor 402 can execute to be stored in machine readable storage medium 403 Machine readable instructions, to realize process as described above.
Machine readable storage medium 403 referred to herein can be any electronics, magnetism, optics or other physical stores Device may include or store information, such as executable instruction, data, etc..For example, machine readable storage medium may is that easily Lose memory, nonvolatile memory or similar storage medium.Specifically, machine readable storage medium 403 can be RAM (Radom Access Memory, random access memory), flash memory, memory driver (such as hard disk drive), solid state hard disk, Any kind of storage dish (such as CD, DVD) perhaps similar storage medium or their combination.
So far, hardware configuration description shown in Fig. 4 is completed.
In addition, the embodiment of the present application also provides a kind of machine readable storage medium including machine-executable instruction, example Such as the machine-readable readable storage medium storing program for executing 403 in Fig. 4, the machine-executable instruction can be by data processing equipment Device 402 is managed to execute to realize data processing method described above.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus Realization process, details are not described herein.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the application Its embodiment.This application is intended to cover any variations, uses, or adaptations of the application, these modifications, purposes or Person's adaptive change follows the general principle of the application and including the undocumented common knowledge in the art of the application Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the application are by following Claim is pointed out.
It should be understood that the application is not limited to the precise structure that has been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.Scope of the present application is only limited by the accompanying claims.
The foregoing is merely the preferred embodiments of the application, not to limit the application, all essences in the application Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the application protection.

Claims (10)

1. a kind of message forwarding method, which is characterized in that the method is applied to enable the network equipment of VXLAN;The network Equipment includes at least the CPU for Message processing, for the forwarding chip of message fast-forwarding;Wherein, the CPU with described turn It sends out chip and passes through the connected communication of hardware bus, which comprises
Network packet in target is received, determines whether network packet needs to be implemented VXLAN encapsulation in the target by the CPU;
If network packet needs to be implemented VXLAN encapsulation in the target, it is inserted into package identification in network packet in the target, Network packet in the target is sent to the forwarding chip by the CPU;
It is executed after VXLAN is encapsulated and is forwarded for network packet in the target by the forwarding chip.
2. the method according to claim 1, wherein described be directed to the target Intranet report by the forwarding chip Text is executed after VXLAN is encapsulated and is forwarded, comprising:
Check that network packet whether there is package identification in the target by the forwarding chip;
If network packet is there are package identification in the target, network packet in the target is based on pair by the forwarding chip Preset VXLAN tunnel configuration is answered, network packet in the target is executed into corresponding VXLAN and is encapsulated, VXLAN message is obtained;
The VXLAN message is transferred through the corresponding tunnel VXLAN by the forwarding chip.
3. the method according to claim 1, wherein network packet in the reception target, determines institute by the CPU State whether network packet in target needs to be implemented VXLAN encapsulation, comprising:
Network packet in the target is received, determines the corresponding inbound port of network packet and VLAN in the target;
If the corresponding inbound port of network packet and VLAN match with preset configuration in the target, it is determined that the target Intranet report Text needs to be implemented VXLAN encapsulation.
4. according to the method described in claim 3, it is characterized by further comprising:
The purpose MAC for determining network packet in the target checks the purpose MAC and the network equipment of network packet in the target MAC Address whether match;
If the MAC Address of the purpose MAC of network packet and the network equipment mismatches in the target, two layers of forwarding are executed;
If the purpose MAC of network packet is matched with the MAC Address of the network equipment in the target, three layers of forwarding are executed;
In preset VXLAN forwarding conversational list, forwarding session entry corresponding with network packet in the target is saved;Wherein, The forwarding session entry includes at least the corresponding inbound port of network packet in the target, the corresponding IP of network packet in the target The corresponding outer envelope message IP five-tuple information of network packet, the outer envelope message pair in five-tuple information, the target The exit port of the VNI, the outer envelope message that answer.
5. a kind of apparatus for forwarding message, which is characterized in that described device is applied to enable the network equipment of VXLAN;The network Equipment includes at least the CPU for Message processing, for the forwarding chip of message fast-forwarding;Wherein, the CPU with described turn Chip is sent out by the connected communication of hardware bus, described device includes:
Preprocessing module receives network packet in target, determines whether network packet needs to be implemented in the target by the CPU VXLAN encapsulation;
Mark module is inserted into network packet in the target if network packet needs to be implemented VXLAN encapsulation in the target Network packet in the target is sent to the forwarding chip by the CPU by package identification;
Forwarding module is executed after VXLAN is encapsulated and is forwarded for network packet in the target by the forwarding chip.
6. device according to claim 5, which is characterized in that the forwarding module further,
Check that network packet whether there is package identification in the target by the forwarding chip;
If network packet is there are package identification in the target, network packet in the target is based on pair by the forwarding chip Preset VXLAN tunnel configuration is answered, network packet in the target is executed into corresponding VXLAN and is encapsulated, VXLAN message is obtained;
The VXLAN message is transferred through the corresponding tunnel VXLAN by the forwarding chip.
7. device according to claim 5, which is characterized in that the preprocessing module further,
Network packet in the target is received, determines the corresponding inbound port of network packet and VLAN in the target;
If the corresponding inbound port of network packet and VLAN match with preset configuration in the target, it is determined that the target Intranet report Text needs to be implemented VXLAN encapsulation.
8. device according to claim 7, which is characterized in that the preprocessing module further,
The purpose MAC for determining network packet in the target checks the purpose MAC and the network equipment of network packet in the target MAC Address whether match;
If the MAC Address of the purpose MAC of network packet and the network equipment mismatches in the target, two layers of forwarding are executed;
If the purpose MAC of network packet is matched with the MAC Address of the network equipment in the target, three layers of forwarding are executed;
In preset VXLAN forwarding conversational list, forwarding session entry corresponding with network packet in the target is saved;Wherein, The forwarding session entry includes at least the corresponding inbound port of network packet in the target, the corresponding IP of network packet in the target The corresponding outer envelope message IP five-tuple information of network packet, the outer envelope message pair in five-tuple information, the target The exit port of the VNI, the outer envelope message that answer.
9. a kind of electronic equipment, which is characterized in that including communication interface, processor, memory and bus, the communication interface, It is connected with each other between the processor and the memory by bus;
Machine readable instructions are stored in the memory, the processor is executed by calling the machine readable instructions as weighed Benefit requires 1 to 4 described in any item methods.
10. a kind of machine readable storage medium, which is characterized in that the machine readable storage medium is stored with machine readable finger It enables, the machine readable instructions realize the described in any item methods of Claims 1-4 when being called and being executed by processor.
CN201910786464.2A 2019-08-23 2019-08-23 Message forwarding method, device, electronic equipment and machine readable storage medium Pending CN110505138A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910786464.2A CN110505138A (en) 2019-08-23 2019-08-23 Message forwarding method, device, electronic equipment and machine readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910786464.2A CN110505138A (en) 2019-08-23 2019-08-23 Message forwarding method, device, electronic equipment and machine readable storage medium

Publications (1)

Publication Number Publication Date
CN110505138A true CN110505138A (en) 2019-11-26

Family

ID=68589210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910786464.2A Pending CN110505138A (en) 2019-08-23 2019-08-23 Message forwarding method, device, electronic equipment and machine readable storage medium

Country Status (1)

Country Link
CN (1) CN110505138A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111107007A (en) * 2019-12-31 2020-05-05 奇安信科技集团股份有限公司 Message forwarding method and device, electronic equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101695047B (en) * 2009-10-26 2015-01-28 中兴通讯股份有限公司 Method and switch for realizing forwarding of dynamic tunnel message
US20160211989A1 (en) * 2015-01-16 2016-07-21 Alcatel-Lucent Usa Inc. Bidirectional Forwarding Detection Over a Virtual Extensible Local Area Network
CN106209557A (en) * 2016-06-30 2016-12-07 杭州迪普科技有限公司 Message forwarding method and device
CN109495366A (en) * 2017-09-11 2019-03-19 中兴通讯股份有限公司 A kind of VXLAN message processing method, device and storage medium
CN109525479A (en) * 2018-12-19 2019-03-26 锐捷网络股份有限公司 A kind of message processing method and equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101695047B (en) * 2009-10-26 2015-01-28 中兴通讯股份有限公司 Method and switch for realizing forwarding of dynamic tunnel message
US20160211989A1 (en) * 2015-01-16 2016-07-21 Alcatel-Lucent Usa Inc. Bidirectional Forwarding Detection Over a Virtual Extensible Local Area Network
CN106209557A (en) * 2016-06-30 2016-12-07 杭州迪普科技有限公司 Message forwarding method and device
CN109495366A (en) * 2017-09-11 2019-03-19 中兴通讯股份有限公司 A kind of VXLAN message processing method, device and storage medium
CN109525479A (en) * 2018-12-19 2019-03-26 锐捷网络股份有限公司 A kind of message processing method and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111107007A (en) * 2019-12-31 2020-05-05 奇安信科技集团股份有限公司 Message forwarding method and device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
US10757231B2 (en) Providing network efficiencies in forwarding packets among provider networks and applying segment routing policies
CN104168223B (en) For determining the method and system of packet-priority
US9130859B1 (en) Methods and apparatus for inter-virtual local area network multicast services
US20160254927A1 (en) Tagging virtual overlay packets in a virtual networking system
US8913613B2 (en) Method and system for classification and management of inter-blade network traffic in a blade server
US20170331741A1 (en) Mac chaining load balancer
US20220210225A1 (en) Class-based queueing for scalable multi-tenant rdma traffic
WO2018028590A1 (en) Packet transmission
CN113326228B (en) Message forwarding method, device and equipment based on remote direct data storage
CN109361606B (en) Message processing system and network equipment
EP3465997B1 (en) Packet forwarding using vendor extension in a software-defined networking (sdn) system
CN103200069A (en) Message processing method and device
CN106209557B (en) Message forwarding method and device
WO2016062169A1 (en) Message transmission method and apparatus
CN104704778A (en) Method and system for virtual and physical network integration
WO2018166325A1 (en) Method and device for forwarding data packet
CN105635190B (en) Service executing apparatus in data center network and device
US12010195B2 (en) Efficient flow management utilizing control packets
US10091112B1 (en) Highly-scalable virtual IP addresses in a load balancing switch
CN108600109A (en) A kind of message forwarding method and device
US10536398B2 (en) Plug and play in a controller based network
CN108718276A (en) A kind of message forwarding method and device
CN109246016B (en) Cross-VXLAN message processing method and device
CN111130978B (en) Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
CN110505138A (en) Message forwarding method, device, electronic equipment and machine readable 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191126

RJ01 Rejection of invention patent application after publication