[go: up one dir, main page]

CN1558615A - A physical network topology discovery system and method thereof - Google Patents

A physical network topology discovery system and method thereof Download PDF

Info

Publication number
CN1558615A
CN1558615A CNA2004100018209A CN200410001820A CN1558615A CN 1558615 A CN1558615 A CN 1558615A CN A2004100018209 A CNA2004100018209 A CN A2004100018209A CN 200410001820 A CN200410001820 A CN 200410001820A CN 1558615 A CN1558615 A CN 1558615A
Authority
CN
China
Prior art keywords
information
switch
topology
port
address
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.)
Pending
Application number
CNA2004100018209A
Other languages
Chinese (zh)
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.)
Institute of Computing Technology of CAS
Original Assignee
Institute of Computing Technology of CAS
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 Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CNA2004100018209A priority Critical patent/CN1558615A/en
Publication of CN1558615A publication Critical patent/CN1558615A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a physical network topology finding system for computer network topology and general purpose MIB information and method thereof, which comprises, determining the IP address range of the administration domain, determining the active IP address aggregation in the network address range, determining subnet quantity, corresponding subnet number and subnet mask, mapping the IP address aggregation, obtaining the discovered address transferring table information belonging to the switchboard of the subnet, obtaining the connection between the ports of the switchboards. determining the connection between the host computer and the port of the switchboard. The system comprises: a determining device for the apparatus, an information gathering device, an information processing device, a topology display device. The invention is utilized to a variety of IP network( such as IPV4, IPV6, and IP telecommunication network).

Description

一种物理网络拓扑发现系统及其方法A physical network topology discovery system and method thereof

技术领域technical field

本发明涉及计算机网络拓扑发现以及通用的MIB(管理信息库)库信息,特别是一种物理网络拓扑发现系统及其方法,基于此类信息的物理拓扑发现以及通用的拓扑发现技术。The invention relates to computer network topology discovery and general MIB (management information base) library information, in particular to a physical network topology discovery system and method thereof, physical topology discovery based on such information and general topology discovery technology.

背景技术Background technique

交换机已成为现代计算机网络的关键设备。对于网络管理员来说,能够随时获取网络的拓扑信息具有极其重要的意义。它可以帮助判断链路的通断、进行错误相关性分析,以及将服务器安放在最合适的位置。Switches have become key devices in modern computer networks. For network administrators, it is extremely important to be able to obtain network topology information at any time. It can help determine link continuity, perform error correlation analysis, and place servers in the most appropriate locations.

传统的拓扑发现技术只进行三层的逻辑网络连接发现,即发现路由器和子网的连接,这种技术显然不适用于交换机的环境。因为与路由器的路由表存放了相邻实体(指路由器)的信息不同,交换机的通用地址转发表并不能明确给出相邻实体(指交换机)的信息。当然,某些厂商提供特定的协议支持设备的发现,如CISCO的CDP协议。但通常局域网中的设备并不来自同一个厂家,在这种异构网络的环境下,需要有新的算法来支持异构网络的拓扑发现,这些算法所基于的信息基础必须是所有厂商都支持的共同标准。The traditional topology discovery technology only discovers the logical network connections of the three layers, that is, discovers the connections between routers and subnets. This technology is obviously not suitable for the environment of switches. Because the routing table of the router stores the information of the adjacent entity (referring to the router), the general address forwarding table of the switch cannot clearly provide the information of the adjacent entity (referring to the switch). Of course, some manufacturers provide specific protocols to support device discovery, such as CISCO's CDP protocol. But usually the devices in the LAN do not come from the same manufacturer. In such a heterogeneous network environment, new algorithms are needed to support the topology discovery of the heterogeneous network. The information basis of these algorithms must be supported by all manufacturers. common standards.

发明内容Contents of the invention

本发明的目的在于提供一种物理网络拓扑发现的方法,是能在异构网络环境提供的有限信息基础上,准确地发现二层物理网络拓扑结构,包括交换机端口与交换机端口的连接、交换机与主机的连接、交换机和HUB的连接、主机与HUB的连接。同时可以把该算法应用到VLAN的环境中。The purpose of the present invention is to provide a method for discovering physical network topology, which can accurately discover the layer-2 physical network topology structure based on the limited information provided by the heterogeneous network environment, including the connection between switch ports and switch ports, the connection between switches and The connection of the host, the connection of the switch and the HUB, the connection of the host and the HUB. At the same time, the algorithm can be applied to the VLAN environment.

基于通用MIB库信息的二层网络拓扑(在本文档中,二层网络拓扑等同于物理网络拓扑,二者可以互换)发现方法。本发明通过自行设计的算法,通过设备确定、信息采集、信息计算三个阶段发现二层网络的拓扑结构。本发明的特点在于,将一般算法收集网络信息前所需要发送的ICMP消息数从O(n2)降低到O(n),减少了对网络带宽的占有量并提高了系统运行的速度;本发明同时能发现网络中对于交换机透明的HUB设备,从而给出确切的物理连接而非逻辑连接。该发明能应用到各类IP网(IPV4,IPV6,IP电信网等)中实现,既适用于没有VLAN的环境,也适用于配置有VLAN且每个VLAN对应于一棵生成树的环境等。A layer-2 network topology discovery method based on general MIB database information (in this document, a layer-2 network topology is equivalent to a physical network topology, and the two can be interchanged). The invention discovers the topological structure of the two-layer network through three stages of equipment determination, information collection and information calculation through self-designed algorithm. The present invention is characterized in that the number of ICMP messages that need to be sent before the general algorithm collects network information is reduced from O(n 2 ) to O(n), which reduces the occupation of network bandwidth and improves the speed of system operation; At the same time, the invention can discover the HUB equipment transparent to the switch in the network, so as to give the exact physical connection instead of the logical connection. The invention can be implemented in various IP networks (IPV4, IPV6, IP telecommunication networks, etc.), and is applicable to environments without VLANs and environments configured with VLANs and each VLAN corresponds to a spanning tree.

