CN109246012A - Message forwarding method, device and computer readable storage medium - Google Patents
Message forwarding method, device and computer readable storage medium Download PDFInfo
- Publication number
- CN109246012A CN109246012A CN201710558908.8A CN201710558908A CN109246012A CN 109246012 A CN109246012 A CN 109246012A CN 201710558908 A CN201710558908 A CN 201710558908A CN 109246012 A CN109246012 A CN 109246012A
- Authority
- CN
- China
- Prior art keywords
- message
- forwarding
- node
- label
- forwarded
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/50—Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4633—Interconnection of networks using encapsulation techniques, e.g. tunneling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
- H04L12/4645—Details on frame tagging
- H04L12/4666—Operational details on the addition or the stripping of a tag in a frame, e.g. at a provider edge node
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 kind of message forwarding method, device and computer readable storage mediums, the described method includes: first node obtains the corresponding local first via of message to be forwarded by detail, the first via is mapped by detail and the first label in local label pond, and the first via is synchronized to second node by the first mapping relations of detail and the first label;First node obtains the secondary route detail of second node, and obtains the second label according to secondary route detail;First node is packaged message to be forwarded, the first label and the second label to obtain encapsulated message, encapsulated message is sent to second node, so that second node receives and decapsulates the encapsulated message, and based on the message after the first mapping relations and the forwarding decapsulation of the second mapping relations to target user.The technical issues of existing message encapsulation head load of present invention solution is excessive, and bandwidth availability ratio is not reasonable, and network communication equipment transmitting message efficiency is caused to reduce.
Description
Technical field
The present invention relates to Message processing field more particularly to a kind of message forwarding methods, device and computer-readable storage
Medium.
Background technique
Currently, the message of network communication equipment transmission includes the local address network interface card hardware Eth-MAC, Internet protocol IP
Location, User Datagram Protocol UDP, reserved field, message payload etc. include items in existing message encapsulation head load
The redundancy that routing detail such as source MAC, IP address etc. excessively causes efficiency of transmission to reduce, there is some bandwidth resources
The client of limit, although taking the modes such as the virtual tunnel expansible local area network VXLAN of optimization that can promote whole message transmissions efficiency, so
And single message correspond to efficient resource not and is improved, i.e., message excessive, the bandwidth availability ratio that encapsulates head load still occurs
It is not reasonable, cause network communication equipment transmitting message efficiency reduce the technical issues of.
Summary of the invention
Of the invention main second is to provide a kind of message forwarding method, device and computer readable storage medium, purport
Excessive in the existing message encapsulation head load of solution, bandwidth availability ratio is not reasonable, and network communication equipment transmitting message is caused to imitate
The technical issues of rate reduces.
To realize above-mentioned second, the present invention provides a kind of message forwarding method, and the message forwarding method includes:
When detecting message to be forwarded, local first node and long-range second node establish virtual expansible local area network
The tunnel VXLAN;
First node obtains the corresponding local first via of message to be forwarded by detail, by the first via by detail and local
The first label in label pond is mapped, and the first via is synchronized to by detail and the first mapping relations of the first label
Second node;
The secondary route detail of second node is obtained, and obtains the secondary route detail and second node remote tag pond
In the second label the second mapping relations;
It is packaged message to be forwarded, the first label and the second label to obtain encapsulated message, be sent by the tunnel VXLAN
Encapsulated message is to second node, so that second node receives and decapsulates the encapsulated message, and based on the first mapping relations with
The encapsulated message after the forwarding decapsulation of second mapping relations is to target user.
Preferably, the second node receives and decapsulates the encapsulated message, and based on the first mapping relations forwarding solution
The encapsulated message after encapsulation includes: to target user's step
The second node receives and decapsulates the encapsulated message, obtains the second label, the first label;
Secondary route detail is obtained based on the second label, the first label, the first mapping relations and the second mapping relations;
The second node is based on the encapsulated message after the forwarding decapsulation of secondary route detail to target user.
Preferably, the encapsulated message further includes virtual expansible local area network VXLAN field, increases field, the VXLAN
Field includes the first reserved field and the second reserved field, wherein, and the first reserved field includes the second label, the second reserved field
Including optional Option field, increasing field includes the first label.
Preferably, the first node obtains the corresponding first via of message to be forwarded by detail, by the first via by bright
Carefully carrying out mapping step before with the first label in local label pond includes:
Local corresponding first user obtains the first via by detail by first node;
First user obtains secondary route detail, and obtains the first via by detail road corresponding with secondary route detail
By entry, message to be forwarded is forwarded so that first node is based on the routing entry.
Preferably, local corresponding first user obtains the first via by including: before detail step by first node
Judge whether the message to be forwarded is three layers of forwarding, it is preset corresponding when the message to be forwarded is three layers of forwarding
Routing detail to be includes physical MAC address, the data of IP address or Address Resolution Protocol ARP data, wherein routing detail packet
The first via is included by detail and secondary route detail.
Preferably, described to judge whether the message to be forwarded is that three layers of forwarding step include: later
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is that two layers of known unicast turn
Hair, when forwarding for two layers of known unicast, preset corresponding routing detail is the data for including physical MAC address, wherein routing is bright
It carefully include the first via by detail and secondary route detail.
Preferably, described to judge whether the message to be forwarded is that three layers of forwarding step include: later
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is second-layer multicast forwarding;
When message to be forwarded is second-layer multicast forwarding, preset corresponding routing detail is the data for including physical MAC address,
And the data in the preset multicast address pond of the second reserved field, the corresponding multicast address in the preset pond of location to each group of the first reserved field
Data.
Preferably, described to judge whether the message to be forwarded is that three layers of forwarding step include: later
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is that broadcast or unknown unicast turn
Hair;
Broadcast or unknown unicast forwarding, second label are determining default second label.
In addition, to realize above-mentioned second, the present invention also provides a kind of apparatus for forwarding message, the apparatus for forwarding message packet
It includes: memory, processor, communication bus and the message retransmission process being stored on the memory,
The communication bus is for realizing the communication connection between processor and memory;
The processor is for executing the message retransmission process, to perform the steps of
When detecting message to be forwarded, local first node and long-range second node establish virtual expansible local area network
The tunnel VXLAN;
First node obtains the corresponding local first via of message to be forwarded by detail, by the first via by detail and local
The first label in label pond is mapped, and the first via is synchronized to by detail and the first mapping relations of the first label
Second node;
The secondary route detail of second node is obtained, and obtains the secondary route detail and second node remote tag pond
In the second label the second mapping relations;
It is packaged message to be forwarded, the first label and the second label to obtain encapsulated message, be sent by the tunnel VXLAN
Encapsulated message is to second node, so that second node receives and decapsulates the encapsulated message, and based on the first mapping relations with
The encapsulated message after the forwarding decapsulation of second mapping relations is to target user.
Preferably, the second node receives and decapsulates the encapsulated message, and based on the first mapping relations forwarding solution
The encapsulated message after encapsulation includes: to target user's step
The second node receives and decapsulates the encapsulated message, obtains the second label, the first label;
Secondary route detail is obtained based on the second label, the first label, the first mapping relations and the second mapping relations;
The second node is based on the encapsulated message after the forwarding decapsulation of secondary route detail to target user.
Preferably, the encapsulated message further includes virtual expansible local area network VXLAN field, increases field, the VXLAN
Field includes the first reserved field and the second reserved field, wherein, and the first reserved field includes the second label, the second reserved field
Including optional Option field, increasing field includes the first label.
Preferably, the first node obtains the corresponding first via of message to be forwarded by detail, by the first via by bright
Carefully carrying out mapping step before with the first label in local label pond includes:
Local corresponding first user obtains the first via by detail by first node;
First user obtains secondary route detail, and obtains the first via by detail road corresponding with secondary route detail
By entry, message to be forwarded is forwarded so that first node is based on the routing entry.
Preferably, local corresponding first user obtains the first via by including: before detail step by first node
Judge whether the message to be forwarded is three layers of forwarding, it is preset corresponding when the message to be forwarded is three layers of forwarding
Routing detail to be includes physical MAC address, the data of IP address or Address Resolution Protocol ARP data, wherein routing detail packet
The first via is included by detail and secondary route detail.
Preferably, described to judge whether the message to be forwarded is that three layers of forwarding step include: later
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is that two layers of known unicast turn
Hair, when forwarding for two layers of known unicast, preset corresponding routing detail is the data for including physical MAC address, wherein routing is bright
It carefully include the first via by detail and secondary route detail.
Preferably, described to judge whether the message to be forwarded is that three layers of forwarding step include: later
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is second-layer multicast forwarding;
When message to be forwarded is second-layer multicast forwarding, preset corresponding routing detail is the data for including physical MAC address,
And the data in the preset multicast address pond of the second reserved field, the corresponding multicast address in the preset pond of location to each group of the first reserved field
Data.
Preferably, described to judge whether the message to be forwarded is that three layers of forwarding step include: later
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is that broadcast or unknown unicast turn
Hair;
Broadcast or unknown unicast forwarding, second label are determining default second label.
In addition, for realization above-mentioned second, it is described computer-readable the present invention also provides a kind of computer readable storage medium
Storage medium be stored with one perhaps more than one program the one or more programs can by one or one with
On processor execute to be used for:
When detecting message to be forwarded, local first node and long-range second node establish virtual expansible local area network
The tunnel VXLAN;
First node obtains the corresponding local first via of message to be forwarded by detail, by the first via by detail and local
The first label in label pond is mapped, and the first via is synchronized to by detail and the first mapping relations of the first label
Second node;
The secondary route detail of second node is obtained, and obtains the secondary route detail and second node remote tag pond
In the second label the second mapping relations;
It is packaged message to be forwarded, the first label and the second label to obtain encapsulated message, be sent by the tunnel VXLAN
Encapsulated message is to second node, so that second node receives and decapsulates the encapsulated message, and based on the first mapping relations with
The encapsulated message after the forwarding decapsulation of second mapping relations is to target user.
The present invention obtains the corresponding local first via of message to be forwarded by detail by first node, by the first via by
Detail is mapped with the first label in local label pond, and by the first via by the first mapping of detail and the first label
Relationships synchronization is to second node;First node obtains the secondary route detail of second node, and is obtained according to secondary route detail
Associated second mapping relations and the second mapping relations second label of mapped in second node remote tag pond;First
Message to be forwarded, the first label and the second label are packaged to obtain encapsulated message by node, send encapsulated message to the second section
Point so that second node receives and decapsulate the encapsulated message, and is forwarded based on the first mapping relations and the second mapping relations
Message after decapsulation is to target user.Due in the present invention, by modifying the internal form of message, by first node in message
The first via of redundancy corresponding with second node is replaced and is forwarded by the concept of detail and secondary route detail label, and is being turned
Corresponding message can be effectively decapsulated after hair, it is thus possible to which the efficiency for effectively increasing message transmissions solves existing message envelope
The technical issues of dress head load is excessive, and bandwidth availability ratio is not reasonable, and network communication equipment transmitting message efficiency is caused to reduce.
Detailed description of the invention
Fig. 1 is the flow diagram of message forwarding method first embodiment of the present invention;
Fig. 2 is the flow diagram of message forwarding method second embodiment of the present invention;
Fig. 3 is the device structure schematic diagram for the hardware running environment that present invention method is related to;
Fig. 4 is the flow diagram of message of embodiment of the present invention forwarding;
Fig. 5 is the flow diagram of message of embodiment of the present invention forwarding;
The embodiments will be further described with reference to the accompanying drawings for realization, functional characteristics and the advantage of the present invention second.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of message forwarding method, in the first embodiment of message forwarding method of the present invention, referring to figure
1, the message forwarding method includes:
Step S10, first node obtain the corresponding local first via of message to be forwarded by detail, by the first via by bright
It is carefully mapped with the first label in local label pond, and the first via is closed by the first mapping of detail and the first label
System is synchronized to second node;
Wherein, the first node obtains the corresponding local first via of message to be forwarded by including: before detail step
When detecting message to be forwarded, first node and long-range second node establish virtual expansible local area network VXLAN
Tunnel.
Currently, using virtual expansible local area network VXLAN tunnel transmission message, i.e., it will be other by a kind of network protocol
After the message encapsulation of network protocol, transmit in a network, the transmission path of the message after encapsulation in a network, referred to as tunnel, tunnel
Road is a kind of point-to-point connection, needs to be packaged message and decapsulate at the both ends in tunnel.When detecting message to be forwarded
When, local first node and long-range second node establish the virtual tunnel expansible local area network VXLAN, initially set up a VXLAN
The networking in tunnel, first node and second node are EVPN node, and EVPN is to carry attribute based on Border Gateway Protocol (BGP) to be assisted
The agreement of quotient, after establishing BGP-EVPN neighbours between the two nodes, the tunnel VXLAN is it has been established that in the application, report to be forwarded
Text can be derived from carry in the first user of local first node, wherein carry can be multiple, general in the user of first node
The message to be forwarded of first user is transmitted to long-range second via Ethernet EVPN by local first node after encapsulation
Node after long-range second node obtains the message of the encapsulation, decapsulates the message of encapsulation, based on the report after decapsulation
Text obtains the information of second user, and the message after the decapsulation is sent to second user, wherein carry is in second node
User can also be multiple.
As shown in figure 3, tradition VXLAN message remove including the local address network interface card hardware Eth-MAC, Internet protocol IP address,
It further include reserved field content outside the contents such as User Datagram Protocol UDP, message payload, to meet different message demands,
Wherein, the local address network interface card hardware Eth-MAC, Internet protocol IP address, User Datagram Protocol UDP are that transmitting message is necessary
Data, it is possible to provide the routing information of forwarding redesigns message structure, retain the local network interface card hardware of message in this application
The address Eth-MAC, Internet protocol IP address, User Datagram Protocol UDP, message payload content, by the of reserved field
One reserved field is designed as the second label, is designed as Option field to expand as multicast in the second reserved field of reserved field
Exhibition uses, wherein reserved field further includes VNI identification information, in addition, as shown in figure 4, increasing by 4 after traditional VXLAN heading
Byte is used as the first label.
Step S20, first node obtain the corresponding local first via of message to be forwarded by detail, by the first via by bright
It is carefully mapped with the first label in local label pond, and the first via is closed by the first mapping of detail and the first label
System is synchronized to second node;
Before forwarding message to be forwarded, first node is communicated with the first user of carry to obtain first based on ARP
The corresponding first via of user includes MAC Address, the information such as IP address, wherein forwarded according to message by detail by detail, the first via
Attribute it is different, the first via is not identical by detail, is illustrated to specific embodiment, when message forwarding is two layers of forwarding
When, which includes MAC Address without including IP address by detail, when message forwarding is three layers of forwarding, the first via by
Detail includes MAC Address and IP address, and it is to work as the first via that secondary route detail is identical by detail attributes match as the first via
It include MAC Address by detail, when IP address, secondary route detail also includes MAC Address, IP address, in addition, to be forwarded forwarding
Before message, the first user communicates with second user or first node is communicated with second node, it is thus possible to obtain
The corresponding secondary route detail of second user, so that first node obtains under the network identity VNI and tunnel that encapsulated message needs
One hop-information, in addition, it is necessary to explanation, the first label pond is arranged in first node, which can be memory space, should
Each first label is arranged in first label pond, and each first label, which can be, in the first label pond is randomly assigned but corresponds to uniquely,
Before forwarding message to be forwarded, first node is corresponding first label of the corresponding routing detail distribution of first node, this
One label, which can be, to be randomly assigned, and the first mapping relations of first label and routing detail are synchronized to second via the first user
User, meanwhile, the second label pond is arranged in second node, which is arranged each second label, second node second
The corresponding routing detail of node distributes corresponding second label, which, which can be, is randomly assigned, and receives in second user
When the first label synchronized to first node and the first mapping relations, the second label and second which will acquire
Second mapping relations of routing detail are synchronized to the first user, so that the first user sends the second mapping relations and the second label
To second node, in addition, it is necessary to explanation, above-mentioned all synchronizing processes can also be what first node was carried out with second node
Simultaneously operating, and be not necessarily the first user and synchronize operation with second user.
Wherein, network side carry the first user need communicated with first node, with realize first node based on pair
The arp address resolution protocol answered obtains the first via such as the corresponding MAC of the first user by detail.
Step S30, first node are packaged message to be forwarded, the first label and the second label to obtain encapsulated message,
Encapsulated message is sent to second node, so that second node receives and decapsulate the encapsulated message, and is closed based on the first mapping
System is with the message after the forwarding decapsulation of the second mapping relations to target user.
After local side gets the first label and the second label, first node by message to be forwarded, the first label and
Second label is packaged to obtain encapsulated message, the format of message format encapsulated message as shown in the figure in the application, and existing
Message compare, in encapsulated message, the first label and option field are increased in reserved field, wherein option field
It is used to divide into Option field as Multicast Extensions, increases by 4 bytes after traditional VXLAN heading as the first label
It uses, it is identical in the load form of the message payload form with before.After the completion of loading encapsulation, pass through the tunnel VXLAN
Encapsulated message is sent to second node, so that second node receives and decapsulate the encapsulated message, and is closed based on the first mapping
System is with the encapsulated message after the forwarding decapsulation of the second mapping relations to target user.
In the present invention, by obtaining the corresponding local first via of message to be forwarded by detail, by institute by first node
It states the first via to be mapped by detail and the first label in local label pond, and by the first via by detail and the first label
The first mapping relations be synchronized to second node;First node obtains the secondary route detail of second node, and according to the second tunnel
Associated second mapping relations and the second mapping relations mapped the is obtained in second node remote tag pond by detail
Two labels;Message to be forwarded, the first label and the second label are packaged to obtain encapsulated message by first node, send encapsulation report
Text so that second node receives and decapsulate the encapsulated message, and is reflected based on the first mapping relations with second to second node
Message after penetrating relationship forwarding decapsulation is to target user.Due in the present invention, by modifying the internal form of message, by message
The first via of middle first node redundancy corresponding with second node is replaced simultaneously by the concept of detail and secondary route detail label
Forwarding, and corresponding message can be effectively decapsulated after forwarding, it is thus possible to the efficiency of message transmissions is effectively increased, is solved
Existing message encapsulation head load is excessive, and bandwidth availability ratio is not reasonable, causes the reduction of network communication equipment transmitting message efficiency
The technical issues of.
Further, on the basis of the first embodiment of message forwarding method of the present invention, message forwarding method is provided
Two embodiments, in a second embodiment, the method also includes:
If first node receives the encapsulated message of third node transmission, the first node is received and is decapsulated described
Encapsulated message;
The third mapping relations and the third of Receive message third node of the first node based on the decapsulation
Mapping relations mapped third label;
Third, which is obtained, based on third label, the first label, the first mapping relations and third mapping relations routes detail, and base
Forward the message of the decapsulation to target user in third routing detail.
If first node is receiving end, when even first node receives the encapsulated message of third node transmission, first segment
Point receives and decapsulates encapsulated message transmitted by the third node, can obtain the message payload of the encapsulated message
And third label, due to carry, there are many user at first node, thus after receiving and unsealing corresponding message, third section
Point obtains the first mapping relations and the first label, third mapping relations and third label, is used with being accurately sent to corresponding purpose
Family.
In the present embodiment, if by first node receive third node transmission encapsulated message when, the first segment
Point receives and decapsulates the encapsulated message;The third of Receive message third node of the first node based on the decapsulation
Mapping relations and the third mapping relations mapped third label;Based on third label, the first label, the first mapping relations
Third is obtained with third mapping relations and routes detail, and forwards the message of the decapsulation to use to target based on third routing detail
Family.Thus corresponding message accurately can be sent to purpose user, the user experience is improved.
Further, on the basis of the first embodiment of message forwarding method of the present invention, message forwarding method is provided
Three embodiments, in the third embodiment, the encapsulated message further include the first reserved field, the second reserved field, increase field,
Wherein, the first reserved field includes the second label, and the second reserved field includes optional Option field, and increasing field includes first
Label.
As shown, the encapsulated message reserved field includes the first reserved field, the second reserved field, the first reserved word
Section can provide 24 forwarding label fields, but the second label can only occupy 1 field, and the second reserved field can be 8
The optional Option field of position can recognize two, three-tier message as storing, and the mark of multicast and broadcasting packet increases field packet
Include the first label, increasing field can be 4 fields, and the first label can only occupy a field, i.e., with existing message ratio
Compared with, increase increase field store the first label, and original first reserved field store the second label, rather than store word
The more MAC Address of joint number mesh or IP address, thus resource has been saved, so that message transferring speed is faster.
In the present embodiment, further include the first reserved field by the encapsulated message, the second reserved field, increase word
Section, wherein the first reserved field includes the second label, and the second reserved field includes optional Option field, increases field and includes
First label.Field due to effectively introducing message is constituted, it is thus possible to so that message transferring speed is faster.
Further, on the basis of the first embodiment of message forwarding method of the present invention, message forwarding method is provided
Four embodiments, in the fourth embodiment, the first node obtain the corresponding local first via of message to be forwarded by detail step
Include: before
Judge whether the message to be forwarded is three layers of forwarding, it is preset corresponding when the message to be forwarded is three layers of forwarding
Routing detail is the data for including physical MAC address, IP address, wherein routing detail includes the first via by detail and the second tunnel
By detail.
It is described to judge whether the message to be forwarded is that three layers of forwarding step include: later
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is that two layers of known unicast turn
Hair, when forwarding for two layers of known unicast, preset corresponding routing detail is the data for including physical MAC address, wherein routing is bright
It carefully include the first via by detail and secondary route detail.
Judge whether the message to be forwarded is three layers of forwarding, when the message to be forwarded is three layers of forwarding, in label pond
Label mapped with physical MAC address, IP address, when the message to be forwarded is two layers of unicast forwarding, in label pond
Label and physical MAC address are mapped, in addition, optional Option field is different because of the two layers of type forwarded difference.
In the present embodiment, by judging whether the message to be forwarded is three layers of forwarding, when the message to be forwarded is three
When layer forwarding, preset corresponding routing detail is the data for including physical MAC address, IP address, is forwarded when for two layers of known unicast
When, preset corresponding routing detail is the data for including physical MAC address, wherein routing detail includes the first via by detail and the
Two routing details, according to the different and preset different mappings of forwarding type, it is thus possible to when two layers of forwarding are with three layers of forwarding
Realize the speed for promoting message forwarding.
Further, on the basis of the fourth embodiment of message forwarding method of the present invention, message forwarding method is provided
Five embodiments, it is in the 5th embodiment, described to judge whether the message to be forwarded is that three layers of forwarding step include: later
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is second-layer multicast forwarding;
When message to be forwarded is second-layer multicast forwarding, preset corresponding routing detail is the data for including physical MAC address,
And the data in the preset multicast address pond of the second reserved field, the corresponding multicast address in the preset pond of location to each group of the first reserved field
Data.
It is described to judge whether the message to be forwarded is that three layers of forwarding step include: later
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is that broadcast or unknown unicast turn
Hair;
When being broadcast or unknown unicast forwarding, second label is determining default second label.
When the message to be forwarded is not three layers of forwarding, judge the message to be forwarded for second-layer multicast forwarding or wide
It broadcasts, unknown unicast forwarding, due to not being three layers of forwarding, thus label is mapped with MAC Address, when message to be forwarded is two layers
When multicast forwarding, since target user address is uncertain, thus the data in the preset multicast address pond of the second reserved field, first
The corresponding multicast address data in the preset pond of location to each group of reserved field, it is useful for message group is cast to the corresponding institute of second node
Family, if message to be forwarded is two layers of forwarding when being broadcast, unknown unicast forwarding, second label is determining default second mark
Label, particularly, which can be complete 1 label.
In addition, message to be forwarded can be protocol massages, when message to be forwarded is protocol massages, the second reserved field can
It is the priority orders for identifying forwarding, for determining the preferential forwarding of protocol massages.The present invention also realizes the compatibility of agreement,
It is identified as common message scene for 0x08 when message reserved field first 8, when being 0x88 for message reserved field lead-in section 8,
For field used in the present invention.
In conclusion the present invention modifies the internal form of message, the part of redundancy in message is replaced with the concept of Label
And forward, the efficiency of message load is improved to a certain extent, and by taking 128 byte messages as an example, common message redundancy information reaches
To 80 bytes, information, which covers utilization rate, only has 37.5%, reduces 28 bytes using the present invention redundancy that E-Packets, makes letter
Breath covers utilization rate and reaches 59.3%, improves the usage experience of user.
In the present embodiment, by the way that when message to be forwarded is second-layer multicast forwarding, preset corresponding routing detail is to include
The data of physical MAC address, and the data in the preset multicast address pond of the second reserved field, the first reserved field are preset to each group
The corresponding multicast address data in location pond.It is described to judge that the message to be forwarded whether be after three layers of forwarding step includes: to work as institute
When to state message to be forwarded not be three layers of forwarding, judge whether the message to be forwarded is broadcast or unknown unicast forwarding;When be broadcast
Or unknown unicast forwarding, second label are determining default second label.The user experience is improved.
The present invention provides a kind of apparatus for forwarding message, which includes:
Synchronization module obtains the corresponding local first via of message to be forwarded by detail, by described first for first node
Routing detail is mapped with the first label in local label pond, and by the first via by detail and the first of the first label
Mapping relations are synchronized to second node;
First obtains module, the secondary route detail of second node is obtained for first node, and bright according to secondary route
It is thin to obtain associated second mapping relations and the second mapping relations mapped second mark in second node remote tag pond
Label;
Message to be forwarded, the first label and the second label are packaged and are encapsulated for first node by sending module
Message sends encapsulated message to second node, so that second node receives and decapsulate the encapsulated message, and reflects based on first
Message after penetrating relationship and the forwarding decapsulation of the second mapping relations is to target user.
Further, described device further include:
Receiving module, if receive the encapsulated message of third node transmission for first node, the first node is connect
It receives and decapsulates the encapsulated message;
Second obtains module, and the third of the Receive message third node for the first node based on the decapsulation is reflected
Penetrate relationship and the third mapping relations mapped third label;
Third obtains module, for being obtained based on third label, the first label, the first mapping relations and third mapping relations
Third routes detail, and forwards the message of the decapsulation to target user based on third routing detail.
Further, the apparatus for forwarding message, further includes: the encapsulated message further includes the first reserved field, second
Reserved field increases field, wherein the first reserved field includes the second label, and the second reserved field includes optional Option word
Section, increasing field includes the first label.
Further, the apparatus for forwarding message, further includes:
Module is established, for when detecting message to be forwarded, first node can virtually to expand with the foundation of long-range second node
Open up the tunnel local area network VXLAN.
Further, the apparatus for forwarding message, further includes:
Judgment module turns for judging whether the message to be forwarded is three layers of forwarding when the message to be forwarded is three layers
When hair, preset corresponding routing detail is the data for including physical MAC address, IP address, wherein routing detail include the first via by
Detail and secondary route detail.
Further, judgment module includes:
First judging unit, for whether judging the message to be forwarded when the message to be forwarded is not three layers of forwarding
Forwarded for two layers of known unicast, when for two layers of known unicasts forwarding, preset corresponding routing detail be include physical MAC address
Data, wherein routing detail includes the first via by detail and secondary route detail.
Further, judgment module includes:
Second judgment unit, for whether judging the message to be forwarded when the message to be forwarded is not three layers of forwarding
For second-layer multicast forwarding;
Preset unit, for when message to be forwarded be second-layer multicast forwarding when, preset corresponding routing detail be include physics
The data of MAC Address, and the data in the preset multicast address pond of the second reserved field, the preset location pond to each group of the first reserved field
Corresponding multicast address data.
Further, judgment module includes:
Third judging unit, for whether judging the message to be forwarded when the message to be forwarded is not three layers of forwarding
For broadcast or unknown unicast forwarding;
Determination unit, for when being broadcast or unknown unicast forwards, second label to be determining default second mark
Label.
Referring to Fig. 3, Fig. 3 is the device structure schematic diagram for the hardware running environment that present invention method is related to.
Apparatus for forwarding message of the embodiment of the present invention can be PC, be also possible to smart phone, tablet computer, e-book reading
Device, MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio
Level 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert compression
Standard audio level 3) terminal devices such as player, portable computer.
As shown in figure 3, the apparatus for forwarding message may include: processor 1001, such as CPU, memory 1005, communication is always
Line 1002.Wherein, communication bus 1002 is for realizing the connection communication between processor 1001 and memory 1005.Memory
1005 can be high speed RAM memory, be also possible to stable memory (non-volatile memory), such as disk is deposited
Reservoir.Memory 1005 optionally can also be the storage device independently of aforementioned processor 1001.
Optionally, which can also include user interface, network interface, camera, RF (Radio
Frequency, radio frequency) circuit, sensor, voicefrequency circuit, WiFi module etc..User interface may include display screen
(Display), input unit such as keyboard (Keyboard), optional user interface can also include wireline interface, the nothing of standard
Line interface.Network interface optionally may include standard wireline interface and wireless interface (such as WI-FI interface).
Message is forwarded it will be understood by those skilled in the art that apparatus for forwarding message structure shown in Fig. 3 is not constituted
The restriction of device may include perhaps combining certain components or different component cloth than illustrating more or fewer components
It sets.
As shown in figure 3, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium
Believe module and message retransmission process.Operating system is to manage and control the program of apparatus for forwarding message hardware and software resource,
Support the operation of message retransmission process and other softwares and/or program.Network communication module is for realizing in memory 1005
Communication between each component in portion, and communicated between hardware and softwares other in apparatus for forwarding message.
In apparatus for forwarding message shown in Fig. 3, processor 1001 is used to execute the message stored in memory 1005 and turns
Program is sent out, is performed the steps of
First node obtains the corresponding local first via of message to be forwarded by detail, by the first via by detail and local
The first label in label pond is mapped, and the first via is synchronized to by detail and the first mapping relations of the first label
Second node;
First node obtains the secondary route detail of second node, and long-range according to secondary route detail acquisition second node
Associated second mapping relations and the second mapping relations second label of mapped in label pond;
Message to be forwarded, the first label and the second label are packaged to obtain encapsulated message by first node, send encapsulation
Message so that second node receives and decapsulate the encapsulated message, and is based on the first mapping relations and second to second node
Message after mapping relations forwarding decapsulation is to target user.
Further, the method also includes:
If first node receives the encapsulated message of third node transmission, the first node is received and is decapsulated described
Encapsulated message;
The third mapping relations and the third of Receive message third node of the first node based on the decapsulation
Mapping relations mapped third label;
Third, which is obtained, based on third label, the first label, the first mapping relations and third mapping relations routes detail, and base
Forward the message of the decapsulation to target user in third routing detail.
Further, the encapsulated message further includes the first reserved field, the second reserved field, increases field, wherein the
One reserved field includes the second label, and the second reserved field includes optional Option field, and increasing field includes the first label.
Further, the first node obtains the corresponding local first via of message to be forwarded by wrapping before detail step
It includes:
When detecting message to be forwarded, first node and long-range second node establish virtual expansible local area network VXLAN
Tunnel.
Further, the first node obtains the corresponding local first via of message to be forwarded by wrapping before detail step
It includes:
Judge whether the message to be forwarded is three layers of forwarding, it is preset corresponding when the message to be forwarded is three layers of forwarding
Routing detail is the data for including physical MAC address, IP address, wherein routing detail includes the first via by detail and the second tunnel
By detail.
Further, described to judge whether the message to be forwarded is that three layers of forwarding step include: later
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is that two layers of known unicast turn
Hair, when forwarding for two layers of known unicast, preset corresponding routing detail is the data for including physical MAC address, wherein routing is bright
It carefully include the first via by detail and secondary route detail.
Further, described to judge whether the message to be forwarded is that three layers of forwarding step include: later
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is second-layer multicast forwarding;
When message to be forwarded is second-layer multicast forwarding, preset corresponding routing detail is the data for including physical MAC address,
And the data in the preset multicast address pond of the second reserved field, the corresponding multicast address in the preset pond of location to each group of the first reserved field
Data.
Further, described to judge whether the message to be forwarded is that three layers of forwarding step include: later
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is that broadcast or unknown unicast turn
Hair;
When being broadcast or unknown unicast forwarding, second label is determining default second label.
Apparatus for forwarding message specific embodiment of the present invention and each embodiment of above-mentioned message forwarding method are essentially identical, herein
It repeats no more.
The present invention provides a kind of computer readable storage medium, the computer-readable recording medium storage have one or
More than one program of person, the one or more programs can also be executed by one or more than one processor with
In the step of realizing message forwarding method described above.
Computer readable storage medium specific embodiment of the present invention and the basic phase of each embodiment of above-mentioned message forwarding method
Together, details are not described herein.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field similarly includes in patent process range of the invention.
Claims (10)
1. a kind of message forwarding method, which is characterized in that the message forwarding method includes:
First node obtains the corresponding local first via of message to be forwarded by detail, by the first via by detail and local label
The first label in pond is mapped, and the first via is synchronized to second by the first mapping relations of detail and the first label
Node;
First node obtains the secondary route detail of second node, and obtains second node remote tag according to secondary route detail
Associated second mapping relations and the second mapping relations second label of mapped in pond;
Message to be forwarded, the first label and the second label are packaged to obtain encapsulated message by first node, send encapsulated message
To second node, so that second node receives and decapsulates the encapsulated message, and based on the first mapping relations and the second mapping
Message after relationship forwarding decapsulation is to target user.
2. message forwarding method as described in claim 1, which is characterized in that the method also includes:
If first node receives the encapsulated message of third node transmission, the first node receives and decapsulates the encapsulation
Message;
The third mapping relations of Receive message third node of the first node based on the decapsulation and third mapping
Relationship mapped third label;
Third is obtained based on third label, the first label, the first mapping relations and third mapping relations and routes detail, and based on the
Three routing details forward the message of the decapsulation to target user.
3. message forwarding method as described in claim 1, which is characterized in that the encapsulated message further includes the first reserved word
Section, increases field at the second reserved field, wherein the first reserved field includes the second label, and the second reserved field includes optional
Option field, increasing field includes the first label.
4. message forwarding method as claimed in claim 3, which is characterized in that it is corresponding that the first node obtains message to be forwarded
The local first via by including: before detail step
When detecting message to be forwarded, first node and long-range second node establish the virtual tunnel expansible local area network VXLAN.
5. message forwarding method as claimed in claim 4, which is characterized in that it is corresponding that the first node obtains message to be forwarded
The local first via by including: before detail step
Judge whether the message to be forwarded is three layers of forwarding, when the message to be forwarded is three layers of forwarding, preset corresponding routing
Detail is the data for including physical MAC address, IP address, wherein routing detail includes that the first via is bright with secondary route by detail
Carefully.
6. message forwarding method as claimed in claim 5, which is characterized in that described to judge whether the message to be forwarded is three
Include: after layer forwarding step
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is two layers of known unicast forwarding, when
When forwarding for two layers of known unicast, preset corresponding routing detail is the data for including physical MAC address, wherein routing detail packet
The first via is included by detail and secondary route detail.
7. message forwarding method as claimed in claim 5, which is characterized in that described to judge whether the message to be forwarded is three
Include: after layer forwarding step
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is second-layer multicast forwarding;
When message to be forwarded be second-layer multicast forwarding when, preset corresponding routing detail be include the data of physical MAC address, and
The data in the preset multicast address pond of the second reserved field, the corresponding multicast address number in the preset pond of location to each group of the first reserved field
According to.
8. message forwarding method as claimed in claim 5, which is characterized in that described to judge whether the message to be forwarded is three
Include: after layer forwarding step
When the message to be forwarded is not three layers of forwarding, judge whether the message to be forwarded is broadcast or unknown unicast forwarding;
When being broadcast or unknown unicast forwarding, second label is determining default second label.
9. a kind of apparatus for forwarding message, which is characterized in that the apparatus for forwarding message includes: memory, processor, communication bus
And it is stored in the message retransmission process on the memory,
The communication bus is for realizing the communication connection between processor and memory;
The processor is for executing the message retransmission process, to realize such as message described in any item of the claim 1 to 8
The step of retransmission method.
10. a kind of computer readable storage medium, which is characterized in that the computer class is read to be stored with message turn on storage medium
Program is sent out, realizes that message of any of claims 1-8 such as forwards when the message retransmission process is executed by processor
The step of method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710558908.8A CN109246012A (en) | 2017-07-10 | 2017-07-10 | Message forwarding method, device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710558908.8A CN109246012A (en) | 2017-07-10 | 2017-07-10 | Message forwarding method, device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109246012A true CN109246012A (en) | 2019-01-18 |
Family
ID=65083267
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710558908.8A Pending CN109246012A (en) | 2017-07-10 | 2017-07-10 | Message forwarding method, device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109246012A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111698165A (en) * | 2020-04-30 | 2020-09-22 | 新华三信息安全技术有限公司 | Message transmission method, device, equipment and machine readable storage medium |
CN112532593A (en) * | 2020-11-16 | 2021-03-19 | 杭州迪普科技股份有限公司 | Method, device, equipment and medium for processing attack message |
WO2021057293A1 (en) * | 2019-09-26 | 2021-04-01 | 中兴通讯股份有限公司 | Message forwarding method and apparatus in evpn, and device and storage medium |
CN114024725A (en) * | 2021-10-25 | 2022-02-08 | 全球能源互联网研究院有限公司南京分公司 | Inter-container communication method, system, electronic equipment and storage medium |
CN114500163A (en) * | 2020-10-23 | 2022-05-13 | ***通信有限公司研究院 | Communication scheduling method, device and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101316260A (en) * | 2007-05-30 | 2008-12-03 | 华为技术有限公司 | Packaging conversion method and packaging conversion equipment |
CN101674229A (en) * | 2008-09-12 | 2010-03-17 | 华为技术有限公司 | Information management method of link aggregation group and network node |
CN101848171A (en) * | 2010-07-01 | 2010-09-29 | 杭州华三通信技术有限公司 | Data transmission method based on GRE tunnel, device and system |
US20150003463A1 (en) * | 2013-06-28 | 2015-01-01 | Futurewei Technologies, Inc. | Multiprotocol Label Switching Transport for Supporting a Very Large Number of Virtual Private Networks |
CN105471737A (en) * | 2014-09-05 | 2016-04-06 | 华为技术有限公司 | Tag stack compression method and device and tag stack decompression method and device |
CN106789657A (en) * | 2016-12-23 | 2017-05-31 | 北京格林伟迪科技股份有限公司 | A kind of message forwarding method and device |
-
2017
- 2017-07-10 CN CN201710558908.8A patent/CN109246012A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101316260A (en) * | 2007-05-30 | 2008-12-03 | 华为技术有限公司 | Packaging conversion method and packaging conversion equipment |
CN101674229A (en) * | 2008-09-12 | 2010-03-17 | 华为技术有限公司 | Information management method of link aggregation group and network node |
CN101848171A (en) * | 2010-07-01 | 2010-09-29 | 杭州华三通信技术有限公司 | Data transmission method based on GRE tunnel, device and system |
US20150003463A1 (en) * | 2013-06-28 | 2015-01-01 | Futurewei Technologies, Inc. | Multiprotocol Label Switching Transport for Supporting a Very Large Number of Virtual Private Networks |
CN105471737A (en) * | 2014-09-05 | 2016-04-06 | 华为技术有限公司 | Tag stack compression method and device and tag stack decompression method and device |
CN106789657A (en) * | 2016-12-23 | 2017-05-31 | 北京格林伟迪科技股份有限公司 | A kind of message forwarding method and device |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021057293A1 (en) * | 2019-09-26 | 2021-04-01 | 中兴通讯股份有限公司 | Message forwarding method and apparatus in evpn, and device and storage medium |
CN111698165A (en) * | 2020-04-30 | 2020-09-22 | 新华三信息安全技术有限公司 | Message transmission method, device, equipment and machine readable storage medium |
CN111698165B (en) * | 2020-04-30 | 2023-12-26 | 新华三信息安全技术有限公司 | Message transmission method, device, equipment and machine-readable storage medium |
CN114500163A (en) * | 2020-10-23 | 2022-05-13 | ***通信有限公司研究院 | Communication scheduling method, device and storage medium |
CN112532593A (en) * | 2020-11-16 | 2021-03-19 | 杭州迪普科技股份有限公司 | Method, device, equipment and medium for processing attack message |
CN112532593B (en) * | 2020-11-16 | 2022-06-28 | 杭州迪普科技股份有限公司 | Method, device, equipment and medium for processing attack message |
CN114024725A (en) * | 2021-10-25 | 2022-02-08 | 全球能源互联网研究院有限公司南京分公司 | Inter-container communication method, system, electronic equipment and storage medium |
CN114024725B (en) * | 2021-10-25 | 2023-06-20 | 全球能源互联网研究院有限公司南京分公司 | Inter-container communication method, system, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109246012A (en) | Message forwarding method, device and computer readable storage medium | |
CN111193653B (en) | Data transmission method, device, equipment and storage medium | |
CN105025387B (en) | The method and system of IPTV intelligent terminal progress IPTV service and Internet service | |
JP7023989B2 (en) | Generating transfer entries | |
WO2016019287A2 (en) | Mechanism and service for device naming | |
CN107645433B (en) | Message forwarding method and device | |
CN106231001A (en) | A kind of method, apparatus and system carrying out IP address configuration | |
WO2017215390A1 (en) | Method and device for selecting data forwarding port of longitudinal stack system | |
CN103430621A (en) | Method and system of providing internet protocol (IP) data communication in a NFC peer to peer communication environment | |
US20150181499A1 (en) | Communication apparatus, communication method, and communication system | |
US11595306B2 (en) | Executing workloads across multiple cloud service providers | |
CN101800781A (en) | Tunnel transition method and system for passing through NAT | |
CN106878136A (en) | A kind of message forwarding method and device | |
CN105634901A (en) | MAC address information synchronization method and device based on CAS VXLAN | |
CN109196842A (en) | A kind of session keeping method, equipment and storage medium | |
CN103491153A (en) | Method, equipment and peer-to-peer network system for data sharing | |
CN109787900B (en) | Transmission method, device, equipment and machine readable medium | |
CN104349202B (en) | Video acquiring method and device | |
CN106130867B (en) | Virtual machine communication method and device across data center | |
CN111954162B (en) | Method for realizing wireless screen transmission through autonomous networking among multiple devices, screen transmission end and receiving end | |
US20200137153A1 (en) | Method for establishing peer to peer service session over infrastructure link | |
CN116566897A (en) | Addressing routing method, device, equipment and medium | |
WO2022007749A1 (en) | Data transmission method and apparatus | |
Martin et al. | A future-proof application-to-network interface | |
CN111200472B (en) | Data synchronization method of new network access equipment |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190118 |