Embodiment
As stated in the Background Art, in existing ring network structure, the transmission of two laminar flow amounts can directly be carried out between each node, and visits outer net if desired, so, just can realize as long as do the three-layer network pass by connection router on the node in network.But complicated along with network design, the frequency of visit and all raisings greatly of possibility mutually between the node in different broadcast domains, like this, the bandwidth resources that just can take on the ring are transmitted in the inside of three a large amount of laminar flow amounts, if for this network is transformed, then can be improved corresponding design and networking cost.
In order to solve such problem, reduce the bandwidth occupancy of this part, the present invention proposes the method that a kind of message that is used for two layers of looped network is transmitted, the mode that can heavily encapsulate by message, needs are forwarded to the data flow short circuit of three-layer network pass, directly realize the message forwarding between the node, avoided the three-tier message intercommunication the bandwidth occupancy on the looped network.
As shown in Figure 3, the schematic flow sheet of the method that a kind of message that is used for two layers of looped network that proposes for the present invention is transmitted specifically may further comprise the steps:
Step S301, identification meets the message of heavy packing rule in the message that receives.
Wherein, in concrete enforcement scene, heavy packing rule is specially:
The message that port receives has identical target MAC (Media Access Control) address with the message that receive the another port, and opposite each other source IP address and purpose IP address.
If recognize such message, then execution in step S302 if do not recognize, then continues execution in step S301.
By the identification of above-mentioned heavy packing rule, can find needs in two layers of looped network to close the three-tier message of transmitting through three-layer network, is defined as the object that can heavily encapsulate.
Whether the message that step S302, detection recognize reaches and heavily encapsulates trigger condition.
Wherein, in concrete enforcement scene, the heavily encapsulation trigger condition here comprises two kinds of situations:
Condition one, receive that the total flow of the message that meets heavy packing rule that the port of the message that meets heavy packing rule is received reaches threshold value.
Condition two, receive that the flow of the message that meets heavy packing rule that any one port of the message that meets heavy packing rule is received reaches threshold value.
Certainly; if there are other heavily encapsulation trigger conditions that can reach constructed effect can be applied to the present invention equally; concrete which kind of condition that adopts determines that according to the scene needs of reality the difference of determined heavy encapsulation trigger condition can't influence protection scope of the present invention.
If testing result is to reach heavily to encapsulate trigger condition, then execution in step S303 on the contrary, if do not reach, then proceeds relevant detection.
Step S303, obtain associated MAC Address, the vlan information in purpose IP address of the message that meets heavy packing rule.
In concrete application scenarios; obtaining like this can be to inquire about according to corresponding forwarding-table item or route table items; also can be to obtain mutually in the message in groups that in step S301, is recognized; the MAC Address and the vlan information conduct that are about to the transmitting terminal of first message are satisfied the MAC Address and the vlan information of the pairing destination of another message of heavy packing rule with it; in actual applications; concrete which kind of mode that adopts is obtained, and can't influence protection scope of the present invention.
Step S304, the target MAC (Media Access Control) address and the vlan information that will meet in the message that weighs packing rule replace to the associated MAC Address in purpose IP address, vlan information to generate heavy encapsulated message.
Before and after heavy encapsulation process, the entrained change in information of corresponding message contrasts as shown in Table 1 and Table 2:
The entrained information of message before the heavy encapsulation process of table 1
Information project |
The information content |
Source MAC |
The MAC Address of message sending node |
Target MAC (Media Access Control) address |
The MAC Address that three-layer network closes |
Source IP address |
The IP address of message sending node |
Purpose IP address |
The IP address of message receiving node |
Vlan information |
The pairing vlan information of message sending node |
The entrained information of message after the heavy encapsulation process of table 2
Information project |
The information content |
Source MAC |
The MAC Address of message sending node |
Target MAC (Media Access Control) address |
The MAC Address of message receiving node |
Source IP address |
The IP address of message sending node |
Purpose IP address |
The IP address of message receiving node |
Vlan information |
The pairing vlan information of message receiving node |
Step S305, in the transmitting of the vlan information correspondence of described heavy encapsulated message, the purpose IP address corresponding port of searching described heavy encapsulated message forwards described heavy encapsulated message by the port that finds.
Heavily after the encapsulation, corresponding message no longer needs to transmit to the three-layer network pass, but directly carries out short circuit at network device internal, and transmits by outbound port, and the message of finishing in the technical program is transmitted processing.
Compared with prior art, the present invention has the following advantages:
By using technical scheme of the present invention, two nodes (as client and server) of looped network inside thus between the three-tier message sent out mutually no longer need to deliver to three-layer network and put row into and transmit, can finish smoothly under the situation of forwarding not influencing message, avoid too much bandwidth to be transmitted shared by the message of three layer intercommunications, improved bandwidth availability ratio, saved the transfer resource of system, and, message forwarding efficient improved.
In order further to set forth technological thought of the present invention, existing in conjunction with concrete application scenarios, technical scheme of the present invention is described.
The crucial thinking of technical scheme proposed by the invention is: on ring network structure of the prior art, owing to the problem that bandwidth resources take on the ring that causes is transmitted in the inside of three laminar flow amounts, if can adjust partial discharge, it is not closed by three-layer network, but directly between node, carry out double layer intercommunication, just can reduce taking for bandwidth resources.In the scene for example shown in Figure 2, the flow between Users and the Server is only transmitted between DUT1 and DUT2, and do not used three layers of notion, so just can avoid flow the taking between Users and the Server the bandwidth between DUT1 and the DUT3.
If realize such processing, keep the processing mode of existing user or server simultaneously to greatest extent, just need encapsulated message again.After the three-tier message that needs between the node on the looped network to transmit encapsulated again, just can in two layers looped network, transmit, and when under the message of two layers of forwarding, encircling, can handle by corresponding, remove the form that encapsulation recovers original three-tier message, pass to destination node.
The embodiment of the invention also is applicable to HVRP ring, big two layers of looped network such as RRPP ring according to the technical scheme that above-mentioned technical thought proposed.The difference of using the looped network type can not influence protection scope of the present invention.
The realization key point of such technical scheme has 2, basis for estimation and message encapsulation.
Below, in conjunction with concrete application scenarios as shown in Figure 4, the selection of concrete basis for estimation and the implementation of message encapsulation are described.
As shown in Figure 5, the schematic flow sheet of the method for a kind of concrete application scenarios message forwarding that is used for two layers of looped network down that proposes for the embodiment of the invention specifically may further comprise the steps:
The flow of each port of step S501, DUT1 detection self.
As shown in Figure 2, the message between Users and the Server is transmitted according to three layers of pass-through mode, needs could arrive destination node behind the pile warp Router, and therefore, the bandwidth between PORT2 and the PORT3 is occupied.
Step S502, DUT1 judge whether self port exists the message of meet the requirements (being aforesaid heavy packing rule).
Requirement herein refers to that specifically two ports of DUT1 receive and have identical target MAC (Media Access Control) address and the opposite source IP address and the three-tier message of purpose IP address.
With reference to the explanation among the step S301, in fact such three-tier message is exactly to be in two layers of looped network to need between two equipment (Users and Server) of different broadcast domains to close the three-tier message of transmitting by three-layer network, and to close the message of transmitting by three-layer network between Users and the Server be to close by delivering to three-layer network on same the equipment DUT1.That is, the three-tier message that Server the sends to User at first broadcast domain (VLAN30 in as Fig. 4) at the Serverr place is forwarded to three-layer network and closes, and DUT1 participates in one of equipment of transmitting in this repeating process; Three-layer network closes and at User place broadcast domain (as Fig. 4 VLAN20) message to be forwarded to User afterwards, finally finish Server send to User to three-tier message transmit.Otherwise User sends to the three-tier message that Server sends to also will pass through similar repeating process, and DUT1 participates in one of equipment of transmitting.Therefore, as shown in Figure 2, DUT1 can receive on PORT7 and PORT4 and receive that respectively Server issues the message of User and the message that User sends to Server, and the message that these two ports are received forwards (because the target MAC (Media Access Control) address in the message all is the purpose MAC that three-layer network closes) by Port3, but the source IP between the message is opposite with purpose IP.
Therefore, the message that receives among the PORT4 of DUT1 judgement self and the PORT7 meets the condition that heavily encapsulates, and continues execution in step S503.
Certainly, if there is not such message, then returns step S501 and proceed relevant detection.
Concrete, such detection can be periodically to carry out, and also can carry out always, the variation of concrete executive mode can not change protection scope of the present invention.
Concrete, the content of message that PORT7 and PORT4 receive is summarized as follows:
The content of message that sends to Users by Server that receives in PORT7 is:
Source mac (source MAC): 0-0-1 (MAC Address of Server)
Dest mac (purpose MAC): 00e0-fc00-0001 (MAC Address that three-layer network closes)
Source ip (source IP): 20.1.1.100 (the IP address of Server)
Dest ip (purpose IP): 30.1.1.100 (the IP address of User)
Vlan tag id: 20 (the VLAN ID of Server place VLAN)
The content of message that sends to Server by Users that receives in PORT4 is:
Source mac (source MAC): 0-0-2 (MAC Address of User)
Dest mac (purpose MAC): 00e0-fc00-0001 (MAC Address that three-layer network closes)
Source ip (source IP): 30.1.1.100 (the IP address of User)
Dest ip (purpose IP): 20.1.1.100 (the IP address of Server)
Vlan tag id: 30 (the VLAN ID of User place VLAN)
Wherein, the target MAC (Media Access Control) address 00e0-fc00-0001 of the message that two ports are received is the MAC Address of gateway, and source IP address is opposite with purpose IP address, this shows, two above-mentioned messages that PORT7 and PORT4 receive are satisfactory messages.
Step S503, DUT1 judge whether to satisfy and heavily encapsulate trigger condition.
Be this class herein and judge,, can not influence other professional normal transmission, then can not weigh encapsulation process, return step S501 if the flow of this class three-tier message is very little by the flow that three-layer network closes the three-tier message of transmitting.
On the contrary, if flow has surpassed certain threshold value (being heavily encapsulation trigger condition given among the above-mentioned steps S302), then trigger corresponding heavy encapsulation process, execution in step S504, trigger DUT1 and carry out the heavily encapsulation of message, to avoid three laminar flow amounts additionally taking bandwidth.
With reference to the explanation among the step S302, heavily encapsulation trigger condition herein can be selected aforesaid condition one or condition two, and trigger condition herein can be divided into following two kinds equally:
(1) if DUT1 judge receive among the PORT7 by Server send to receive among the message of Users and the PORT4 by Users send to Server message flow and surpassed predetermined threshold value, so, DUT1 determines two kinds of above-mentioned messages are triggered heavy encapsulation operation.
(2) if DUT1 judge receive among the PORT7 send to sending in the flow of message of Server by Users of receiving among the flow of message of Users or the PORT4 by Server any one surpassed predetermined threshold value, so, DUT1 determines corresponding message is triggered heavy encapsulation operation.
Concrete which kind of condition that adopts determines that according to the scene needs of reality the difference of determined condition can't influence protection scope of the present invention.
Step S504, DUT1 obtain associated MAC Address, the VLAN ID in purpose IP address of satisfactory message.
Determine to what PORT7 was received to be example by Server to the heavy encapsulation operation of message triggering that Users sends with DUT1, in this step, the information that DUT1 need obtain comprises target MAC (Media Access Control) address and the VLAN ID that the purpose IP address of Users is associated.
Promptly heavy encapsulation operation information needed, in the technical scheme of the embodiment of the invention, the main information that heavy encapsulation operation need be revised is MAC Address and VLAN ID.
The obtain manner of above-mentioned information can be to inquire about according to corresponding forwarding-table item or route table items; also can be in step S502, recognized satisfactory in groups message (be PORT4 receive by Users to message that Server sends) in obtain; in actual applications; concrete which kind of mode that adopts is obtained, and can't influence protection scope of the present invention.
After finishing above-mentioned information and obtaining, heavy encapsulation process and handle after the needed information of send mode just ready.
If determine the message that is sent to Server by Users is triggered heavy encapsulation process, the type of then obtaining information accordingly can be with reference to above-mentioned explanation, specifically repeated description no longer.
Step S505, DUT1 replace to the associated MAC Address in purpose IP address, VLAN ID with target MAC (Media Access Control) address in the satisfactory message and VLAN ID, and message has been finished heavily encapsulation.
When DUT1 receives when sending to the message of Users by Server by PORT7,, directly corresponding message content is carried out as shown in Figure 6 modification according to the information that gets access among the step S504.
Step S506, DUT1 transmit the message after the heavily encapsulation.
Message after DUT1 directly will heavily encapsulate sends by PORT4, directly sends to Users through DUT2.
The corresponding forwarding in pairing the transmitting of VLANID that port specifically can be the message after heavily encapsulating finds, and the foundation of searching can be the purpose IP address of the message after heavily encapsulating.Reason is, after DUT1 heavily encapsulates message, the message that DUT1 no longer sends Server is forwarded to three-layer network and closes in the VLAN20 at Server place, but DUT1 directly is forwarded to Users according to the VLAN ID 30 in the heavy encapsulated message in the VLAN30 of Users place.
By above-mentioned processing procedure, original forward-path as shown in Figure 2 changes to forward-path as shown in Figure 7, corresponding three laminar flow amounts no longer need the pile warp three-layer network to close (Router), can not take the bandwidth between DUT1 and the DUT3 again, effectively raise bandwidth availability ratio and message forwarding efficient.
Compared with prior art, the present invention has the following advantages:
By using technical scheme of the present invention, to between the node of two layers of looped network inside, close the forwarding three-tier message by heavily encapsulation by three-layer network, message can be transmitted in the VLAN at recipient place, thereby, can finish smoothly under the situation of forwarding not influencing message, avoid too much bandwidth to be required closing the three-tier message of transmitting shared by three-layer network, improved bandwidth availability ratio, saved the transfer resource of system, and, message forwarding efficient improved.
In order to realize technical scheme of the present invention, based on aforesaid explanation, the invention allows for a kind of network equipment that message is transmitted in two layers of looped network, its structural representation is as shown in Figure 8, this network equipment comprise a plurality of ports 81 be used to receive/E-Packet, and further comprise with lower module:
Identification module 82, the message identification that is used for receiving at each port 81 meets the message of heavy packing rule;
Detection module 83 is used for when forwarding module 86 identification modules 82 recognize the message that meets heavy packing rule, and whether detection forwarding module 86 messages reach and heavily encapsulate trigger condition;
Acquisition module 84, the testing result that is used at forwarding module 86 detection modules 83 is to reach when heavily encapsulating trigger condition, obtains associated MAC Address, the vlan information in purpose IP address of the message that meets heavy packing rule;
Heavy package module 85 is used for replacing to the associated MAC Address in the accessed purpose IP address of forwarding module 86 acquisition modules 84, vlan informations (as VLAND ID) to generate heavy encapsulated message with meeting the target MAC (Media Access Control) address of message of heavy packing rule and vlan information;
Forwarding module 86, the transmitting of vlan information correspondence that is used for the heavy encapsulated message that generated at forwarding module 86 heavy package modules 85, search the purpose IP address corresponding port 81 of forwarding module 86 heavy encapsulated messages, forwarding module 86 heavy encapsulated messages are forwarded by the port 81 that finds.
Wherein, forwarding module 86 identification modules 82 specifically are used for:
Discern the message that each port receives and whether have the message that meets following heavy packing rule:
The message that port receives has identical target MAC (Media Access Control) address with the message that receive the another port, and opposite each other source IP address and purpose IP address.
Further, forwarding module 86 detection modules 83 specifically are used for:
Whether the message that meets heavy packing rule that detection identification module 82 is recognized reaches following heavily encapsulation trigger condition:
Two received total flows that meet the message that weighs packing rule of port reach threshold value; Or,
The flow of the message that meets heavy packing rule that any one port is received reaches threshold value.
Compared with prior art, the present invention has the following advantages:
By using technical scheme of the present invention, two ports of the network equipment of two layers of looped network receive that other two equipment send in two layers of looped network need close the three-tier message of transmitting by three-layer network the time, by this class three-tier message is heavily encapsulated, message can be transmitted in the VLAN at recipient place, avoided this class three-tier message to transmit the bandwidth that takies because of needing three-layer network to close, improve bandwidth availability ratio, saved the transfer resource of system.
Based on above-mentioned technical scheme, the present invention is in the enterprise network networking, and the three-tier message of sending out mutually between server and the client no longer needs to transmit by three-tier message, does not also need again planning network to make the server and client side in same broadcast domain.Therefore the present invention has not only improved bandwidth availability ratio, can not increase the networking cost of client's enterprise network simultaneously because of planning network again.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by hardware, also can realize by the mode that software adds necessary general hardware platform.Based on such understanding, technical scheme of the present invention can embody with the form of software product, it (can be CD-ROM that this software product can be stored in a non-volatile memory medium, USB flash disk, portable hard drive etc.) in, comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) each implements the described method of scene to carry out the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is a preferred schematic diagram of implementing scene, module in the accompanying drawing or flow process might not be that enforcement the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device of implementing in the scene can be distributed in the device of implementing scene according to implementing scene description, also can carry out respective change and be arranged in the one or more devices that are different from this enforcement scene.The module of above-mentioned enforcement scene can be merged into a module, also can further split into a plurality of submodules.
The invention described above sequence number is not represented the quality of implementing scene just to description.
More than disclosed only be several concrete enforcement scene of the present invention, still, the present invention is not limited thereto, any those skilled in the art can think variation all should fall into protection scope of the present invention.