基于通用RFC定义的MIB信息的二层物理网络拓扑发现方法,包括设备发现、信息采集和拓扑计算三个阶段来达到目的,我们所提出的算法基于通用的RFC定义的MIB信息,适用于异构网络,通过计算能给出二层网络中交换机端口与交换机端口,交换机端口与HUB,交换机端口与主机,主机与HUB的连接关系;The two-layer physical network topology discovery method based on the MIB information defined by the general RFC includes three stages of device discovery, information collection and topology calculation to achieve the goal. The algorithm we propose is based on the MIB information defined by the general RFC, and is suitable for heterogeneous Network, through calculation, the connection relationship between switch port and switch port, switch port and HUB, switch port and host, host and HUB can be given in the layer-2 network;

我们提出的算法,算法运行前的采集信息预处理过程,所发送的ICMP信息量为O(n),算法所基于的理论基础是关于上行端口和下行端口划分。The algorithm we proposed, the preprocessing process of collecting information before the algorithm runs, the amount of ICMP information sent is O(n), and the theoretical basis of the algorithm is about the division of uplink ports and downlink ports.

首先介绍我们所提出的基于二层拓扑发现的算法Firstly, we introduce our proposed algorithm based on Layer 2 topology discovery

1定义1 definition

转发表:交换机Si的端口j在交换过程中存储的该端口收到的源MACForwarding table: port j of switch S i stores the source MAC received by the port during the switching process

    地址集合,记为F(Si,j);Address set, denoted as F(S i , j);

转发表完整:交换机Si的端口j的转发表完整指F(Si,j)包含了所有Complete forwarding table: The complete forwarding table of port j of switch S i means that F(S i , j) contains all

       该端口所能看到的设备MAC地址的集合;A collection of device MAC addresses that the port can see;

叶交换机:在转发表完整的情形下,若某个交换机存在且仅存在一个Leaf switch: In the case of a complete forwarding table, if a switch exists and only one

      端口,其转发表包含其它交换机的MAC地址;A port whose forwarding table contains the MAC addresses of other switches;

标志节点:当算法运行的主机为待发现子网中的成员,则该主机称为Flag node: When the host running the algorithm is a member of the subnet to be discovered, the host is called

      标志节点;否则,连接该子网的路由器称为标志节点;Sign node; otherwise, the router connected to the subnet is called a sign node;

交换机的叶端口:如果交换机Si端口j的转发表F(Si,j)在完整的情Leaf port of the switch: If the forwarding table F(S i , j) of port j of switch S i is in complete condition

        况下不包含其它任何交换机或标志节点的MAC地址,则In the case does not contain the MAC address of any other switches or marked nodes, then

        称为该交换机的叶端口;is called the leaf port of the switch;

上行端口:端口对应的转发表中出现标志节点MAC地址的端口;Uplink port: the port whose MAC address of the marked node appears in the forwarding table corresponding to the port;

下行端口:端口对应的转发表中没有出现标志节点MAC地址的端口;Downlink port: the port corresponding to the port does not appear in the forwarding table that marks the MAC address of the node;

2定理2 theorems

若交换机Si与Sk满足:

Figure A20041000182000061
(n=1,2….,N,N为交换机Sk的端口计数,且n不等于上行端口集合中端口的编号),则Si的端口j与Sk的上行端口1直接相连。例如,图2中S3的上行端口为1,下行端口为2,3,满足F(S2,2)=F(S3,2)∪F(S3,3)∪{S3},因此判定S2端口2与S3上行端口1相连。If the switches S i and S k satisfy:
Figure A20041000182000061
(n=1, 2..., N, N is the port count of switch S k , and n is not equal to the port number in the uplink port set), then port j of S i is directly connected to uplink port 1 of S k . For example, in Figure 2, the uplink port of S3 is 1, and the downlink port is 2, 3, which satisfies F(S2, 2) = F(S3, 2)∪F(S3, 3)∪{S3}, so it is determined that S2 port 2 Connect to uplink port 1 of S3.

我们提出的算法1,算法的理论计算依据是:交换机A的下行端口与交换机B的上行端口直接连接的条件是交换机A的下行端口转发表正好等于交换机B的非上行端口转发表之并集再并上B本身。3算法-1(适用于交换机与交换机直接相连而不是通过HUB相连)We propose Algorithm 1, the theoretical calculation basis of the algorithm is: the condition that the downlink port of switch A is directly connected with the uplink port of switch B is that the downlink port forwarding table of switch A is exactly equal to the union of the non-uplink port forwarding table of switch B And on B itself. 3 Algorithm-1 (applicable to switches directly connected to switches instead of connected through HUB)

1)PING子网内所有交换机1) PING all switches in the subnet

图3给出了PING消息流的方向;Figure 3 shows the direction of the PING message flow;

2)依次读取每台交换机的地址转发表;2) Read the address forwarding table of each switch in turn;

3)从各交换机地址转发表中构造每台交换机的上行端口与下行端口集合,同时将子网内所有交换机节点放入待检测队列;3) Construct the uplink port and downlink port set of each switchboard from the address forwarding table of each switchboard, and put all switch nodes in the subnet into the queue to be detected simultaneously;

4)将叶交换机节点依次压入待生成队列(此队列为先进先出队列),同时把叶交换机从待检测队列移去;4) Push the leaf switch nodes into the queue to be generated in turn (this queue is a first-in-first-out queue), and remove the leaf switch from the queue to be detected at the same time;

5)从待生成队列中取出一节点,使其成为待检测节点;5) Take out a node from the queue to be generated to make it a node to be detected;

