WO2013189414A2 - 网络拓扑自动获取方法及系统、网络查询及管理系统 - Google Patents

网络拓扑自动获取方法及系统、网络查询及管理系统 Download PDF

Info

Publication number
WO2013189414A2
WO2013189414A2 PCT/CN2013/082075 CN2013082075W WO2013189414A2 WO 2013189414 A2 WO2013189414 A2 WO 2013189414A2 CN 2013082075 W CN2013082075 W CN 2013082075W WO 2013189414 A2 WO2013189414 A2 WO 2013189414A2
Authority
WO
WIPO (PCT)
Prior art keywords
network
host
address
query
router
Prior art date
Application number
PCT/CN2013/082075
Other languages
English (en)
French (fr)
Other versions
WO2013189414A3 (zh
Inventor
高海燕
董学明
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013189414A2 publication Critical patent/WO2013189414A2/zh
Publication of WO2013189414A3 publication Critical patent/WO2013189414A3/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/48Routing tree calculation

Definitions

  • Network topology automatic acquisition method and system network query and management system
  • the present invention relates to network management technologies in a network topology, and in particular, to a network topology automatic acquisition method and system, and a network query and management system. Background technique
  • the main purpose of network topology acquisition is to acquire and maintain the information of network nodes and the connection relationship between them, and draw the entire network topology on this basis.
  • the network administrator can quickly locate the faulty node based on the network topology.
  • the network management of the Dense Wavelength Division Multiplexing (DWDM) system generally manages the destination network element by establishing an Internet Protocol (IP) connection between the network management channel and the destination network element.
  • IP Internet Protocol
  • the elements appear on the network management interface in a separate form on the network management system interface. The administrator can only look up the configuration information of each network element, but cannot know the specific topology connection mode of these network elements. Summary of the invention
  • the main purpose of the embodiments of the present invention is to provide a network topology automatic acquisition method and system, and a network query and management system, which can acquire information of network elements in the network and topology connection relationship information between them.
  • An embodiment of the present invention provides a method for automatically acquiring a network topology, where the method includes: acquiring a network type of a host; if the network type of the host is a direct connection network, performing multiple spanning tree protocols (MSTP, Multle Spanning Tree) on the host Protocol) The status query request is immediately answered, and the result of the query is obtained; if the network type of the host is a routing network, the host is obtained. The IP address of the router between the network management systems, and the MSTP status query request from the host and the router between the host and the network management system is immediately answered, and the query result is obtained;
  • MSTP Scaltle Spanning Tree
  • the network type of the acquiring host includes:
  • IP address of the host and obtain the destination IP address and source IP address of the IP address; determine the network type of the host.
  • the network type of the host is determined according to the IP address of the host and the destination IP address and the source IP address of the IP packet, including:
  • the network type is a direct connection network, otherwise the network type of the host is a routed network.
  • the acquiring an IP address of a router between the host and the network management system includes:
  • each hop router on the path receives the IP data packet and decrements the TTL by 1, and checks whether the TTL of the IP data packet is 0, if 0, the IP packet is discarded and an Internet Control Message Protocol (ICMP) error message is returned. If it is not 0, the IP packet is forwarded to the next one. Router; until the IP packet arrives at the network management system;
  • TTL Time To Live
  • the query result includes: a bridge identifier (ID, IDentity), a root bridge ID, a root path cost, an MSTP-enabled port number, a port number, a port connection status, a port role, and a bridge protocol data received by the port.
  • ID bridge identifier
  • MAC Medium Access Control
  • drawing topology diagram includes:
  • An embodiment of the present invention provides a network topology automatic acquisition system, where the system includes: a network query system, a host, a router, and a network management system;
  • the network query system is configured to obtain a network type of the host; when the network type is a direct network, the host performs an MSTP status query request, and immediately receives a query result returned by the host; when the network type is a routing network Obtaining the IP address of the router between the host and the network management system, and immediately responding to the MSTP status query request of the host and the router between the host and the network management system, and receiving the query result returned by the host and the router; Send to the network management system for analysis and drawing;
  • the host is configured to receive an immediate response from the MSTP status query request sent by the network query system, and return the query result to the network query system;
  • the router is configured to accept the IP address of the network query system; receive the MSTP status query request sent by the network query system, and return the query result to the network query system;
  • the network management system is configured to receive a query result sent by the network query system, analyze the query result, and draw a network topology map.
  • the network query system includes: a host network type obtaining module, a first query module, a router IP address obtaining module, and a second query module;
  • the host network type obtaining module is configured to obtain a network type of the host according to the destination IP address and the source IP address of the host, and notify the first query module to perform MSTP on the host when the network type is a direct network.
  • the status query request is answered immediately; when the network type is When the network is routed, the router IP address obtaining module is notified to obtain the IP address of the router;
  • the first query module is configured to: after receiving the notification of the host network type obtaining module, immediately respond to the host for the MSTP status query request, and receive the query result returned by the host; send the query result to the network management system for analysis and drawing;
  • the router IP address obtaining module is configured to: obtain an IP address of a router between the host and the network management system by sending an IP data packet with a time-to-live to the network management system; and send the IP address of the router to the second query module. Result inquiry
  • the second query module is configured to, after receiving the IP address of the router sent by the router IP address obtaining module, immediately respond to the MSTP status query request of the host and the router between the host and the network management system, and receive the host and the The query result returned by the router; the query result is sent to the network management system for analysis and drawing.
  • the network management system includes: a network topology automatic acquisition analysis module, and a network topology automatic acquisition drawing module; wherein,
  • the network topology automatically acquires an analysis module, configured to receive a query result sent by the network query system, analyze the query result, and send the analysis result to a network topology automatic acquisition drawing module for drawing;
  • the network topology automatically acquires a drawing module, and is configured to receive an analysis result sent by the network topology automatic acquisition analysis module, and draw a network topology map according to the analysis result.
  • An embodiment of the present invention provides a network query system, where the system includes: a host network type obtaining module, a first query module, a router IP address obtaining module, and a second query module; wherein the host network type obtaining module is configured as Obtaining a network type of the host according to the destination IP address and the source IP address of the IP packet of the host; when the network type is a direct network, notifying the first query module to immediately respond to the MSTP status query request of the host; When the type is a routing network, the router IP address obtaining module is notified to obtain the IP address of the router.
  • the first query module is configured to receive the notification of the host network type obtaining module, The host performs an MSTP status query request to immediately respond, and receives the query result returned by the host; sends the query result to the network management system for analysis and drawing;
  • the router IP address obtaining module is configured to: obtain an IP address of a router between the host and the network management system by sending an IP data packet with a time-to-live to the network management system; and send the IP address of the router to the second query module. Result inquiry
  • the second query module is configured to, after receiving the IP address of the router sent by the router IP address obtaining module, immediately respond to the MSTP status query request of the host and the router between the host and the network management system, and receive the host and the The query result returned by the router; the query result is sent to the network management system for analysis and drawing.
  • the host network type obtaining module includes: an IP packet acquiring unit, a bit and an operation unit, and a network type determining unit;
  • the IP packet obtaining unit is configured to obtain an IP address packet of the host, and send the destination IP address and the source IP address of the IP packet to the bit and the operation unit to perform bit and operation;
  • the bit and the operation unit are configured to receive the destination IP address and the source IP address of the IP packet sent by the IP packet obtaining unit, obtain a mask corresponding to the host IP address, and respectively set the mask with the destination IP address and the source IP address. Perform bit and operation; send two operation results to the network type judgment unit for judgment;
  • the network type determining unit is configured to receive the two bits and the operation result sent by the bit and the operation unit. If the two bits are the same as the operation result, the network type of the host is a direct network, otherwise the network type of the host is a routing network. .
  • the router IP address obtaining module includes: a sending unit, a receiving unit, and a time-to-live setting unit;
  • the sending unit is configured to send, by using a router, an IP data packet with a TTL to the network management system;
  • the receiving unit is configured to receive an ICMP error message returned by the router, and receive the After the ICMP error message, the notification survival time setting unit adds 1 to the TTL; obtains the IP address of the router according to the ICMP error message, and sends the IP address of the router to the second query module to perform a result query;
  • the survival time setting unit is configured to set an initial value of the TTL of the IP data packet in the sending unit, and when the notification of the receiving unit is received, the TTL of the IP data packet in the sending unit is incremented by one.
  • the router sends an IP packet with a TTL to the network management system, including:
  • the IP packet is sent to the router in the path.
  • the router decrements the TTL by 1, and checks whether the TTL of the IP packet is 0. If it is 0, the IP packet is discarded and an ICMP error message is returned to the receiving unit. If it is not 0, continue to forward this IP packet to the next router; until the IP packet arrives at the network management system.
  • the embodiment of the present invention provides a network management system, where the system includes: a network topology automatic acquisition analysis module, and a network topology automatic acquisition drawing module;
  • the network topology automatically acquires an analysis module, configured to receive a query result sent by the network query system, analyze the query result, and send the analysis result to a network topology automatic acquisition drawing module for drawing;
  • the network topology automatically acquires a drawing module, and is configured to receive an analysis result sent by the network topology automatic acquisition analysis module, and draw a network topology map according to the analysis result.
  • the method and system for automatically acquiring the network topology and the network query and management system obtained an MSTP status query request for the host of the network type directly connected to the network by obtaining the network type of the host, and obtain the query result;
  • the network type is the host of the routing network, obtains the IP address of the router between the host and the network management system, and immediately responds to the host and the router for the MSTP status query request, and obtains the query result; analyzes and draws the query result.
  • the network topology diagram in this way, the information of each network element in the network and the topology connection relationship information between them can be obtained.
  • FIG. 1 is a schematic flowchart of a network topology automatic acquisition method according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a network topology automatic acquisition system according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a network query system according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a network management system according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of an embodiment of drawing a topology diagram in a method for automatically acquiring a network topology according to an embodiment of the present invention. detailed description
  • FIG. 1 is a schematic flowchart of a method for automatically acquiring a network topology according to an embodiment of the present invention. As shown in FIG. 1 , the method includes the following steps:
  • Step 101 Obtain the network type of the host. If the network type of the host is a direct network, go to step 102. If the network type of the host is a routed network, go to step 103.
  • the network type of the host is obtained by the network query system.
  • the network type of the host includes: a direct connection network and a routing network; wherein, the direct connection network is a network in which the IP address of the host and the IP address of the network management system are in the same network segment, and the routing network is the IP address and network management of the host. The IP address of the system is not in the network on the same network segment.
  • Step 101 includes: obtaining, by the network query system, an IP packet of the host, and obtaining a destination IP address and a source IP address of the IP packet;
  • the network type of the host is determined according to the IP address of the host, the destination IP address of the IP packet, and the source IP address. Specifically, the network query system obtains a mask corresponding to the IP address of the host according to the IP address of the host; the network query system will The mask performs bitwise AND operation on the destination IP address and source IP address of the IP packet, and compares the bit and operation results of the two, if the bits of the two are compared with the operation result Similarly, the network type of the host is a direct network, otherwise the network type of the host is a routing network.
  • the network interface of the host has an IP packet flowing in and out.
  • the network query system can obtain an IP packet from the network interface of the host.
  • the IP packet is an IP packet sent by the host to the network management system. That is, the source IP address of the IP address is the IP address of the host, and the destination IP address of the IP address is the IP address of the network management system.
  • the network query system is externally placed on the host, and each host has a network query system corresponding thereto, and the IP address of the network query system is the same as the IP address of the host.
  • Step 102 Immediately respond to the MSTP status query request of the host, obtain the query result, and perform step 105.
  • the MSTP status query request to the host is immediately answered by the network query system.
  • the network query system can immediately respond to the MSTP status query request of the host, and the period can be set according to the requirements of the quality of service (QoS) of the link in the network topology.
  • QoS quality of service
  • the query result includes: Bridge ID, Root Bridge ID, Remainhops, MSTP-enabled port number, Port ID, Port connection status (Port) Status ), port role ( Role ), upstream MAC address of the BPDU received by the port.
  • Step 103 Obtain the IP address of the router between the host and the network management system.
  • the IP address of the router between the host and the network management system is obtained by the network inquiry system.
  • the network query system performs tracking route detection on the IP address of the network management system to obtain the IP address of the router between the host and the network management system.
  • the tracking route detection comprises the following steps:
  • the network query system first sends an IP data packet with a TTL of 1 to the network management system.
  • the TTL is decremented by 1, and the TTL of the IP data packet is checked to be 0. If it is 0, the IP packet is discarded and an ICMP error message is returned to the network query system. If it is not 0, the IP packet is forwarded to the next router; here, since the TTL of the IP packet changes at this time 0, so the first hop router will discard the IP packet and return an ICMP error message to indicate that the IP packet cannot be sent due to a TTL timeout, where the ICMP error message is sent via an ICMP timeout error message. ;
  • the network query system resends an IP packet with a TTL of 2.
  • the first hop router receives the IP packet, it decrements the TTL by 1, and checks whether the IP packet is 0.
  • the TTL becomes 1, that is, not 0, so the first hop router continues to forward the IP packet to the second hop router; after receiving the IP packet, the second hop router decrements the TTL by 1, and checks the IP data.
  • the packet is 0, here, since the TTL of the IP packet becomes 0 at this time, the second hop router discards the IP packet and returns an ICMP error message indicating that the TTL expires and cannot be sent;
  • the network query system obtains the source address of the ICMP timeout error packet, that is, the IP address of the router according to the ICMP error message returned by the router, that is, the ICMP timeout error message; thus, the IP address of the router between the host and the network management system can be obtained. .
  • Step 104 Perform an MSTP status query request on the router between the host and the host and the network management system, and immediately obtain a query result.
  • the network query system immediately responds to the MSTP status query request of the host and the router between the host and the network management system.
  • the network query system may perform an MSTP status query request to the router between the host and the host and the network management system, and the response may be periodic, and the period may be based on the network topology.
  • the quality of service requirements for the link are set.
  • the query result includes: a bridge ID, a root bridge ID, a root path cost, an MSTP-enabled port number, a port number, a port connection state, a port role, and an upstream MAC address of a BPDU received by the port; preferably, the The specific content of the query result is determined by the actual situation of the network element connecting in the network.
  • Step 105 Send the query result to the network management system for analysis of the result and draw a network topology map.
  • the query result is sent by the network query system to the network management system for result analysis and drawing a network topology map.
  • the network management system analyzes the results of the query results, including:
  • Bridge ID indicates the ID of the bridge transmitting the BPDU, which is composed of a 2-byte priority and a 6-byte MAC address; here, the bridge ID is generated according to the IP address of the host;
  • Root bridge ID consists of a 2-byte priority and a 6-byte MAC address. It is the switch of the sub-bridge ID.
  • the IP address of the root bridge can be calculated according to the root bridge ID.
  • Root path cost The content of this field can be used to know the distance between the host and the root bridge, and the number of hosts between the host and the root bridge.
  • Number of ports enabled with MSTP Count the number of ports that enable MSTP.
  • Port number The port that sends the BPDU by the port number, and the MSTP-enabled port number is combined with the hardware port number.
  • Port connection status Indicates whether the port has a connection. If the port is not connected, the Role in the query result and the upstream MAC address of the BPDU received by the port are empty.
  • Port role Indicates the port type, including: root port, master port, designated port, alternate port, backup port;
  • the upstream MAC address of the BPDU received by the port Only the upstream MAC address can be obtained.
  • the port role is the root port, the alternate port, or the backup port. The other port roles do not have this query result.
  • the network topology map is drawn according to the analysis result, including:
  • FIG. 2 is a schematic structural diagram of a network topology automatic acquisition system according to an embodiment of the present invention. As shown in FIG. 2, the system includes: a network query system 21, a host 22, a router 23, and a network management system 24;
  • the network query system 21 is configured to acquire the network type of the host 22; when the network type is a direct connection network, the host 22 performs an MSTP status query request and immediately responds, and receives the query result returned by the host 22; When the type is a routing network, the IP address of the router 23 between the host 22 and the network management system 24 is obtained, and the host 22 and the router 23 between the host 22 and the network management system 24 perform an MSTP status query request to immediately respond, and the receiving host 22 And the query result returned by the router 23; sending the query result to the network management system 24 for analysis and drawing;
  • the host 22 is configured to receive an immediate response from the MSTP status query request sent by the network query system 21, and return the query result to the network query system 21;
  • the router 23 is configured to provide the IP address of the router to the network query system 21; the MSTP status query request sent by the network query system 21 is immediately answered, and the query result is returned to the network query system 21;
  • the network management system 24 is configured to receive the query result sent by the network query system 21, analyze the query result, and draw a network topology map.
  • the network type of the host 22 includes: a direct connection network and a routing network;
  • the direct connection network is a network in which the IP address of the host 22 and the IP address of the network management system 24 are in the same network segment, and the routing network is the network whose IP address of the host 22 and the IP address of the network management system 24 are not in the same network segment.
  • the network query system 21 is externally placed on the host 22, and each host 22 has a network query system 21 corresponding thereto, and the IP address of the network query system 21 is the same as the IP address of the host 22.
  • the network query system 21 can perform an immediate response to the MSTP status query request of the host 22 and the router 23, and the period can be set according to the service quality requirement of the link in the network topology.
  • the query result includes: a bridge ID, a root bridge ID, a root path cost, an MSTP-enabled port number, a port number, a port connection status, a port role, and an upstream MAC address of a BPDU received by the port.
  • the network query system 21 includes: a host network type obtaining module 211, a first query module 212, a router IP address obtaining module 213, and a second query module 214.
  • the host network type obtaining module 211 is configured to Obtaining the network type of the host according to the destination IP address and the source IP address of the IP packet of the host; when the network type is a direct connection network, notifying the first query module 212 to immediately respond to the host 22 for the MSTP status query request;
  • the notification router IP address obtaining module 213 obtains the IP address of the router;
  • the first query module 212 is configured to receive the MSTP status query request from the host 22 immediately after receiving the notification from the host network type obtaining module 211, and receive the query result returned by the host 22; and send the query result to the network management system 24 Analyze and draw;
  • the router IP address obtaining module 213 is configured to obtain an IP address of the router 23 between the host 22 and the network management system 24 by sending an IP data packet with a time-to-live to the network management system 24; and sending the IP address of the router to The second query module 214 performs a result query;
  • the second query module 214 is configured to immediately respond to the MS22 status query request of the host 22 and the router 23 between the host 22 and the network management system 24 after receiving the IP address of the router sent by the router IP address obtaining module 213. Receiving the query result returned by the host 22 and the router 23; sending the query result to the network management system 24 for analysis and rendering.
  • the first query module 212 performs an MSTP status query request to the host 22 to respond immediately.
  • the period may be set according to the service quality requirement of the link in the network topology.
  • the second query module 214 may perform an immediate response to the MSTP status query request of the host 22 and the router 23, and the period may be set according to the service quality requirement of the link in the network topology.
  • the network management system 24 includes: a network topology automatic acquisition analysis module 241, and a network topology automatic acquisition drawing module 242;
  • the network topology automatic acquisition and analysis module 241 is configured to receive the query result sent by the network query system 11, analyze the query result, and send the analysis result to the network topology automatic acquisition drawing module 242 for drawing;
  • the network topology automatic acquisition drawing module 242 is configured to receive the analysis result sent by the network topology automatic acquisition analysis module 241, and draw a network topology map according to the analysis result.
  • the analysis result includes:
  • Bridge ID indicates the ID of the bridge transmitting the BPDU, which is composed of a 2-byte priority and a 6-byte MAC address; here, the bridge ID is generated according to the IP address of the host;
  • Root bridge ID consists of a 2-byte priority and a 6-byte MAC address. It is the switch of the sub-bridge ID.
  • the IP address of the root bridge can be calculated according to the root bridge ID.
  • Root path cost The content of this field can be used to know the distance between the host and the root bridge, and the number of hosts between the host and the root bridge.
  • Number of ports enabled with MSTP Count the number of ports that enable MSTP.
  • Port number The port that sends the BPDU by the port number, and the MSTP-enabled port number is combined with the hardware port number.
  • Port connection status Indicates whether the port has a connection. If the port is not connected, the Role in the query result and the upstream MAC address of the BPDU received by the port are empty.
  • Port role Indicates the port type, including: root port, primary port, designated port, alternate port, backup port;
  • the upstream MAC address of the BPDU received by the port According to the upstream MAC address, the IP address of the host connected to the port can be obtained.
  • the port role is the root port, the alternate port, or the backup port. Other port roles do not have this query result;
  • the drawing network topology includes:
  • the host network type obtaining module 211 includes: an IP packet acquiring unit 2111, a bit and computing unit 2112, and a network type determining unit 2113;
  • the IP packet obtaining unit 2111 is configured to obtain an IP address packet of the host 22, and send the destination IP address and the source IP address of the IP packet to the bit and operation unit 2112 for bitwise operation; the bit and operation The unit 2112 is configured to receive the destination IP address and the source IP address of the IP packet sent by the IP packet obtaining unit 2111, obtain a mask corresponding to the host IP address, and perform the bit mask with the destination IP address and the source IP address respectively. Computing; sending two operation results to the network type determining unit 2113 for determination;
  • the network type determining unit 2113 is configured to receive the bit and the operation result sent by the operation unit 2112. If the two bits are the same as the operation result, the network type of the host is a direct connection network, otherwise the network type of the host is Routing network
  • the network interface of the host 22 has IP packets flowing in and out, IP packets.
  • the obtaining unit 2111 can obtain an IP packet from the network interface of the host.
  • the IP packet is an IP packet sent by the host 22 to the network management system 24, that is, the source IP address of the IP packet is the host 22
  • the IP address of the IP address is the IP address of the network management system 24.
  • the router IP address obtaining module 213 includes: a sending unit 2131, a receiving unit 2132, and a time-to-live setting unit 2133;
  • the sending unit 2131 is configured to send an IP packet with a TTL to the network management system 24 via the router 23;
  • the router 23 on the path to the network management system 24 decrements the TTL by 1 when it receives the IP packet, and checks whether the TTL of the IP packet is 0. If it is 0, the IP packet is discarded. Returning an ICMP error message to the receiving unit 2132. If not, continuing to forward the IP data packet to the next router; until the IP data packet arrives at the network management system 24;
  • the receiving unit 2132 is configured to receive the ICMP error message returned by the router 23, and after receiving the ICMP error message, notify the time-to-live setting unit 2133 to increase the TTL by 1; obtain the IP address of the router according to the ICMP error message, and the router The IP address is sent to the second query module 214 for a result query.
  • the ICMP error message is sent through an ICMP timeout error message, and the source address of the message, that is, the IP address of the router, can be obtained by using an ICMP timeout error message.
  • the time-to-live setting unit 2133 is configured to set the initial value of the TTL of the IP data packet in the sending unit 2131 to 1.
  • the TTL port 1 of the IP data packet in the unit 2131 is sent.
  • the network query system 21 and the network management system 24 in the network topology automatic acquisition system may be automatically acquired by a network topology, a central processing unit (CPU), or a digital signal processor (DSP). , Digital Signal Processor ), or Implementation of a Field-Programmable Gate Array (FPGA).
  • the host 22 in the above network topology automatic acquisition system can be implemented by any terminal device, such as a personal computer, a server, a tablet, and the like.
  • the router 23 in the above network topology automatic acquisition system can be implemented by any routing device having a routing function.
  • the embodiment of the present invention further describes a network query system.
  • the network query system includes: a host network type obtaining module 211, a first query module 212, a router IP address obtaining module 213, and a second query module. 214; where
  • the host network type obtaining module 211 is configured to obtain a network type of the host according to the destination IP address and the source IP address of the host, and notify the first query module 212 to the host when the network type is a direct network. 22, the MSTP status query request is immediately answered; when the network type is a routing network, the notification router IP address obtaining module 213 obtains the IP address of the router;
  • the first query module 212 is configured to receive an MSTP status query request from the host immediately after receiving the notification from the host network type obtaining module 211, and receive the query result returned by the host; send the query result to the network management system for analysis and Draw
  • the router IP address obtaining module 213 is configured to: obtain an IP address of a router between the host and the network management system by sending an IP data packet with a time-to-live to the network management system; and send the IP address of the router to the second query module. 214 query results;
  • the second query module 214 is configured to, after receiving the IP address of the router sent by the router IP address obtaining module 213, immediately respond to the MSTP status query request of the host and the router between the host and the network management system, and receive the host and The query result returned by the router; the query result is sent to the network management system for analysis and drawing.
  • the first query module 212 may perform an immediate response to the MSTP status query request of the host, and the period may be set according to the service quality requirement of the link in the network topology.
  • the second query module 214 may perform an immediate response to the MSTP status query request of the host and the router, and the period may be set according to the service quality requirement of the link in the network topology.
  • the host network type obtaining module 211 includes: an IP packet acquiring unit 2111, a bit and computing unit 2112, and a network type determining unit 2113;
  • the IP packet obtaining unit 2111 is configured to obtain an IP address packet of the host 22, and send the destination IP address and the source IP address of the IP packet to the bit and operation unit 2112 for bitwise operation; the bit and operation The unit 2112 is configured to receive the destination IP address and the source IP address of the IP packet sent by the IP packet obtaining unit 2111, obtain a mask corresponding to the host IP address, and perform the bit mask with the destination IP address and the source IP address respectively. Computing; sending two operation results to the network type determining unit 2113 for determination;
  • the network type determining unit 2113 is configured to receive the bit and the operation result sent by the operation unit 2112. If the two bits are the same as the operation result, the network type of the host is a direct connection network, otherwise the network type of the host is Routing network
  • the network interface of the host 22 has an IP packet flowing in and out.
  • the IP packet obtaining unit 2111 can obtain an IP packet from the network interface of the host.
  • the IP packet is sent by the host 22.
  • the IP address of the network management system 24, that is, the source IP address of the IP packet is the IP address of the host 22, and the destination IP address of the IP document is the IP address of the network management system 24.
  • the router IP address obtaining module 213 includes: a sending unit 2131, a receiving unit 2132, and a time-to-live setting unit 2133;
  • the sending unit 2131 is configured to send, by using a router, an IP data packet with a TTL to the network management system;
  • the router on the path to the network management system receives the IP packet and decrements the TTL by 1, and checks whether the TTL of the IP packet is 0. If it is 0, the IP packet is discarded. And returning an ICMP error message to the receiving unit 2132. If not, continuing to forward the IP data packet to the next router; until the IP data packet arrives at the network management system;
  • the receiving unit 2132 is configured to receive an ICMP error message returned by the router, and after receiving the ICMP error message, notify the time-to-live setting unit 2133 to set the TTL force ⁇ 1; obtain the IP address of the router according to the ICMP error message, and The IP address is sent to the second query module 214 for a result query.
  • the ICMP error message is sent through an ICMP timeout error message, and the source address of the message, that is, the IP address of the router, can be obtained by using an ICMP timeout error message.
  • the time-to-live setting unit 2133 is configured to set the initial value of the TTL of the IP data packet in the sending unit 2131 to 1.
  • the TTL port 1 of the IP data packet in the unit 2131 is sent.
  • FIG. 3 can be understood by referring to the related description of the network query system in the network topology automatic acquisition system shown in FIG. 2.
  • the host network type obtaining module 211, the first query module 212, the router IP address obtaining module 213, and the second query module 214 in the network query system may automatically acquire the CPU, DSP, or DSP in the system by the network topology.
  • the embodiment of the present invention further describes a network management system.
  • the network management system includes: a network topology automatic acquisition analysis module 241, and a network topology automatic acquisition drawing module 242;
  • the network topology automatic acquisition analysis module 241 is configured to receive the query result sent by the network query system, analyze the query result, and send the analysis result to the network topology automatic acquisition drawing module 242 for drawing;
  • the network topology automatic acquisition drawing module 242 is configured to receive the analysis result sent by the network topology automatic acquisition analysis module 241, and draw a network topology map according to the analysis result.
  • the analysis result includes: Bridge ID: indicates the ID of the bridge transmitting the BPDU, which is composed of a 2-byte priority and a 6-byte MAC address; here, the bridge ID is generated according to the IP address of the host;
  • Root bridge ID consists of a 2-byte priority and a 6-byte MAC address. It is the switch of the sub-bridge ID.
  • the IP address of the root bridge can be calculated according to the root bridge ID.
  • Root path cost The content of this field can be used to know the distance between the host and the root bridge, and the number of hosts between the host and the root bridge.
  • Number of ports enabled with MSTP Count the number of ports that enable MSTP.
  • Port number The port that sends the BPDU by the port number, and the MSTP-enabled port number is combined with the hardware port number.
  • Port connection status Indicates whether the port has a connection. If the port is not connected, the Role in the query result and the upstream MAC address of the BPDU received by the port are empty.
  • Port role Indicates the port type, including: root port, primary port, designated port, alternate port, backup port;
  • the upstream MAC address of the BPDU received by the port According to the upstream MAC address, the IP address of the host connected to the port can be obtained.
  • the port role is the root port, the alternate port, or the backup port. Other port roles do not have this query result;
  • the drawing network topology includes:
  • FIG. 4 can be understood by referring to the related description of the network management system in the network topology automatic acquisition system shown in FIG. 2.
  • FIG. 5 is a schematic diagram of an implementation of a topology diagram in a method for automatically acquiring a network topology according to an embodiment of the present invention. As shown in FIG. 3, the embodiment includes: a first host 301, a second host 302, and a third host 303.
  • the path cost is recorded as the root path cost-0;
  • the root path cost query result of the second host 302 and the third host 302 displays the first neighboring root bridge of the two hosts, and the path cost is recorded as the root path cost -1; 308.
  • the root path cost query result of the sixth host 306 and the third router 310 displays the second neighboring root bridges of the three network elements, where the path cost is recorded as the root path cost-2; the fourth host 304 and the second router 309.
  • the root path cost query result of the seventh host 307 shows the third neighboring root bridge of the three network elements, and the path cost is recorded as the root path cost-3;
  • the root path cost query result of the fifth host 305 shows that the network element is the fourth closest Root bridge path cost which is referred to as a root path costs -4;
  • the IP address of the network element is marked next to each network element, such as the IP address of the first host 301 is 102.11.21.33, the IP address of the second host 302 is 102.11.21.3, and the upper end IP of the third router 310.
  • the address is 102.11.21.22, and the lower IP address is 35.8.60.1.
  • the upper and lower ports of each network element are marked with the network element port role.
  • the lower end of the first host 301 is marked with D, indicating that the port role is a designated port; and if the upper end of the second host 302 is marked with R, Indicates that the port role is the root port and the lower end is marked with D, indicating that the port role is the designated port.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种网络拓朴自动获取方法,包括:获取主机的网络类型;若主机的网络类型为直连网络,对主机进行MSTP状态查询请求立即应答,得到查询结果;若主机的网络类型为路由网络,获取主机到网络管理系统之间的路由器的IP地址,并对主机及主机与网络管理系统之间的路由器进行MSTP状态查询请求立即应答,得到查询结果;对查询结果分析并绘制网络拓朴图。本发明还同时公开了一种网络拓朴自动获取系统、网络查询系统及网络管理系统,采用本发明,能够获取网络中各网元的信息和它们之间的拓朴连接关系信息。

