CN104219113A - Topological algorithm for displaying and analyzing multicast distribution - Google Patents

Topological algorithm for displaying and analyzing multicast distribution Download PDF

Info

Publication number
CN104219113A
CN104219113A CN201410250288.8A CN201410250288A CN104219113A CN 104219113 A CN104219113 A CN 104219113A CN 201410250288 A CN201410250288 A CN 201410250288A CN 104219113 A CN104219113 A CN 104219113A
Authority
CN
China
Prior art keywords
node
port
equipment
multicast address
multicast
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.)
Granted
Application number
CN201410250288.8A
Other languages
Chinese (zh)
Other versions
CN104219113B (en
Inventor
周厚明
崔磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Maiwei Communications Co., Ltd.
Original Assignee
WUHAN MAIWEI SHIDA SOFTWARE CO Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by WUHAN MAIWEI SHIDA SOFTWARE CO Ltd filed Critical WUHAN MAIWEI SHIDA SOFTWARE CO Ltd
Priority to CN201410250288.8A priority Critical patent/CN104219113B/en
Publication of CN104219113A publication Critical patent/CN104219113A/en
Application granted granted Critical
Publication of CN104219113B publication Critical patent/CN104219113B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed is a topological algorithm for displaying and analyzing multicast distribution. A client side or server side architecture is adopted, a server side is divided into a communication thread and a service thread. The communication thread is responsible for receiving neighbor information of a client side and multicast address information and establishing a public data structure, and the public data structure stores equipment information, neighbor information with ports connected and the multicast address information and establishes correlation among the equipment information, the neighbor information and the multicast address information. The service thread is responsible for drawing a topological graph and receiving user query, and a user can check multicast address of the equipment and inquire distribution of a specific multicast address in a network. A client side thread synchronously cooperates with an LLDP (link layer discovery protocol), a GMRP (general multicast registration protocol) and an IGMP (internet group management protocol) and sends the neighbor information and the multicast address information to a client thread, and the client thread processes the neighbor information and the multicast address information and then sends the same to the server side.

Description

The topological diagram algorithm of display and analysis multicast distribution
Technical field
The present invention is display and the topological diagram algorithm analyzing multicast distribution, belongs to network communication field.This algorithm adopts client-side/server-side architecture, in network, a PC is as service end, switch in network or router are as client, client is collected data and is reported service end, the topological diagram of the whole network of data genaration that service end reports according to client, reflects the multicast distribution situation in network simultaneously.
Background technology
Now multicast is applied widely in a network, and multicast has compared obvious advantage with broadcast: a bit send, multipoint reception, recipient can select to leave or add this multicast group.With broadcast unlike, do not add the equipment of multicast group, can not affect by multicast, alleviate these set handlings bear.The problem brought of applying widely of multicast is exactly the multicast distribution situation that keeper needs to understand current network, the path that a such as specific multicast address flows in a network, wherein, its final destination is wherein, middle by which kind of equipment for the source originating end of this multicast.
Summary of the invention
The algorithm that the present invention proposes can solve the problem, and it calculates the topological diagram of whole network, shows multicast distribution situation on topological diagram simultaneously, helps user's diagnostic network.It shows the multicast path in network intuitively, in real time, check specific Multicast Flows the equipment of process, and the transmitting terminal of this Multicast Flows and receiving terminal.This algorithm supports that complicated topological diagram generates, and multicast path combines, and can show the Multicast Flows of particular topology node on the network topological diagram generated, and the topological node that flows through of the specific Multicast Flows of real-time exhibition, facilitates supervision and the management of keeper simultaneously.
This algorithm adopts client-side/server-side structure, and in selection network, a PC is as service end, and in network, switch and router are as client, adopt udp protocol communication between client and service end.The program of service end is divided into two independently threads, is communication thread and service thread respectively.Communication thread is responsible for user client communication and is received the information upload of client, according to information upload generating network topological diagram, preserves various uploading data, sets up the corresponding relation of each network node and multicast address.Service thread is mainly used to represent topological diagram, represents the multicast table on each node, provides to inquire about to use into confession administrative staff simultaneously.Two threads use public data structure to deposit the data of topological diagram and multicast table.Two threads adopt synchronization mechanism, communication thread receives the data of client, common data structures is safeguarded in foundation, then notification service thread after having operated common data structures, service thread receives notice, read public data structure, the information deposited according to common data structures repaints topological diagram.The synchronized relation of communication thread and service thread as shown in Figure 1.
Common data structures comprises three parts: equipment chained list, multicast address table.Equipment chained list comprises device node.Device node comprises equipment sign, IP address of equipment, device mac address, points to the pointer of port node, points to the pointer of next device node.Port node comprises: the port numbering of local terminal, the port numbering of opposite end, neighbor device pointer, points to the pointer of the next port node of same equipment; Multicast address table comprises: multicast address node, and this node comprises the pointer of multicast device node of the type of multicast address, Multicast MAC Address, Multicast IP Address, sensing, points to the pointer of next multicast address node.Multicast device node comprises the pointer of sensing equipment node, the device port vector of this multicast address use, points to the pointer of next multicast device node.Relation between common data structures as shown in Figure 2.
Service end and client adopt udp protocol, and when client terminal to discover connects change or the change of IP/MAC Multicast Flows, active upload information is to service end.Need the data uploaded little when network stabilization, need when network changes in time change information to be issued service end, service end and client are often short connections, the data volume of transmission is little, higher to time requirement, therefore employing udp protocol, compare TCP server simultaneously and adopt UDP service end can support more UDP client.The message of service end to client upload confirms, communication two party defines two kinds of data formats for this reason: the data format that the data format of client upload and service end confirm.The data format uploaded comprises: the body part of sequence number, sender IP address, sender's MAC Address, command type, order.One of them UDP message uploaded comprises type and the body part of order of one or more order, the type decided of the order content of body part, and the type of order and text thereof have several below:
1. command type 0x01, implication adds new neighbours; The text of this order comprises: the IP address of sender, the MAC Address of sender, the port numbering of local terminal, the port numbering of opposite end, the IP address of neighbours, the MAC Address of neighbours.
2. command type 0x11, implication loses neighbours to connect; The text of this order comprises: the IP address of sender, the MAC Address of sender, the port numbering of local terminal, the port numbering of opposite end, the IP address of neighbours, the MAC Address of neighbours.
3. command type 0x02, implication newly adds multicast address; This order text comprises: the IP address of sender, the MAC Address of sender, the type of multicast address, Multicast IP Address, Multicast MAC Address, corresponding port vector.
4. command type 0x22, implication is that multicast address leaves; This order text comprises: the IP address of sender, the MAC Address of sender, the type of multicast address, Multicast IP Address, Multicast MAC Address, corresponding port vector.
First the public udp port of service end binding both sides agreement, waits for that client data arrives.First service end sends back message after receiving the uploading message of client, and back message content comprises the sequence number of uploading message, then the content of analytic message, operation common data structures.Service end takes out the IP of transmit leg and the MAC Address of transmit leg in message, inquires about corresponding equipment chained list accordingly.If do not inquire corresponding device node, then a newly-built device node, the then type of viewing command.
If command type is 0x01, in equipment chained list, corresponding transmitting apparatus node is found with IP and MAC of sender's equipment in order text, if corresponding equipment can be found, according to the port numbering of the local terminal in order text, search the port node of port chained list with or without the port numbering of the local terminal of correspondence of device node sensing, if there is corresponding port node to exist, then in the device node pointed to by the neighbor device pin of port node and order text, IP and MAC of neighbor device compares.If equal, then prove that this neighborhood exists, end process; If neighbor device can not mate, then in equipment chained list, find corresponding device node with IP and MAC of neighbor device in order text, if find corresponding neighbor device node, then revise the new-found device node of neighbor device pointed of port node, if do not find neighbor device, the device node that then establishment one is new, is inserted into the end of equipment chained list, then this equipment of neighbor device pointed of port node; If do not find the port numbering of the local terminal of corresponding transmitting apparatus, then create a port node, be inserted into the afterbody of device node port chained list, in equipment chained list, corresponding device node is looked for IP and MAC of the neighbor device in order text, if find the device node that the neighbor device pointed of the port node newly created finds by corresponding neighbor device, if do not find neighbor device, create a new device node, be inserted into the end of equipment chained list, this equipment of neighbor device pointed of this port node.
If command type is 0x11, in equipment chained list, find corresponding transmitting apparatus node with IP and MAC of sender's equipment in order text, if do not have corresponding transmitting apparatus to end process.If there is corresponding transmitting apparatus, according to the port numbering of the local terminal in order text, search the port of port table with or without correspondence of device node sensing, if do not have corresponding ports to end process; If there is corresponding port node, IP and MAC of the neighbor device in IP and MAC of the device node of the neighbor device pointed of port node and order text is compared.If more identical, then the device pointer of port is set to null pointer; If more not identical, then do not deal with.
If the type of order is 0x02, then representative has new multicast address to add, first multicast address table is searched, if find multicast address node, then search the multicast device node that multicast address points to, if IP with MAC of the device node pointed by the device pointer of multicast device node is the same with IP with MAC in message, then by the port vector of filling this node with order text middle port vector, end process flow process; If do not find corresponding device node, creates a new device node, be inserted into the end of equipment chained list, by the port vector of this node of order text middle port vector filling, newly-established equipment pointed by the device pointer of multicast device node.If do not find multicast address node, then add a multicast address node; Whether the device node then searching this multicast address associations exists, if there is no a then newly-built device node, this device node is put into the end of equipment chained list, then one or more port node is created according to the port vector in message, the port node that the port node pointed of the new equipment chained list node created newly creates; The equipment chained list device pointer of new multicast address node points to newly-built device node, and fill the port vector of this node with order text middle port vector, device pointer points to the device node created.If find multicast address node, whether the device node then searching this multicast address associations exists, if there is no a then newly-built equipment chained list node, this equipment chained list node is put into the end of equipment chained list, then one or more port node is created according to the port vector in message, the port node that the port node pointed of the new equipment chained list node created newly creates; The equipment chained list device pointer of new multicast address node points to newly-built device node, and fill the port vector of this node with order text middle port vector, device pointer points to the device node created.If there is this device node, check that whether the port vector of multicast device node is identical, if fruit is not identical, replace, identical, end process.If corresponding equipment also exists while multicast address node exists, then check that whether the port vector of multicast device node is identical, if fruit is not identical, replace, identical, end process.
If the type of order is 0x22, then representative has multicast address to leave, first multicast address table is searched, if find multicast address node, search the device node pointer of its sensing, then whether the IP address of the equipment of the multicast device node of compare facilities pointed is equal with MAC Address with the IP address of message transmitting party with MAC Address.If the port vector in equal judgement message and the step-by-step of multicast device node middle port vector compare, if the position of correspondence both 1, then this position 0 of the port vector that this multicast device is corresponding; If the ip address of the multicast device of multicast device pointed and mac are unequal in message, the next multicast device node that more next multicast device node pointer points to.Above-mentioned service end receives the handling process of order as shown in Figure 3.
As mentioned above, the communication thread of service end is responsible for setting up and is safeguarded common data structures, if communication thread finds that common data structures has any change, notification service thread starts to repaint topological diagram.Service end long-play, As time goes on, common data structures has increasing junk data, and communication thread opens timer for this reason, unwanted data in timed collection cleaning common data structures.Concrete method for cleaning is as follows:
First clear up isolated device node, isolated device node is the node without any neighbor device.Scanning device chained list successively, checks whether the port chain list index that equipment chained list points to is null pointer, if null pointer, shows that this equipment does not have neighbours, is an isolated equipment, then deletes this device node; If port chain list index non-NULL, check whether the neighbor device pointer of all port nodes of this equipment is all null pointer, if be all null pointer, then can delete all of the port node of this equipment, then delete this device node.Next empties invalid multicast address, and invalid multicast address refers to this multicast address not on any equipment.The step removed is: scanning multicast address table, checks whether the multicast device node pointer of multicast address node is null pointer, if null pointer, deletes this multicast address node.
One of function of service thread is generating network topological diagram, generates the algorithm that can adopt Depth Priority Algorithm and BFS of topological diagram.This algorithm adopts depth-first search, and its concrete steps are:
A. arranging looped network mark amount is 0 show not occur loop, and each Node configuration of equipment chained list is not for search for complement mark;
B. the equipment not having to have searched for is found, if do not find this equipment to exit whole step.If find this equipment, the current depth of this equipment and depth capacity are set to 0, set up current device current depth path vector, current depth path vector, spends path vector the most deeply, all of the port of all devices is set to not accessed mark simultaneously;
C. set up a stack, the element of stack comprises the type of node, device node, port node; If what type equaled that 0 representative deposits is equipment, port node reset represent nonsensical; If type equals 1, what deposit is port, the device node at what now equipment was deposited is port place, and port deposits port node data, represents current device node stacked; Step B find not search for finishing equipment node stacked, device node stored in current depth path vector, current depth value 1;
D. judge whether stack is empty, if stack is empty, the device node of popping recently is set to search and completes, and goes to step B; If be not empty, get stack top element, if stack top element is port node, turn to step e; If stack top element is device node, search the port node of the not accessed mistake of this equipment and stacked, arrange this port for access flag, the port of the correspondence of the neighbor device simultaneously port node pointed to is set to access flag; If equipment does not find the port node of not accessed mistake, then pop, current depth subtracts 1, and current path degree of depth vector removes this equipment, turns to step D; If find this port, this port is stacked, arranges this port for access flag, and the port of the correspondence of the neighbor device simultaneously port node pointed to is set to access flag; If the neighbor device pointer of this port node exists, check that whether the device node of pointer indication is identical with the node in path vector, identically go to step G, if not identical, then current depth adds 1, and neighbor device, stored in current depth path vector, then jumps to the device node of neighbor device pointed, neighbor device is stacked, moves into current depth path vector simultaneously; Go to step F;
If E. stack top element is port node, the equipment at port place is obtained from this stack top element, search the port node of not accessing of this equipment, find this port stacked, this port is set for access flag, the port of the correspondence of the neighbor device of port node sensing is set to access flag, port node indication neighbor device node is stacked, turns to step D simultaneously; The port node of not accessing does not exist, and pops, and turns to step D;
F. current depth adds 1, when current depth is greater than depth capacity, upgrades depth capacity with current depth, and current depth path vector copies to depth capacity vector simultaneously, turns to step D;
If G. identical, then prove to occur loop, all nodes on record loop are also preserved, arranging looped network mark amount is 1 show to occur loop, preserves the nodes that this ring exists simultaneously, abandons this deep search, the all nodes occurred in loop, be set to search for mark, then start the root node finding next depth-first search, this node did not occur in the loop of record.Turn to step B;
Repeat above-mentioned in steps until all devices is all provided with search complement mark, all depth capacitys being root node with this equipment can be obtained by aforesaid operations.If asking in depth capacity process the node not having to find repeating, then network configuration is being tree topology.Ask the algorithm flow of depth capacity as shown in Figure 4.
After obtaining depth capacity, start the distance between computing equipment, area shared by each equipment, equipment is represented with square, distance between equipment equals the total height of painting canvas divided by depth capacity: suppose that this distance is for D, the foursquare length of side representing equipment equals 1/8th of equipment distance, i.e. length of side a=D/8.Each equipment has 2 hiding painting canvas, and the essential information of a painting canvas recording equipment comprises equipment sign, IP address, MAC Address, the multicast address of each port association of another painting canvas recording equipment.The two ends of the line of every 2 equipment have one to hide picture simultaneously, the port numbers of record institute attached device.
Network topological diagram has two large classes: tree topology, ring topology.According to depth-first search and BFS, two and multiple same device node is there is in searching route, then can judge it is ring topology, otherwise be tree topology, this algorithm is asked in the depth capacity process of device node and is judged that network is annular or tree topology, and adopts diverse ways drawing topological graph.
The plot step of tree topology is: detection ring network mark will amount, if be 0, then representative is tree structure, check the depth capacity of each device node, if the degree of depth is identical, the mac address of compare facilities, little preferential in mac address, they are carried out descending, find arrangement first equipment, it is placed in the middle position of the top of painting canvas, then the path vector of this equipment is traveled through, under Current Scan, target equipment points to the beginning of arrangement, from the 1st equipment of the arrangement of subscript sensing, D distance immediately below equipment, draw next equipment, then setting-out connects this two equipment.According to said method draw all devices on the depth capacity path of this equipment.After all devices line in the darkest path of the darkest equipment of the degree of depth is completed, Current Scan subscript adds 1, start the device node path of the equipment depth capacity of drawing scanning subscript indication: first judge to occur in the figure of the whether former drafting of this equipment, then need not draw separately if there is crossing, find out this node, then draw according to the method for drawing the darkest path of Article 1.Before this node of each drafting, first judge whether this node exists, if existed, need not draw, directly connect with straight line.If this node did not occur, horizontal-shift D distance, vertical shift H(H=(depth capacity-present node degree of depth) × D), draw this node.In addition in order to the overall maintenance balance of figure, in turn at the darkest path the right and left drawing path and equipment, each drafting departs from D distance downwards, departs from D distance to the left side or the right simultaneously.According to this kind of method until all devices in queue is all completed.And then scanning device chained list, specifically according to BFS, check which equipment line is not drawn, if do not drawn, connect this two equipment with sensing.The method for drafting of tree structure as shown in Figure 5.
The drafting of ring topology figure, detection ring network mark will amount, if be 1, check all looped network nodes and looped network interior joint logarithmic data preserved, therefrom finds out that ring that the nodes of preservation is maximum.If the nodes of several ring is the same, then that first detects is preferential, and the nodes of this ring is set to depth H, draw the equipment on this ring and line, determine a bit in the central authorities of painting canvas, be the center of circle with this, 1/4 width of painting canvas for radius, start the equipment drawn on circumference.Each increase 360/H degree central angle, draws out all devices on ring and straight line connection.And then successively with the equipment on this ring for source point, be breadth first search, first check whether its neighbor device occurs in the figure drawn, if there is cross and they between there is no line, then directly draw straight line connect this two equipment; If do not occurred, with the equipment on ring for the center of circle, 1/8 width of painting canvas is radius, and its neighbor device do not occurred all is plotted on painting canvas.The central angle of each drafting increase fixed angle, suppose neighbours' number that it did not occur for T=360/, when after on ring, the neighbours of all devices have drawn, again in the same way, the equipment newly added with these for the center of circle start draw, until all limits and equipment all occurred on painting canvas.
According to the method for drafting of above-mentioned tree structure and loop configuration, while each equipment of drafting, add the port information on the IP address of this equipment, MAC Address, descriptor, equipment line both sides in the same position hidden Layers.After line between all devices and equipment is completed, scanning multicast address table, adds to multicast address on the hiding painting canvas of multicast address associations equipment, also adds the port vector of this multicast address corresponding device simultaneously.
The service thread of service end is responsible for user interface part, it have show and hide Layers, inquiry apparatus information, inquiry multicast address information, various function such as inquiry multicast path etc.The multicast address of user's query device specific, only needs the multicast address painting canvas equipment is hidden again to show.Whether whether user wants to inquire about specific multicast address exists in current network, first need to inquire about this address and be present in multicast address table, if do not existed in multicast address table, return query failure message; If existed, then inquire about the multicast device pointer chained list that multicast address points to, then on painting canvas, these relevant devices pointed by pointer are highlighted display, line also overstriking display.Any one multicast address distribution situation in a network in current network can be checked by this.
Client is responsible for information upload to service end, client needs IP address and the port numbers of knowing service end, general port numbers remains unchanged, but network manager can change the IP setting of service end sometimes, or keeper moves to another computer service end from a computer, now all in normal conditions clients all need to reconfigure.The present invention proposes following scheme and solves this problem: in service end running, the IP address of periodic overseas broadcast oneself, whether the IP preserved before first client adopts in just bringing into operation is normal to detect service end, if time-out does not receive the response message of service end, start the broadcast message receiving service end, the IP address of new service end is obtained from the content of the broadcast message received, then with new IP address and service end communication, and preserve this IP address, when next time is run, use this address.
Client needs to upload neighbor information and multicast address information, client process and LLDP protocol process, and GMRP protocol process, IGMP protocol process carries out synchronous collaboration.The mode of synchronous collaboration has the several types such as pipeline, message queue, shared drive, web socket.In this algorithm, adopt message queue, the type of the order of type of message and service end process is here duplicate, and numbering and the implication of type of message are as follows:
1. type of message 0x01, finds new neighbours.
2. type of message 0x02, former neighbours are out of touch.
3. type of message 0x11, finds new multicast address.
4. type of message 0x12, multicast address leaves a port.
Client process needs and the cooperation of LLDP protocol process obtains neighbor information, adopts message queue to carry out data and transmit with synchronous between two processes.After the neighbours that LLDP protocol discovery one is new, type of message 0x01 is set, by these information such as the port numbers of the IP address of the MAC Address of the IP address of sender, sender, neighbours, MAC Address and correspondence, issues client process by message queue.After client process receives this information in message queue, be assembled into UDP message and issue service end.After LLDP protocol discovery neighbours are out of touch, type of message 0x02 is set, by these information of port numbers of the IP address of the MAC Address of the IP address of sender, sender, neighbours, MAC Address and correspondence, client process is issued by message queue, after client process receives this information in queue, be assembled into UDP message and issue service end.
Client process needs and GMRP agreement or IGMP protocol process cooperate obtains multicast address information, when GMRP agreement or IGMP protocol process receive join message registration multicast address time, type of message 0x11 is set, by the IP address of sender, the MAC Address of sender, multicast address type, multicast address, corresponding port vector, write in message queue, when GMRP agreement or IGMP protocol process receive leave message nullify multicast address time or multicast address time-out known time, type of message 0x12 is set, the IP address of sender, the MAC Address of sender, multicast address type, multicast address, corresponding port vector, write in message queue.After client process receives this information in queue, be assembled into UDP message and issue service end.Cooperation relation between the process of service end and client as shown in Figure 5.
accompanying drawing explanation
The synchronized relation of Fig. 1 communication thread and service thread
Graph of a relation between Fig. 2 common data structures
The flow process of Fig. 3 service end processing command
Fig. 4 take device node as the algorithm flow that root asks depth capacity
The method for drafting of Fig. 5 tree structure
The method for drafting of Fig. 6 loop configuration
Cooperation relation between the process of Fig. 7 service end and client
Embodiment
First select a high performance server as service end, the ability that it has a large amount of network data of parallel processing has good man-machine interface simultaneously, operation service end process.The communication thread of service end periodically externally issues the IP address of oneself, receives the information upload of client, sets up common data structures.If common data structures has variation, signaling service thread refreshes topological diagram.Service end periodically clears up invalid equipment, invalid equipment neighborhood, current useless multicast address, if find in the process, data structure is eliminated, then signaling service thread refreshes topological diagram.The service thread wait-receiving mode signal of service end, after receiving signal, scanning common data structures, generates new topological diagram.Service thread is after generation topological diagram, according to multicast address table information in common data structures, the multicast address information of each equipment is filled on hiding Layers, it receives the inquiry request of user simultaneously, after receiving inquiry request, inquiry common data mechanism and the topological diagram of generation, then open the content revealing that hides Layers to user.When the multicast address of user's query device specific, only the multicast address information painting canvas that this equipment hides filling need be shown.When user inquires about the distribution of specific multicast address, first inquire about in specific multicast address table and whether exist, if do not existed in multicast address table, return query failure message; If this multicast address exists, the device pointer chained list that inquiry multicast address points to, then adds some points these relevant devices pointed by pointer, highlight display on painting canvas, line also overstriking display.Any one multicast address distribution situation in a network in current network can be checked by this.
Client comprises supports LLDP agreement, and GMRP agreement, the equipment of IGMP agreement, ordinary circumstance comprises intelligent exchange, router, intelligent electronic device.Client needs amendment LLDP agreement, GMRP agreement, IGMP agreement, open respective message queue, these queues are connected to client process, need to be modified by the source code of these agreements, in GMRP agreement, when IGMP protocol discovery needs registration and unregistration specific multicast address, these information are all crossed message queue and issue client process and process.At the new neighbor device of LLDP protocol discovery or when having neighbor device out of touch, these information are all crossed message queue and issue client process and process.Client process, after receiving these message, is issued service end by UDP message and is processed.
Above said content, just a concrete example of the present invention, and not only for limiting protection scope of the present invention.All any amendments within original scope of the present invention, equivalencing, improves and any parameter adjustment, all should be included among protection scope of the present invention.

Claims (8)

1. the topological diagram algorithm of display and analysis multicast distribution, employing client-side/server-side architecture shows the neighbours' topological diagram in network in real time, reflects the multicast distribution situation in network simultaneously, it is characterized in that: server and client side performs following step respectively:
Service end is an a large amount of network data of parallel processing and has the server of good man-machine interface, comprises two threads of executed in parallel: communication thread and service thread, communication thread; Their operating procedure is as follows:
The neighbor information message that A communication thread reception client is sent and multicast address infomational message;
B communication thread sets up common data structures according to the neighbor information received and multicast address information, and this data structure comprises facility information, port neighbor information, multicast address information;
C communication thread is notification service thread after setting up common data structures;
D service thread is notified, the information of scanning common data structures, drawing topological graph, simultaneously in the multicast address information of adding about equipment that hides Layers;
E service shows network topological diagram in real time and waits for inquiry and the display request of user, according to request display multicast address information;
Client by supporting LLDP agreement, GMRP agreement, IGMP agreement equipment composition, operating procedure is as follows:
A client is by LLDP protocol process, GMRP protocol process, IGMP protocol process synchronous collection neighbor information and multicast address information;
The message that B collects passes to client process;
C client process is uploaded to service end message.
2., according to the display shown in claim 1 and the topological diagram algorithm analyzing multicast distribution, common data structures comprises equipment chained list, multicast address chained list; Equipment chained list is made up of device node, and device node comprises the pointer pointing to port node, points to the pointer of next device node, the IP address of equipment, the mac address of equipment; Port node comprises the port numbering of local terminal, the port numbering of opposite end, points to the device node pointer of its neighbor device, points to the pointer belonging to the next port node of same equipment; Multicast device node comprises the pointer of sensing equipment node, the device port vector of this multicast address use, points to the pointer of next multicast device node; At equipment, port, by equipment chained list between multicast address, is associated between multicast address table and port; It is characterized in that: the establishment step of common data structures is as follows:
A service end receives the neighbor information of client upload, and neighbor information comprises sender information, port message, the neighbor information of port; Judge whether client sender exists at equipment chained list, if there is no, perform step B; Step C is performed if existed;
B creates a device node, and create a port node, the port pointer in device node points to this port node simultaneously;
C judges whether port node exists, and if there is no creates a port node, this port node of device node middle port pointed; Judge whether its neighbor device exists in equipment chained list, if existed, the neighbor device of port node points to this device node; If there is no step D is performed;
D creates a device node, this equipment of neighbor device pointed of port node;
E service end receives the multicast address information of client upload, and multicast address packets of information, containing sender information and multicast address information, first judges whether this multicast address exists, and if there is no then creates a multicast address node;
F judges whether existing about sender's equipment in multicast address information; If there is no this device node is then created;
G judges whether exist in the multicast device node that multicast address node points to, if there is no, create this multicast device node, calculates port vector, and the device pointer sensing equipment node of multicast device node.
3. the topological diagram algorithm of the display according to claim 1 and 2 and analysis multicast distribution, the service thread of service end is responsible for drawing topological graph, equipment carries out depth-first search and obtains longest path, in deep search process, if there is loop, looped network mark amount is set, the sum of each node and loop node in record loop: it is characterized in that: ask the step in equipment depth capacity path to be:
It is 0 show not occur loop that A arranges looped network mark amount, and each Node configuration of equipment chained list is not for search for complement mark;
B finds the equipment not having to have searched for, if do not find this equipment to exit whole step, if find this equipment, the current depth of this equipment and depth capacity are set to 0, set up current device current depth path vector, current depth path vector, spends path vector the most deeply, all of the port of all devices is set to not accessed mark simultaneously;
C sets up a stack, and the element of stack comprises the type of node, device node, port node; If what type equaled that 0 representative deposits is equipment, port node reset represent nonsensical; If type equals 1, what deposit is port, the device node at what now equipment was deposited is port place, and port deposits port node data, represents current device node stacked; Step B find not search for finishing equipment node stacked, device node is stored in current depth path vector, and current depth value adds 1;
D judges whether stack is empty, if stack is empty, the device node of popping recently is set to search and completes, and goes to step B; If be not empty, get stack top element, if stack top element is port node, turn to step e; If stack top element is device node, search the port node of the not accessed mistake of this equipment and stacked, arrange this port for access flag, the port of the correspondence of the neighbor device simultaneously port node pointed to is set to access flag; If equipment does not find the port node of not accessed mistake, then pop, current depth subtracts 1, and current path degree of depth vector removes this equipment, turns to step D; If find this port, this port is stacked, arranges this port for access flag, and the port of the correspondence of the neighbor device simultaneously port node pointed to is set to access flag; If the neighbor device pointer of this port node exists, check that whether the device node of pointer indication is identical with the node in path vector, identically go to step G, if not identical, then current depth adds 1, and neighbor device, stored in current depth path vector, then jumps to the device node of neighbor device pointed, neighbor device is stacked, moves into current depth path vector simultaneously; Go to step F;
If E stack top element is port node, the equipment at port place is obtained from this stack top element, search the port node of not accessing of this equipment, find this port stacked, this port is set for access flag, the port of the correspondence of the neighbor device of port node sensing is set to access flag, port node indication neighbor device node is stacked, turns to step D simultaneously; The port node of not accessing does not exist, and pops, and turns to step D;
F current depth adds 1, when current depth is greater than depth capacity, upgrades depth capacity with current depth, and current depth path vector copies to depth capacity vector simultaneously, turns to step D;
If G is identical, then prove to occur loop, all nodes on record loop are also preserved, and arranging looped network mark amount is 1 show to occur loop, preserves the nodes that this ring exists simultaneously, abandon this deep search, the all nodes occurred in loop, be set to search for mark, then start the root node finding next depth-first search, this node did not occur in the loop of record, turned to step B.
4. the topological diagram algorithm of the display according to claim 1 and 3 and analysis multicast distribution, it is characterized in that: if not there is loop in depth-first search, the longest path descending that the depth-first search of all devices is obtained, arrangement compares according to the degree of depth in path and the mac address of equipment, the superior elder generation of the degree of depth, the degree of depth is the same, little preferential in mac address; Then first draw equipment and the line of the longest degree of depth, then draw equipment and the line of vice-minister's degree of depth, if former equipment was drawn, then need not draw direct connection; Repeat these operations until all equipment and line are all completed.
5. the topological diagram algorithm of the display according to claim 1 and 3 and analysis multicast distribution, it is characterized in that: if there is loop in depth-first search, then first obtain the ring that loop interior joint number is maximum, then with the centre of painting canvas for the logic center of circle, with certain length for radius, increase progressively a fixing central angle at every turn, circumferentially successively the equipment in the longest endless path is being drawn out, and straight line connects this equipment; Then with these equipment for the center of circle, breadth first search is carried out to these equipment simultaneously, the equipment searched is plotted in circumferentially successively, and straight line connect; Repeat these operations until all equipment and neighborhood are all out drawn.
6. according to the display shown in claim 1 and the topological diagram algorithm analyzing multicast distribution, it is characterized in that: after having drawn topological diagram, scanning multicast address table, obtains the equipment of sensing multicast address associations, in the hiding Layers of equipment, add this multicast address.
7. according to the display shown in claim 1 and the topological diagram algorithm analyzing multicast distribution, it is characterized in that: whether user wants to inquire about specific multicast address exists in current network, whether first need to inquire about this address is present in multicast address table, if do not existed in multicast address table, return query failure message; If existed, then inquire about the device pointer chained list that multicast address points to, then on painting canvas, these relevant devices pointed by pointer are highlighted display, line also overstriking display, can check any one multicast address distribution situation in a network in current network by this.
8. according to the display shown in claim 1 and the topological diagram algorithm analyzing multicast distribution, it is characterized in that: client process needs and LLDP protocol process, GMRP protocol process, IGMP protocol process synchronously collect neighbor information and multicast address information, above-mentioned each process can carry out data transmission and synchronous by modes such as pipeline, message queue, shared drive, sockets; When LLDP protocol process discovery neighbours have variation, the message of variation is issued client process and processes; When GMRP protocol process and IGMP protocol process find that multicast address registration occurs or nullifies, the message of variation is issued client process and processes, client receives the laggard row relax of message and issues service end process by udp protocol.
CN201410250288.8A 2014-06-09 2014-06-09 Display and the method for analysis multicast distributed topology figure Active CN104219113B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410250288.8A CN104219113B (en) 2014-06-09 2014-06-09 Display and the method for analysis multicast distributed topology figure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410250288.8A CN104219113B (en) 2014-06-09 2014-06-09 Display and the method for analysis multicast distributed topology figure

Publications (2)

Publication Number Publication Date
CN104219113A true CN104219113A (en) 2014-12-17
CN104219113B CN104219113B (en) 2017-11-24

Family

ID=52100267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410250288.8A Active CN104219113B (en) 2014-06-09 2014-06-09 Display and the method for analysis multicast distributed topology figure

Country Status (1)

Country Link
CN (1) CN104219113B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI638549B (en) * 2016-12-14 2018-10-11 中華電信股份有限公司 Visualized software network service dynamic supply and series system and method thereof
TWI653857B (en) 2017-12-27 2019-03-11 中華電信股份有限公司 Method and system for topological operation
CN114630361A (en) * 2022-03-14 2022-06-14 浙江瑞瀛物联科技有限公司 Zigbee wireless communication analysis system based on imaging
CN114844864A (en) * 2022-06-30 2022-08-02 深圳市爱图仕影像器材有限公司 Configuration method and device of DMX equipment information

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588884A (en) * 2004-07-06 2005-03-02 北京航空航天大学 Automatic discovering method for IPV6 internet network topology
CN101212348A (en) * 2006-12-31 2008-07-02 中兴通讯股份有限公司 Resilient packet ring based graphical display method for service topology
CN102148703A (en) * 2011-01-19 2011-08-10 武汉迈威光电技术有限公司 Network management topology realizing algorithm of switchboard
CN102195857A (en) * 2010-03-18 2011-09-21 武汉迈威光电技术有限公司 Network topology structure and node information gathering method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588884A (en) * 2004-07-06 2005-03-02 北京航空航天大学 Automatic discovering method for IPV6 internet network topology
CN101212348A (en) * 2006-12-31 2008-07-02 中兴通讯股份有限公司 Resilient packet ring based graphical display method for service topology
CN102195857A (en) * 2010-03-18 2011-09-21 武汉迈威光电技术有限公司 Network topology structure and node information gathering method
CN102148703A (en) * 2011-01-19 2011-08-10 武汉迈威光电技术有限公司 Network management topology realizing algorithm of switchboard

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI638549B (en) * 2016-12-14 2018-10-11 中華電信股份有限公司 Visualized software network service dynamic supply and series system and method thereof
TWI653857B (en) 2017-12-27 2019-03-11 中華電信股份有限公司 Method and system for topological operation
CN114630361A (en) * 2022-03-14 2022-06-14 浙江瑞瀛物联科技有限公司 Zigbee wireless communication analysis system based on imaging
CN114844864A (en) * 2022-06-30 2022-08-02 深圳市爱图仕影像器材有限公司 Configuration method and device of DMX equipment information
CN114844864B (en) * 2022-06-30 2022-10-25 深圳市爱图仕影像器材有限公司 Configuration method and device of DMX equipment information

Also Published As

Publication number Publication date
CN104219113B (en) 2017-11-24

Similar Documents

Publication Publication Date Title
CN102075417B (en) Multicast cutting method, protocol independent multicast router
CN100388695C (en) Monitoring and analytic system for route between domain of internet and its working method
CN103108089B (en) Connection establishment management method of network system and related system thereof
Arshad et al. Towards information-centric networking (ICN) naming for Internet of Things (IoT) the case of smart campus
CN105490957B (en) A kind of load sharing method and device
CN107431726A (en) Messaging bus service catalogue
CN104219113A (en) Topological algorithm for displaying and analyzing multicast distribution
CN103873523B (en) client cluster access method and device
CN108521656A (en) A kind of Lora communication means and system
CN102780779A (en) Gateway equipment and method and device for optimization of campus network export P2P (peer-to-peer) traffic
CN108733821A (en) A kind of distribution of monitor video sectional drawing and methods of exhibiting and system
Sri et al. A review on the state of art of Internet of Things
CN103200102A (en) Method, device and system for service routing
CN105208090A (en) Zookeeper-based Leader selection method
CN109729115A (en) Realize method, apparatus, the proxy server, terminal device of distributed computing
CN106331115A (en) Distributed expandable server system in support of multi-device connection
CN101662508B (en) Method for data transmission based on point-to-point protocol, device and system thereof
CN105635335B (en) Social resources cut-in method, apparatus and system
CN102104526A (en) Method, device and system for distributing and obtaining contents
CN101902347B (en) Anonymous meeting terminal enrollment method and device
CN106899641A (en) The acquisition methods of data resource, server, control device and communication system
CN103001874B (en) Delay tolerant mobile social network routing method based on node label set
CN113055457B (en) Access control and data forwarding method and device, electronic equipment and storage medium
CN100586104C (en) A route-based talk initialization protocol transparent transmission network address conversion method
CN102469017A (en) Relay selection method and relay control system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20180111

Address after: 430070 Hubei Province, Wuhan City, Donghu High Technology Development Zone Light Valley Road 62 light valley headquarters international 6 Building 9 layer

Patentee after: Wuhan macwell Communication Co. Ltd.

Address before: 430073 9 floors of the Optics Valley headquarters, Optics Valley Avenue, Wuhan, Wuhan, Hubei

Patentee before: Wuhan Maiwei Shida Software Co., Ltd.

TR01 Transfer of patent right
CP03 Change of name, title or address

Address after: 430000 Block E, Phoenix Industrial Park, 52 Liufang Avenue, Donghu New Technology Development Zone, Wuhan City, Hubei Province, No. 2

Patentee after: Wuhan Maiwei Communications Co., Ltd.

Address before: 430070 Hubei Province, Wuhan City, Donghu High Technology Development Zone Light Valley Road 62 light valley headquarters international 6 Building 9 layer

Patentee before: Wuhan macwell Communication Co. Ltd.

CP03 Change of name, title or address
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20141217

Assignee: Shanxi MeiAn Technology Co.,Ltd.

Assignor: Wuhan Maiwei Communications Co.,Ltd.

Contract record no.: X2021420000032

Denomination of invention: Method for displaying and analyzing multicast distribution topology

Granted publication date: 20171124

License type: Common License

Record date: 20211123

EE01 Entry into force of recordation of patent licensing contract