Background technology
The ethernet ring network automatic protective system is linked to each other by a plurality of nodes and constitutes ring; wherein; can define a plurality of territories on the ring; comprise host node and transmission node in the territory; and the protection of one group of this territory be used for professional VLAN (Virtual Local AreaNetwork abbreviates VLAN as) that user data transmits and the control VLAN that is used for the protocol massages forwarding.For a special domain, protected service VLAN is called the protection service VLAN, and the port on two rings of host node is defined as master port respectively and from port.Host node sends link health detection frame from master port, is receiving link health detection frame from port if link is intact.When link is intact; host node blocks the protection service VLAN forwarding capability from port; when link occurs fault; relieving is from the protection service VLAN forwarding capability of port; and host node sends the Link State notification frame when link switchover; transmission node upgrades medium access control (media access control the abbreviates MAC as) address table of ring upper port after receiving the Link State notification frame, the user data in the protection service VLAN is according to new path transmission.The ethernet ring network automatic protective system has guaranteed that the protection service VLAN can not form loop, has prevented because " broadcast storm " that loop causes.When on a physical rings, only having an independent territory; the link switchover convergence time of ethernet ring network automatic protective system can reach in 50 milliseconds; but under the single domain situation, the protection service VLAN data can not by host node from port transmission, greatly wasted link bandwidth.When having a plurality of territory on the physical link; the protection service VLAN data of same area can be by different path transmission; made full use of link bandwidth; but the link switchover convergence time of ethernet ring network automatic protective system is the stack of a plurality of territory link switchover convergence times; when the ring co-domain during many or loop more complicated; usually can reach more than the hundreds of millisecond; make and to satisfy next-generation communication network (Next generation network well; abbreviate NGN as); Web TVs (Internet protocol television abbreviates IPTV as) etc. are professional to the network high reliability; the requirement of high real-time.
In order to make full use of link bandwidth, in the actual networking of ethernet ring network automatic protective system, usually the service VLAN on the same physical rings is divided into many group protection service VLAN, every group of protection service VLAN protected with different ethernet ring network territories.
Fig. 1 is the topological structure of ethernet ring network; wherein; telephone net node S1, S2, S3, S4 have formed ethernet ring network; a plurality of service VLAN on each node, have been disposed; if there is not the ethernet ring network automatic protective system; these VLAN will form loop so, cause " broadcast storm " thus cause network unavailable.
These service VLAN are divided into two groups, protect by territory 1 and territory 2 respectively.In territory 1, node S2 is a host node, and the master port of host node is a port one, is port 2 from port, and node S1, S3, S4 are transmission nodes; In territory 2, node S2 is a host node, and the master port of host node is a port 2, is port one from port, and node S1, S3, S4 are transmission nodes.
When link was intact, the protection service VLAN data forwarding function of the port 2 of node S2 had been blocked in territory 1, and the protection service VLAN in territory 1 can not be by port 2 transmission of S2.Though territory 1 has been avoided forming loop in the protection service VLAN by the port 2 that blocks node S2; but when there not being territory 2, that is, and when only having a territory on this physics loop; do not have business datum on the link between node S2 and the S4, making has greatly wasted link circuit resource.In order to make full use of link circuit resource, dispose the ethernet ring network multiple domain in actual applications usually.For territory 2; when link is intact; the protection service VLAN data forwarding function of blocking the port one of node S2; the protection service VLAN in territory 2 can not avoid forming loop in the protection service VLAN, and the protection service VLAN data in territory 2 can be by the port 2 of node S2 by the port one transmission of S2; promptly; on the link between node S2 and the S4, transmit, realized load balancing, made full use of link circuit resource.
When link occurs fault; for example; during link occurs fault among Fig. 1 between node S3 and the S4; the ethernet ring network automatic protective system detects the laggard line link troubleshooting of link failure; host node is decontroled the protection service VLAN forwarding capability from port; go up transmission link failure state notifying frame to ring; and the mac address table of renewal ring upper port; transmission node is after receiving the link failure state notifying frame that host node sends; upgrade the mac address table of ring upper port; the protection service VLAN data can by host node from port transmission, having guaranteed has a logic approach that can be communicated with between two nodes.During link failure; host node still sends link health detection frame from master port; if receiving link health detection frame from port; then think link-recovery; host node blocks the protection service VLAN forwarding capability from port; go up transmission link-recovery state notifying frame to ring; and the mac address table of renewal ring upper port; transmission node is after receiving the recovering state state notifying frame that host node sends; upgrade the mac address table of ring upper port; the data of protection service VLAN can be by original faulty link transmission; can not by host node from port transmission; guaranteed to have only a logic approach that can be communicated with between two nodes, can not form and open circuit or loop.
During ethernet ring network automatic protective system handle link fault, the data of protection service VLAN can not be transmitted by faulty link, only at the protection service VLAN forwarding capability of host node relieving from port, and ring is gone up after the node updates ring upper port mac address table, the data of protection service VLAN could be by the transmitting from port of host node, and the host node in the territory is decontroled and gone up node updates ring upper port mac address table from the protection service VLAN forwarding capability of port and ring and can be time sequencing arbitrarily; When ethernet ring network automatic protective system handle link is recovered; there is the transmission path of two connections physically in the data of protection service VLAN; at the protection service VLAN forwarding capability of host node obstruction from port; and ring is gone up after the node updates ring upper port mac address table; the data of protection service VLAN can not form loop; therefore; be necessary for the protection service VLAN forwarding capability of first host node obstruction from port; ring is gone up node updates ring upper port mac address table then, and both time sequencings can not be put upside down.
In addition, encircle in the networking at single domain more, a link switchover meeting produces a plurality of Link State notification frame, and node needs to upgrade the port mac address table after receiving the Link State notification frame at every turn on the ring, and a link switchover meeting causes ring to go up node and repeatedly repeats hardware operation is upgraded the port mac address table.
Because the restriction of hardware handles ability, the mac address table that upgrades port is more consuming time, and the MAC Address of only upgrading some VLAN on the port is not saved time than upgrading on this port all address tables.When Ethernet ring protection system was carried out link switchover, node repeatedly repeated hardware operation is upgraded the mac address table of port on the ring, accumulated consuming time very longly, sometimes even reach the hundreds of millisecond, was unfavorable for the quick switching of Ring protection system.
Therefore, need a kind of Ethernet ring protection method that can restrain fast.
Summary of the invention
Consider the problems referred to above and make the present invention that for this reason, main purpose of the present invention is to provide a kind of ring protection processing method.
This method may further comprise the steps: each node is enabled timer, regularly the address update mode of port is inquired about; When node processing link, address update mode that will updated port is set at the address and upgrades preparing state; And the address update mode that timer inquires port is after preparing state is upgraded in the address, upgrades the comparative result of guard time according to link switchover type and current time and difference and the address that will upgrade update time last time of port, upgrades the port processing.
Wherein, link switchover type comprises that link failure switches and link-recovery switches.
In addition, in the link switchover type is under the situation of link failure switching, when node processing link, address update mode that will updated port is set at the address and upgrades the step of preparing state and comprise: detect the host node in the node notice territory of link failure, the professional VLAN forwarding capability of protection that blocks the corresponding port of faulty link, upgrade the Media Access Control Address table of the corresponding port of faulty link, and recording address update time; After host node detects link failure, decontrol the professional VLAN forwarding capability of the protection from port of host node, transmission node on ring sends link failure state notifying frame, and the master port address update mode of host node is set at address renewal preparing state; And after transmission node receives link failure state notifying frame, the address update mode of ring upper port is set at the address upgrades preparing state.
In link switchover is under the situation of link failure switching; the comparative result that upgrades guard time according to link switchover type and current time and difference and the address that will upgrade update time last time of port upgrades port to be handled and comprises: when the described current time with the difference that will upgrade port address last time update time during less than address renewal guard time, the address update mode that will upgrade port is set at the address and upgrades ready attitude and do not upgrade port address table.
In link switchover is under the situation of link failure switching, the comparative result that upgrades guard time according to link switchover type and current time and difference and the address that will upgrade update time last time of port upgrades port to be handled and comprises: when the described current time with the difference that will upgrade port address last time update time during greater than address renewal guard time, the address update mode that will upgrade port is set at the address and upgrades ready attitude, upgrades the Media Access Control Address table of port; The address update mode that will upgrade port is set at the address and upgrades and finish attitude and recording address update time.
On the other hand, in the link switchover type is under the situation of link-recovery switching, when node processing link, address update mode that will updated port is set at the address and upgrades the step of preparing state and comprise: host node cycle ground is from master port transmission link health detection frame; When receive link health detection frame from port after, obstruction is from the professional VLAN forwarding capability of the protection of port, transmission node on ring sends link-recovery state notifying frame, and being set at the address from the port address update mode and upgrading preparing state host node; And after transmission node receives link-recovery state notifying frame, the port that blocks the professional VLAN forwarding capability of protection is decontroled, and the address update mode that will encircle upper port is set at address renewal preparing state.
In link switchover is under the situation of link-recovery switching, the comparative result that upgrades guard time according to link switchover type and current time and difference and the address that will upgrade update time last time of port upgrades the port processing and comprises: the address update mode that will upgrade port is set at the address and upgrades ready attitude, and renewal will be upgraded the Media Access Control Address table of port; And the address update mode that will upgrade port is set at the address and upgrades and to finish attitude and recording address update time.
Timer is set at any one time numerical value of 1 millisecond to 100 milliseconds, preferably, timer is set at 10 milliseconds.
In addition, the Media Access Control Address table of same port is upgraded in each ring or territory simultaneously.
By technique scheme of the present invention; when carrying out link switchover, upgrade the mac address table of port fast; reduced number of times to hardware operation; the link switchover convergence time does not strengthen with the increase of ring co-domain number; improved hardware efficiency; and made full use of link circuit resource, thereby satisfied of the requirement of high real-time business Ring protection system.
Embodiment
Describe embodiments of the invention below with reference to accompanying drawings in detail.
In embodiments of the present invention, provide a kind of ring protection processing method.
At first, basic thought of the present invention is described.The present invention enables quick timer the port address update mode is inquired about, the periodic regime of timer can be at 1 to 100 millisecond fast, the mac address table mode of upgrading port is set to upgrade all MAC Address of port, definition port mac address update mode is that preparing state is upgraded in the address, the address upgrades ready attitude and attitude is finished in the address, these three kinds of states refer to the software records state, rather than real operational hardware, when operation, do not expend time in.When the ethernet ring network automatic protective system is carried out link switchover; and encircle when upward node need upgrade the port mac address table; hardware is not operated; but being the address, the MAC Address update mode of this port of software records upgrades preparing state; when the address update mode that quick timer inquires port is address renewal preparing state; with the address update mode software setting of port is that ready attitude is upgraded in the address; and hardware operation is upgraded all MAC Address of this port; the address software upgrading state of port is set to the address renewal and finishes attitude then; in this process; for once really operated hardware, other software operations do not expend time in.Because a plurality of domain discovery link failures of ether environmental protection automatic protective system and recovery are simultaneously; when therefore link switchover is carried out in each territory; do not have real mac address table to hardware operation renewal port; but after all territories handle link switchover, just begin the mac address table of ring upper port is upgraded.In addition, when the handle link fault of each territory, the ring upper port does not repeat to upgrade the port mac address table at short notice, and this timing definition is that guard time is upgraded in the address, can be arranged in 1 to 100 millisecond of scope.So just can prevent to repeat hardware operation consuming time, greatly improve the processing speed and the stability of Ethernet ring protection system, and the link switchover convergence time of Ethernet ring protection system can not strengthen when the number of same physical rings co-domain increases.
Fig. 2 is the flow chart that illustrates according to the looped network protection processing method of the embodiment of the invention.
With reference to Fig. 2, this method comprises: step S202, enable timer to each node, regularly the address update mode of port is inquired about; Step S204, when node processing link, address update mode that will updated port is set at the address and upgrades preparing state; And step S206; timer inquires the address update mode of port for after upgrading preparing state; comparative result according to link switchover type and the difference of current time and update time last time that will upgrade port and address renewal guard time upgrades port and handles.
Wherein, link switchover type comprises that link failure switches and link-recovery switches.
In addition, in the link switchover type is under the situation of link failure switching, when node processing link, address update mode that will updated port is set at the step of upgrading preparing state and further comprises following processing: detect the host node in the node notice territory of link failure, the professional VLAN forwarding capability of protection that blocks the corresponding port of faulty link, upgrade the Media Access Control Address table of the corresponding port of faulty link, and recording address update time; After host node detects link failure, decontrol the professional VLAN forwarding capability of the protection from port of host node, transmission node on ring sends link failure state notifying frame, and the master port address update mode of host node is set at address renewal preparing state; And after transmission node receives link failure state notifying frame, and the address update mode that will encircle upper port is set at the address and upgrades preparing state.
In link switchover is under the situation of link failure switching; the comparative result that upgrades guard time according to link switchover type and current time and difference and the address that will upgrade update time last time of port upgrades port to be handled and comprises: when the difference of current time and port address last time update time during less than address renewal guard time, the address update mode of port is set at the address upgrades ready attitude and do not upgrade port address table.
In link switchover is under the situation of link failure switching, the comparative result that upgrades guard time according to link switchover type and current time and difference and the address that will upgrade update time last time of port upgrades port to be handled and comprises: when the difference of current time and port address last time update time during greater than address renewal guard time, the address update mode of port is set at the address upgrades ready attitude, upgrade the Media Access Control Address table of port; And the address update mode of port is set at the address upgrades and finish attitude and recording address update time.
On the other hand, in the link switchover type is under the situation of link-recovery switching, when node processing link, address update mode that will updated port is set at the step of upgrading preparing state and comprises: host node cycle ground is from master port transmission link health detection frame; When receive link health detection frame from port after, obstruction is from the professional VLAN forwarding capability of the protection of port, transmission node on ring sends link-recovery state notifying frame, and being set at the address from the port address update mode and upgrading preparing state host node; And after transmission node receives link-recovery state notifying frame, the port that blocks the professional VLAN forwarding capability of protection is decontroled, and the address update mode that will encircle upper port is set at address renewal preparing state.
In link switchover is under the situation of link-recovery switching, the comparative result that upgrades guard time according to link switchover type and current time and difference and the address that will upgrade update time last time of port upgrades port to be handled and comprises: the address update mode of port is set at the address upgrades ready attitude, the Media Access Control Address table of renewal port; And the address update mode of port is set at the address upgrades and finish attitude and recording address update time.
Timer is set at 1 millisecond to 100 milliseconds, preferably, timer is set at 10 milliseconds.
In addition, the Media Access Control Address table of same port is upgraded in each ring or territory simultaneously.
Below, with reference to Fig. 1 and Fig. 3 to Fig. 5, the ring protection processing method according to the embodiment of the invention is described.Wherein, Fig. 3 is the flow chart that illustrates according to the instantiation of the looped network protection processing method of the embodiment of the invention, and Fig. 4 is the flow chart when handle link according to the embodiment of the invention being shown breaking down; And Fig. 5 is the flow chart that illustrates when recovering according to the handle link of the embodiment of the invention.
With reference to Fig. 3, in step 301, node S1, S2, S3, S4 enable quick timer on the ring, regularly the address update mode of ring upper port are inquired about;
In step 302, when link switchover need be upgraded the port mac address table, directly do not carry out hardware operation, but software records need to upgrade the address update mode of port be that preparing state is upgraded in the address, software operation does not expend time in;
Next, in step 303, remaining also needs to upgrade the port mac address table during link switchover, but does not all carry out hardware operation, upgrades preparing state but software records address update mode is the address;
In step 304, after each territory of link switchover and each ring was gone up all operations and finished, the address update mode that timer detects the ring upper port was that preparing state is upgraded in the address, and aforesaid operations does not have hardware operation consuming time, makes speed very fast;
In step 305, switch if be link failure, and address last time that the current time deducts this port upgrades guard time less than the address update time, then do not carry out the hardware update port address table;
In step 306, switch if be link-recovery, perhaps guard time is upgraded greater than the address update time in address last time that deducts this port the current time, and then software setting port address update mode is that ready attitude is upgraded in the address, carries out the hardware update port address table;
At last, in step 307, behind step 205 and 206, software setting port address update mode is that the address is upgraded and to be finished attitude, and recording address update time, and link switchover is finished, in the aforesaid operations, do not repeat renewal port mac address table operation consuming time, improved efficient.
With reference to Fig. 4, the detailed process that link failure switches when working as link occurs fault (for example, the link between node S3 and the S4 disconnects) is described.
In step 401, node S3 and node S4 detect the link of port;
In step 402, node S3 and S4 detect the chain route fault-free of port to breaking down, and fault has taken place the host node link in notice territory 1 and the territory 2;
Then, in step 403, node S3 and S4 block the territory 1 of the corresponding port of faulty link and the protection service VLAN forwarding capability in territory 2, and alarm frame to the host node generation link failure in territory 1 and territory 2;
In step 404, node S3 and S4 directly upgrade the mac address table of the corresponding port of faulty link, recording address update time;
In step 405, the host node S2 in territory 1 and territory 2 receives the link failure alarm in two territories respectively;
Next, in step 406, the link failure of territory 1 host node S2 processing domain 1, the protection service VLAN forwarding capability in the territory 1 of relieving port 2, go up the link failure state notifying frame that sends territory 1 to ring, the address update mode of port one is set to the address and upgrades preparing state;
In step 407, the link failure of territory 2 host node S2 processing domain 2, the protection service VLAN forwarding capability in the territory 2 of relieving port one is gone up the link failure state notifying frame that sends territory 2 to ring, and the address update mode of port 2 is set to the address and upgrades preparing state;
In step 408, after transmission node was received the link failure state notifying frame of territory 1 host node transmission on the ring in territory 1, the address update mode of ring upper port was set to the address and upgrades preparing state;
In step 409, after transmission node was received the link failure state notifying frame of territory 2 host nodes transmission on the ring in territory 2, the address update mode of ring upper port was set to the address and upgrades preparing state;
In above-mentioned behaviour's operation, do not carry out hardware operation consuming time; at last; in step 410; the address update mode that the quick timer of node inquires port on ring is that the address is upgraded after the preparing state; if deducting this port address last time, the current time upgrades guard time greater than the address update time; the address update mode that this port then is set is that ready attitude is upgraded in the address; upgrade the mac address table of this port; the address update mode that this port is set is that the address is upgraded and to be finished attitude, and recording address update time.
With reference to Fig. 5, the processing procedure when link failure is eliminated (for example, the link-recovery between node S3 and the S4) is described.
In step 501, when the host node S2 in the territory 1 receives from link health detection frame that port one sends from port 2, the territory 1 protection service VLAN forwarding capability of port blocked 2 is gone up transmission link-recovery state notifying frame to ring, and the address update mode of port 2 is set to the address and upgrades preparing state;
In step 502, when the host node S2 in the territory 2 receives from link health detection frame that port 2 sends from port one, the territory 2 protection service VLAN forwarding capabilitys of port blocked 1 are gone up transmission link-recovery state notifying frame to ring, and the address update mode of port one is set to the address and upgrades preparing state;
Then, in step 503, after transmission node in the territory 1 is received the link-recovery state notifying frame of host node transmission, node S3 decontrols the protection service VLAN forwarding capability in the territory 1 of port one, node S4 decontrols the protection service VLAN forwarding capability in the territory 1 of port one, and the address update mode of each transmission node ring upper port is set to the address and upgrades preparing state;
In step 504, after transmission node in the territory 2 is received the link-recovery state notifying frame of host node transmission, node S3 decontrols the protection service VLAN forwarding capability in the territory 2 of port one, node S4 decontrols the protection service VLAN forwarding capability in the territory 2 of port one, and the address update mode of each transmission node ring upper port is set to the address and upgrades preparing state;
In aforesaid operations, there is not hardware operation consuming time, at last, in step 505, the address update mode that the quick timer of node inquires port on ring is that the address is upgraded after the preparing state, the address update mode that this port is set is that ready attitude is upgraded in the address, upgrade the mac address table of this port, the address update mode that this port is set is that the address is upgraded and to be finished attitude, and recording address update time.
For example, in certain Ethernet ring network system, used method of the present invention.Wherein, 15 territories have been disposed on the ring; when link occurs fault; on each node hardware operation being upgraded in the address of ring upper port is to carry out after Ethernet ring protection system has been finished operation not consuming time such as other various software records; and port address renewal operation has only been carried out once rather than 15 times; upgrade action needs and expend the hundreds of millisecond and carry out 15 port addresss, but use not increasing and strengthen of link switchover convergence time after the inventive method with the territory.During link switchover, business datum is stable, and node is few to the hardware operation number of times, and probability of failure is low, and convergence time is in 50 milliseconds.
In addition, the present invention not only can be applied to multiple domain, also can be applied in the single domain.
When looped network is made up of a plurality of tangent rings, can carries out level to ring and divide, when node is received the link switchover notice of low level node transmission on the high-rise secondary ring, need to upgrade ring upper port mac address table.But when the low level link switched, high-level node can be received the link switchover notice that a plurality of low level nodes are sent, and causes repeatedly carrying out hardware operation and upgrades the port mac address table, and was consuming time very long.After using the inventive method, node is when upgrading the port mac address table, just having write down the port application state is that port address upgrades preparing state, there is not real operational hardware, it is just to carry out hardware operation renewal port address MAC table after preparing state is upgraded in the address that quick timer detects the port address update mode, making the hardware address that repeats upgrade operation has only carried out once, during link switchover, business datum is stable, node is few to the hardware operation number of times, probability of failure is low, and convergence time is fast.
In sum; by technique scheme of the present invention; link switchover adaptive updates mac address table has been proposed; the fast processing ethernet ring network is the method for protection automatically; notions such as port address update mode have been introduced; when carrying out link switchover, Ethernet ring protection system do not repeat to upgrade the port mac address table; avoided hardware operation consuming time; the processing speed and the stability of Ethernet ring protection system have greatly been improved; especially the link switchover convergence time of Ethernet ring protection system can not strengthen when the number of same physical rings co-domain increases, and satisfies the requirement of high real-time business to Ring protection system when utilizing multiple domain to carry out balancing link load.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.