Description

网络拓朴自动获取方法及系统、 网络查询及管理系统 技术领域
本发明涉及网络拓朴中的网络管理技术, 尤其涉及一种网络拓朴自动 获取方法及系统、 网络查询及管理系统。 背景技术
网络拓朴获取的主要目的是获取和维护网络节点的信息及它们之间的 连接关系信息, 并在此基础上绘制出整个网络拓朴图。 网络管理人员在网 络拓朴图的基础上能够对故障节点进行快速定位。
现有技术中, 密集型光波复用 (DWDM, Dense Wavelength Division Multiplexing ) 系统的网络管理一般是通过建立网管通道与目的网元的管理 因特网协议( IP, Internet Protocol )连接来管理目的网元, 网元在网络管理 系统界面上以彼此独立的形式显现在网管界面上, 管理员只能查寻每个网 元各自的配置信息, 却无法得知这些网元具体的拓朴连接方式。 发明内容
有鉴于此, 本发明实施例的主要目的在于提供一种网络拓朴自动获取 方法及系统、 网络查询及管理系统, 能够获取网络中各网元的信息和它们 之间的拓朴连接关系信息。
为达到上述目的, 本发明实施例的技术方案是这样实现的:
本发明实施例提供了一种网络拓朴自动获取方法, 该方法包括: 获取主机的网络类型; 若所述主机的网络类型为直连网络, 对主机进 行多生成树协议(MSTP, Multle Spanning Tree Protocol )状态查询请求立 即应答, 得到查询结果; 若所述主机的网络类型为路由网络, 获取主机到 网络管理系统之间的路由器的 IP地址, 并对主机及主机与网络管理系统之 间的路由器进行 MSTP状态查询请求立即应答, 得到查询结果;
对查询结果分析并绘制网络拓朴图。
上述方案中, 所述获取主机的网络类型包括:
获取主机的 IP 文, 并获取所述 IP 文的目的 IP地址和源 IP地址; 定主机的网络类型。
上述方案中, 所述根据所述主机的 IP地址以及所述 IP报文的目的 IP 地址和源 IP地址确定主机的网络类型, 包括:
才艮据所述主机的 IP地址, 获取到主机的 IP地址对应的掩码;
将所述掩码分别与所述 IP报文的目的 IP地址、 源 IP地址进行位与运 算, 并比较两者的位与运算结果, 若两者的位与运算结果相同, 则所述主 机的网络类型为直连网络, 否则所述主机的网络类型为路由网络。
上述方案中, 所述获取主机到网络管理系统之间的路由器的 IP地址, 包括:
经过路由器向网络管理系统发送一个具有生存时间 (TTL, Time To Live ) 的 IP数据包, 路径上的每跳路由器收到此 IP数据包时将 TTL减 1, 并检查此 IP数据包的 TTL是否为 0, 如果为 0, 则将 IP数据包丟弃并返回 一个英特网控制报文协议 ( ICMP, Internet Control Message Protocol )错误 消息, 如果不为 0, 则继续转发此 IP数据包到下一个路由器; 直到 IP数据 包到达网络管理系统为止;
根据收到的全部 ICMP错误消息, 获取 ICMP超时差错报文的源地址。 上述方案中, 所述查询结果包括: 桥标识(ID, IDentity )、 根桥 ID、 根路径成本、 启用 MSTP的端口数目、 端口号、 端口连接状态、 端口角色、 端口接收到的网桥协议数据单元 ( BPDU, Bridge Protocol Data Unit ) 的上 游介质访问控制层( MAC, Medium Access Control )地址。
上述方案中, 所述绘制拓朴图包括:
删除每个主机及每个路由器的桥和根桥之间冗余的部分, 将全部主机 及路由器用桥和根桥连接起来;
将 IP地址、 端口类型, 根路径成本标记在主机及路由器上。
本发明实施例提供了一种网络拓朴自动获取系统, 所述系统包括: 网 络查询系统、 主机、 路由器、 网络管理系统; 其中,
所述网络查询系统, 配置为获取主机的网络类型; 当所述网络类型为 直连网络时, 对主机进行 MSTP状态查询请求立即应答, 接收主机返回的 查询结果; 当所述网络类型为路由网络时, 获取主机到网络管理系统之间 的路由器的 IP地址,对主机及主机与网络管理系统之间的路由器进行 MSTP 状态查询请求立即应答, 接收主机及所述路由器返回的查询结果; 将查询 结果发送至网络管理系统进行分析及绘制;
所述主机, 配置为接收网络查询系统发送的 MSTP状态查询请求立即 应答, 并返回查询结果给网络查询系统;
所述路由器, 配置为接受网络查询系统对其 IP地址的获取; 接收网络 查询系统发送的 MSTP状态查询请求立即应答, 并返回查询结果给网络查 询系统;
所述网络管理系统, 配置为接收网络查询系统发送的查询结果, 对查 询结果进行分析并绘制网络拓朴图。
上述方案中, 所述网络查询系统包括: 主机网络类型获取模块、 第一 查询模块、 路由器 IP地址获取模块、 第二查询模块; 其中,
所述主机网络类型获取模块,配置为根据主机的 IP报文的目的 IP地址 和源 IP地址获取主机的网络类型; 当所述网络类型为直连网络时, 通知第 一查询模块对主机进行 MSTP状态查询请求立即应答; 当所述网络类型为 路由网络时, 通知路由器 IP地址获取模块获取路由器的 IP地址;
所述第一查询模块, 配置为收到主机网络类型获取模块的通知后, 对 主机进行 MSTP状态查询请求立即应答, 接收主机返回的查询结果; 将查 询结果发送至网络管理系统进行分析及绘制;
所述路由器 IP地址获取模块, 配置为通过向网络管理系统发送具有生 存时间的 IP数据包, 获取主机与网络管理系统之间的路由器的 IP地址; 将 路由器的 IP地址发送至第二查询模块进行结果查询;
所述第二查询模块, 配置为在接收到路由器 IP地址获取模块发送的路 由器的 IP地址后, 对主机及主机与网络管理系统之间的路由器进行 MSTP 状态查询请求立即应答, 接收主机及所述路由器返回的查询结果; 将查询 结果发送至网络管理系统进行分析及绘制。
上述方案中, 所述网络管理系统包括: 网络拓朴自动获取分析模块、 网络拓朴自动获取绘制模块; 其中,
所述网络拓朴自动获取分析模块, 配置为接收网络查询系统发送的查 询结果, 对该查询结果进行分析并将分析结果发送至网络拓朴自动获取绘 制模块进行绘制;
所述网络拓朴自动获取绘制模块, 配置为接收网络拓朴自动获取分析 模块发送的分析结果, 并根据该分析结果绘制网络拓朴图。
本发明实施例提供了一种网络查询系统, 该系统包括: 主机网络类型 获取模块、 第一查询模块、 路由器 IP地址获取模块、 第二查询模块; 其中, 所述主机网络类型获取模块,配置为根据主机的 IP报文的目的 IP地址 和源 IP地址获取主机的网络类型; 当所述网络类型为直连网络时, 通知第 一查询模块对主机进行 MSTP状态查询请求立即应答; 当所述网络类型为 路由网络时, 通知路由器 IP地址获取模块获取路由器的 IP地址;
所述第一查询模块, 配置为收到主机网络类型获取模块的通知后, 对 主机进行 MSTP状态查询请求立即应答, 接收主机返回的查询结果; 将查 询结果发送至网络管理系统进行分析及绘制;
所述路由器 IP地址获取模块, 配置为通过向网络管理系统发送具有生 存时间的 IP数据包, 获取主机与网络管理系统之间的路由器的 IP地址; 将 路由器的 IP地址发送至第二查询模块进行结果查询;
所述第二查询模块, 配置为在接收到路由器 IP地址获取模块发送的路 由器的 IP地址后, 对主机及主机与网络管理系统之间的路由器进行 MSTP 状态查询请求立即应答, 接收主机及所述路由器返回的查询结果; 将查询 结果发送至网络管理系统进行分析及绘制。
上述方案中, 所述主机网络类型获取模块包括: IP报文获取单元、 位 与运算单元、 网络类型判断单元; 其中,
所述 IP报文获取单元, 配置为获取主机的 IP地址报文, 将该 IP报文 的目的 IP地址和源 IP地址发送至位与运算单元进行位与运算;
所述位与运算单元,配置为接收 IP报文获取单元发送的 IP报文的目的 IP地址和源 IP地址, 获取主机 IP地址对应的掩码, 将掩码分别与目的 IP 地址、 源 IP地址进行位与运算; 将两个运算结果发送至网络类型判断单元 进行判断;
所述网络类型判断单元, 配置为接收位与运算单元发送的两个位与运 算结果, 若两个位与运算结果相同, 则主机的网络类型为直连网络, 否则 主机的网络类型为路由网络。
上述方案中, 所述路由器 IP地址获取模块包括: 发送单元、接收单元、 生存时间设置单元; 其中,
所述发送单元,配置为经过路由器发送一个具有 TTL的 IP数据包到网 络管理系统;
所述接收单元, 配置为接收路由器返回的 ICMP错误消息, 并在收到 ICMP错误消息后, 通知生存时间设置单元将 TTL加 1 ; 根据 ICMP错误消 息获取路由器的 IP地址,并将路由器的 IP地址发送至第二查询模块进行结 果查询;
所述生存时间设置单元,配置为设置发送单元中 IP数据包的 TTL初始 值为 1, 当收到接收单元的通知时, 将发送单元中 IP数据包的 TTL加 1。
上述方案中,所述经过路由器发送一个具有 TTL的 IP数据包到网络管 理系统, 包括:
首先将 IP数据包发送至路径中的路由器, 路由器将 TTL减 1, 并检查 此 IP数据包的 TTL是否为 0, 如果为 0, 则将 IP数据包丟弃并给接收单元 返回一个 ICMP错误消息, 如果不为 0, 则继续转发此 IP数据包到下一个 路由器; 直到 IP数据包到达网络管理系统为止。
本发明实施例提供了一种网络管理系统, 所述系统包括: 网络拓朴自 动获取分析模块、 网络拓朴自动获取绘制模块; 其中,
所述网络拓朴自动获取分析模块, 配置为接收网络查询系统发送的查 询结果, 对该查询结果进行分析并将分析结果发送至网络拓朴自动获取绘 制模块进行绘制;
所述网络拓朴自动获取绘制模块, 配置为接收网络拓朴自动获取分析 模块发送的分析结果, 并根据该分析结果绘制网络拓朴图。
本发明实施例提供的网络拓朴自动获取方法及系统、 网络查询及管理 系统,通过获取主机的网络类型,对网络类型为直连网络的主机进行 MSTP 状态查询请求立即应答, 得到查询结果; 对网络类型为路由网络的主机, 获取该主机到网络管理系统之间的路由器的 IP地址, 并对所述主机及所述 路由器进行 MSTP状态查询请求立即应答, 得到查询结果; 对查询结果分 析并绘制网络拓朴图; 如此, 可以获取网络中各网元的信息和它们之间的 拓朴连接关系信息。 附图说明
图 1为本发明实施例网络拓朴自动获取方法实现流程示意图; 图 2为本发明实施例网络拓朴自动获取系统结构组成示意图; 图 3为本发明实施例网络查询系统的结构组成示意图;
图 4为本发明实施例网络管理系统的结构组成示意图;
图 5 为本发明实施例网络拓朴自动获取方法中绘制拓朴图实施例实现 示意图。 具体实施方式
为了能够更加详尽地了解本发明实施例的特点与技术内容, 下面结合 附图对本发明实施例的实现进行详细阐述, 所附附图仅供参考说明之用, 并非用来限定本发明实施例。
图 1 为本发明实施例网络拓朴自动获取方法实现流程示意图, 如图 1 所示, 该方法包括步骤:
步骤 101 : 获取主机的网络类型; 若主机的网络类型为直连网络, 则执 行步骤 102; 若主机的网络类型为路由网络, 则执行步骤 103。
这里, 由网络查询系统获取主机的网络类型。
这里, 主机的网络类型包括: 直连网络、 路由网络; 其中, 直连网络 为主机的 IP地址和网络管理系统的 IP地址在同一网段内的网络,路由网络 为主机的 IP地址和网络管理系统的 IP地址不在同一网段内的网络。
步骤 101包括: 网络查询系统获取主机的 IP报文, 并获取 IP报文的目 的 IP地址和源 IP地址;
根据主机的 IP地址、 IP报文的目的 IP地址和源 IP地址确定主机的网 络类型; 具体地, 网络查询系统根据主机的 IP地址, 获取到主机的 IP地址 对应的掩码; 网络查询系统将掩码分别与 IP报文的目的 IP地址、 源 IP地 址进行位与运算, 并比较两者的位与运算结果, 若两者的位与运算结果相 同, 则主机的网络类型为直连网络, 否则主机的网络类型为路由网络。 这里, 主机的网络接口上有 IP报文的流进和流出, 网络查询系统可以 从主机的网络接口中获取 IP报文; 优选地, 该 IP报文为由主机发往网络管 理系统的 IP 文, 即: 该 IP 文的源 IP地址为主机的 IP地址, 该 IP才艮 文的目的 IP地址为网络管理系统的 IP地址。
这里, 网络查询系统外置于主机, 每个主机都有一个与其对应的网络 查询系统, 且该网络查询系统的 IP地址与主机的 IP地址相同。
步骤 102: 对主机进行 MSTP状态查询请求立即应答, 得到查询结果, 并执行步骤 105。
这里, 由网络查询系统对主机进行 MSTP状态查询请求立即应答。 这里, 网络查询系统对主机进行 MSTP状态查询请求立即应答可以是 周期的, 该周期可以根据网络拓朴中链路的服务质量(Quality of Service, QoS ) 的要求进行设置。
这里,所述查询结果包括:桥 ID( Bridge ID )、根桥 ID( Root Bridge ID )、 才艮路径成本 ( Remainhops )、 启用 MSTP的端口数目、 端口号 ( Port ID )、 端口连接状态 ( Port Status )、 端口角色 ( Role )、 端口接收到的 BPDU的上 游 MAC地址。
步骤 103: 获取主机到网络管理系统之间的路由器的 IP地址。
这里, 由网络查询系统获取主机到网络管理系统之间的路由器的 IP地 址。
具体地, 若主机的网络类型为路由网络, 则主机的 IP地址和网络管理 系统的 IP地址不在同一网段内, 由于网络查询系统的 IP地址与主机的 IP 地址相同,因此网络查询系统的 IP地址与网络管理系统的 IP地址不在同一 网段内; 网络查询系统对网络管理系统的 IP地址进行跟踪路由探测, 以获 取到主机到网络管理系统之间的路由器的 IP地址。 优选地, 所述跟踪路由探测的包括以下步骤:
网络查询系统首先向网络管理系统发送一个 TTL为 1的 IP数据包,当 路径上的第一跳路由器收到此 IP数据包时将 TTL减 1,并检查此 IP数据包 的 TTL是否为 0, 如果为 0, 则将 IP数据包丟弃并给网络查询系统返回一 个 ICMP错误消息, 如果不为 0, 则继续转发此 IP数据包到下一个路由器; 这里, 由于此时 IP数据包的 TTL变为 0, 因此该第一跳路由器会将 IP数据 包丟弃,并返回一个 ICMP错误消息以指明此 IP数据包因为 TTL超时而不 能被发送, 其中, ICMP错误消息是通过 ICMP超时差错报文发送;
网络查询系统重新发送一个 TTL为 2的 IP数据包,同样第一跳路由器 收到此 IP数据包时, 将 TTL减 1, 并检查此 IP数据包是否为 0, 这里, 由 于此时 IP数据包的 TTL变为 1, 即不为 0, 因此该第一跳路由器继续转发 此 IP数据包到第二跳路由器;第二跳路由器收到 IP数据包后,将 TTL减 1, 并检查此 IP数据包是否为 0, 这里, 由于此时 IP数据包的 TTL变为 0, 因 此该第二跳路由器会将 IP数据包丟弃,并返回一个指明 TTL超时而不能被 发送的 ICMP错误消息;
依次类推, 不断重复以上过程,直到 IP数据包到达网络管理系统为止。 网络查询系统根据路由器返回的 ICMP错误消息, 即 ICMP超时差错报文, 获得 ICMP超时差错报文的源地址, 即路由器的 IP地址; 如此, 可以获得 主机和网络管理系统之间的路由器的 IP地址。
步骤 104:对主机及主机与网络管理系统之间的路由器进行 MSTP状态 查询请求立即应答, 得到查询结果。
这里, 由网络查询系统对主机及主机与网络管理系统之间的路由器进 行 MSTP状态查询请求立即应答。
这里, 网络查询系统对主机及主机与网络管理系统之间的路由器进行 MSTP状态查询请求立即应答回复可以是周期的,该周期可以根据网络拓朴 中链路的服务质量的要求进行设置。
这里, 所述查询结果包括: 桥 ID、 根桥 ID、 根路径成本、 启用 MSTP 的端口数目、 端口号、 端口连接状态、 端口角色、 端口接收到的 BPDU的 上游 MAC地址; 优选地, 所述查询结果各项的具体内容由网元在网络中连 接的实际情况决定。
步骤 105:将查询结果发送至网络管理系统进行结果分析并绘制网络拓 朴图。
这里, 由网络查询系统将查询结果发送至网络管理系统进行结果分析 并绘制网络拓朴图。
这里, 网络管理系统对查询结果进行结果分析, 包括:
桥 ID: 表示发送 BPDU的桥的 ID, 由 2字节优先级和 6字节 MAC地 址构成; 这里, 所述桥 ID是根据主机的 IP地址生成;
根桥 ID: 由 2字节优先级和 6字节 MAC地址构成, 是子桥 ID的交换 机, 根据根桥 ID可以算出根桥的 IP地址;
根路径成本: 由此字段内容可以得知主机与根桥的距离, 主机与根桥 之间主机的数目;
启用 MSTP的端口数目: 统计出启用 MSTP的端口的数目;
端口号: 由端口号标识发出 BPDU的端口, 结合硬件端口号得到启用 MSTP的端口号;
端口连接状态: 表示端口是否有连接; 如果端口无连接, 则查询结果 中的 Role、 端口接收到的 BPDU的上游 MAC地址内容为空;
端口角色: 表示端口的类型, 包括: 根端口(root port )、主端口(master port ), 指定端口 (designated port ), 替代端口 (alternate port ), 备份端口 ( backup port );
端口接收到的 BPDU的上游 MAC地址:才艮据上游的 MAC地址可以得 出端口所连接的主机的 IP地址; 这里, 只有端口角色为根端口、 替代端口 或备份端口才具有此项查询结果, 其他端口角色没有此项查询结果。
这里, 网络管理系统对查询结果进行结果分析之后, 根据分析结果绘 制网络拓朴图, 包括:
删除每个主机及每个路由器的桥和根桥之间冗余的部分, 将全部主机 及路由器用桥和根桥连接起来;
将 IP地址、 端口类型, 根路径成本标记在主机及路由器上。
图 2 为本发明实施例网络拓朴自动获取系统结构组成示意图, 如图 2 所示, 所述系统包括: 网络查询系统 21、 主机 22、 路由器 23、 网络管理系 统 24; 其中,
所述网络查询系统 21, 配置为获取主机 22的网络类型; 当所述网络类 型为直连网络时, 对主机 22进行 MSTP状态查询请求立即应答, 接收主机 22返回的查询结果; 当所述网络类型为路由网络时, 获取主机 22到网络管 理系统 24之间的路由器 23的 IP地址, 对主机 22及主机 22与网络管理系 统 24之间的路由器 23进行 MSTP状态查询请求立即应答,接收主机 22及 所述路由器 23返回的查询结果; 将查询结果发送至网络管理系统 24进行 分析及绘制;
所述主机 22,配置为接收网络查询系统 21发送的 MSTP状态查询请求 立即应答, 并返回查询结果给网络查询系统 21 ;
所述路由器 23,配置为提供路由器的 IP地址给网络查询系统 21 ;接收 网络查询系统 21发送的 MSTP状态查询请求立即应答,并返回查询结果给 网络查询系统 21 ;
所述网络管理系统 24, 配置为接收网络查询系统 21发送的查询结果, 对查询结果进行分析并绘制网络拓朴图。
上述方案中, 所述主机 22的网络类型包括: 直连网络、 路由网络; 其 中,直连网络为主机 22的 IP地址和网络管理系统 24的 IP地址在同一网段 内的网络,路由网络为主机 22的 IP地址和网络管理系统 24的 IP地址不在 同一网段内的网络。
上述方案中, 所述网络查询系统 21外置于主机 22, 每个主机 22都有 一个与其对应的网络查询系统 21, 且该网络查询系统 21的 IP地址与主机 22的 IP地址相同。
上述方案中, 所述网络查询系统 21对主机 22及路由器 23进行 MSTP 状态查询请求立即应答可以是周期的, 该周期可以根据网络拓朴中链路的 服务质量的要求设置。
上述方案中, 所述查询结果包括: 桥 ID、 根桥 ID、 根路径成本、 启用 MSTP的端口数目、端口号、端口连接状态、端口角色、端口接收到的 BPDU 的上游 MAC地址。
优选地, 所述网络查询系统 21 包括: 主机网络类型获取模块 211、 第 一查询模块 212、 路由器 IP地址获取模块 213、 第二查询模块 214; 其中, 所述主机网络类型获取模块 211, 配置为根据主机的 IP报文的目的 IP 地址和源 IP地址获取主机的网络类型; 当所述网络类型为直连网络时, 通 知第一查询模块 212对主机 22进行 MSTP状态查询请求立即应答; 当所述 网络类型为路由网络时, 通知路由器 IP地址获取模块 213获取路由器的 IP 地址;
所述第一查询模块 212,配置为收到主机网络类型获取模块 211的通知 后, 对主机 22进行 MSTP状态查询请求立即应答, 接收主机 22返回的查 询结果; 将查询结果发送至网络管理系统 24进行分析及绘制;
所述路由器 IP地址获取模块 213,配置为通过向网络管理系统 24发送 具有生存时间的 IP数据包, 获取主机 22与网络管理系统 24之间的路由器 23的 IP地址; 将路由器的 IP地址发送至第二查询模块 214进行结果查询; 所述第二查询模块 214, 配置为在接收到路由器 IP地址获取模块 213 发送的路由器的 IP地址后,对主机 22及主机 22与网络管理系统 24之间的 路由器 23进行 MSTP状态查询请求立即应答, 接收主机 22及所述路由器 23返回的查询结果; 将查询结果发送至网络管理系统 24进行分析及绘制。
上述方案中, 所述第一查询模块 212对主机 22进行 MSTP状态查询请 求立即应答可以是周期的, 该周期可以根据网络拓朴中链路的服务质量的 要求设置。
上述方案中,所述第二查询模块 214对主机 22及路由器 23进行 MSTP 状态查询请求立即应答可以是周期的, 该周期可以根据网络拓朴中链路的 服务质量的要求设置。
优选地, 所述网络管理系统 24包括: 网络拓朴自动获取分析模块 241、 网络拓朴自动获取绘制模块 242; 其中,
所述网络拓朴自动获取分析模块 241, 配置为接收网络查询系统 11发 送的查询结果, 对该查询结果进行分析并将分析结果发送至网络拓朴自动 获取绘制模块 242进行绘制;
所述网络拓朴自动获取绘制模块 242,配置为接收网络拓朴自动获取分 析模块 241发送的分析结果, 并根据该分析结果绘制网络拓朴图。
上述方案中, 所述分析结果包括:
桥 ID: 表示发送 BPDU的桥的 ID, 由 2字节优先级和 6字节 MAC地 址构成; 这里, 所述桥 ID是根据主机的 IP地址生成;
根桥 ID: 由 2字节优先级和 6字节 MAC地址构成, 是子桥 ID的交换 机, 根据根桥 ID可以算出根桥的 IP地址;
根路径成本: 由此字段内容可以得知主机与根桥的距离, 主机与根桥 之间主机的数目;
启用 MSTP的端口数目: 统计出启用 MSTP的端口的数目; 端口号: 由端口号标识发出 BPDU的端口, 结合硬件端口号得到启用 MSTP的端口号;
端口连接状态: 表示端口是否有连接; 如果端口无连接, 则查询结果 中的 Role、 端口接收到的 BPDU的上游 MAC地址内容为空;
端口角色: 表示端口的类型, 包括: 根端口、 主端口、 指定端口、 替 代端口、 备份端口;
端口接收到的 BPDU的上游 MAC地址:才艮据上游的 MAC地址可以得 出端口所连接的主机的 IP地址; 这里, 只有端口角色为根端口、 替代端口 或备份端口才具有此项查询结果, 其他端口角色没有此项查询结果;
上述方案中, 所述绘制网络拓朴图包括:
删除每个主机及每个路由器的桥和根桥之间冗余的部分, 将全部主机 及路由器用桥和根桥连接起来;
将 IP地址、 端口类型, 根路径成本标记在主机及路由器上。
优选地, 所述主机网络类型获取模块 211包括: IP报文获取单元 2111、 位与运算单元 2112、 网络类型判断单元 2113; 其中,
所述 IP报文获取单元 2111, 配置为获取主机 22的 IP地址报文, 将该 IP报文的目的 IP地址和源 IP地址发送至位与运算单元 2112进行位与运算; 所述位与运算单元 2112, 配置为接收 IP报文获取单元 2111发送的 IP 报文的目的 IP地址和源 IP地址, 获取主机 IP地址对应的掩码, 将掩码分 别与目的 IP地址、 源 IP地址进行位与运算; 将两个运算结果发送至网络类 型判断单元 2113进行判断;
所述网络类型判断单元 2113,配置为接收位与运算单元 2112发送的两 个位与运算结果, 若两个位与运算结果相同, 则主机的网络类型为直连网 络, 否则主机的网络类型为路由网络;
上述方案中, 主机 22的网络接口上有 IP报文的流进和流出, IP报文 获取单元 2111可以从主机的网络接口中获取 IP报文; 优选地, 该 IP报文 为由主机 22发往网络管理系统 24的 IP报文, 即: 该 IP报文的源 IP地址 为主机 22的 IP地址, 该 IP 文的目的 IP地址为网络管理系统 24的 IP地 址。
优选地, 所述路由器 IP地址获取模块 213包括: 发送单元 2131、 接收 单元 2132、 生存时间设置单元 2133; 其中,
所述发送单元 2131, 配置为经过路由器 23发送一个具有 TTL的 IP数 据包到网络管理系统 24;
相应的, 通往网络管理系统 24路径上的路由器 23收到此 IP数据包时 将 TTL减 1, 并检查此 IP数据包的 TTL是否为 0, 如果为 0, 则将 IP数据 包丟弃并给接收单元 2132返回一个 ICMP错误消息, 如果不为 0, 则继续 转发此 IP数据包到下一个路由器; 直到 IP数据包到达网络管理系统 24为 止;
所述接收单元 2132, 配置为接收路由器 23返回的 ICMP错误消息, 并 在收到 ICMP错误消息后, 通知生存时间设置单元 2133将 TTL加 1 ; 根据 ICMP错误消息获取路由器的 IP地址, 并将路由器的 IP地址发送至第二查 询模块 214进行结果查询。
这里,所述 ICMP错误消息是通过 ICMP超时差错报文发送,通过 ICMP 超时差错报文可以获得该报文的源地址, 即路由器的 IP地址。
所述生存时间设置单元 2133, 配置为设置发送单元 2131 中 IP数据包 的 TTL初始值为 1, 当收到接收单元 2132的通知时, 将发送单元 2131中 IP数据包的 TTL力口 1。
在实际应用中, 上述网络拓朴自动获取系统中的网络查询系统 21、 网 络管理系统 24可由网络拓朴自动获取系统中的中央处理器(CPU, Central Processing Unit )、 或数字信号处理器 ( DSP, Digital Signal Processor ), 或 可编程门阵列 (FPGA, Field - Programmable Gate Array ) 实现。 上述网络 拓朴自动获取系统中的主机 22可由任意终端设备实现, 例如个人电脑、 服 务器、 平板电脑等。 上述网络拓朴自动获取系统中的路由器 23可由具有路 由功能的任意路由设备实现。
本发明实施例还记载了一种网络查询系统, 如图 3 所示, 所述网络查 询系统包括: 主机网络类型获取模块 211、 第一查询模块 212、 路由器 IP 地址获取模块 213、 第二查询模块 214; 其中,
所述主机网络类型获取模块 211, 配置为根据主机的 IP报文的目的 IP 地址和源 IP地址获取主机的网络类型; 当所述网络类型为直连网络时, 通 知第一查询模块 212对主机 22进行 MSTP状态查询请求立即应答; 当所述 网络类型为路由网络时, 通知路由器 IP地址获取模块 213获取路由器的 IP 地址;
所述第一查询模块 212,配置为收到主机网络类型获取模块 211的通知 后, 对主机进行 MSTP状态查询请求立即应答, 接收主机返回的查询结果; 将查询结果发送至网络管理系统进行分析及绘制;
所述路由器 IP地址获取模块 213, 配置为通过向网络管理系统发送具 有生存时间的 IP数据包,获取主机与网络管理系统之间的路由器的 IP地址; 将路由器的 IP地址发送至第二查询模块 214进行结果查询;
所述第二查询模块 214, 配置为在接收到路由器 IP地址获取模块 213 发送的路由器的 IP地址后, 对主机及主机与网络管理系统之间的路由器进 行 MSTP状态查询请求立即应答,接收主机及所述路由器返回的查询结果; 将查询结果发送至网络管理系统进行分析及绘制。
上述方案中, 所述第一查询模块 212对主机进行 MSTP状态查询请求 立即应答可以是周期的, 该周期可以根据网络拓朴中链路的服务质量的要 求设置。 上述方案中, 所述第二查询模块 214对主机及路由器进行 MSTP状态 查询请求立即应答可以是周期的, 该周期可以根据网络拓朴中链路的服务 质量的要求设置。
优选地, 所述主机网络类型获取模块 211包括: IP报文获取单元 2111、 位与运算单元 2112、 网络类型判断单元 2113; 其中,
所述 IP报文获取单元 2111, 配置为获取主机 22的 IP地址报文, 将该 IP报文的目的 IP地址和源 IP地址发送至位与运算单元 2112进行位与运算; 所述位与运算单元 2112, 配置为接收 IP报文获取单元 2111发送的 IP 报文的目的 IP地址和源 IP地址, 获取主机 IP地址对应的掩码, 将掩码分 别与目的 IP地址、 源 IP地址进行位与运算; 将两个运算结果发送至网络类 型判断单元 2113进行判断;
所述网络类型判断单元 2113,配置为接收位与运算单元 2112发送的两 个位与运算结果, 若两个位与运算结果相同, 则主机的网络类型为直连网 络, 否则主机的网络类型为路由网络;
上述方案中, 主机 22的网络接口上有 IP报文的流进和流出, IP报文 获取单元 2111可以从主机的网络接口中获取 IP报文; 优选地, 该 IP报文 为由主机 22发往网络管理系统 24的 IP报文, 即: 该 IP报文的源 IP地址 为主机 22的 IP地址, 该 IP 文的目的 IP地址为网络管理系统 24的 IP地 址。
优选地, 所述路由器 IP地址获取模块 213包括: 发送单元 2131、 接收 单元 2132、 生存时间设置单元 2133; 其中,
所述发送单元 2131, 配置为经过路由器发送一个具有 TTL的 IP数据 包到网络管理系统;
相应的, 通往网络管理系统路径上的路由器收到此 IP数据包时将 TTL 减 1, 并检查此 IP数据包的 TTL是否为 0, 如果为 0, 则将 IP数据包丟弃 并给接收单元 2132返回一个 ICMP错误消息, 如果不为 0, 则继续转发此 IP数据包到下一个路由器; 直到 IP数据包到达网络管理系统为止;
所述接收单元 2132, 配置为接收路由器返回的 ICMP错误消息, 并在 收到 ICMP错误消息后,通知生存时间设置单元 2133将 TTL力 σ 1;根据 ICMP 错误消息获取路由器的 IP地址,并将路由器的 IP地址发送至第二查询模块 214进行结果查询。
这里,所述 ICMP错误消息是通过 ICMP超时差错报文发送,通过 ICMP 超时差错报文可以获得该报文的源地址, 即路由器的 IP地址。
所述生存时间设置单元 2133, 配置为设置发送单元 2131 中 IP数据包 的 TTL初始值为 1, 当收到接收单元 2132的通知时, 将发送单元 2131中 IP数据包的 TTL力口 1。
本领域的技术人员应当理解, 图 3所示的网络查询系统可参照图 2所 示的网络拓朴自动获取系统中的网络查询系统的相关描述而理解。
在实际应用中, 上述网络查询系统中的主机网络类型获取模块 211、 第 一查询模块 212、路由器 IP地址获取模块 213、第二查询模块 214可由网络 拓朴自动获取系统中 CPU、 或 DSP、 或 FPGA实现。
本发明实施例还记载了一种网络管理系统, 如图 4所示, 所述网络管 理系统包括: 网络拓朴自动获取分析模块 241、 网络拓朴自动获取绘制模块 242; 其中,
所述网络拓朴自动获取分析模块 241,配置为接收网络查询系统发送的 查询结果, 对该查询结果进行分析并将分析结果发送至网络拓朴自动获取 绘制模块 242进行绘制;
所述网络拓朴自动获取绘制模块 242,配置为接收网络拓朴自动获取分 析模块 241发送的分析结果, 并根据该分析结果绘制网络拓朴图。
上述方案中, 所述分析结果包括: 桥 ID: 表示发送 BPDU的桥的 ID, 由 2字节优先级和 6字节 MAC地 址构成; 这里, 所述桥 ID是根据主机的 IP地址生成;
根桥 ID: 由 2字节优先级和 6字节 MAC地址构成, 是子桥 ID的交换 机, 根据根桥 ID可以算出根桥的 IP地址;
根路径成本: 由此字段内容可以得知主机与根桥的距离, 主机与根桥 之间主机的数目;
启用 MSTP的端口数目: 统计出启用 MSTP的端口的数目;
端口号: 由端口号标识发出 BPDU的端口, 结合硬件端口号得到启用 MSTP的端口号;
端口连接状态: 表示端口是否有连接; 如果端口无连接, 则查询结果 中的 Role、 端口接收到的 BPDU的上游 MAC地址内容为空;
端口角色: 表示端口的类型, 包括: 根端口、 主端口、 指定端口、 替 代端口、 备份端口;
端口接收到的 BPDU的上游 MAC地址:才艮据上游的 MAC地址可以得 出端口所连接的主机的 IP地址; 这里, 只有端口角色为根端口、 替代端口 或备份端口才具有此项查询结果, 其他端口角色没有此项查询结果;
上述方案中, 所述绘制网络拓朴图包括:
删除每个主机及每个路由器的桥和根桥之间冗余的部分, 将全部主机 及路由器用桥和根桥连接起来;
将 IP地址、 端口类型, 根路径成本标记在主机及路由器上。
本领域的技术人员应当理解, 图 4所示的网络管理系统可参照图 2所 示的网络拓朴自动获取系统中的网络管理系统的相关描述而理解。
在实际应用中, 上述网络管理系统中的网络拓朴自动获取分析模块 241、 网络拓朴自动获取绘制模块 242可由网络拓朴自动获取系统中 CPU、 或 DSP、 或 FPGA实现。 图 5 为本发明实施例网络拓朴自动获取方法中绘制拓朴图实施例实现 示意图, 如图 3所示, 本实施例中包括: 第一主机 301、 第二主机 302、 第 三主机 303、 第四主机 304、 第五主机 305、 第六主机 306、 第七主机 307、 第一路由器 308、 第二路由器 309、 第三路由器 310; 其中, 第一主机 301 为根桥处的主机, 其根路径成本记作根路径成本 -0; 第二主机 302、 第三主 机 302 的根路径成本查询结果显示这两个主机第一近邻根桥, 其路径成本 记作根路径成本 -1 ; 第一路由器 308、 第六主机 306、 第三路由器 310的根 路径成本查询结果显示这三个网元第二近邻根桥, 其路径成本记作根路径 成本 -2; 第四主机 304、 第二路由器 309、 第七主机 307的根路径成本查询 结果显示这三个网元第三近邻根桥,其路径成本记作根路径成本 -3 ; 第五主 机 305 的根路径成本查询结果显示这个网元第四近邻根桥, 其路径成本记 作根路径成本 -4;
这里, 每个网元的旁边都标记了该网元的 IP地址, 如第一主机 301的 IP地址为 102.11.21.33、 第二主机 302的 IP地址为 102.11.21.3、 第三路由 器 310的上端 IP地址为 102.11.21.22, 下端 IP地址为 35.8.60.1 ;
这里, 每个网元的上下端口处都标记了该网元端口角色, 如第一主机 301的下端标记有 D, 表示该端口角色为指定端口; 再如第二主机 302的上 端标记有 R,表示该端口角色为根端口, 下端标记有 D,表示该端口角色为 指定端口。
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围。