6)在其它结点的下行端口集合中各端口的地址转发表中查询是否包含待检测节点MAC地址,若出现但表中节点个数大于1,则删除此表项,若仅出现检测节点,则此项所对应的端口的端口号与待检测节点的上行端口直接连接,同时将此端口从当前节点的下行端口集合中移去;6) Check whether the MAC address of the node to be detected is included in the address forwarding table of each port in the downstream port set of other nodes, if it occurs but the number of nodes in the table is greater than 1, then delete this entry, if only the detection node occurs, Then the port number of the port corresponding to this item is directly connected to the uplink port of the node to be detected, and this port is removed from the downlink port set of the current node at the same time;

7)每遍历完一节点,若此节点的下行端口集合为空,则将此交换机节点压入待生成结点队列中,同时从待监测队列移去;7) Every time a node is traversed, if the downlink port set of this node is empty, the switch node is pushed into the node queue to be generated, and removed from the queue to be monitored;

8)若待生成队列不空,重复6至8。我们给出的算法2能发现多个交换机之间通过HUB相连的情况,其特征在于,某个交换机的下行端口转发表等于若干个交换机的非上行端口转发表的并集再并上这些交换机本身。4算法-2(对于算法-1的改进,能适用于交换机与交换机之间通过HUB相连的情况,兼容算法1的情况,但复杂性稍大)8) If the queue to be generated is not empty, repeat 6 to 8. The Algorithm 2 we give can find the situation that multiple switches are connected through HUB, and the characteristic is that the downlink port forwarding table of a certain switch is equal to the union of the non-uplink port forwarding tables of several switches and then merged with these switches themselves . 4 Algorithm-2 (for the improvement of Algorithm-1, it can be applied to the situation where switches are connected through HUB, compatible with Algorithm 1, but the complexity is slightly larger)

1)找出所有的交换机集合;1) Find out all switch sets;

2)PING所有交换机;2) PING all switches;

3)获取所有交换机的转发表,并判断上行端口和下行端口;3) Obtain the forwarding tables of all switches, and judge the uplink port and downlink port;

4)将所有叶交换机节点压入待生成队列,所有非叶交换机压入待检测队列;4) All leaf switch nodes are pushed into the queue to be generated, and all non-leaf switches are pushed into the queue to be detected;

5)取出待检测队列中的一个检测节点,逐个检测其下行端口5) Take out a detection node in the queue to be detected, and detect its downlink ports one by one

CASE1:若某个下行端口仅包含一个待生成队列中的节点而不包含待检测队列中的节点,则将此下行端口直接与生成队列中该节点的上行端口相连,并将此下行端口从转发表中去掉,若去除后该节点已经没有下行端口,则将此节点压入待生成队列;把对应与之相连的的生成队列中的节点去掉;CASE1: If a downlink port only contains a node in the queue to be generated but not a node in the queue to be detected, connect the downlink port directly to the uplink port of the node in the generation queue, and transfer the downlink port from If the node has no downlink ports after removal, push this node into the queue to be generated; remove the corresponding node in the generation queue connected to it;

CASE2:若其下行端口包含若干个待生成队列中的节点,而不包括待检测队列中的节点,则此下行端口与这几个待生成队列的上行端口之间通过HUB相连接,同时,将此下行端口从转发表中去除,若去除后没有任何别的下行端口,则将此节点压入待生成队列;把对应与之相连的生成队列中的节点去掉;CASE2: If its downlink port contains several nodes in the queue to be generated, but does not include nodes in the queue to be detected, then this downlink port is connected to the uplink ports of these queues to be generated through a HUB, and at the same time, the This downlink port is removed from the forwarding table. If there is no other downlink port after removal, push this node into the queue to be generated; remove the corresponding node in the generation queue connected to it;

CASE3:若其下行端口包含有非待生成队列的节点,则检测下一个下行端口;CASE3: If its downlink port contains a node that is not a queue to be generated, then detect the next downlink port;

6)检测完所有下行端口后,若该节点仍然存在下行端口,则将此节点重新压入待检测节点的队列尾部;6) After detecting all downlink ports, if the node still has a downlink port, this node is re-pressed into the tail of the queue of the node to be detected;

7)重复5、6两步,直到待检测节点队列为空(表示完成),7) Repeat steps 5 and 6 until the queue of nodes to be detected is empty (indicating completion),

图4所示为一个包含HUB的子网环境,运用该算法进行拓扑发现过程如下:Figure 4 shows a subnet environment including a HUB. The topology discovery process using this algorithm is as follows:

各下行端口的转发表为The forwarding table behavior of each downlink port

F(S1,2)={S2,S5,S6}F(S1, 2) = {S2, S5, S6}

F(S1,3)={S3,S4,S7}F(S1, 3) = {S3, S4, S7}

F(S2,2)={S5,S6}F(S2, 2) = {S5, S6}

F(S3,2)={S7}F(S3, 2)={S7}

记待生成队列为Q,待检测队列为T,则初始时Remember that the queue to be generated is Q, and the queue to be detected is T, then the initial

Q={S5,S6,S7,S4}Q={S5, S6, S7, S4}

T={S1,S2,S3}T = {S1, S2, S3}

第一步,取出S1,检测F(S1,2),F(S1,3),均为CASE3,于是将S1压入T队尾,此时The first step is to take out S1, detect F(S1, 2), F(S1, 3), both are CASE3, then push S1 into the end of the T queue, at this time

Q={S5,S6,S7,S4}Q={S5, S6, S7, S4}

T={S2,S3,S1}T = {S2, S3, S1}

第二步,取出S2,检测F(S2,2),为CASE2,于是在S2端口2,S5端口1和S6端口1之间加一个HUB,从Q中去除S5,S6,同时删除S2的端口2的下行端口转发表,删除后S2已经不存在下行端口转发表,因此将S2压入Q,此时The second step is to take out S2, detect F(S2, 2), it is CASE2, then add a HUB between S2 port 2, S5 port 1 and S6 port 1, remove S5 and S6 from Q, and delete the port of S2 at the same time 2's downlink port forwarding table, after deletion, there is no downlink port forwarding table in S2, so S2 is pushed into Q, at this time

