Background technology
Along with the universal development of Ethernet, the communication apparatus (following unification is called network element) be deployed in network is more and more, and the topological structure that the network element in network forms becomes increasingly complex.
The network topology structure of communication operator mainly contains: ring-type and tree-shaped.
Circulus can realize encircling interior link redundancy protection, promotes the reliability of network, and this structure is deployed in MAN (Metropolitan Area Network, metropolitan area network) usually.
Based on Ethernet, be basic communication, in circulus, the broadcasting packet forwarding that can circulate between network element, this phenomenon is commonly called as " broadcast storm ", once this phenomenon appearance can take the network bandwidth in the short time, more serious consequence is to cause network paralysis, and consequence is very serious.Therefore, form physically in the network of ring-type topological structure, must carry out the broken ring of protocol level, implementation method is, according to certain rule, to becoming the port of ring, carries out the obstruction of protocol level, make it can not send message, thereby it is tree-shaped to realize that ring-type becomes.The agreement of existing broken ring has MSTP (Multiple Spanning Tree Protocol; Multiple Spanning Tree Protocol), RRPP (Rapid Ring Protection Protocol; rapid ring protection protocol) etc., the network element deploy after above-mentioned agreement, can effectively avoid network Cheng Huan.
In order to reduce broadcasting packet, two layers based on the Ethernet message forward principle, network element need to be at inbound port learning message SMAC (Source Media Access Control, media interviews address, source), record VLAN (Virtual Line Access Network) and SMAC that message carries, so that during the message backhaul, according to VLAN and DMAC (Destination Media Access Control, target MAC (Media Access Control) address) search the message outbound port, accomplish that the backhaul clean culture sends.
Once network forms loop, forward principle according to two layers of Ethernets, the MAC Address place physical port in same VLAN scope is updated, and MAC Address is drifted about between port, as shown in Figure 1.In Fig. 1, as loop paths network element R1 (Router, router) receive message on, message source MAC is MAC1, suppose that all network elements of whole loop paths all are in same VLAN together and forward in territory, so along the routing direction of figure tri-arrow logos, forward on network element and learn successively MAC address entries at each, shown in one, when message is sent back to R1 (P6 port) again, input VLAN and MAC Address, coupling mac learning list item one, new port (P6) is refreshed to old port (P0), this phenomenon is called the MAC Address drift phenomenon.
Under ring network framework, the Sampling network loop seems important, existing detection mode is periodically from physical port (as P1), outwards to send the message of special characteristic by network element, once the receive direction of this network element is received this characteristic message, block this receiving port (P6), follow-up this network element can not outwards send message from this port (P6), as shown in Figure 2.But there are a lot of problems in this mode, as:
1, periodically to all physical ports in network element, send messages, consume the cpu resource of network element;
2, testing mechanism depends on network element transmitting-receiving message, detection ageing not high;
3, detection messages may be dropped on forward-path network element network element, and under the network congestion scene, reliability is not high;
4, in this feature message (proprietary protocol) other network elements in network, may be by wrong processing, as expect other network element nonrecognition, as data retransmission, yet processing identified by it, final detection messages is dropped, and has the compatibility issue of this equipment room;
5, can only know starting point and the terminal of loop, but the fullpath of loop can't present, if need broken ring, also need network element one by one to investigate respectively, be unfavorable for that customer network unifies O&M.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out to clear, complete description, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making under the creative work prerequisite the every other embodiment obtained, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of loop detecting method, as shown in Figure 3, comprising:
Step 201, from the topological data of the port of network element, obtain the loop paths existed in network element, loop paths is stored in the loop paths table.
In embodiments of the present invention, a plurality of network elements can be arranged, preserve the topological data of the port of these network elements on the management equipment of network element, management equipment can be webmaster, can be also network element served as the role of manager etc., the topological data of port can be also to be kept at management equipment to have on the specific installation of annexation.
In order to realize conveniently, the port in the embodiment of the present invention can be the port that possesses transmitting-receiving Ethernet message ability on network element, also forwards port.If a plurality of forwarding ports are arranged on a network element, can on management equipment, for each, forward port and preserve a topological data, topological data can comprise the identification information of the next-hop node that port-mark and this port connect, the next-hop node here can be certain port on the down hop network element, and identification information can be port numbers and/or the frame position/slot number of port on network element etc.
Loop paths table in the embodiment of the present invention can comprise many loop paths physically.Article one, the generative process of loop paths can be to choose the port that there is no next-hop node on a network element as the path originating point, according to the identification information of the next-hop node in the topological data of port, traveled through successively, until a port that is connected with next-hop node of getting back on the network element at originating point place, path finishes, the set of traversal node out is a loop paths.
Step 203, when the drift of the port generation MAC Address of network element, search the loop paths table according to the former identification information of port and the identification information after drift, thereby obtain the loop paths on agreement.
In embodiments of the present invention, by preserving the topological data of port, thereby obtain the identification information of the next-hop node of port, can further obtain complete loop paths, when the MAC Address drift occurs, can accurately navigate to the loop paths on agreement, not need to send in addition detection messages, effectively save the cpu resource of network bandwidth resources and equipment.
Concrete, one embodiment of the invention provides a kind of loop paths detection method, in the method, need on the management equipment of network element, preserve the topological data of the port of network element, port in the present embodiment can be port all on network element, can be also the port (forwarding port) that possesses transmitting-receiving Ethernet message ability, for convenience of describing, following examples will be for forwarding port.Topological data can comprise the identification information of port and the identification information of next-hop node, can also comprise the type of port and the quantity of next-hop node etc.
The identification information of port can be port numbers and/or the frame position/slot number of port on network element, also can be comprised of port numbers and network element ID, will be with port numbers and network element ID as an example in the present embodiment, and network element ID can be network element numbering etc.
The type of port is distinguished according to the topology location of network element upper port, comprises two kinds of edge port and inline ports, wherein,
Edge port: the port that does not connect next-hop node;
Inline port: the port that is connected with next-hop node.
As shown in Figure 4,
Edge port comprises: P1, P3, P4, P5, P6, P7; The edge port number is labeled as N
edge;
Inline port comprises: P2, P8; Network element 1 is connected with P8 by P2 with network element 2; Inline port number is labeled as N
inline;
The port number summation N=N that possesses transmitting-receiving Ethernet message ability on network element
edge+ N
inline.
For the next-hop node identification information, as this port is edge port, next-hop node is empty node; As this port is inline port, the identification information that next-hop node is the port that is connected with this port.
The method that the present embodiment provides as shown in Figure 5, comprising:
Step 501, according to the topological data of preserving, obtain loop paths between network element.
Management equipment is the extracting loops path from the topological data of preserving, concrete:
When only having a network element, as shown in Figure 6 a, network element 1 comprises P1, P2, P3, tetra-ports of P4, and these four ports all do not have to be connected with other ports, are edge port, and the topological data of preserving on management equipment as shown in Figure 6 b.
Can extract 4 paths from the topological data shown in Fig. 6 b, but all only have start point information, destination node points to empty node, does not therefore have loop paths.
When 2 network elements are arranged, as shown in Figure 7a, P5, P6, P7, P8 port are arranged on network element 2, network element 2 is connected to the P2 of network element 1 by P8.P5, P6, P7 are edge port, P8 is inline port, compare Fig. 6 a, port P2 on network element 1 is changed to inline port from edge port, therefore can on the basis of Fig. 6 b, delete the topological data of P2, then increase the topological data that P8 points to P2 and P2 sensing P8, the topological data of network element 1 and network element 2 as shown in Figure 7b, can travel through out 6 loop paths from topological data, be respectively following (referring to Fig. 7 c):
(P1,P2,P8)
(P3,P2,P8)
(P4,P2,P8)
(P5,P8,P2)
(P6,P8,P2)
(P7,P8,P2)
When 3 network elements are arranged, as shown in Figure 8 a, compare Fig. 7 a, the port P3 of network element 1 is changed to inline port from edge port; The port P7 of network element 2 is changed to inline port from edge port, therefore can first delete and take the topological data that P3 and P7 be the path starting point, because the quantity of the inline port on network element 1 and network element 2 is 2, the next node that P8 and P2 point to is not just empty, point to respectively P7 and P3, topological data as shown in Figure 8 b, if using respectively P1 and P4 as the path originating point, travel through successively, can obtain following 4 loop paths (referring to Fig. 8 c):
(P1,P2,P8,P7,P10,P9,P3,P2)
(P4,P2,P8,P7,P10,P9,P3,P2)
(P1,P3,P9,P10,P7,P8,P2,P3)
(P4, P3, P9, P10, P7, P8, P2, P3) in like manner, respectively with edge port P5, P6, P11, P12 is the path initial point, generates following 8 loop paths, as follows:
(P5,P8,P2,P3,P9,P10,P7,P8)
(P6,P8,P2,P3,P9,P10,P7,P8)
(P5,P7,P10,P9,P3,P2,P8,P7)
(P6,P7,P10,P9,P3,P2,P8,P7)
(P11,P9,P3,P2,P8,P7,P10,P9)
(P12,P9,P3,P2,P8,P7,P10,P9)
(P11,P10,P7,P8,P2,P3,P9,P10)
(P12,P10,P7,P8,P2,P3,P9,P10)
, when three network elements are arranged, the loop paths table is as shown in table 1:
Table 1
Remarks: while for path starting point port numbering, being greater than the Trail Termination Point numbering, contrary operation has been done in path.
Step 503, when port generation MAC Address is drifted about, search the loop paths table according to the former identification information of port and the identification information after drift, obtains the loop paths on agreement.
If the MAC Address drift has occurred in certain port on network element, as shown in table 2,
Table 2
Network element |
MAC |
OldPort |
NewPort |
Network element 1 |
MAC1 |
P1 |
P3 |
The above-mentioned MAC Address drift of reported by network elements information, management equipment be take P1 as the path starting point, and P3 is Trail Termination Point, as initial conditions, in the loop paths table, is searched, thereby hit path 3, therefore, the full set of this loop is (P1, P3, P9, P10, P7, P8, P2, P3).
After the loop paths of having obtained on corresponding agreement, can close the forwarding capability of certain port on the loop paths on described agreement, perhaps block certain port on the loop paths on described agreement, as opened the broken ring property of agreement on network element, as MSTP, RRPP etc., reach the purpose of the protocol forward state of choke ring road port.
The method that the present embodiment provides, by preserving the topological data of port, can obtain the loop paths physically existed between network element, when the MAC Address drift occurs, can accurately navigate to the loop paths on agreement, do not need to send in addition detection messages, effectively saved the cpu resource of network bandwidth resources and equipment.
One embodiment of the invention provides a kind of management equipment of network element, as shown in Figure 9, comprises memory module 901, physics loop computing module 903 and agreement loop computing module 905.
Memory module 901, for the topological data of the port of storing network element, topological data comprises the identification information of port and the identification information of the next-hop node that port connects.The next-hop node here is the port be connected with this port on the network element that connects of port.Identification information can be port numbers and/or the frame position/slot number of port on network element, can be also the combination of port numbers and network element ID, and network element ID can be network element numbering etc.
Topological data can also comprise the type of port and the quantity of the next-hop node that port connects etc., and the type of its middle port can comprise according to the residing topology location of port the fringe node that does not connect next-hop node and be connected with the inline node of next-hop node.
Physics loop computing module 903, for obtain the loop paths existed between network element from topological data, be stored in loop paths in the loop paths table of memory module 901.
Agreement loop computing module 905, while drifting about for the port generation media access control address when network element, search described loop paths table according to the port-mark after former port-mark and drift, obtains the loop paths on agreement.
The loop paths table record has the physics loop paths existed between network element.Concrete, physics loop computing module 903 comprises control module 9031 and spider module 9033, as shown in figure 10.
Control module 9031, for choose a port that does not connect next-hop node on network element, is also edge port.
Spider module 9033, for take the port that control module 9031 chooses, it is the path originating point, mode according to from the inline port direction traversal to network element travels through, until the inline port of the network element that path node is originating point place, path, the set of traversal node out is a loop paths.
The management equipment 900 that the present embodiment provides also comprises network element interface module 907, and for receiving the MAC Address drift information of reported by network elements, MAC Address drift information comprises the former identification information of the port that the MAC Address drift occurs and the identification information after drift.
The management equipment that the present embodiment provides can be webmaster, it can be also the network element that serves as the role of manager, as DSLAM (Digital Subscriber Line Access Multiplexer, Digital Subscriber Line Access Multiplexer), OLT (Optical Line Terminal, optical line terminal), router, switch etc.
The management equipment that the present embodiment provides can be obtained the loop paths physically existed between network element from the topological data of the port preserved, when the MAC Address drift occurs, can accurately navigate to the loop paths on agreement, do not need to send in addition detection messages, effectively saved the cpu resource of network bandwidth resources and equipment.
For system and device embodiment, due to it, substantially corresponding to embodiment of the method, so describe fairly simplely, relevant part gets final product referring to the part explanation of embodiment of the method.System embodiment described above is only schematic, the wherein said module as the separating component explanation can or can not be also physically to separate, the parts that show as module can be or can not be also physical modules, can be positioned at a place, or also can be distributed on a plurality of mixed-media network modules mixed-medias.Can select according to the actual needs some or all of module wherein to realize the purpose of the present embodiment scheme.Those of ordinary skills in the situation that do not pay creative work, can understand and implement.
To the above-mentioned explanation of the disclosed embodiments, make professional and technical personnel in the field can realize or use the present invention.Multiple modification to these embodiment will be apparent for those skilled in the art, and General Principle as defined herein can be in the situation that do not break away from the spirit or scope of the embodiment of the present invention, realization in other embodiments.Therefore, the embodiment of the present invention will can not be restricted to these embodiment shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.