Claims

权利要求书
1、 一种网络拓朴自动获取方法, 所述方法包括:
获取主机的网络类型; 若所述主机的网络类型为直连网络, 对主机进 行多生成树协议 MSTP状态查询请求立即应答, 得到查询结果; 若所述主 机的网络类型为路由网络, 获取主机到网络管理系统之间的路由器的 IP地 址, 并对主机及主机与网络管理系统之间的路由器进行 MSTP状态查询请 求立即应答, 得到查询结果;
对查询结果分析并绘制网络拓朴图。
2、根据权利要求 1所述的方法, 其中, 所述获取主机的网络类型包括: 获取主机的 IP地址, 并获取所述 IP 文的目的 IP地址和源 IP地址; 定主机的网络类型。
3、根据权利要求 2所述的方法, 其中, 所述根据所述主机的 IP地址以 及所述 IP报文的目的 IP地址和源 IP地址确定主机的网络类型, 包括: 才艮据所述主机的 IP地址, 获取到主机的 IP地址对应的掩码; 将所述掩码分别与所述 IP报文的目的 IP地址、 源 IP地址进行位与运 算, 并比较两者的位与运算结果, 若两者的位与运算结果相同, 则所述主 机的网络类型为直连网络, 否则所述主机的网络类型为路由网络。
4、 根据权利要求 1至 3任一项所述的方法, 其中, 所述获取主机到网 络管理系统之间的路由器的 IP地址, 包括:
经过路由器向网络管理系统发送一个具有生存时间 TTL的 IP数据包, 路径上的每跳路由器收到此 IP数据包时将 TTL减 1,并检查此 IP数据包的 TTL是否为 0, 如果为 0, 则将 IP数据包丟弃并返回一个英特网控制报文 协议 ICMP错误消息, 如果不为 0, 则继续转发此 IP数据包到下一个路由 器; 直到 IP数据包到达网络管理系统为止;
根据收到的全部 ICMP错误消息, 获取 ICMP超时差错报文的源地址。
5、 根据权利要求 4所述的方法, 其中, 所述查询结果包括: 桥 ID、 根 桥 ID、 根路径成本、 启用 MSTP的端口数目、 端口号、 端口连接状态、 端 口角色、 端口接收到的网桥协议数据单元 BPDU的上游 MAC地址。
6、 根据权利要求 5所述的方法, 其中, 所述绘制拓朴图包括: 删除每个主机及每个路由器的桥和根桥之间冗余的部分, 将全部主机 及路由器用桥和根桥连接起来;
将 IP地址、 端口类型, 根路径成本标记在主机及路由器上。
7、一种网络拓朴自动获取系统, 所述系统包括: 网络查询系统、 主机、 路由器、 网络管理系统; 其中,
所述网络查询系统, 配置为获取主机的网络类型; 当所述网络类型为 直连网络时, 对主机进行 MSTP状态查询请求立即应答, 接收主机返回的 查询结果; 当所述网络类型为路由网络时, 获取主机到网络管理系统之间 的路由器的 IP地址,对主机及主机与网络管理系统之间的路由器进行 MSTP 状态查询请求立即应答, 接收主机及所述路由器返回的查询结果; 将查询 结果发送至网络管理系统进行分析及绘制;
所述主机, 配置为接收网络查询系统发送的 MSTP状态查询请求立即 应答, 并返回查询结果给网络查询系统;
所述路由器, 配置为接受网络查询系统对其 IP地址的获取; 接收网络 查询系统发送的 MSTP状态查询请求立即应答, 并返回查询结果给网络查 询系统;
所述网络管理系统, 配置为接收网络查询系统发送的查询结果, 对查 询结果进行分析并绘制网络拓朴图。
8、 根据权利要求 7所述的系统, 其中, 所述网络查询系统包括: 主机 网络类型获取模块、 第一查询模块、 路由器 IP地址获取模块、 第二查询模 块; 其中,
所述主机网络类型获取模块,配置为根据主机的 IP报文的目的 IP地址 和源 IP地址获取主机的网络类型; 当所述网络类型为直连网络时, 通知第 一查询模块对主机进行 MSTP状态查询请求立即应答; 当所述网络类型为 路由网络时, 通知路由器 IP地址获取模块获取路由器的 IP地址;
所述第一查询模块, 配置为收到主机网络类型获取模块的通知后, 对 主机进行 MSTP状态查询请求立即应答, 接收主机返回的查询结果; 将查 询结果发送至网络管理系统进行分析及绘制;
所述路由器 IP地址获取模块, 配置为通过向网络管理系统发送具有生 存时间的 IP数据包, 获取主机与网络管理系统之间的路由器的 IP地址; 将 路由器的 IP地址发送至第二查询模块进行结果查询;
所述第二查询模块, 配置为在接收到路由器 IP地址获取模块发送的路 由器的 IP地址后, 对主机及主机与网络管理系统之间的路由器进行 MSTP 状态查询请求立即应答, 接收主机及所述路由器返回的查询结果; 将查询 结果发送至网络管理系统进行分析及绘制。
9、 根据权利要求 7或 8所述的系统, 其中, 所述网络管理系统包括: 网络拓朴自动获取分析模块、 网络拓朴自动获取绘制模块; 其中,
所述网络拓朴自动获取分析模块, 配置为接收网络查询系统发送的查 询结果, 对该查询结果进行分析并将分析结果发送至网络拓朴自动获取绘 制模块进行绘制;
所述网络拓朴自动获取绘制模块, 配置为接收网络拓朴自动获取分析 模块发送的分析结果, 并根据该分析结果绘制网络拓朴图。
10、 一种网络查询系统, 所述系统包括: 主机网络类型获取模块、 第 一查询模块、 路由器 IP地址获取模块、 第二查询模块; 其中, 所述主机网络类型获取模块,配置为根据主机的 IP报文的目的 IP地址 和源 IP地址获取主机的网络类型; 当所述网络类型为直连网络时, 通知第 一查询模块对主机进行 MSTP状态查询请求立即应答; 当所述网络类型为 路由网络时, 通知路由器 IP地址获取模块获取路由器的 IP地址;
所述第一查询模块, 配置为收到主机网络类型获取模块的通知后, 对 主机进行 MSTP状态查询请求立即应答, 接收主机返回的查询结果; 将查 询结果发送至网络管理系统进行分析及绘制;
所述路由器 IP地址获取模块, 配置为通过向网络管理系统发送具有生 存时间的 IP数据包, 获取主机与网络管理系统之间的路由器的 IP地址; 将 路由器的 IP地址发送至第二查询模块进行结果查询;
所述第二查询模块, 配置为在接收到路由器 IP地址获取模块发送的路 由器的 IP地址后, 对主机及主机与网络管理系统之间的路由器进行 MSTP 状态查询请求立即应答, 接收主机及所述路由器返回的查询结果; 将查询 结果发送至网络管理系统进行分析及绘制。
11、 根据权利要求 10所述的系统, 其中, 所述主机网络类型获取模块 包括: IP报文获取单元、 位与运算单元、 网络类型判断单元; 其中,
所述 IP报文获取单元, 配置为获取主机的 IP地址报文, 将该 IP报文 的目的 IP地址和源 IP地址发送至位与运算单元进行位与运算;
所述位与运算单元,配置为接收 IP报文获取单元发送的 IP报文的目的 IP地址和源 IP地址, 获取主机 IP地址对应的掩码, 将掩码分别与目的 IP 地址、 源 IP地址进行位与运算; 将两个运算结果发送至网络类型判断单元 进行判断;
所述网络类型判断单元, 配置为接收位与运算单元发送的两个位与运 算结果, 若两个位与运算结果相同, 则主机的网络类型为直连网络, 否则 主机的网络类型为路由网络。
12、 根据权利要求 10或 11所述的系统, 其中, 所述路由器 IP地址获 取模块包括: 发送单元、 接收单元、 生存时间设置单元; 其中,
所述发送单元,配置为经过路由器发送一个具有 TTL的 IP数据包到网 络管理系统;
所述接收单元, 配置为接收路由器返回的 ICMP错误消息, 并在收到 ICMP错误消息后, 通知生存时间设置单元将 TTL加 1 ; 根据 ICMP错误消 息获取路由器的 IP地址,并将路由器的 IP地址发送至第二查询模块进行结 果查询;
所述生存时间设置单元,配置为设置发送单元中 IP数据包的 TTL初始 值为 1, 当收到接收单元的通知时, 将发送单元中 IP数据包的 TTL加 1。
13、 根据权利要求 12所述的系统, 其中, 所述经过路由器发送一个具 有 TTL的 IP数据包到网络管理系统, 包括:
首先将 IP数据包发送至路径中的路由器, 路由器将 TTL减 1, 并检查 此 IP数据包的 TTL是否为 0, 如果为 0, 则将 IP数据包丟弃并给接收单元 返回一个 ICMP错误消息, 如果不为 0, 则继续转发此 IP数据包到下一个 路由器; 直到 IP数据包到达网络管理系统为止。
14、 一种网络管理系统, 所述系统包括: 网络拓朴自动获取分析模块、 网络拓朴自动获取绘制模块; 其中,
所述网络拓朴自动获取分析模块, 配置为接收网络查询系统发送的查 询结果, 对该查询结果进行分析并将分析结果发送至网络拓朴自动获取绘 制模块进行绘制;
所述网络拓朴自动获取绘制模块, 配置为接收网络拓朴自动获取分析 模块发送的分析结果, 并根据该分析结果绘制网络拓朴图。
PCT/CN2013/082075 2012-12-24 2013-08-22 网络拓扑自动获取方法及系统、网络查询及管理系统 WO2013189414A2 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210566280.3 2012-12-24
CN2012105662803A CN103051477A (zh) 2012-12-24 2012-12-24 一种网络拓扑自动获取方法及系统、网络管理系统