Q={S7,S4,S2}Q={S7, S4, S2}

T={S3,S1}T = {S3, S1}

第三步,取出S3,检测F(S3,2),为CASE1,将S3端口2和S7端口1直接相连,同时从Q中去掉S7,同时删除S3端口2的下行端口转发表,删除后S3已经不存在下行端口转发表,将S3压入Q,此时The third step is to take out S3, detect F(S3, 2), it is CASE1, directly connect S3 port 2 to S7 port 1, remove S7 from Q at the same time, and delete the downlink port forwarding table of S3 port 2, after deletion, S3 There is no downlink port forwarding table, push S3 into Q, at this time

Q={S4,S2,S3}Q={S4, S2, S3}

T={S1}T={S1}

第四步,取出S1,检测F(S1,2),为CASE1,将S1端口2与S2端口1直接相连,并将S2从Q中去除,删除S1端口2的下行端口转发表,由于S1还有一个下行端口,所以继续检测S1的下一个下行端口转发表,此时The fourth step is to take out S1, detect F(S1, 2), it is CASE1, directly connect S1 port 2 to S2 port 1, remove S2 from Q, delete the downlink port forwarding table of S1 port 2, because S1 is still There is a downlink port, so continue to detect the next downlink port forwarding table of S1, at this time

Q={S4,S3}Q = {S4, S3}

第五步,检测F(S1,3),为CASE2,将S1端口3,S4端口1,S3端口1通过HUB相连,将S4,S3从Q中去除,删除S1端口3的下行端口转发表,删除后S1已经不存在下行端口转发表,将S1压入Q,此时The fifth step is to detect F(S1, 3), which is CASE2, connect S1 port 3, S4 port 1, and S3 port 1 through HUB, remove S4 and S3 from Q, delete the downlink port forwarding table of S1 port 3, After deletion, there is no downlink port forwarding table in S1, and S1 is pushed into Q. At this time

Q={S1}Q={S1}

T=空集T = empty set

算法结束end of algorithm

为了达到所要求的目的,本解决方案在所提出的算法基础上,通过设备发现、信息采集和拓扑计算三个阶段来达到需要的目的,具体包括以下步骤:(如图5所示)In order to achieve the required purpose, this solution is based on the proposed algorithm, through three stages of device discovery, information collection and topology calculation to achieve the required purpose, specifically including the following steps: (as shown in Figure 5)

一确定管理域的IP地址范围,可以由网络管理员手动给出,或者可以通过查询网关路由器自动获得,通过查询网关路由器的ipRouteTable来获得。同时查询路由器的端口号,判断是否存在单臂路由To determine the IP address range of the management domain, it can be given manually by the network administrator, or can be obtained automatically by querying the gateway router, and can be obtained by querying the ipRouteTable of the gateway router. At the same time, query the port number of the router to determine whether there is a one-armed route

二确0定步骤一所得到的网络地址范围中活动的IP地址集合,通过ping所有IP地址实现;2. Determine the set of active IP addresses in the network address range obtained in step 1, and realize by pinging all IP addresses;

三确定子网数以及相应的子网号和子网掩码,通过访问路由器的ipAddrEntry来获得;3. Determine the number of subnets and the corresponding subnet number and subnet mask, and obtain them by accessing the ipAddrEntry of the router;

四将步骤二中所得到活动IP地址集合映射到具体的物理设备,并实例化相应设备;4. Map the active IP address set obtained in step 2 to a specific physical device, and instantiate the corresponding device;

向每个活动的IP地址发送SNMP GET消息,若该IP地址对应设备没有实现BRIDGE-MIB,则该IP地址对应设备为主机;若该IP地址对应设备实现了BRIDGE-MIB,并且其ipForwarding为0,则该IP地址对应设备为交换机;若该IP地址对应设备实现了BRIDGE-MIB,并且其ipForwarding为1,则该IP地址对应设备为路由器;多个IP地址可能对应于同一个物理设备,可以通过查看该设备的IP地址表来避免把这些IP地址映射为不同的设备;Send an SNMP GET message to each active IP address. If the device corresponding to the IP address does not implement BRIDGE-MIB, the device corresponding to the IP address is a host; if the device corresponding to the IP address implements BRIDGE-MIB, and its ipForwarding is 0 , the device corresponding to the IP address is a switch; if the device corresponding to the IP address implements BRIDGE-MIB, and its ipForwarding is 1, the device corresponding to the IP address is a router; multiple IP addresses may correspond to the same physical device, you can Avoid mapping these IP addresses to different devices by looking at the IP address table for that device;

五对于某个子网,从运行拓扑发现的主机ping所有步骤四中所获得的属于该子网的交换机设备;5. For a certain subnet, ping all the switch devices belonging to the subnet obtained in step 4 from the host running topology discovery;

六获取步骤四中发现的属于该子网的交换机的地址转发表信息;6. Obtain the address forwarding table information of the switch belonging to the subnet found in step 4;

七通过所给出的算法对步骤六中所获得的信息进行分析计算,获得交换机端口与交换机端口之间的连接(可能存在交换机-HUB-交换机连接);7. Analyze and calculate the information obtained in step 6 through the given algorithm to obtain the connection between the switch port and the switch port (there may be a switch-HUB-switch connection);

八根据交换机地址转发表中的信息,确定主机与交换机端口的连接,包括交换机-HUB-主机的连接;Eighth, according to the information in the switch address forwarding table, determine the connection between the host and the switch port, including the switch-HUB-host connection;

