Data flow transmission method and device
Technical field
The present invention relates to the communications field, in particular to a kind of data flow transmission method and device.
Background technology
Along with developing rapidly of network technique, ensure the stability ever more important of Internet Transmission, in the prior art, propose certain methods, make when network failure, fast quick-recovery transport service can be ensured, wherein, the port handoff technique of web-transporting device is comprised.
Fig. 1 is the transmission schematic diagram of data flow before switching according to the web-transporting device port of prior art, Fig. 2 is the transmission schematic diagram of data flow after switching according to the web-transporting device port of prior art, below in conjunction with the method that Fig. 1, Fig. 2 are switched by network in concrete case introduction prior art.
As shown in Figures 1 and 2, this example comprises two Layer 2 switch (Switch1 and Switch2), Swich1 has three port: Port11, Port12 and Port13, Switch2 has three port: Port21, Port22 and Port23, above-mentioned all of the port all belongs to same virtual local area network (being set as vlan10), because middle 4 ports constitute one " ring ", so need the same upper-layer protocol of similar Spanning-Tree Protocol to block a port, loop is broken, at this, we suppose that the port got clogged is Port 13, after breaking ring by upper-layer protocol, whole network can normally work.
As shown in Figure 1, before port switches, forwarding data flow is represented by the curve with arrow, and send out a data flow from Port11, the object mac address that these data are stayed is: 00.00.00.00.00.02, and mac address, source is: 00.00.00.00.00.01; The mac address sending out an entry from Port21 is: 00.00.00.00.00.01, and mac address, source is: the data flow of 00.00.00.00.00.02, switch can learn following mac address after such network stabilization:
Switch1:mac=0x000000000001 vlan=10Port=11
mac=0x000000000002 vlan=10Port=12
Switch2:mac=0x000000000001 vlan=10Port=22
mac=0x000000000002 vlan=10Port=21
If now there is transmission fault in the link of Port12, flow just should be switched on the present Port13 blocked and forward, but according to the principle that two layers forward, need to search whether there is this mac address of other port bindings, if found, then stream compression is dealt on the port of binding, if searched less than just inundation in vlan10.
Port due to the mac=0x000000000002 learnt at Switch1 is Port12, so port occurs that transmission fault in a flash, flow still can go to Port12, only has and this address is deleted, and allows data flow search mac failure, then inundation in vlan10, and the blocked state of Port13 is removed, data flow just can arrive opposite end Port23, after opposite end Port23 learns new mac address, flow also can be switched on Port23, and after switching, data stream transmitting situation is as Fig. 2.
Action important in above-mentioned handoff procedure is: delete mac address, data traffic is flooded to other and is on the port of forwarding state, if but the mac address on this time port is very many, the time of software and hardware deletion mac will become the bottleneck of switch speed, such as, time mac address is less, 1ms just can complete switching action, if but mac address is a lot, more than 200ms may be needed just to complete switching, very large on transmission performance impact, and in prior art, at present effective solution is not yet proposed.
Summary of the invention
For lacking effective solution in prior art, certain port solved due to web-transporting device is deleted overlong time, port that binding MAC address expends and was switched slowly and the problem affecting transmission performance caused and propose the present invention, for this reason, main purpose of the present invention is to provide a kind of data stream transmitting scheme, to solve the problem one of at least.
According to an aspect of the present invention, provide a kind of data flow transmission method, for transmitting data stream on a communication network, wherein, described telecommunication network comprises multiple web-transporting device with multiple port.
Data flow transmission method according to the present invention comprises: before one or more MAC Address of a port of deleting network transmission equipment, for port arranges a mark, wherein, above-mentioned mark be used to indicate the destination address of current transmission be above-mentioned one or more MAC Address data flow at other port inundations of this web-transporting device; Delete one or more MAC Address of above-mentioned port.
Further, after one or more MAC Address of deleting above-mentioned port, the method also comprises: the mark cancelling above-mentioned port.
Preferably, the one or more MAC Address needing to delete above-mentioned port are determined in a case where: detect that the communication link that above-mentioned port connects breaks down.
Preferably, when the communication link detecting that above-mentioned port connects breaks down, the method also comprises: the standby port starting above-mentioned port.
According to another aspect of the present invention, provide a kind of data stream transmitting device, be arranged on there is multiple port web-transporting device on.
Data stream transmitting device according to the present invention comprises: detection module, mark arrange module and removing module, wherein, whether detection module, for there being the port needing to delete one or more MAC Address in multiple ports of Sampling network transmission equipment, if had, then trigger arranges module; Mark arranges module, for for needing the port deleting one or more MAC Address to arrange a mark, wherein, this mark be used to indicate the destination address of current transmission be above-mentioned one or more MAC Address data flow at other port inundations of above-mentioned web-transporting device, be provided with rear triggering removing module; Removing module, for deleting one or more MAC Address of above-mentioned port.
Preferably, this device also comprises: port starts module, during for detecting the one or more MAC Address needing to delete port at detection module, starts the standby port of this port.
Preferably, this device also comprises: mark cancels module, for delete above-mentioned port at removing module one or more MAC Address after, cancel the mark of this port.
Pass through the present invention, adopt before the MAC Address of certain port deleting network transmission equipment, for port arranges the mark of a forced flooding, the destination address of current transmission is data flow other port inundations at web-transporting device of MAC Address to be deleted by instruction, and then delete the MAC Address of port, just traffic flood is carried out after solving in prior art the MAC Address of deleting non-working port, because deletion action expends time in possible long, the problem affecting the promptness of data stream transmitting caused, and then ensure that data flow can be transmitted in time in port handoff procedure.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the transmission schematic diagram of data flow before switching according to the web-transporting device port of prior art;
Fig. 2 is the transmission schematic diagram of data flow after switching according to the web-transporting device port of prior art;
Fig. 3 is the flow chart of the data flow transmission method according to the embodiment of the present invention;
Fig. 4 is the flow chart of data stream transmitting according to the preferred embodiment of the invention;
Fig. 5 is the structural representation of the data stream transmitting device according to the embodiment of the present invention.
Embodiment
Functional overview
In embodiments of the present invention, before one or more MAC Address of certain port of deleting network transmission equipment, by arranging forced flooding mark for this port, the current destination address transmitted is data flow other port inundations at this network equipment of above-mentioned one or more MAC Address by instruction, one or more MAC Address of this port are deleted again after forced flooding mark is set, even if thus ensure that deleting MAC address overlong time, data flow also can be made to transmit in time.
Hereinafter also describe the present invention in detail with reference to accompanying drawing in conjunction with the embodiments.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
Embodiment of the method
According to embodiments of the invention, provide firstly a kind of data flow transmission method, for transmitting data stream on a communication network, wherein, telecommunication network comprises multiple web-transporting device with multiple port.
Fig. 3 is the flow chart of the data flow transmission method according to the embodiment of the present invention, and as shown in Figure 3, the flow process of the method comprises (step 302-step 304):
Step 302, before one or more MAC Address of some ports of deleting network transmission equipment, for this port arranges a mark, wherein, this mark be used to indicate the destination address of current transmission be above-mentioned one or more MAC Address data flow at other port inundations of above-mentioned web-transporting device;
Step 304, delete one or more MAC Address of above-mentioned port.
The process details of above steps is described below respectively.
(1) step 302
Preferably, the communication link connected due to above-mentioned port breaks down, data flows congestion cannot send at above-mentioned port, data flow is needed to be sent by other ports, the method that the embodiment of the present invention provides is by arranging forced flooding mark for non-working port, indicate this data flow at other port inundations of transmission equipment, namely this data flow (except receiving the interface of this data flow) is sent by all of the port in transmission equipment, therefore when detecting that the communication link of this port breaks down, need other ports starting transmission equipment, the particularly standby port of this non-working port.
In concrete implementation process, web-transporting device can search the one or more MAC Address values whether other ports have also bound non-working port, but no matter whether have found other ports qualified, as long as be provided with forced flooding mark, will in this data flow of all of the port inundation of this web-transporting device, like this, no matter non-working port how many MAC Address are bound, as long as forced flooding mark just can the data flow of all destination addresses of inundation, thus ensure that all data flow can be transmitted in time.
(2) step 304
Mark is being set, after designation data stream forced flooding, data flow is at all of the port inundation of web-transporting device on the one hand, on the other hand, start one or more MAC Address of deleting non-working port, data stream transmitting and deletion non-working port MAC Address are synchronously carried out, even if MAC Address therefore to be deleted is too much, data flow also can not be made to be trapped in non-working port.
Preferably, after all MAC Address of non-working port are deleted, it is the mark of this non-working port setting before cancellation, forced flooding terminates, now, certain port (may be the standby port of non-working port) has learnt the target MAC (Media Access Control) address of data flow, and the transmission of data flow is switched to the new port of study to target MAC (Media Access Control) address from non-working port before, and port has switched.
Below in conjunction with the application scenarios shown in Fig. 1 and Fig. 2, be described in detail by the implementation procedure of specific embodiment to the embodiment of the present invention.
Fig. 4 is the flow chart of data stream transmitting according to the preferred embodiment of the invention, and as shown in Figure 4, this flow process comprises (step 401-step 405):
The communication link that step 401, port Port 12 connect breaks down, and now packet loss appears in data stream transmitting;
Step 402, start standby port Port 13, Port 13 is changed over transmission state by blocked state, now data stream transmitting remains unchanged packet loss;
Step 403, forced flooding mark is set for port Port 12, after setting completed, the data flow of all target MAC (Media Access Control) address of this port binding of inundation, data stream transmitting is normal;
All MAC Address of step 404, deletion port Port 12, data stream transmitting is normal;
Most of the time needed for port switching all consumes in step, and in prior art, owing to not having inundation data flow before deleting MAC address, therefore, in this link, data flow is still blocked in port Port 12.
The MAC Address of step 405, port Port 12 is deleted complete, cancels the forced flooding mark of port Port 12.
Device embodiment
According to embodiments of the invention, provide a kind of data stream transmitting device, be arranged on there is multiple port web-transporting device on.
Fig. 5 is the structural representation of the data stream transmitting device according to the embodiment of the present invention.As shown in Figure 5, this device comprises: detection module 51, mark arrange module 52 and removing module 53, wherein, detection module 51, for whether there being the port needing to delete one or more MAC Address in multiple ports of Sampling network transmission equipment, if had, then trigger arranges module 52; Mark arranges module 52, for arranging a mark for above-mentioned port, wherein mark is used to indicate the destination address of current transmission is that the data flow of above-mentioned one or more MAC Address triggers removing module 53 after other port inundations of web-transporting device are provided with; Removing module 53, for deleting one or more MAC Address of above-mentioned port.
Preferably, this device can also comprise: port starts module 54, for when the one or more MAC Address needing to delete above-mentioned port is measured in detection module inspection 51, starts the standby port of above-mentioned port.
Preferably, this device can also comprise: mark cancels module 55, after deleting described one or more MAC Address at removing module 53, cancels the mark being used to indicate traffic flood of this port.
It should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the flow chart of accompanying drawing, and, although show logical order in flow charts, but in some cases, can be different from the step shown or described by order execution herein.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
By at least one technical scheme that the embodiment of the present invention provides, before one or more MAC Address of certain port of deleting network transmission equipment, for this port arranges forced flooding mark, the current destination address transmitted is indicated to be data flow other port inundations at this network equipment of above-mentioned one or more MAC Address, one or more MAC Address of this port are deleted, even if thus ensure that deleting MAC address overlong time also can not affect the promptness of data stream transmitting after forced flooding mark is set.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.