Publications (2)

Publication Number Publication Date
WO2013189414A2 true WO2013189414A2 (zh) 2013-12-27
WO2013189414A3 WO2013189414A3 (zh) 2014-02-13

Family

ID=48063982

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/082075 WO2013189414A2 (zh) 2012-12-24 2013-08-22 网络拓扑自动获取方法及系统、网络查询及管理系统

Country Status (2)

Country Link
CN (1) CN103051477A (zh)
WO (1) WO2013189414A2 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112839324A (zh) * 2021-03-24 2021-05-25 四川创智联恒科技有限公司 一种ecpri连接设备扫描方法及系统
CN113839859A (zh) * 2020-06-23 2021-12-24 华为技术有限公司 一种报文通告的方法以及相关装置
CN114363189A (zh) * 2021-12-15 2022-04-15 中电信数智科技有限公司 基于tr069协议的局域网拓扑结构测绘方法及系统

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051477A (zh) * 2012-12-24 2013-04-17 中兴通讯股份有限公司 一种网络拓扑自动获取方法及系统、网络管理系统
CN103490926A (zh) * 2013-09-18 2014-01-01 湖南蚁坊软件有限公司 一种网络拓扑自动获取的方法
JP6863305B2 (ja) * 2018-01-29 2021-04-21 オムロン株式会社 ネットワークシステム、制御方法および制御装置
CN112953833B (zh) * 2021-03-25 2022-04-15 全讯汇聚网络科技(北京)有限公司 基于网桥实现三层路由转发的方法、系统及网关设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145950A (zh) * 2007-04-25 2008-03-19 中兴通讯股份有限公司 一种基于多业务传送节点的拓扑管理方法
WO2009097615A1 (en) * 2008-02-01 2009-08-06 Allied Telesis Holdings Kabushiki Kaisha Method and system for dynamic link failover management
CN101729351A (zh) * 2009-11-03 2010-06-09 福建星网锐捷网络有限公司 拓扑信息的发现方法及系统、查询请求设备、待查询设备
CN102439905A (zh) * 2011-09-30 2012-05-02 华为技术有限公司 网络拓扑自动发现方法、装置及系统
CN103051477A (zh) * 2012-12-24 2013-04-17 中兴通讯股份有限公司 一种网络拓扑自动获取方法及系统、网络管理系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102821009B (zh) * 2012-08-08 2015-01-28 中兴通讯股份有限公司 基于链路层发现协议监控环形网络的方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145950A (zh) * 2007-04-25 2008-03-19 中兴通讯股份有限公司 一种基于多业务传送节点的拓扑管理方法
WO2009097615A1 (en) * 2008-02-01 2009-08-06 Allied Telesis Holdings Kabushiki Kaisha Method and system for dynamic link failover management
CN101729351A (zh) * 2009-11-03 2010-06-09 福建星网锐捷网络有限公司 拓扑信息的发现方法及系统、查询请求设备、待查询设备
CN102439905A (zh) * 2011-09-30 2012-05-02 华为技术有限公司 网络拓扑自动发现方法、装置及系统
CN103051477A (zh) * 2012-12-24 2013-04-17 中兴通讯股份有限公司 一种网络拓扑自动获取方法及系统、网络管理系统

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113839859A (zh) * 2020-06-23 2021-12-24 华为技术有限公司 一种报文通告的方法以及相关装置
CN113839859B (zh) * 2020-06-23 2023-05-23 华为技术有限公司 一种报文通告的方法以及相关装置
CN112839324A (zh) * 2021-03-24 2021-05-25 四川创智联恒科技有限公司 一种ecpri连接设备扫描方法及系统
CN114363189A (zh) * 2021-12-15 2022-04-15 中电信数智科技有限公司 基于tr069协议的局域网拓扑结构测绘方法及系统