本发明的优点在于:利用各个厂家都支持的RFC所定义的MIB信息作为拓扑发现算法的基础,能够适用于异构网络;摈弃了一般二层拓扑发现对于所有转发表都要完整的要求,算法所采集的信息能保证算法准确地进行拓扑发现,大大减少了为达到转发表完整要求而所需要的PING操作数;能准确定位到端口与端口的连接,而不是简单的设备与设备的逻辑连接;能发现对于交换机透明的HUB设备;同时,该算法也能应用于配置VLAN且每个VLAN都对应于一棵生成树的环境;The present invention has the advantages of: using the MIB information defined by RFC supported by each manufacturer as the basis of the topology discovery algorithm, which can be applied to heterogeneous networks; abandoning the general two-layer topology discovery requirement for all forwarding tables to be complete, the algorithm The collected information can ensure that the algorithm can accurately discover the topology, greatly reducing the number of PING operations required to meet the complete requirements of the forwarding table; it can accurately locate the connection between ports, rather than the simple logical connection between devices ;Can discover HUB devices transparent to switches; at the same time, this algorithm can also be applied to the environment where VLANs are configured and each VLAN corresponds to a spanning tree;

附图说明Description of drawings

图1是典型的子网环境图。Figure 1 is a typical subnet environment diagram.

图2是定理示例图。Figure 2 is an example diagram of the theorem.

图3是ICMP消息的流向图。Figure 3 is a flow chart of ICMP messages.

图4是一个包含HUB的子网环境,运用该算法进行拓扑的流程图。Fig. 4 is a subnet environment including a HUB, and a flow chart of using this algorithm for topology.

图5是本发明的物理网络拓扑发现方法流程图。Fig. 5 is a flow chart of the method for discovering the topology of the physical network according to the present invention.

图6是本发明的物理网络拓扑发现系统图。FIG. 6 is a diagram of the physical network topology discovery system of the present invention.

图1是关于一个典型子网环境的各个术语示例Figure 1 is an example of each term for a typical subnet environment

其中S1、S2、S3、S4、S5为交换机,M为管理节点,即算法运行的节点,M同时也为该子网的标志节点。其中S3的上行端口为端口1,下行端口为端口2与端口3。S2、S4、S5为叶交换机。S4的端口2、S2的端口2分别为交换机S4和交换机S2的叶端口。Among them, S1, S2, S3, S4, and S5 are switches, M is the management node, that is, the node where the algorithm runs, and M is also the symbol node of the subnet. The uplink port of S3 is port 1, and the downlink ports are port 2 and port 3. S2, S4, and S5 are leaf switches. Port 2 of S4 and port 2 of S2 are leaf ports of switch S4 and switch S2 respectively.

M为管理站,同时也是标志节点;Sk(k=1..5)为交换机,交换机旁边的数字表示端口号,Host代表主机。M is a management station, which is also a symbol node; S k (k=1..5) is a switch, the number next to the switch represents the port number, and Host represents the host.

图2是定理的一个例子Figure 2 is an example of the theorem

图中,S3的上行端口为1,下行端口为2,3,满足F(S2,2)=F(S3,2)∪F(S3,3)∪{S3},因此判定S2端口2与S3上行端口1相连。In the figure, the uplink port of S3 is 1, and the downlink port is 2, 3, satisfying F(S2, 2) = F(S3, 2)∪F(S3, 3)∪{S3}, so it is determined that S2 port 2 and S3 Uplink port 1 is connected.

交换机S2,S3的转发表如下所示The forwarding tables of switches S2 and S3 are as follows

F(S2,2)={S3,S5,S6}F(S2, 2) = {S3, S5, S6}

F(S3,2)={S5}F(S3, 2)={S5}

F(S3,3)={S6}满足F(S2,2)=F(S3,2)∪F(S3,3)∪{S3},因此判定S2端口2与S3上行端口1相连。F(S3,3)={S6} satisfies F(S2,2)=F(S3,2)∪F(S3,3)∪{S3}, so it is determined that S2 port 2 is connected to S3 uplink port 1.

图3是ICMP消息的流向Figure 3 is the flow of ICMP messages

其中虚线箭头为ICMP请求消息流,实线箭头为ICMP响应消息流Among them, the dotted arrow is the ICMP request message flow, and the solid line arrow is the ICMP response message flow

图4是算法2网络环境的一个实例Figure 4 is an example of Algorithm 2 network environment

图中有管理站和标志节点M,交换机Sk(k=1..7)以及两个连接交换机的HUB。In the figure, there are a management station and a symbol node M, a switch S k (k=1..7) and two HUBs connected to the switches.

具体实施方式Detailed ways

实施该方案的前提有The prerequisites for the implementation of the program are

(1)各个交换机都配置有IP地址,都为可管理的,且都实现了(1) Each switch is configured with an IP address, all of which are manageable, and all of them are implemented

RFC1213-MIB和RFC1493定义的BRIDGE-MIB;BRIDGE-MIB defined by RFC1213-MIB and RFC1493;

(2)运行算法所在的主机安装有SNMP agent(2) The host where the algorithm is running is installed with SNMP agent

(3)活动的交换机和主机都响应PING消息(3) Both the active switch and the host respond to the PING message

可以将实现系统划分为四个装置:The implementation system can be divided into four devices:

(1)设备确定装置;(1) Equipment determination device;

(2)信息采集装置;(2) Information collection device;

(3)信息处理装置;(3) information processing device;

(4)拓扑信息数据库;(4) Topological information database;

(5)拓扑显示装置;(5) Topology display device;

图6给出了五个装置的相互关系。设备确定装置包括了确定管理域IP地址范围,确定活动IP地址集合,收集设备信息并实例化各个物理设备。所需要查询的MIB信息包括ipRouteTable、ipAddrTable、sysDescr、ifTable、ipForwarding、dotldBaseType等。该装置最终的结果是给出特定IP地址范围内活动的交换机集合、路由器集合、主机集合,并实例化相应设备。Figure 6 shows the interrelationships of the five devices. The device determining means includes determining the IP address range of the management domain, determining the set of active IP addresses, collecting device information and instantiating each physical device. The MIB information to be queried includes ipRouteTable, ipAddrTable, sysDescr, ifTable, ipForwarding, dotldBaseType, etc. The final result of the device is to give a set of switches, a set of routers, and a set of hosts active within a specific IP address range, and instantiate corresponding devices.