Also Published As

Publication number Publication date
WO2013189414A3 (zh) 2014-02-13
CN103051477A (zh) 2013-04-17

Similar Documents

Publication Publication Date Title
US10122614B2 (en) Failure protection for traffic-engineered bit indexed explicit replication
WO2019128950A1 (zh) 一种报文处理的方法、网络节点和系统
WO2013189414A2 (zh) 网络拓扑自动获取方法及系统、网络查询及管理系统
CN107078963B (zh) 虚拟可扩展局域网中的路由追踪
JP2019205171A (ja) ビットフォワーディングイングレスルータ、ビットフォワーディングルータ及び運用管理保守テスト方法
US8605603B2 (en) Route convergence based on ethernet operations, administration, and maintenance protocol
US8798054B2 (en) IP network system
US7778204B2 (en) Automatic maintenance of a distributed source tree (DST) network
WO2007140683A1 (fr) Procédé, système et dispositif de protection de service, basés sur l'absence de connexion
US9094330B2 (en) Data transport system and control method of data transport system
WO2008055426A1 (fr) Procédé, système et appareil de nœud pour transmettre un message de gestion de défaut de connectivité ethernet
US8948023B2 (en) Enhancing mtrace to detect failure in multicast diverse paths
WO2009052765A1 (fr) Procédé et dispositif de détection et de traitement de défaillance de nœud dans un réseau poste à poste
WO2008028384A1 (fr) Procédé et système de mise en oeuvre de commande de transmission pour messages oam
WO2006131055A1 (fr) Procédé et élément de réseau destiné au transfert de données
KR20140117993A (ko) 링크 장애 추적을 위한 mpls-tp 네트워크 및 방법
WO2017000802A1 (zh) 一种业务故障定位方法及装置
JP4822905B2 (ja) ブリッジ装置、ブリッジ装置における制御方法、及び制御プログラム
WO2009092257A1 (zh) 运营商骨干网传输网络的故障检测方法和装置
WO2020173424A1 (zh) 报文处理的方法和网关设备
JP4532253B2 (ja) フレーム転送装置及びフレームのループ抑止方法
CN107786386B (zh) 对用于验证多播连接的双向转发检测(bfd)消息的选择性传输
US9667439B2 (en) Determining connections between disconnected partial trees
US10148515B2 (en) Determining connections of non-external network facing ports
WO2020168982A1 (zh) 一种发送和获取断言报文的方法和网络节点

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13807593

Country of ref document: EP

Kind code of ref document: A2

122 Ep: pct application non-entry in european phase

Ref document number: 13807593

Country of ref document: EP

Kind code of ref document: A2