信息采集装置通过SNMP消息收集算法所需要的信息。在信息采集之前,首先需要对给定子网内的所有交换机都发送PING消息,以填充相应交换机的转发表。信息采集所需要查询的MIB信息为dotldTpFdbTable。The information collection device collects the information required by the algorithm through SNMP messages. Before collecting information, it is first necessary to send PING messages to all switches in a given subnet to fill the forwarding table of the corresponding switch. The MIB information to be queried for information collection is dotldTpFdbTable.

信息处理装置包括算法分析计算过程和信息存储过程装置。信息处理过程采用我们给出的算法通过对上行端口、下行端口及其转发表的分析,得出交换机端口到端口、交换机与HUB以及交换机与主机之间的物理连接信息。信息存储过程的前提是要进行数据库接口设计,所设计的数据库要使得拓扑显示装置能简单而全面地获得拓扑信息。通过数据库接口同时实现了信息计算与显示的分离。The information processing device includes an algorithm analysis calculation process and an information storage process device. The information processing process adopts the algorithm given by us to obtain the physical connection information between switch ports, switches and HUBs, and switches and hosts through the analysis of uplink ports, downlink ports and their forwarding tables. The premise of the information storage process is to design the database interface, and the designed database should enable the topology display device to obtain topology information simply and comprehensively. Through the database interface, the separation of information calculation and display is realized at the same time.

信息存储过程负责把算法分析的结果存放到数据库中。The information storage process is responsible for storing the results of the algorithm analysis into the database.

拓扑信息数据库;存贮拓扑信息数据;Topology information database; store topology information data;

拓扑显示装置包括获取数据库拓扑信息,根据拓扑信息进行拓扑显示。拓扑显示可以根据用户的喜好采用不同的显示风格。但无论采用哪种拓扑显示方法,显示总是独立于拓扑信息的计算的。The topology display device includes obtaining the topology information of the database, and performing topology display according to the topology information. The topology display can adopt different display styles according to the user's preference. But no matter which topology display method is used, the display is always independent of the calculation of topology information.

其中,设备确定装置连接于信息采集装置,信息采集装置连接于信息处理装置,信息处理装置连接于拓扑信息数据库,拓扑信息数据库连接于拓扑显示装置,拓扑显示装置连接于设备确定装置。Wherein, the device determination device is connected to the information collection device, the information collection device is connected to the information processing device, the information processing device is connected to the topology information database, the topology information database is connected to the topology display device, and the topology display device is connected to the equipment determination device.

Claims (6)

1、基于通用RFC定义的MIB信息的二层物理网络拓扑发现方法,包括设备发现、信息采集和拓扑计算三个阶段来达到目的,其特征在于,我们所提出的算法基于通用的RFC定义的MIB信息,适用于异构网络,通过计算能给出二层网络中交换机端口与交换机端口,交换机端口与HUB,交换机端口与主机,主机与HUB的连接关系;1. A Layer 2 physical network topology discovery method based on MIB information defined by general RFC, including three stages of device discovery, information collection and topology calculation to achieve the goal. It is characterized in that the algorithm we propose is based on the MIB defined by general RFC Information, suitable for heterogeneous networks, can give the connection relationship between switch ports and switch ports, switch ports and HUBs, switch ports and hosts, and hosts and HUBs in a layer-2 network through calculation; 2、根据权利要求1所述的物理网络拓扑发现方法,其特征在于,算法运行前的采集信息预处理过程,所发送的ICMP信息量为O(n),算法所基于的理论基础是关于上行端口和下行端口划分。2. The method for discovering the topology of a physical network according to claim 1, characterized in that, in the preprocessing process of collecting information before the operation of the algorithm, the amount of ICMP information sent is O(n), and the theoretical basis on which the algorithm is based is about uplink port and downstream port division. 3、根据权利要求1所述的物理网络拓扑发现方法,我们提出的算法1,其特征在于,算法的理论计算依据是:交换机A的下行端口与交换机B的上行端口直接连接的条件是交换机A的下行端口转发表正好等于交换机B的非上行端口转发表之并集再并上B本身。3. The method for discovering the topology of a physical network according to claim 1, the algorithm 1 proposed by us, is characterized in that the theoretical calculation basis of the algorithm is: the condition that the downlink port of switch A is directly connected to the uplink port of switch B is that switch A The downlink port forwarding table of switch B is exactly equal to the union of the non-uplink port forwarding tables of switch B and then merged with switch B itself. 4、根据权利要求1所述的物理网络拓扑发现方法,我们给出的算法2能发现多个交换机之间通过HUB相连的情况,其特征在于,某个交换机的下行端口转发表等于若干个交换机的非上行端口转发表的并集再并上这些交换机本身。4. According to the method for discovering the topology of a physical network according to claim 1, the algorithm 2 we provide can discover the situation that multiple switches are connected through HUBs, and it is characterized in that the downlink port forwarding table of a certain switch is equal to several switches The union of the non-uplink port forwarding tables is then merged on the switches themselves. 5、一种物理网络拓扑发现的方法,其具体步骤如下:5. A method for discovering a physical network topology, the specific steps of which are as follows: 一确定管理域的IP地址范围,可以由网络管理员手动给出,或者可以通过查询网关路由器自动获得,通过查询网关路由器的ipRouteTable来获得,同时查询路由器的端口号,判断是否存在单臂路由;1. Determine the IP address range of the management domain, which can be given manually by the network administrator, or can be obtained automatically by querying the gateway router, by querying the ipRouteTable of the gateway router, and querying the port number of the router at the same time to determine whether there is a one-armed route; 二确定步骤一所得到的网络地址范围中活动的IP地址集合,通过ping所有IP地址实现;2. Determine the set of active IP addresses in the network address range obtained in step 1, and realize by pinging all IP addresses; 三确定子网数以及相应的子网号和子网掩码,通过访问路由器的ipAddrEntry来获得;3. Determine the number of subnets and the corresponding subnet number and subnet mask, and obtain them by accessing the ipAddrEntry of the router; 四将步骤二中所得到活动IP地址集合映射到具体的物理设备,并实例化相应设备,向每个活动的IP地址发送SNMP GET消息,若该IP地址对应设备没有实现BRIDGE-MIB,则该IP地址对应设备为主机;若该IP地址对应设备实现了BRIDGE-MIB,并且其ipForwarding为0,则该IP地址对应设备为交换机;若该IP地址对应设备实现了BRIDGE-MIB,并且其ipForwarding为1,则该IP地址对应设备为路由器;4. Map the set of active IP addresses obtained in step 2 to specific physical devices, instantiate the corresponding devices, and send SNMP GET messages to each active IP address. If the device corresponding to the IP address does not implement BRIDGE-MIB, the The device corresponding to the IP address is a host; if the device corresponding to the IP address implements BRIDGE-MIB, and its ipForwarding is 0, then the device corresponding to the IP address is a switch; if the device corresponding to the IP address implements BRIDGE-MIB, and its ipForwarding is 1, the device corresponding to the IP address is a router; 五对于某个子网,从运行拓扑发现的主机ping所有步骤四中所获得的属于该子网的交换机设备;5. For a certain subnet, ping all the switch devices belonging to the subnet obtained in step 4 from the host running topology discovery; 六获取步骤四中发现的属于该子网的交换机的地址转发表信息;6. Obtain the address forwarding table information of the switch belonging to the subnet found in step 4; 七通过所给出的算法对步骤六中所获得的信息进行分析计算,获得交换机端口与交换机端口之间的连接;Seventh, the information obtained in step six is analyzed and calculated by the given algorithm to obtain the connection between the switch port and the switch port; 八根据交换机地址转发表中的信息,确定主机与交换机端口的连接,包括交换机-HUB-主机的连接。Eighth, according to the information in the switch address forwarding table, determine the connection between the host and the switch port, including the switch-HUB-host connection. 6、一种物理网络拓扑系统,包括:6. A physical network topology system, comprising: (1)设备确定装置,包括确定管理域IP地址范围,确定活动IP地址集合,收集设备信息并实例化各个物理设备;(1) device determining means, including determining the IP address range of the management domain, determining the set of active IP addresses, collecting device information and instantiating each physical device; (2)信息采集装置,通过SNMP消息收集算法所需要的信息;(2) information collecting device, collects the required information of algorithm by SNMP message; (3)信息处理装置,包括算法分析计算过程和信息存储过程装置;(3) Information processing device, including algorithm analysis and calculation process and information storage process device; (4)拓扑信息数据库;存贮拓扑信息数据;(4) topology information database; store topology information data; (5)拓扑显示装置,包括获取数据库拓扑信息,根据拓扑信息进行拓扑显示;其特征在于,设备确定装置连接于信息采集装置,信息采集装置连接于信息处理装置,信息处理装置连接于拓扑信息数据库,拓扑信息数据库连接于拓扑显示装置,拓扑显示装置连接于设备确定装置。(5) Topology display device, including obtaining database topology information, and performing topology display according to the topology information; it is characterized in that the device determination device is connected to the information collection device, the information collection device is connected to the information processing device, and the information processing device is connected to the topology information database , the topology information database is connected to the topology display device, and the topology display device is connected to the device determination device.
CNA2004100018209A 2004-01-14 2004-01-14 A physical network topology discovery system and method thereof Pending CN1558615A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2004100018209A CN1558615A (en) 2004-01-14 2004-01-14 A physical network topology discovery system and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2004100018209A CN1558615A (en) 2004-01-14 2004-01-14 A physical network topology discovery system and method thereof

Publications (1)

Publication Number Publication Date
CN1558615A true CN1558615A (en) 2004-12-29

Family

ID=34350661

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2004100018209A Pending CN1558615A (en) 2004-01-14 2004-01-14 A physical network topology discovery system and method thereof

Country Status (1)

Country Link
CN (1) CN1558615A (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100356739C (en) * 2005-07-29 2007-12-19 杭州华三通信技术有限公司 Testing system and method
CN100372308C (en) * 2005-10-14 2008-02-27 杭州华三通信技术有限公司 Network topological graph updation and management
CN100372309C (en) * 2005-10-14 2008-02-27 杭州华三通信技术有限公司 Updation of bridge management information base
WO2008037203A1 (en) * 2006-09-28 2008-04-03 Huawei Technologies Co., Ltd. Method and node device for realizing the network topology discovery
CN100411360C (en) * 2006-06-30 2008-08-13 迈普(四川)通信技术有限公司 Multi-network converged network management method
CN100544261C (en) * 2005-12-20 2009-09-23 中国科学院声学研究所 A Data Distribution/Acquisition Method Based on Network Information
CN101145963B (en) * 2007-07-27 2010-08-18 中兴通讯股份有限公司 A topology discovery method of protective sub-network
CN101945043A (en) * 2010-09-06 2011-01-12 华南理工大学 Topology discovery system of next generation Internet based on IPv6 (Internet Protocol Version 6) and realizing method thereof
WO2011023123A1 (en) * 2009-08-28 2011-03-03 迈普通信技术股份有限公司 Method and system for monitoring ethernet automatic protection switching (eaps) ring network topology
CN101243654B (en) * 2005-08-08 2012-01-11 思科技术公司 Method and apparatus for enabling routing of label switched data packets
CN101527647B (en) * 2008-03-06 2012-07-18 原创信通电信技术(北京)有限公司 Multi-data plane oriented resource management realization method
CN101242306B (en) * 2008-02-28 2012-10-03 成都市华为赛门铁克科技有限公司 Method, system, device and server for automatic discovery of network device
CN104301192A (en) * 2013-07-18 2015-01-21 杭州华三通信技术有限公司 Method and device for discovering network equipment in VPN networking
CN104539453A (en) * 2014-12-19 2015-04-22 上海自仪泰雷兹交通自动化系统有限公司 Network equipment configuration checking analysis method for rail transit signal system
CN105589401A (en) * 2014-11-06 2016-05-18 阿自倍尔株式会社 Network Control Method And System
CN105897490A (en) * 2016-06-24 2016-08-24 深圳市风云实业有限公司 Automatic network topology discovery method
CN107786373A (en) * 2017-10-13 2018-03-09 广州供电局有限公司 Generate method, apparatus, storage medium and the computer equipment of topology server relation
CN109257225A (en) * 2018-10-12 2019-01-22 北京信研汇智信息技术有限公司 Generate method, apparatus, storage medium and the processor of network topology
CN111934921A (en) * 2020-07-29 2020-11-13 深信服科技股份有限公司 Network topology discovery method and device, equipment and storage medium

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100356739C (en) * 2005-07-29 2007-12-19 杭州华三通信技术有限公司 Testing system and method
CN101243654B (en) * 2005-08-08 2012-01-11 思科技术公司 Method and apparatus for enabling routing of label switched data packets
CN100372308C (en) * 2005-10-14 2008-02-27 杭州华三通信技术有限公司 Network topological graph updation and management
CN100372309C (en) * 2005-10-14 2008-02-27 杭州华三通信技术有限公司 Updation of bridge management information base
CN100544261C (en) * 2005-12-20 2009-09-23 中国科学院声学研究所 A Data Distribution/Acquisition Method Based on Network Information
CN100411360C (en) * 2006-06-30 2008-08-13 迈普(四川)通信技术有限公司 Multi-network converged network management method
WO2008037203A1 (en) * 2006-09-28 2008-04-03 Huawei Technologies Co., Ltd. Method and node device for realizing the network topology discovery
CN101145963B (en) * 2007-07-27 2010-08-18 中兴通讯股份有限公司 A topology discovery method of protective sub-network
CN101242306B (en) * 2008-02-28 2012-10-03 成都市华为赛门铁克科技有限公司 Method, system, device and server for automatic discovery of network device
CN101527647B (en) * 2008-03-06 2012-07-18 原创信通电信技术(北京)有限公司 Multi-data plane oriented resource management realization method
WO2011023123A1 (en) * 2009-08-28 2011-03-03 迈普通信技术股份有限公司 Method and system for monitoring ethernet automatic protection switching (eaps) ring network topology
CN101945043A (en) * 2010-09-06 2011-01-12 华南理工大学 Topology discovery system of next generation Internet based on IPv6 (Internet Protocol Version 6) and realizing method thereof
CN104301192A (en) * 2013-07-18 2015-01-21 杭州华三通信技术有限公司 Method and device for discovering network equipment in VPN networking
CN105589401A (en) * 2014-11-06 2016-05-18 阿自倍尔株式会社 Network Control Method And System
CN104539453A (en) * 2014-12-19 2015-04-22 上海自仪泰雷兹交通自动化系统有限公司 Network equipment configuration checking analysis method for rail transit signal system
CN105897490A (en) * 2016-06-24 2016-08-24 深圳市风云实业有限公司 Automatic network topology discovery method
CN107786373A (en) * 2017-10-13 2018-03-09 广州供电局有限公司 Generate method, apparatus, storage medium and the computer equipment of topology server relation
CN107786373B (en) * 2017-10-13 2021-08-31 广东电网有限责任公司广州供电局 Method and device for generating server topological relation, storage medium and computer equipment
CN109257225A (en) * 2018-10-12 2019-01-22 北京信研汇智信息技术有限公司 Generate method, apparatus, storage medium and the processor of network topology
CN109257225B (en) * 2018-10-12 2021-08-10 北京信研汇智信息技术有限公司 Method, device, storage medium and processor for generating network topology
CN111934921A (en) * 2020-07-29 2020-11-13 深信服科技股份有限公司 Network topology discovery method and device, equipment and storage medium
CN111934921B (en) * 2020-07-29 2023-11-07 深信服科技股份有限公司 Network topology discovery method and device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN1558615A (en) A physical network topology discovery system and method thereof
CN1306752C (en) Using link state information to discover IP network topology
CN1287307C (en) Topology discovery by partitioning multiple discovery techniques
CN102045190B (en) Network topology discovery method and device
CN1216472C (en) A Control Method of Hierarchical Switching Network Node Domain
CN102082690B (en) Passive finding equipment and method of network topology
EP2286554B1 (en) Using spanning tree protocol (stp) to enhance layer-2 network topology maps
CN101051995A (en) Protection switching method based on no connection network
CN1925452A (en) Data transferring system, method and network transferring apparatus
CN1913496A (en) Conversion control method and system of OAM message
CN107733713B (en) Method, system, device and storage medium for acquiring network topology in hybrid network
WO2014169969A1 (en) Identification of the paths taken through a network of interconnected devices
CN101060485A (en) Topology changed messages processing method and processing device
JPWO2006118203A1 (en) Network map generation method
CN103532818B (en) Quick test method of accessibility of VPN link
CN104579978B (en) A kind of dynamic network Datalink Layer Topology Discovery method
CN101043462A (en) Method for processing link condition announcement and router
CN1152516C (en) Method for finding out IP network node
CN101043453A (en) Method and apparatus for gathering and analyzing flux
US8799444B2 (en) Automated host discovery and path tracing by network management server
US7948916B2 (en) Method and apparatus for discovering topology information in a network
CN101227336A (en) Method and device for configuring link layer discovery protocol management address
WO2019196914A1 (en) Method for discovering forwarding path, and related device thereof
CN1767495A (en) Method for Ensuring Data Security of Layer 2 Ethernet Switches in Metropolitan Area Transmission Equipment
CN1949740A (en) Processing method for BGP load sharing medium route

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication