WO2019128273A1 - Method, device and system for determining connection relation of network devices - Google Patents

Method, device and system for determining connection relation of network devices Download PDF

Info

Publication number
WO2019128273A1
WO2019128273A1 PCT/CN2018/102710 CN2018102710W WO2019128273A1 WO 2019128273 A1 WO2019128273 A1 WO 2019128273A1 CN 2018102710 W CN2018102710 W CN 2018102710W WO 2019128273 A1 WO2019128273 A1 WO 2019128273A1
Authority
WO
WIPO (PCT)
Prior art keywords
relay device
network management
packet
identification information
relay
Prior art date
Application number
PCT/CN2018/102710
Other languages
French (fr)
Chinese (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 WO2019128273A1 publication Critical patent/WO2019128273A1/en

Links

Images

Classifications

    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present application relates to the field of network management technologies, and in particular, to a method, device, and system for determining a connection relationship of a network device.
  • determining the connection relationship between the network devices included in the communication network helps to have an overall understanding and understanding of the structure of the entire communication network, and can help the user or the network administrator to perform network fault location and Performance analysis.
  • a network topology is determined mainly based on a simple network management protocol (SNMP).
  • SNMP information protocol is used to obtain a forwarding information base (FIB) of each network device in the network, and The obtained routing table is determined in the obtained FIB, and the connection relationship between the network devices is determined according to the forwarding relationship in the routing forwarding table.
  • the information about the network device through which the optimal path of the packet is transmitted is recorded in the routing and forwarding table of each network device.
  • the information about the network device that does not pass the optimal path cannot be obtained through the FIB information. Therefore, the information is determined.
  • the embodiment of the present invention provides a method, a device, and a system for determining a connection relationship of a network device, which are used to solve the problem that a certain network device cannot be considered in the prior art, and thus the complete connection relationship between the network devices cannot be determined. And because of the need to obtain additional FIBs for each network device in the network, resulting in higher complexity.
  • the embodiment of the present application provides a method for determining a connection relationship of a network device, where the method includes: the terminal device sends an internet protocol (IP) packet to the network management device via at least one relay device, and relays Receiving, by the device, an IP packet sent by the last hop device (the terminal device or another relay device different from the relay device), and inserting the IP packet in the area where the IP packet is used for inserting the identifier information
  • IP internet protocol
  • the network management device receives the IP packet sent by the terminal device, where the network management device receives the IP packet sent by the terminal device.
  • the IP packet is an IP packet that is forwarded to the network management device by the at least one relay device, and the identifier information of the terminal device is inserted in the IP packet, and at least one of the IP packets is sequentially passed.
  • the identifier information corresponding to the relay device after the network management device receives the IP packet sent by the terminal device, parses the IP packet, and obtains the sequential arrangement. Identifying the identification information of the terminal device and the identification information corresponding to the at least one relay device, and determining the terminal device and the at least one relay according to the identification information of the terminal device and the identification information corresponding to the at least one relay device respectively.
  • the connection relationship between the devices and determines the connection relationship between the at least one relay device and the network management device.
  • the network management device can determine the terminal by using the identifier information of the terminal device carried in the IP packet and the identifier information of the relay device that the IP packet passes through, as long as the terminal device sends the IP packet to the network management device.
  • the connection between the device and the relay device Compared with the prior art, the method for determining the connection relationship of the network device provided by the application, the network management device does not need to obtain the FIB of the terminal device and the relay device, and inserts the identifier information into the IP packet sent by the terminal device.
  • the connection relationship of the network device is determined, the complexity of determining the connection relationship of the network device is reduced, and the connection relationship between the network devices is not determined by the FIB. Therefore, there is no part of the network device that can only be obtained through the FIB information. Information that caused the problem of not being able to determine the complete network topology map.
  • the IP packet is used to insert the identifier information.
  • the identification information of the terminal device and the identification information of the relay device are sequentially inserted.
  • the network management device determines the terminal device and the at least one relay according to the identification information of the terminal device and the identification information corresponding to the at least one relay device.
  • the connection between devices can be as follows:
  • the network management device can determine the connection relationship between the terminal device and the at least one relay device without relying on the terminal device and the relay device to report the FIB information, and determine the complete network topology map. Reduce the complexity of determining the network topology map.
  • the network management device determines a connection relationship between the at least one relay device and the network management device, and specifically adopts the following manner:
  • the network management device Determining, by the network management device, the last of the IP packets sent to the network management device, according to the identification information of the terminal device and the identification information corresponding to the at least one relay device.
  • the network management device determines the last relay device as a relay device directly connected to the network management device, and determines according to a relay device directly connected to the network management device a connection relationship between the network management device and the at least one relay device.
  • the network management device can determine the connection relationship between the network management device and the at least one relay device without relying on the terminal device and the relay device to report the FIB information, thereby reducing the complexity of determining the network topology map. .
  • the network management device determines a connection relationship between the at least one relay device and the network management device, and specifically adopts the following manner:
  • the pre-set correspondence includes a correspondence between the identifier information of the relay device directly connected to the network management device and the identifier information of the network management device.
  • the network management device can determine the connection relationship between the network management device and the at least one relay device without relying on the terminal device and the relay device to report the FIB information, thereby reducing the complexity of determining the network topology map. .
  • the identification information of the terminal device includes a media access control (MAC) address, a serial number (SN), and a uniform resource name (uniform resource name) of the terminal device.
  • MAC media access control
  • SN serial number
  • URI uniform resource identifier
  • the identifier information of the terminal device is not limited, and the identifier information of the terminal device may be a MAC address, an SN, a URN, and a URI of the terminal device, and may be used to identify the terminal device.
  • Other Information may be used to identify the terminal device.
  • the identification information of the relay device includes at least one of a MAC address, an SN, a URN, and a URI of the relay device.
  • the identifier information of the relay device is not limited, and the identifier information of the relay device may be used for the identifier, in addition to the MAC address, the SN, the URN, and the URI of the relay device. Additional information for the relay device.
  • the IP packet may be the first IP packet sent by the terminal device.
  • the terminal device does not need to insert the identification information of the terminal device and the relay device into all the IP packets sent to the network management device, and only needs to insert in the first IP packet sent by the terminal device to the network management device.
  • the identification information of the terminal device and the relay device can save the transmission time of the IP packet and improve the processing efficiency of the network management device.
  • the IP packet may also be the first N (N is a positive integer greater than or equal to 2) IP packets sent by the terminal device, and N may be used according to the actual application. The accuracy setting required for reliability.
  • the embodiment of the present application provides a network management device, where the network management device has a function of implementing network management device behavior in the foregoing method example of the first aspect.
  • the functions can be implemented by hardware or by software.
  • the network management device includes a processor, a memory, a communication interface, and a bus, wherein the processor, the memory, and the communication interface are connected by the bus; the processor calls An instruction stored in the memory to perform the method of the first aspect described above and any one of the possible aspects of the first aspect, the communication interface for receiving or transmitting an IP message.
  • the embodiment of the present application provides a relay device, where the relay device has a function of implementing the behavior of the relay device in the foregoing method example of the first aspect.
  • the functions can be implemented by hardware or by software.
  • the structure of the relay device includes a processor, a memory, a communication interface, and a bus, wherein the processor, the memory, and the communication interface are connected by the bus;
  • the processor invokes instructions stored in the memory to perform the method of the first aspect and any one of the possible aspects of the first aspect, the communication interface for receiving or transmitting an IP message.
  • the embodiment of the present application further provides a terminal device, where the terminal device has a function of implementing the behavior of the terminal device in the foregoing method example.
  • the functions can be implemented by hardware or by software.
  • the structure of the terminal device includes a processor, a memory, a communication interface, a display screen, and a bus, wherein the processor, the memory, the communication interface, and the display screen pass The bus is connected; the processor calls an instruction stored in the memory to execute the above method, and the display screen is for displaying information.
  • system of the present application further provides a system for determining a connection relationship of a network device, where the system includes the network management device described in the foregoing second aspect, the relay device described in the foregoing third aspect, and the foregoing fourth aspect.
  • an embodiment of the present application provides a network management device, where the network management device has a function of implementing network management device behavior in the foregoing method example of the first aspect.
  • the functions can be implemented by hardware or by software.
  • the network management device includes a receiving module and a processing module, and the receiving module and the processing module are configured to perform the method described in the above first aspect and any one of the first aspects the design of.
  • the embodiment of the present application further provides a computer storage medium, where the computer storage medium stores computer executable instructions, when the computer executable instructions are invoked by a computer, causing the computer to perform the first aspect. Or the method provided by any of the above first aspects of the design.
  • the embodiment of the present application further provides a computer program product, when run on a computer, causing the computer to perform the method described in the above first aspect or any one of the above possible aspects of the first aspect.
  • the embodiment of the present application provides a chip used in a network management device, where the chip is connected to a memory, and is configured to read and execute a software program stored in the memory to implement the first aspect and the foregoing Any of the methods provided by the design included in one aspect.
  • FIG. 1 is a schematic structural diagram of a home WLAN network provided by the present application.
  • FIG. 2 is a flowchart of a method for determining a network topology diagram provided by the present application
  • FIG. 3 is a schematic diagram of a network topology diagram displayed on a terminal device according to the present application.
  • FIG. 4 is a flowchart of another method for determining a network topology diagram provided by the present application.
  • FIG. 5 is a schematic diagram of inserting identification information into an IP packet according to the present application.
  • FIG. 6 is a schematic flowchart of determining a network topology diagram provided by the present application.
  • FIG. 7 is a schematic diagram of IP packet parsing provided by the present application.
  • FIG. 8 is a schematic diagram of an area for inserting identification information in an IP packet according to the present application.
  • FIG. 9 is a schematic structural diagram of another home WLAN network provided by the present application.
  • FIG. 10 is a schematic structural diagram of a network management device provided by the present application.
  • FIG. 11 is a schematic structural diagram of a relay device provided by the present application.
  • FIG. 12 is a schematic structural diagram of a terminal device provided by the present application.
  • FIG. 13 is a schematic structural diagram of another network management device provided by the present application.
  • the embodiment of the present invention provides a method, a device, and a system for determining a connection relationship of a network device, which are used to solve the problem that a certain network device cannot be considered in the prior art, and thus the complete connection relationship between the network devices cannot be determined. And because of the need to obtain additional FIBs for each network device in the network, resulting in higher complexity.
  • Network topology refers to the connection relationship between various network devices in a communication network.
  • the network device may include a network management device, a relay device, and a terminal device.
  • the network device may be equivalent to a network node.
  • the network device and the network node are not distinguished, and the relay device is Refers to a device that has a routing function and provides a wireless access network or a wired access network function for a terminal device, and mainly includes a router, a switch, a bridge, a hub, and a terminal device capable of providing a wireless access network function.
  • the network management device is mainly used for network management in the communication network, and provides a wireless access network or a wired access network function for the terminal device, and may include a router, a switch, and the like, which are responsible for connecting the terminal device to the Internet.
  • terminal equipment can include mobile phones, tablets, laptops, desktop computers, personal digital assistants (PDAs), and TVs with wireless connectivity, smart watches, air conditioners, refrigerators, water heaters, wireless outlets And other equipment.
  • PDAs personal digital assistants
  • TVs with wireless connectivity smart watches, air conditioners, refrigerators, water heaters, wireless outlets And other equipment.
  • Network topology diagram refers to the network structure diagram composed of network equipment and transmission medium.
  • the transmission medium may be a wireless transmission medium or a wired transmission medium.
  • the wired transmission medium may include a twisted pair cable, a coaxial cable, an optical fiber, etc.
  • the wireless transmission medium may include microwave, infrared, and laser.
  • Wireless fidelity is a technology that allows terminal devices to connect to a wireless local area network (WLAN).
  • WLAN wireless local area network
  • the traditional Wi-Fi architecture refers to a secondary architecture consisting of a terminal device and a relay device. In this architecture, all terminal devices are connected to the same relay device through the only one in the architecture. The relay device accesses the network (for example, the Internet or WLAN).
  • the network for example, the Internet or WLAN.
  • the distributed Wi-Fi architecture is an architecture proposed in relation to the traditional Wi-Fi architecture.
  • the terminal device, the primary relay device and the secondary relay device are mainly included, wherein the primary relay device works in the main In the routing mode, it has certain management capabilities.
  • the relay device is a normal relay device that does not have a management function. It works in the slave route mode.
  • the slave relay device passes the wired transmission medium or Wi-Fi. Accessing the WLAN and extending Wi-Fi coverage, the terminal device can be connected to the primary relay device or connected to the secondary relay device, but the packets that need to be sent to the Internet need to be forwarded through the primary relay device.
  • the relay device acts as a gateway.
  • the primary relay device is a network management device that is used to process packet services and service configurations.
  • the device can be directly connected to a wireless access point (for example, a broadband carrier) or an intermediate device. (for example, a modem) is connected to a wireless access point to provide access network functions for terminal devices in the WLAN, including but not limited to routers operating in the main routing mode, power cats, wireless repeaters, and the like.
  • the relay device From the relay device, it can connect to the main relay device through a medium such as a wired transmission medium or a wireless transmission medium, and expand the Wi-Fi coverage range or the wired connection range of the main routing device, and can provide Wi for the terminal device in the same WLAN.
  • a medium such as a wired transmission medium or a wireless transmission medium
  • -Fi or wired connection function from relay devices including but not limited to routers operating in slave route mode, power cats, wireless repeaters, etc.
  • the method for determining a network device connection relationship can be applied to a WLAN network in various scenarios, including but not limited to a campus WLAN network, a home WLAN network, a hospital WLAN network, a enterprise WLAN network, and a restaurant WLAN network. , shopping mall WLAN network, airport WLAN network and so on.
  • the following is a detailed description of the specific implementation process of the embodiment of the present invention.
  • the following describes the architecture of the home WLAN network, as shown in FIG. 1 .
  • FIG. 1 is a schematic structural diagram of a home WLAN network applied to an embodiment of the present application.
  • the home WLAN network architecture shown in FIG. 1 includes a primary relay device, two secondary relay devices, and a terminal device, wherein the two secondary relay devices are a secondary relay device 1 and a secondary relay device 2, respectively.
  • Terminal devices include mobile phone A, mobile phone B, mobile phone C, television, desktop computer and tablet computer. As can be seen from FIG.
  • the primary relay device is connected to the secondary relay device 1
  • the secondary relay device 1 is connected to the secondary relay device 2
  • the mobile phone A and the television set are connected to the internet through the primary relay device
  • the mobile phone B and the desktop computer pass through
  • the mobile phone C and the tablet computer are connected from the relay device 2 to the secondary relay device 1 and then from the relay device 1 to the primary relay device.
  • accessing the internet through the primary relay device wherein, for the primary relay device and the secondary relay device, the secondary relay device 1 and the secondary relay device 2, and the terminal device and the relay device (from the relay device and the primary relay device) in FIG.
  • connection medium between the two is not limited, and may be connected through a wireless transmission medium or may be connected through a wired transmission medium.
  • the network topology diagram in the embodiment of the present application refers to a link connection level relationship between the primary relay device, the at least one secondary relay device, and the terminal device.
  • the home WLAN network shown in FIG. 1 is a distributed Wi-Fi network in which a secondary relay device is extended from a relay device to extend its coverage.
  • a main relay device is usually arranged in a living room, in a bedroom, a restroom, Wi-Fi signal weak points such as kitchen are arranged from the relay device to enhance Wi-Fi coverage, and the relay device is connected to the main relay device through a wired transmission medium or a wireless transmission medium, and the home terminal device is connected to the main relay device or Network communication can be performed normally on the device.
  • FIG. 1 is only an example of a simple home WLAN network including one primary relay device, two secondary relay devices, and six terminal devices.
  • the home WLAN network may include multiple hosts.
  • the connection relationship between the relay device and the terminal device in the home network becomes more complicated, and the network topology map of the home network can intuitively see the home network.
  • the connection relationship between the devices, and thus the overall understanding and understanding of the topology of the entire network effectively help the home user or network management personnel to perform network fault location and performance analysis, therefore, quickly and accurately determine the complete network topology map is Very necessary.
  • the present application provides a method, a device, and a system for determining a connection relationship of a network device, which are used to solve the problem that a certain network device cannot be determined in the prior art, and thus the complete network topology map cannot be determined, and Additional access to the FIB of each network device in the network results in a more complex problem.
  • the method and the device are based on the same concept. Since the principles of the method and the device for solving the problem are similar, the implementation of the device and the method can be referred to each other, and the repeated description is not repeated.
  • the network device connection relationship of the home WLAN network in FIG. 1 is taken as an example for description, but the embodiment of the present application is not limited to be applied to other types of networks.
  • the specific process of the method may include:
  • the network management device receives the IP packet sent by the terminal device, where the IP packet is an IP packet that is forwarded to the network management device by the at least one relay device, and the identifier information and the IP packet of the terminal device are sequentially inserted into the IP packet.
  • the identifier information of the terminal device and the identifier information corresponding to the at least one relay device that the IP packet passes through are sequentially inserted in the IP packet, and may be an area for inserting the identifier information in the IP packet.
  • the identification information of the terminal device and the identification information corresponding to the at least one relay device that the IP packet passes in sequence may be inserted from the left to the right, or may be in the area for inserting the identification information in the IP packet from the right to the right.
  • the identification information of the terminal device and the identification information corresponding to the at least one relay device that the IP packet passes in sequence are inserted in the left-hand order.
  • at least one relay device that sequentially passes the identification information of the terminal device and the IP packet respectively can be implemented.
  • the method of inserting an IP packet in the sequence of the corresponding identification information is in the scope of protection of the present application, which is not limited in this application.
  • sequence refers to the sequence information of the terminal device and the sequence information of the at least one relay device inserted into the IP packet.
  • the network management device may be the primary relay device in FIG. 1 or a newly added network device having the foregoing functions.
  • the network management device When the network management device is the primary relay device, the network management device does not need to be added in the network. Equipment that saves hardware resources.
  • the following takes the network management device as the primary relay device as an example for description. It should be noted that when the network management device is the primary relay device, the at least one relay device refers to the secondary relay device.
  • the terminal device is the mobile phone C.
  • the device After the mobile phone C accesses the Internet, the device sends an IP packet to the Internet.
  • the IP packet must be sent by the host.
  • the relay device forwards to the internet.
  • the transmission process of the IP packet is first, after the slave relay device 2, the slave relay device 2 is forwarded to the slave relay device 1, and then the slave relay device 1 is forwarded to the master relay device.
  • the primary relay device receives the IP packet sent by the mobile phone C and forwards it to the internet.
  • the IP packet in order to identify the network device through which the IP packet passes, the IP packet is sequentially inserted into the identification information of the mobile phone C, the identification information of the slave relay device 2, and the identification information of the slave relay device 1 to be relayed.
  • the device 1 inserts the identifier information into the IP packet as an example.
  • the relay device 1 receives the IP packet sent by the previous hop device (from the relay device 2), and the IP packet is used in the area for inserting the identifier information.
  • the identification information of the slave relay device 1 is inserted from the position after the identification information of the relay device 2, and the IP packet in which the identification information is inserted is forwarded to the master relay device.
  • the network management device parses the IP packet, and obtains the identifier information of the terminal device and the identifier information corresponding to the at least one relay device.
  • the foregoing process is described by taking the network management device as the primary relay device and the terminal device as the mobile phone C as an example.
  • the primary relay device receives the identifier sent by the mobile phone C and sequentially inserted with the mobile phone C. After the information and the IP packet of the identification information corresponding to the relay device 2 and the relay device 1 are sequentially passed through the IP packet, the IP packet is parsed, and the identification information of the mobile phone C and the slave relay device 2 are obtained. Following the identification information corresponding to the device 1 respectively.
  • the network management device determines the connection relationship between the terminal device and the at least one relay device according to the identification information of the terminal device and the identification information corresponding to the at least one relay device, and determines at least one relay device and the network. Manage the connection between devices.
  • the foregoing process is described by taking the network management device as the primary relay device and the terminal device as the mobile phone C as an example.
  • the primary relay device obtains the identification information of the mobile phone C and the secondary relay device 2. After the identification information corresponding to the relay device 1 and the identification information of the mobile phone C and the identification information corresponding to the relay device 2 and the slave relay device 1 respectively, the mobile phone C and the slave relay device 1 and the slave relay device 2 are determined.
  • the connection relationship is as follows: the mobile phone C connection is connected from the relay device 2 to the relay device 1.
  • the network management device determines, according to the identification information of the terminal device and the identification information corresponding to the at least one relay device, the last relay device that the IP packet passes when being sent to the network management device.
  • the network management device determines the last relay device as a relay device directly connected to the network management device, and determines a network management device and at least one relay device according to the relay device directly connected to the network management device. Connection relationship.
  • the foregoing process is described by taking the network management device as the primary relay device and the terminal device as the mobile phone C as an example.
  • the primary relay device obtains the identification information of the mobile phone C and the secondary relay device 2. After the identification information corresponding to the relay device 1 and the identification information of the mobile phone C and the identification information corresponding to the relay device 2 and the slave relay device 1 respectively, it is determined that the IP packet is sent to the primary relay device.
  • the last relay device passed is the slave relay device 1, and the master relay device determines the relay device directly connected to the relay device 1 from the relay device 1, and determines the master according to the slave relay device 1 directly connected to the master relay device.
  • the connection relationship between the relay device and the at least one slave relay device is that the master relay device connection is connected from the relay device 1 to the slave relay device 2.
  • the network management device determines, according to the preset correspondence relationship and the identifier information corresponding to the at least one relay device, a relay device directly connected to the network management device, where the network management device is directly connected according to the network management device.
  • the relay device determines a connection relationship between the network management device and the at least one relay device.
  • the pre-set correspondence includes a correspondence between the identifier information of the relay device directly connected to the network management device and the identifier information of the network management device.
  • the foregoing process is described by taking the network management device as the primary relay device and the terminal device as the mobile phone C as an example.
  • the primary relay device obtains the identification information of the mobile phone C and the secondary relay device 2. After the identification information corresponding to the relay device 1 respectively, the correspondence between the identification information of the slave relay device 1 and the identification information of the master relay device and the identifiers corresponding to the slave relay device 1 and the slave relay device 2 respectively according to the preset Information, determining that the relay device directly connected to the primary relay device is the secondary relay device 1, and further determining the connection between the primary relay device and the at least one secondary relay device according to the secondary relay device 1 directly connected to the primary relay device The relationship is that the primary relay device is connected from the relay device 1 to the secondary device 2.
  • the terminal device in the network may be one or multiple.
  • the primary relay device can receive multiple IP packets sent by multiple terminal devices, where the terminal device has a one-to-one correspondence with the IP packets, that is, different
  • the terminal device sends a different IP packet for itself to the primary relay device, and the primary relay device performs the foregoing S101-S103 for each terminal device included in the multiple terminal devices, and may determine one for each terminal device.
  • the primary relay device can obtain all the network devices included in the network by fusing the connection relationship determined for each terminal device (mainly A complete connection between the device, the slave device, and all the terminal devices.
  • the terminal device includes mobile phone A, mobile phone B, mobile phone C, television, desktop computer, and tablet computer, for mobile phone A, mobile phone B, mobile phone C, television, desktop computer, and tablet.
  • the computer performs the above S101-S103 respectively, and can determine the connection relationship between the mobile phone A, the mobile phone B, the mobile phone C, the television, the desktop computer, and the tablet computer and the relay device (the primary relay device and the secondary relay device).
  • the complete network topology diagram of the home WLAN network shown in FIG. 1 can be determined, so that the network maintenance personnel can maintain the network device information and the network device according to the network topology map.
  • the relationship between the network and the network topology helps network administrators to have an overall understanding and understanding of the topology of the entire network, effectively helping network administrators to locate and analyze network faults.
  • the connection determined for each terminal device may be determined as follows The relationship is merged: the primary relay device can determine all the slave secondary devices directly connected to each other according to the received IP packets sent by all the terminal devices, and determine the slave secondary devices directly connected thereto. a starting point, according to the identification information of the terminal device arranged in order and the identification information of the at least one slave relay device, determining the slave relay device directly connected to the master relay device, the connected next-level network device, and so on, until all are determined The connection relationship of network devices.
  • the terminal device directly connected to the primary relay device only carries its own identification information in the IP packet sent by the primary relay device.
  • the primary relay device may adopt the following manner. Determine the connection relationship. Specifically, after receiving the IP packet including only the terminal device identification information, the primary relay device may determine that the terminal device is directly connected to the terminal device.
  • connection relationship between the terminal device and the at least one relay device may further be at least one The connection relationship between the relay device and the network management device determines the network topology map.
  • the network topology diagram includes interconnection information between the primary relay device, the at least one secondary relay device, and the terminal device.
  • the network topology map may be determined in the primary relay device, and the network topology map may be determined in the terminal device, which is not limited in this application.
  • the terminal device needs to receive a connection relationship between the terminal device determined by the primary relay device and the at least one relay device, a connection relationship between the at least one relay device, and the network management device, And determining a network topology map according to the connection relationship between the terminal device and the at least one relay device, the connection relationship between the at least one relay device, and the network management device, where the terminal device may be in the display screen after determining the network topology map.
  • the network topology map is displayed on it.
  • the user may view the network topology map through a preset user interface corresponding to the primary relay device, so that the user can intuitively access the network topology map. See the connection relationship between devices in the network, and then have an overall understanding and understanding of the topology of the entire network, effectively helping users or network managers to perform network fault location and performance analysis.
  • the user interface corresponding to the primary relay device may be a web address, or may be an application developed by the research and development personnel to enable the user to access the primary relay device, which is not limited in this application.
  • the primary relay device is a router
  • the user can view the network topology map by accessing the website address of the router.
  • the user can also use the terminal device to download an application developed by the developer and accessible to the router, and display the terminal device.
  • the network topology map is displayed and viewed on the screen.
  • FIG. 3 is a schematic diagram showing the network topology diagram displayed on the display screen of the terminal device. The user can intuitively view the terminal device according to the network topology diagram displayed on the display screen.
  • the connection relationship between each relay device is not limited in this application.
  • the attributes of the network device included in the network topology map may be set to be operable, so that the network device in the network topology map can interact with the user.
  • user-selectable options can be set for network devices included in the network topology map so that the user can control the network device to perform the corresponding operation by triggering the corresponding option. For example, suppose that an option to control a network device to access a network or disconnect a network is set for a network device, the user can trigger the option to control the network device to access the network or disconnect the network.
  • the user can disable the corresponding network device to run common games, chats, and the like by triggering the option.
  • the user can trigger this option to control the access of the network device to various websites.
  • the network topology map can also support displaying the name of the network device, the rate of the network device, the network device performance, the link quality, and the device connection reminder, so that the user can manage the network according to the displayed content.
  • the specific process of the implementation may include:
  • the network management device determines the sequence of the IP packet passing through the terminal device and the at least one relay device according to the identification information of the terminal device and the identification information corresponding to the at least one relay device.
  • the sequence may refer to the sequence information of the terminal device and the sequence in which the identifier information corresponding to the at least one relay device is inserted into the IP packet.
  • the process of the S201 is described by taking the network management device as the primary relay device and the terminal device including the mobile phone A, the mobile phone B, the mobile phone C, the television, the desktop computer, and the tablet computer as an example.
  • the primary relay device determines that the IP packet sent by the mobile phone A is not forwarded from the relay device and is directly sent to the primary relay device, that is, the sequence of the IP packet passing through the mobile phone A and the relay device.
  • the primary relay device determines that the IP packet sent by the television has not been forwarded from the relay device and is directly sent to the primary relay device according to the identification information of the televisions arranged in sequence.
  • the order of the IP packets passing through the television and the relay device is: the television and the main relay device; the primary relay device determines the mobile phone B to send according to the identification information of the mobile phone B and the identification information corresponding to the relay device 1
  • the IP packet is forwarded from the relay device 1 to the primary relay device, that is, the sequence of the IP packet passing through the mobile phone B and the relay device is: the mobile phone B, the secondary relay device 1, the primary relay device, and the same, the primary relay.
  • the device determines, according to the identification information of the desktop computer and the identification information corresponding to the relay device 1, that the IP packet sent by the desktop computer is forwarded from the relay device 1 to the primary relay device, that is, the IP packet.
  • the order of the desktop computer and the relay device is: desktop computer, slave relay device 1, master relay device; identification information of the mobile phone C arranged by the main relay device according to the order, and corresponding from the relay device 2 and the slave relay device 1, respectively.
  • the identification information is determined, and the IP packet sent by the mobile phone C is sequentially forwarded from the relay device 2, the relay device 1, and then to the primary relay device, that is, the sequence of the IP packet passing through the mobile phone C and the relay device is: the mobile phone C, Following the device 2, the slave relay device 1, the master relay device, and the same, the master relay device determines the tablet sending according to the identification information of the tablet computer arranged in order and the identification information corresponding to the relay device 2 and the slave relay device 1, respectively.
  • the IP packets are sequentially forwarded from the relay device 2, the relay device 1, and then to the primary relay device, that is, the order in which the IP packets pass through the tablet and the relay device is: tablet, slave relay device 2, and relay device. 1.
  • the main relay device is: desktop computer,
  • the network management device determines, by using a sequence of the terminal device and the at least one relay device, a connection sequence between the terminal device and the at least one relay device, and determines, according to the connection sequence, the terminal device and the at least one relay device. The connection between the two.
  • the network management device is used as the primary relay device as an example, and the process of S202 is described.
  • the primary relay device determines the IP packet sent by the mobile phone A according to the identification information of the mobile phone A. After the mobile phone A and the relay device are in the order of the mobile phone A and the primary relay device, the IP packets are passed through the sequence of the mobile phone A and the relay device: the mobile phone A and the primary relay device are determined as the mobile phone A and the relay device.
  • the connection order, and then the connection relationship between the mobile phone A and the relay device is determined according to the connection order: the mobile phone A is connected to the main relay device, and the main relay device determines the television set according to the identification information of the televisions arranged in order.
  • the sequence of sending IP packets through the TV and the relay device is: after the TV and the main relay device, the IP packets are passed through the TV and the relay device: the TV, the main relay device, and the TV is determined to be the TV.
  • the connection sequence of the machine and the relay device, and then the connection relationship between the television and the relay device can be determined according to the connection order: the television is connected to the main relay device; the main relay device is arranged according to the sequence of the mobile phone B
  • the identification information and the identification information corresponding to the relay device 1 determine that the IP packet sent by the mobile phone B passes through the mobile phone B and the relay device in the order of the mobile phone B, the secondary relay device 1, and the primary relay device, and then the IP packet passes.
  • the sequence of the mobile phone B and the relay device are determined as the connection order of the mobile phone B and the relay device, and the connection relationship between the mobile phone B and the relay device can be determined according to the connection sequence.
  • the mobile phone B is connected from the relay device 1 and the relay device 1 is connected to the main relay device.
  • the main relay device determines the desktop computer to send according to the identification information of the desktop computer and the identification information corresponding to the relay device 1.
  • the order of the IP packets passing through the desktop computer and the relay device is: the order of the desktop computer and the relay device after the desktop computer, the slave relay device 1, and the primary relay device: the desktop computer and the slave relay device 1
  • the primary relay device is determined as the connection sequence of the desktop computer and the relay device, and then the connection relationship between the desktop computer and the relay device is determined according to the connection sequence: desktop power
  • the brain is connected to the relay device 1 and the relay device 1 is connected to the primary relay device.
  • the primary relay device determines the IP packet according to the identification information of the mobile phone C and the identification information corresponding to the relay device 2 and the secondary relay device 1 respectively.
  • the IP packets are passed through the sequence of the mobile phone C and the relay device: the mobile phone C and the secondary relay device 2.
  • the relay device 1 and the master relay device are determined as the connection order of the mobile phone C and the relay device, and then the connection relationship between the mobile phone C and the relay device is determined according to the connection sequence: the mobile phone C is connected to the relay device 2,
  • the slave relay device 2 is connected to the slave relay device 1 and the slave relay device 1 is connected to the master relay device.
  • the master relay device arranges the identification information of the tablet computer according to the order and the identifiers corresponding to the slave relay device 2 and the slave relay device 1 respectively.
  • the information determines that the IP packets sent by the tablet pass through the tablet and the relay device in the order of: tablet, slave device 2, slave device 1, and master relay device, and then report the IP packet.
  • the order of the tablet and the relay device the tablet, the slave relay device 2, the slave relay device 1, the master relay device, determine the connection order of the tablet computer and the relay device, and then determine the tablet computer according to the connection order.
  • the connection relationship of the relay device is: the tablet is connected from the relay device 2, the relay device 2 is connected to the slave relay device 1, and the relay device 1 is connected to the master relay device.
  • the identifier information of the terminal device may include at least one of a MAC address, an SN, a URN, and a URI of the terminal device.
  • the identification information of the terminal device is not limited in the embodiment of the present application.
  • the identification information of the terminal device may be other information for identifying the terminal device, in addition to the MAC address, the SN, the URN, and the URI of the terminal device.
  • the identifier information of the relay device may include at least one of a MAC address, an SN, a URN, and a URI of the relay device.
  • the identification information of the relay device is not limited in this embodiment, and the identifier information of the relay device may be other than the MAC address, SN, URN, and URI of the relay device, and may be other for identifying the relay device. information.
  • the relay device after receiving the IP packet sent by the last hop device, the relay device has two possible processing manners.
  • the last hop device is a terminal device or another relay device different from the relay device that receives the IP packet.
  • the relay device receives the IP packet sent by the last hop device, and inserts the location in the area where the IP packet is used to insert the identifier information after the identifier information of the previous hop device has been inserted. Following the identification information of the device, the IP packet inserted with the identification information is forwarded to the network management device.
  • the network management device For the home WLAN network shown in FIG. 1 , an IP packet sent by the mobile phone C is received from the relay device 2 as an example.
  • the IP packet sent by the mobile phone C is received from the relay device 2, and the slave relay device is inserted at the position after the identification information of the mobile phone C has been inserted in the area where the IP packet is used for inserting the identification information.
  • Identification information of 2 and forwarding the IP packet after the insertion of the identification information to the slave relay device 1, from the relay device 1 in the area where the IP packet is used to insert the identification information, after the identification information of the slave relay device 2 has been inserted
  • the location inserts the identification information of the slave relay device 1 and forwards the IP packet inserted with the identifier information to the master relay device, so that the master relay device can receive at least one of the terminal device identifier information sequentially inserted and the IP packet sequentially passed.
  • the IP packet corresponding to the identification information of the relay device, and then the operation in FIG. 2 or FIG. 4 is performed according to the received IP packet.
  • the slave device receives the IP packet sent by the terminal device, and then uses the IP packet for inserting the identifier information. And sequentially inserting the identification information of the terminal device and the identification information of the slave relay device.
  • This type of processing can prevent the problem that the identity information of the terminal device inserted in the IP packet changes during the transmission of the IP packet during the IP packet transmission process, and the primary relay device cannot identify the terminal device.
  • an IP packet sent by the mobile phone C is received from the relay device 2 as an example.
  • the IP packet sent by the mobile phone C is received from the relay device 2, and the identification information of the mobile phone C and the identification of the slave relay device 2 are sequentially inserted in the area where the IP packet is used to insert the identification information.
  • Information, and the IP packet after the insertion of the identification information is forwarded to the slave relay device 1, and the slave relay device 1 inserts the location from the location after the identification information of the relay device 2 has been inserted in the area where the IP packet is used to insert the identification information.
  • the IP packets corresponding to the identification information respectively perform the operations in FIG. 2 or FIG. 4 according to the received IP packets.
  • the terminal device may insert its own identification information, because the relay device connected to the terminal device inserts the identification information of the terminal device into the IP packet.
  • the identification information of the user may not be inserted, and the application is not limited.
  • the relay device directly connected to the terminal device may be inserted into the identification information of the terminal device, and may also be inserted into the connection relationship between the terminal device and the relay device. In order to enable the primary relay device to determine the connection relationship between the terminal device and the relay device directly connected thereto.
  • the terminal device initiates an IP packet accessing the Internet or the primary relay device.
  • the IP packet sent by the terminal device passes through the network node, it determines whether the network node is a secondary relay device, if the network node is not from the network node.
  • the device may determine that the network node is the primary relay device, and if the network node is the secondary relay device, further determine whether the secondary relay device is the first secondary relay device through which the IP packet passes, and if the secondary relay device.
  • the first slave relay device that the IP packet passes through, and the identifier information of the terminal device and the identifier information of the slave relay device are sequentially inserted in the area where the IP packet is used to insert the identifier information, if the slave relay device is not an IP packet.
  • the identifier information of the slave relay device is inserted.
  • the IP packet after the identification information is inserted is forwarded to the primary relay device, and the primary relay device resolves the IP packet and determines the network topology map.
  • the IP packet sent by the terminal device can be captured from the relay device or the kernel layer, and the captured IP packet is used in the driver layer or the kernel layer to insert the identifier.
  • the identification information of the slave relay device is inserted in the area of the information, and after receiving the IP packet sent by the terminal device and transmitted by the slave relay device, the master relay device parses the IP packet at the driver layer or the kernel layer of the master relay device. After the IP packet is parsed, the network topology map is determined at the application layer of the primary relay device, and after the IP packet is parsed, the identification information of the inserted IP packet is removed, and the IP packet after the identification information is removed is forwarded to the IP packet. Internet. Referring to FIG.
  • the primary relay device includes a physical layer.
  • the driver layer, the kernel layer, and the application layer, the slave relay device includes a physical layer, a driver layer, and a kernel layer, and the primary relay device is similar to the internal structure of the slave device, the physical layer, the driver layer, and the kernel layer, wherein, in the physical layer,
  • the system includes a WIFI interface, a local area network (LAN) 1 interface, a LAN 2 interface, and a wide area network (WAN) interface, and includes a WIFI interface, a LAN1 interface, a LAN2 interface, and a WAN interface in the physical layer respectively.
  • LAN local area network
  • WAN wide area network
  • Corresponding interfaces to implement the corresponding functions such as wl0.1 interface, eth0.1 interface, eth0.2 interface, and eth1 interface in Figure 7, where LAN1 interface, LAN2 interface, and WAN interface are visible physical interfaces.
  • the WIFI interface is an invisible virtual interface, which is indicated by a dotted line in FIG. 7 , and the WIFI interface is used to receive an IP packet sent by the terminal device.
  • the relay apparatus is connected via the WAN interface master relay device LAN1 LAN2 interface or interfaces, LAN1 is connected to the interface to FIG. 7 as an example, the primary relay WAN interface devices connect to the internet.
  • the relay device After receiving the IP packet sent by the terminal device from the relay device through the WIFI interface, the relay device captures the IP packet sent by the terminal device at the driver layer or the kernel layer, and captures the IP address in the driver layer or the kernel layer.
  • the identifier information of the slave relay device is inserted in the area for inserting the identifier information in the packet.
  • the slave relay device After receiving the IP packet sent by the terminal device from the relay device through the WIFI interface, the slave relay device
  • the IP packet sent by the terminal device is captured at the driver layer or the kernel layer, and the identification information of the terminal device and the slave relay are sequentially inserted into the area of the captured IP packet for inserting the identification information in the driver layer or the kernel layer.
  • the identification information of the device is then sent to the primary relay device by the WAN interface that connects the primary relay device from the relay device to the primary relay device, and the primary relay device receives the relayed device from the LAN1 interface of the relay device through the connection.
  • Inserting the terminal device identification information and the IP packet from the relay device identification information, and the primary relay device receives the transmission from the terminal device After the IP packet is forwarded from the relay device, the IP packet is parsed at the driver layer or the kernel layer of the master relay device, and the network topology map is determined at the application layer of the master relay device, and after the IP packet is parsed, The identification information of the inserted IP packet is removed, and the IP packet after the identification information is forwarded to the Internet, and the connection relationship between the network device and the network is determined.
  • the identification information of the terminal device and the secondary relay device may be inserted into the first IP packet sent by the terminal device, of course, To improve the reliability of determining the connection relationship of the network device, the identification information of the terminal device and the secondary relay device may be inserted into the IP packets of the first N (N is a positive integer greater than or equal to 2) sent by the terminal device, and the terminal device does not need to be in the The identification information of the terminal device and the secondary relay device is inserted into all the IP packets sent, thereby saving the transmission time of the IP packets.
  • N can be set according to the accuracy of reliability requirements in practical applications.
  • the area in which the IP packet is used to insert the identifier information may be the header area of the IP packet, for example, may be an option field of the IP packet header, and of course, the IP packet is used for insertion.
  • the area of the identifier information may also be a packet of the IP packet. The application does not limit the area in which the IP packet is used to insert the identifier information.
  • the IP packet may be a transmission control protocol (TCP) packet, or a user datagram protocol (UDP) packet, and may be other IP packets. This application is not limited.
  • TCP transmission control protocol
  • UDP user datagram protocol
  • a field for identifying the insertion format and the insertion length may be preset before the identifier information of the network device (the terminal device or the relay device) is inserted into the IP packet.
  • the insertion format is used for the identifier insertion.
  • the identification information of the network device, the preset field of the identifier insertion format occupies one byte, and the preset field of the identifier insertion length occupies one byte.
  • the area in which the IP packet is used to insert the identification information in FIG. 8 is an option field of the IP packet header.
  • the IP option field can use up to 40 bytes.
  • the networking is connected from the relay device 5 to the secondary device 4, which can be regarded as a second-level networking.
  • the secondary device is connected to the secondary device 3, and can be regarded as a third-level networking.
  • the secondary device is connected to the secondary device. It can be considered as a fourth-level networking.
  • the relay device 2 is connected to the secondary device 1 and can be regarded as a fifth-level network.
  • the relay device 1 is connected to the primary relay device, which can be regarded as a sixth-level networking. Main Device connection internet. If the terminal device wants to interact with the Internet, the interaction between the relay device 5, the relay device 4, the relay device 3, the relay device 2, the relay device 1, and the primary relay device interacts with the Internet.
  • the device can determine the terminal device and the relay device (the primary relay device and the secondary relay device) by using the identification information of the terminal device carried in the IP packet and the identification information of the relay device that the IP packet passes through.
  • the connection relationship can reduce the complexity of determining the connection relationship of the network device, and since there is no need to determine the connection relationship between the network devices through the FIB, there is no problem that the complete network topology map cannot be determined.
  • the embodiment of the present application further provides a network management device 100, which is used to implement the method described in the embodiments described in FIG. 2 and FIG.
  • the network management device 100 includes a memory 101, a processor 102, and a communication interface 103.
  • the memory 101 is configured to store a computer program executed by the processor 102.
  • the processor 102 can be a central processing unit (CPU), or a digital processing unit or the like.
  • the specific connection medium between the above-mentioned memory 101, the processor 102, and the communication interface 103 is not limited in the embodiment of the present application.
  • the memory 101, the processor 102, and the communication interface 103 are connected by a bus 104 in FIG. 10.
  • the bus 104 is indicated by a thick line in FIG. 10, and the connection manner between other components is only illustrative. The description is not limited.
  • the bus 104 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in FIG. 10, but it does not mean that there is only one bus or one type of bus.
  • the memory 101 may be a volatile memory such as a random-access memory (RAM); the memory 101 may also be a non-volatile memory such as a read only memory, flashing A flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or a memory 101 is a program code that can be used to carry or store a desired program or data structure and can be Any other medium accessed by the computer, but is not limited to this.
  • the memory 101 can be a combination of the above memories.
  • the processor 102 and the communication interface 103 are configured to implement a method for determining a connection relationship of a network device as shown in FIG. 2, including:
  • the communication interface 103 is configured to receive an IP packet sent by the terminal device, where the IP packet is an IP packet that is forwarded to the communication interface 103 by the at least one relay device, and the terminal device is sequentially inserted into the IP packet.
  • the processor 102 is configured to invoke the computer program stored in the memory 101 to perform: parsing the IP packet, and obtaining identification information of the sequentially arranged terminal device and identification information corresponding to the at least one relay device respectively, according to the sequence. Determining the connection relationship between the terminal device and the at least one relay device, determining the connection relationship between the terminal device and the identification information corresponding to the at least one relay device, and determining the at least one relay device and the The connection between network management devices.
  • the processor 102 determines the terminal device and the at least one according to the identification information of the terminal device and the identification information corresponding to the at least one relay device. Following the connection relationship between devices, it is specifically used to:
  • the processor 102 determines the connection relationship between the at least one relay device and the network management device, specifically, the:
  • the processor 102 determines the connection relationship between the at least one relay device and the network management device, specifically, the:
  • the pre-set correspondence includes a correspondence between the identifier information of the relay device directly connected to the network management device and the identifier information of the network management device.
  • the identifier information of the terminal device includes at least one of a MAC address, an SN, a URN, and a URI of the terminal device.
  • the identifier information of the relay device includes at least one of a MAC address, an SN, a URN, and a URI of the relay device.
  • the IP packet is the first IP packet sent by the terminal device.
  • the embodiment of the present application further provides a relay device 200, which is used to implement the method described in the embodiment described in FIG. 2 and FIG.
  • the relay device 200 includes a memory 201, a processor 202, and a communication interface 203.
  • the memory 201 is configured to store a computer program executed by the processor 202.
  • the processor 202 can be a central processing unit (CPU), or a digital processing unit or the like.
  • the specific connection medium between the above-mentioned memory 201, the processor 202, and the communication interface 203 is not limited in the embodiment of the present application.
  • the memory 201, the processor 202, and the communication interface 203 are connected by a bus 204 in FIG. 11.
  • the bus 204 is indicated by a thick line in FIG. 11, and the connection manner between other components is only illustrative. The description is not limited.
  • the bus 204 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 11, but it does not mean that there is only one bus or one type of bus.
  • the memory 201 may be a volatile memory, such as a random-access memory (RAM); the memory 201 may also be a non-volatile memory, such as a read-only memory, flashing A flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or a memory 201 is a program code that can be used to carry or store a desired program or data structure and can be Any other medium accessed by the computer, but is not limited to this.
  • the memory 201 may be a combination of the above memories.
  • the processor 202 and the communication interface 203 are used to implement the method for determining the connection relationship of the network device as shown in FIG. 2, including:
  • the communication interface 203 is configured to receive an IP packet sent by the last hop device.
  • the processor 202 is configured to invoke a computer program stored in the memory 201 to perform: insertion in a location after the identification information of the previous hop device has been inserted in an area where the IP packet is used to insert the identification information. Identification information of the relay device.
  • the communication interface 203 is further configured to forward an IP packet inserted with the identifier information to the network management device.
  • the last hop device is a terminal device or other relay device different from the relay device.
  • the processor 202 is further configured to:
  • the identifier information of the terminal device and the identifier information of the relay device are sequentially inserted in an area where the IP packet is used to insert the identifier information. .
  • the embodiment of the present application further provides a terminal device 300, which is used to implement the method described in the embodiment of FIG. 2 and FIG. 4, as shown in FIG.
  • the terminal device 300 includes a memory 301, a processor 302, a communication interface 303, and a display screen 304.
  • the memory 301 is configured to store a computer program executed by the processor 302.
  • the processor 302 can be a central processing unit (CPU), or a digital processing unit or the like.
  • connection medium between the foregoing memory 301, the processor 302, and the communication interface 303 is not limited in the embodiment of the present application.
  • the memory 301, the processor 302, the communication interface 303, and the display screen 304 are connected by a bus 305 in FIG. 12, and the bus 305 is indicated by a thick line in FIG. 12, and the connection manner between other components is only It is intended to be illustrative and not limited.
  • the bus 305 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 12, but it does not mean that there is only one bus or one type of bus.
  • the memory 301 may be a volatile memory, such as a random-access memory (RAM); the memory 301 may also be a non-volatile memory, such as a read-only memory, flashing A flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or a memory 301 is a program code that can be used to carry or store a desired program or data structure and can be Any other medium accessed by the computer, but is not limited to this.
  • the memory 301 can be a combination of the above memories.
  • the display screen 304 can be configured in the form of a liquid crystal display (LCD) or an OLED (organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • the memory 301, the processor 302, the communication interface 303, and the display screen 304 are used to implement the method for determining the connection relationship of the network device as shown in FIG. 2, including:
  • the memory 301 stores a computer program
  • the communication interface 303 is configured to receive a connection relationship between the terminal device and the at least one relay device determined by the network management device, a connection relationship between the at least one relay device, and the network management device .
  • the processor 302 is configured to determine, according to the received connection relationship between the terminal device and the at least one relay device, the connection relationship between the at least one relay device, and the network management device, Network topology diagram.
  • the network topology diagram includes interconnection information between the at least one relay device, the terminal device, and the network management device.
  • the display screen 304 is configured to display the network topology map.
  • the embodiment of the present application further provides a network management device 400, which is used to implement the method described in the embodiments described in FIG. 2 and FIG.
  • the network management device 400 includes a receiving module 401 and a processing module 402.
  • the receiving module 401 is configured to receive an Internet Protocol (IP) packet sent by the terminal device, where the IP packet is an IP packet that is forwarded to the network management device by the at least one relay device, and the IP packet is in the IP packet.
  • IP Internet Protocol
  • the identification information of the terminal device and the identification information corresponding to the at least one relay device that the IP packet passes in sequence are sequentially inserted.
  • the processing module 402 is configured to parse the IP packet received by the receiving module 401, and obtain the identification information of the terminal device and the identifier information corresponding to the at least one relay device, and according to the Determining a connection relationship between the terminal device and the at least one relay device, and determining the at least one of the identification information of the terminal device and the identification information corresponding to the at least one relay device A connection relationship between the device and the network management device.
  • the processing module 402 determines the terminal device and the at least one according to the identification information of the terminal device and the identification information corresponding to the at least one relay device. Following the connection relationship between devices, it is specifically used to:
  • the processing module 402 determines the connection relationship between the at least one relay device and the network management device, specifically:
  • the processing module 402 determines the connection relationship between the at least one relay device and the network management device, specifically:
  • the pre-set correspondence includes a correspondence between the identifier information of the relay device directly connected to the network management device and the identifier information of the network management device.
  • the identifier information of the terminal device includes at least one of a MAC address, an SN, a URN, and a URI of the terminal device.
  • the identifier information of the relay device includes at least one of a MAC address, an SN, a URN, and a URI of the relay device.
  • the IP packet is the first IP packet sent by the terminal device.
  • An embodiment of the present invention further provides a chip used in a network management device, including a communication interface and a processor;
  • the communication interface is configured to receive an Internet Protocol (IP) packet sent by the terminal device, where the IP packet is an IP packet that is forwarded to the network management device by the at least one relay device, and the IP packet is in the sequence
  • IP Internet Protocol
  • the processor is configured to parse the IP packet, and obtain the terminal arranged in sequence
  • the identification information of the device and the identification information corresponding to the at least one relay device and determining the terminal device according to the identification information of the terminal device and the identification information corresponding to the at least one relay device.
  • the embodiment of the invention further provides a system for determining a connection relationship of a network device, including a relay device, a network management device, and a terminal device;
  • the relay device is configured to receive an Internet Protocol IP packet sent by the last hop device, where the IP packet is used to insert the identifier information, and the location after the identifier information of the previous hop device has been inserted Inserting the identification information of the relay device, and forwarding the IP packet inserted with the identifier information to the network management device, where the last hop device is the terminal device or other relay device different from the relay device
  • the network management device is configured to receive the IP packet with the inserted identifier information, parse the IP packet, and obtain the identifier information of the terminal device and the identifier corresponding to the at least one relay device.
  • the terminal device is configured to receive the end determined by the network management device Determining and displaying a network topology map, the network topology map including the connection relationship between the end device and the at least one relay device, the connection relationship between the at least one relay device, and the network management device Interconnection information between at least one relay device, the terminal device, and the network management device.
  • the embodiment of the invention further provides a computer readable storage medium, which is stored as computer software instructions for executing the above-mentioned processor, and includes a program for executing the above-mentioned processor.
  • Also provided in the embodiment of the present application is a computer program product, where the computer program product stores instructions, when executed on a computer, causing the computer to perform any of the above first aspects or any of the above first aspects.
  • the method described in the design is also provided in the embodiment of the present application.
  • the embodiment of the present application provides a method, a device, and a system for determining a connection relationship of a network device.
  • the network management device can pass an IP packet as long as the terminal device sends an IP packet to the network management device.
  • the identification information of the terminal device carried in the terminal device and the identification information of the relay device that the IP packet passes through determine the connection relationship between the terminal device and the relay device.
  • the method for determining the connection relationship of the network device provided by the application the network management device does not need to obtain the FIB of the terminal device and the relay device, and inserts the identifier information into the IP packet sent by the terminal device.
  • connection relationship of the network device is determined, the complexity of determining the connection relationship of the network device is reduced, and the connection relationship between the network devices is not determined by the FIB. Therefore, there is no part of the network device that can only be obtained through the FIB information. Information that caused the problem of not being able to determine the complete network topology map.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Abstract

A method, device and system for determining connection relation of network devices, used for solving the problems in the prior art that the complete connection relation of the network devices cannot be determined and the complexity is higher. In the present application, a network management device receives an IP packet sent by a terminal device, wherein the IP packet is an IP packet forwarded to the network management device by means of at least one relay device, and identification information of the terminal device and identification information respectively corresponding to at least one relay device through which the IP packet passes successively are sequentially inserted in the IP packet; parse the IP packet to obtain the identification information of the terminal device and the identification information respectively corresponding to at least one relay device that are sequentially arranged; determine the connection relation of the terminal device and at least one relay device according to the identification information of the terminal device and the identification information respectively corresponding to at least one relay device that are sequentially arranged, and determine the connection relation between the at least one relay device and the network management device.

Description

确定网络设备连接关系的方法、设备及系统Method, device and system for determining network device connection relationship
本申请要求于2017年12月28日提交中国专利局、申请号为201711464187.0、申请名称为“确定网络设备连接关系的方法、设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on Dec. 28, 2017, the Chinese Patent Office, the application number is 201711464187.0, and the application is entitled "Method, Equipment and System for Determining the Connection Relationship of Network Devices", the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本申请涉及网络管理技术领域,尤其涉及一种确定网络设备连接关系的方法、设备及系统。The present application relates to the field of network management technologies, and in particular, to a method, device, and system for determining a connection relationship of a network device.
背景技术Background technique
在一个通信网络中,确定该通信网络中包括的各个网络设备之间的连接关系,有助于对整个通信网络的结构有整体的认识和了解,可帮助用户或者网络管理人员进行网络故障定位和性能分析。In a communication network, determining the connection relationship between the network devices included in the communication network helps to have an overall understanding and understanding of the structure of the entire communication network, and can help the user or the network administrator to perform network fault location and Performance analysis.
现有技术中,主要基于简单网络管理协议(simple network management protocol,SNMP)确定网络拓扑,具体的,采用SNMP协议获取网络中每个网络设备的转发信息库(forward information base,FIB),并从获取到的FIB中确定路由转发表,根据路由转发表中的转发关系确定网络设备之间的连接关系。由于每个网络设备的路由转发表中仅记录了报文传输最优路径所经过的网络设备的信息,对于最优路径不经过的网络设备的信息不能通过上述FIB信息获取到,因此,在确定网络中网络设备之间的连接关系时,无法考虑到某些网络设备,进而导致无法确定网络设备之间完整的连接关系。此外,上述方法需要额外获取网络中每个网络设备的FIB,复杂度较高。In the prior art, a network topology is determined mainly based on a simple network management protocol (SNMP). Specifically, an SNMP information protocol is used to obtain a forwarding information base (FIB) of each network device in the network, and The obtained routing table is determined in the obtained FIB, and the connection relationship between the network devices is determined according to the forwarding relationship in the routing forwarding table. The information about the network device through which the optimal path of the packet is transmitted is recorded in the routing and forwarding table of each network device. The information about the network device that does not pass the optimal path cannot be obtained through the FIB information. Therefore, the information is determined. When a network device is connected to a network, certain network devices cannot be considered, which may result in a failure to determine a complete connection relationship between the network devices. In addition, the above method requires additional access to the FIB of each network device in the network, which is highly complex.
发明内容Summary of the invention
本申请实施例提供一种确定网络设备连接关系的方法、设备及系统,用以解决现有技术中由于无法考虑到某些网络设备,进而导致无法确定网络设备之间完整的连接关系的问题,以及由于需要额外获取网络中每个网络设备的FIB,导致复杂度较高的问题。The embodiment of the present invention provides a method, a device, and a system for determining a connection relationship of a network device, which are used to solve the problem that a certain network device cannot be considered in the prior art, and thus the complete connection relationship between the network devices cannot be determined. And because of the need to obtain additional FIBs for each network device in the network, resulting in higher complexity.
第一方面,本申请实施例提供一种确定网络设备连接关系的方法,所述方法包括:终端设备经至少一个中继设备向网络管理设备发送互联网协议(internet protocol,IP)报文,中继设备接收上一跳设备(终端设备或不同于所述中继设备的其它中继设备)发送的IP报文,并在所述IP报文用于插入标识信息的区域中、已经插入所述上一跳设备的标识信息之后的位置插入所述中继设备的标识信息,向网络管理设备转发插入标识信息的IP报文,网络管理设备接收所述终端设备发送的IP报文,其中,所述IP报文是经至少一个中继设备转发至所述网络管理设备的IP报文、且所述IP报文中顺序插入有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的标识信息,所述网络管理设备接收到终端设备发送的IP报文之后,解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对 应的标识信息,并根据顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息,确定终端设备以及至少一个中继设备之间的连接关系,并确定至少一个中继设备以及网络管理设备之间的连接关系。In a first aspect, the embodiment of the present application provides a method for determining a connection relationship of a network device, where the method includes: the terminal device sends an internet protocol (IP) packet to the network management device via at least one relay device, and relays Receiving, by the device, an IP packet sent by the last hop device (the terminal device or another relay device different from the relay device), and inserting the IP packet in the area where the IP packet is used for inserting the identifier information The location information of the hop device is inserted into the identifier information of the relay device, and the network management device receives the IP packet sent by the terminal device, where the network management device receives the IP packet sent by the terminal device. The IP packet is an IP packet that is forwarded to the network management device by the at least one relay device, and the identifier information of the terminal device is inserted in the IP packet, and at least one of the IP packets is sequentially passed. The identifier information corresponding to the relay device, after the network management device receives the IP packet sent by the terminal device, parses the IP packet, and obtains the sequential arrangement. Identifying the identification information of the terminal device and the identification information corresponding to the at least one relay device, and determining the terminal device and the at least one relay according to the identification information of the terminal device and the identification information corresponding to the at least one relay device respectively. The connection relationship between the devices, and determines the connection relationship between the at least one relay device and the network management device.
通过上述方法,只要终端设备向网络管理设备发送IP报文,网络管理设备就可以通过IP报文中携带的终端设备的标识信息以及IP报文所经过的中继设备的标识信息,确定出终端设备与中继设备之间的连接关系。相比现有技术,本申请提供的确定网络设备连接关系的方法,网络管理设备不需要额外获取终端设备和中继设备的FIB,通过在终端设备发送的IP报文中插入标识信息,即可确定出网络设备的连接关系,可降低确定网络设备连接关系的复杂度,且,也不需要通过FIB确定网络设备之间的连接关系,故,不存在由于通过FIB信息只能获取部分网络设备的信息,导致无法确定完整网络拓扑图的问题。Through the foregoing method, the network management device can determine the terminal by using the identifier information of the terminal device carried in the IP packet and the identifier information of the relay device that the IP packet passes through, as long as the terminal device sends the IP packet to the network management device. The connection between the device and the relay device. Compared with the prior art, the method for determining the connection relationship of the network device provided by the application, the network management device does not need to obtain the FIB of the terminal device and the relay device, and inserts the identifier information into the IP packet sent by the terminal device. The connection relationship of the network device is determined, the complexity of determining the connection relationship of the network device is reduced, and the connection relationship between the network devices is not determined by the FIB. Therefore, there is no part of the network device that can only be obtained through the FIB information. Information that caused the problem of not being able to determine the complete network topology map.
在一种可能的设计中,若中继设备的上一跳设备为终端设备,则所述中继设备接收到终端设备发送的IP报文之后,在所述IP报文用于插入标识信息的区域中、顺序插入所述终端设备的标识信息以及所述中继设备的标识信息。In a possible design, if the last hop device of the relay device is the terminal device, after the relay device receives the IP packet sent by the terminal device, the IP packet is used to insert the identifier information. In the area, the identification information of the terminal device and the identification information of the relay device are sequentially inserted.
通过上述方法,可避免由于终端设备的标识信息在传输过程中发生变化而导致网络管理设备无法识别终端设备的问题。Through the above method, the problem that the network management device cannot recognize the terminal device due to the change of the identification information of the terminal device during the transmission process can be avoided.
在一种可能的设计中,所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,具体可采用如下方式:In a possible design, the network management device determines the terminal device and the at least one relay according to the identification information of the terminal device and the identification information corresponding to the at least one relay device. The connection between devices can be as follows:
所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序,并将所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序,确定为所述终端设备与所述至少一个中继设备的连接顺序,进而根据所述连接顺序确定所述终端设备以及所述至少一个中继设备之间的连接关系。Determining, by the network management device, that the IP packet passes the terminal device and the at least one relay device according to the identification information of the terminal device and the identification information corresponding to the at least one relay device. And determining, in an order of the IP packet, the terminal device and the at least one relay device, a connection sequence of the terminal device and the at least one relay device, and determining, according to the connection sequence a connection relationship between the terminal device and the at least one relay device.
通过上述方法,网络管理设备不依赖终端设备和中继设备上报FIB信息,即可确定所述终端设备与所述至少一个中继设备之间的连接关系,在确定完整网络拓扑图的同时,可降低确定网络拓扑图的复杂度。Through the foregoing method, the network management device can determine the connection relationship between the terminal device and the at least one relay device without relying on the terminal device and the relay device to report the FIB information, and determine the complete network topology map. Reduce the complexity of determining the network topology map.
本申请实施例中以下给出两种确定所述至少一个中继设备以及所述网络管理设备之间的连接关系的实施方式。Two embodiments for determining a connection relationship between the at least one relay device and the network management device are given below in the embodiment of the present application.
在一种可能的设计中,所述网络管理设备确定所述至少一个中继设备以及所述网络管理设备之间的连接关系,具体可采用如下方式:In a possible design, the network management device determines a connection relationship between the at least one relay device and the network management device, and specifically adopts the following manner:
所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文在被发送至所述网络管理设备时所经过的最后一个中继设备;所述网络管理设备将所述最后一个中继设备,确定为与所述网络管理设备直接相连的中继设备,并根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。Determining, by the network management device, the last of the IP packets sent to the network management device, according to the identification information of the terminal device and the identification information corresponding to the at least one relay device. a relay device; the network management device determines the last relay device as a relay device directly connected to the network management device, and determines according to a relay device directly connected to the network management device a connection relationship between the network management device and the at least one relay device.
通过上述方法,网络管理设备不依赖终端设备和中继设备上报FIB信息,即可确定所述网络管理设备以及所述至少一个中继设备之间的连接关系,可降低确定网络拓扑图的复杂度。Through the foregoing method, the network management device can determine the connection relationship between the network management device and the at least one relay device without relying on the terminal device and the relay device to report the FIB information, thereby reducing the complexity of determining the network topology map. .
在另一种可能的设计中,所述网络管理设备确定所述至少一个中继设备以及所述网络管理设备之间的连接关系,具体可采用如下方式:In another possible design, the network management device determines a connection relationship between the at least one relay device and the network management device, and specifically adopts the following manner:
所述网络管理设备根据预先设置的对应关系以及所述至少一个中继设备分别对应的标识信息,确定与所述网络管理设备直接相连的中继设备;所述网络管理设备根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。Determining, by the network management device, a relay device directly connected to the network management device according to a preset correspondence relationship and identifier information corresponding to the at least one relay device; the network management device according to the network management A relay device directly connected to the device determines a connection relationship between the network management device and the at least one relay device.
其中,所述预先设置的对应关系中包括,与所述网络管理设备直接相连的中继设备的标识信息与所述网络管理设备的标识信息之间的对应关系。The pre-set correspondence includes a correspondence between the identifier information of the relay device directly connected to the network management device and the identifier information of the network management device.
通过上述方法,网络管理设备不依赖终端设备和中继设备上报FIB信息,即可确定所述网络管理设备以及所述至少一个中继设备之间的连接关系,可降低确定网络拓扑图的复杂度。Through the foregoing method, the network management device can determine the connection relationship between the network management device and the at least one relay device without relying on the terminal device and the relay device to report the FIB information, thereby reducing the complexity of determining the network topology map. .
在一种可能的设计中,所述终端设备的标识信息包括所述终端设备的介质访问控制(media access control,MAC)地址、序列号(serial number,SN)、统一资源名称(uniform resource name,URN)以及统一资源标识符(uniform resource identifier,URI)中的至少一个。本申请实施例中对所述终端设备的标识信息不做限定,所述终端设备的标识信息除可以是终端设备的MAC地址、SN、URN以及URI之外,还可以是用于标识终端设备的其它信息。In a possible design, the identification information of the terminal device includes a media access control (MAC) address, a serial number (SN), and a uniform resource name (uniform resource name) of the terminal device. URN) and at least one of a uniform resource identifier (URI). In the embodiment of the present application, the identifier information of the terminal device is not limited, and the identifier information of the terminal device may be a MAC address, an SN, a URN, and a URI of the terminal device, and may be used to identify the terminal device. Other Information.
在一种可能的设计中,所述中继设备的标识信息包括所述中继设备的MAC地址、SN、URN以及URI中的至少一个。本申请实施例中对所述中继设备的标识信息不做限定,所述中继设备的标识信息除可以是中继设备的MAC地址、SN、URN以及URI之外,还可以是用于标识中继设备的其它信息。In a possible design, the identification information of the relay device includes at least one of a MAC address, an SN, a URN, and a URI of the relay device. In the embodiment of the present application, the identifier information of the relay device is not limited, and the identifier information of the relay device may be used for the identifier, in addition to the MAC address, the SN, the URN, and the URI of the relay device. Additional information for the relay device.
在一种可能的设计中,所述IP报文可以为所述终端设备发送的首个IP报文。In a possible design, the IP packet may be the first IP packet sent by the terminal device.
通过上述方法,终端设备不需要在向网络管理设备发送的所有IP报文中均插入终端设备和中继设备的标识信息,只需在终端设备向网络管理设备发送的首个IP报文中插入所述终端设备和中继设备的标识信息,可节省IP报文的传输时间,且可提高网络管理设备的处理效率。当然为提高确定网络设备连接关系的可靠性,所述IP报文也可以为所述终端设备发送的前N(N为大于等于2的正整数)个IP报文,N可根据实际应用中对可靠性要求的精度设置。Through the above method, the terminal device does not need to insert the identification information of the terminal device and the relay device into all the IP packets sent to the network management device, and only needs to insert in the first IP packet sent by the terminal device to the network management device. The identification information of the terminal device and the relay device can save the transmission time of the IP packet and improve the processing efficiency of the network management device. Of course, in order to improve the reliability of determining the connection relationship of the network device, the IP packet may also be the first N (N is a positive integer greater than or equal to 2) IP packets sent by the terminal device, and N may be used according to the actual application. The accuracy setting required for reliability.
第二方面,本申请实施例提供一种网络管理设备,所述网络管理设备具有实现上述第一方面方法示例中网络管理设备行为的功能。所述功能可以通过硬件实现,也可以通过软件来实现。In a second aspect, the embodiment of the present application provides a network management device, where the network management device has a function of implementing network management device behavior in the foregoing method example of the first aspect. The functions can be implemented by hardware or by software.
在一种可能的设计中,所述网络管理设备包括处理器、存储器、通信接口和总线,其中,所述处理器、所述存储器以及所述通信接口通过所述总线连接;所述处理器调用存储在所述存储器中的指令以执行上述第一方面所述的方法以及第一方面中的任意一种可能的设计,所述通信接口,用于接收或者发送IP报文。In a possible design, the network management device includes a processor, a memory, a communication interface, and a bus, wherein the processor, the memory, and the communication interface are connected by the bus; the processor calls An instruction stored in the memory to perform the method of the first aspect described above and any one of the possible aspects of the first aspect, the communication interface for receiving or transmitting an IP message.
第三方面,本申请实施例提供一种中继设备,该中继设备具有实现上述第一方面方法示例中中继设备行为的功能。所述功能可以通过硬件实现,也可以通过软件来实现。In a third aspect, the embodiment of the present application provides a relay device, where the relay device has a function of implementing the behavior of the relay device in the foregoing method example of the first aspect. The functions can be implemented by hardware or by software.
在一种可能的设计中,所述中继设备的结构中包括处理器、存储器、通信接口和 总线,其中,所述处理器、所述存储器以及所述通信接口通过所述总线连接;所述处理器调用存储在所述存储器中的指令以执行第一方面所述的方法以及第一方面中的任意一种可能的设计,所述通信接口,用于接收或者发送IP报文。In a possible design, the structure of the relay device includes a processor, a memory, a communication interface, and a bus, wherein the processor, the memory, and the communication interface are connected by the bus; The processor invokes instructions stored in the memory to perform the method of the first aspect and any one of the possible aspects of the first aspect, the communication interface for receiving or transmitting an IP message.
第四方面,本申请实施例中还提供一种终端设备,该终端设备具有实现上述第一方面方法示例中终端设备行为的功能。所述功能可以通过硬件实现,也可以通过软件来实现。In a fourth aspect, the embodiment of the present application further provides a terminal device, where the terminal device has a function of implementing the behavior of the terminal device in the foregoing method example. The functions can be implemented by hardware or by software.
在一种可能的设计中,所述终端设备的结构中包括处理器、存储器、通信接口、显示屏幕和总线,其中,所述处理器、所述存储器、所述通信接口以及所述显示屏幕通过所述总线连接;所述处理器调用存储在所述存储器中的指令,执行上述方法,所述显示屏幕,用于显示信息。In a possible design, the structure of the terminal device includes a processor, a memory, a communication interface, a display screen, and a bus, wherein the processor, the memory, the communication interface, and the display screen pass The bus is connected; the processor calls an instruction stored in the memory to execute the above method, and the display screen is for displaying information.
第五方面,本申请实施例中还提供一种确定网络设备连接关系的系统,该系统包括上述第二方面所描述的网络管理设备、上述第三方面所描述的中继设备以及上述第四方面所描述的终端设备。In a fifth aspect, the system of the present application further provides a system for determining a connection relationship of a network device, where the system includes the network management device described in the foregoing second aspect, the relay device described in the foregoing third aspect, and the foregoing fourth aspect. The terminal device described.
第六方面,本申请实施例提供一种网络管理设备,所述网络管理设备具有实现上述第一方面方法示例中网络管理设备行为的功能。所述功能可以通过硬件实现,也可以通过软件来实现。In a sixth aspect, an embodiment of the present application provides a network management device, where the network management device has a function of implementing network management device behavior in the foregoing method example of the first aspect. The functions can be implemented by hardware or by software.
在一种可能的设计中,所述网络管理设备包括接收模块和处理模块,所述接收模块和所述处理模块用于执行上述第一方面所述的方法以及第一方面中的任意一种可能的设计。In a possible design, the network management device includes a receiving module and a processing module, and the receiving module and the processing module are configured to perform the method described in the above first aspect and any one of the first aspects the design of.
第七方面,本申请实施例中还提供一种计算机存储介质,所述计算机存储介质存储有计算机可执行指令,所述计算机可执行指令在被计算机调用时,使所述计算机执行上述第一方面或上述第一方面的任意一种设计提供的方法。In a seventh aspect, the embodiment of the present application further provides a computer storage medium, where the computer storage medium stores computer executable instructions, when the computer executable instructions are invoked by a computer, causing the computer to perform the first aspect. Or the method provided by any of the above first aspects of the design.
第八方面,本申请实施例中还提供一种计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或上述第一方面的任意一种可能的设计中所述的方法。In an eighth aspect, the embodiment of the present application further provides a computer program product, when run on a computer, causing the computer to perform the method described in the above first aspect or any one of the above possible aspects of the first aspect.
第九方面,本申请实施例提供一种在网络管理设备中使用的芯片,所述芯片与存储器相连,用于读取并执行所述存储器中存储的软件程序,以实现上述第一方面以及第一方面中包括的任意一种设计提供的方法。In a ninth aspect, the embodiment of the present application provides a chip used in a network management device, where the chip is connected to a memory, and is configured to read and execute a software program stored in the memory to implement the first aspect and the foregoing Any of the methods provided by the design included in one aspect.
附图说明DRAWINGS
图1为本申请提供的一种家庭WLAN网络的架构示意图;1 is a schematic structural diagram of a home WLAN network provided by the present application;
图2为本申请提供的一种确定网络拓扑图的方法流程图;2 is a flowchart of a method for determining a network topology diagram provided by the present application;
图3为本申请提供的一种在终端设备上显示网络拓扑图的示意图;FIG. 3 is a schematic diagram of a network topology diagram displayed on a terminal device according to the present application; FIG.
图4为本申请提供的另一种确定网络拓扑图的方法流程图;4 is a flowchart of another method for determining a network topology diagram provided by the present application;
图5为本申请提供的一种在IP报文中插入标识信息的示意图;FIG. 5 is a schematic diagram of inserting identification information into an IP packet according to the present application;
图6为本申请提供的一种确定网络拓扑图的流程示意图;FIG. 6 is a schematic flowchart of determining a network topology diagram provided by the present application;
图7为本申请提供的一种IP报文解析示意图;FIG. 7 is a schematic diagram of IP packet parsing provided by the present application;
图8为本申请提供的一种在IP报文中用于插入标识信息的区域示意图;FIG. 8 is a schematic diagram of an area for inserting identification information in an IP packet according to the present application;
图9为本申请提供的另一种家庭WLAN网络的结构示意图;FIG. 9 is a schematic structural diagram of another home WLAN network provided by the present application;
图10为本申请提供的一种网络管理设备结构示意图;FIG. 10 is a schematic structural diagram of a network management device provided by the present application;
图11为本申请提供的一种中继设备结构示意图;11 is a schematic structural diagram of a relay device provided by the present application;
图12为本申请提供的一种终端设备结构示意图12 is a schematic structural diagram of a terminal device provided by the present application
图13为本申请提供的另一种网络管理设备结构示意图。FIG. 13 is a schematic structural diagram of another network management device provided by the present application.
具体实施方式Detailed ways
本申请实施例提供了一种确定网络设备连接关系的方法、设备及系统,用以解决现有技术中由于无法考虑到某些网络设备,进而导致无法确定网络设备之间完整的连接关系的问题,以及由于需要额外获取网络中每个网络设备的FIB,导致复杂度较高的问题。The embodiment of the present invention provides a method, a device, and a system for determining a connection relationship of a network device, which are used to solve the problem that a certain network device cannot be considered in the prior art, and thus the complete connection relationship between the network devices cannot be determined. And because of the need to obtain additional FIBs for each network device in the network, resulting in higher complexity.
首先,对本申请实施例中的部分用语进行解释说明,以便使本领域技术人员理解。First, some of the terms in the embodiments of the present application are explained so as to be understood by those skilled in the art.
1、网络拓扑(network topology),是指一个通信网络中,各个网络设备之间的连接关系。1. Network topology refers to the connection relationship between various network devices in a communication network.
2、网络设备,可以包括网络管理设备、中继设备和终端设备等设备,其中,网络设备可等效为网络节点,本申请实施例以下对网络设备与网络节点不做区分,中继设备是指具有路由功能、为终端设备提供无线接入网络或有线接入网络功能的设备,主要包括路由器、交换机、网桥、集线器以及能够提供无线接入网络功能的终端设备等。2. The network device may include a network management device, a relay device, and a terminal device. The network device may be equivalent to a network node. In the embodiment of the present application, the network device and the network node are not distinguished, and the relay device is Refers to a device that has a routing function and provides a wireless access network or a wired access network function for a terminal device, and mainly includes a router, a switch, a bridge, a hub, and a terminal device capable of providing a wireless access network function.
3、网络管理设备,在通信网络中主要用于网络管理,以及为终端设备提供无线接入网络或有线接入网络功能,可以包括负责将终端设备接入因特网(internet)的路由器、交换机等。3. The network management device is mainly used for network management in the communication network, and provides a wireless access network or a wired access network function for the terminal device, and may include a router, a switch, and the like, which are responsible for connecting the terminal device to the Internet.
4、终端设备,可以包括手机、平板电脑、笔记本电脑、台式电脑、个人数字助理(personal digital assistant,PDA)、以及具有无线连接功能的电视机、智能手表、空调、电冰箱、热水器、无线插座等设备。4, terminal equipment, can include mobile phones, tablets, laptops, desktop computers, personal digital assistants (PDAs), and TVs with wireless connectivity, smart watches, air conditioners, refrigerators, water heaters, wireless outlets And other equipment.
5、网络拓扑图,是指由网络设备和传输介质构成的网络结构图。5. Network topology diagram refers to the network structure diagram composed of network equipment and transmission medium.
6、传输介质,可以是无线传输介质或者有线传输介质,其中,有线传输介质可以包括双绞线、同轴电缆、光纤等,无线传输介质可以包括微波、红外线以及激光等。The transmission medium may be a wireless transmission medium or a wired transmission medium. The wired transmission medium may include a twisted pair cable, a coaxial cable, an optical fiber, etc., and the wireless transmission medium may include microwave, infrared, and laser.
7、无线保真技术(wireless fidelity,Wi-Fi),是一种允许终端设备连接到一个无线局域网(wireless local area networks,WLAN)的技术。7. Wireless fidelity (Wi-Fi) is a technology that allows terminal devices to connect to a wireless local area network (WLAN).
8、传统Wi-Fi架构,是指由终端设备和一个中继设备构成的二级架构,在这种架构中,所有终端设备均连接至同一个中继设备,通过该架构中仅有的一个中继设备接入网络(例如,因特网或者WLAN)。8. The traditional Wi-Fi architecture refers to a secondary architecture consisting of a terminal device and a relay device. In this architecture, all terminal devices are connected to the same relay device through the only one in the architecture. The relay device accesses the network (for example, the Internet or WLAN).
9、分布式Wi-Fi架构,是相对传统Wi-Fi架构提出的一种架构,在这种架构中主要包括终端设备,主中继设备和从中继设备,其中,主中继设备工作在主路由模式下,具备一定的管理能力,从中继设备是不具有管理功能的普通中继设备,工作在从路由模式下,在这种架构中,将从中继设备通过有线传输介质或者Wi-Fi等接入WLAN,扩展Wi-Fi覆盖范围,终端设备可以连接至主中继设备,也可以连接至从中继设备,但需要发送至因特网(internet)的报文均需要通过主中继设备转发,主中继设备相当于网关的作用。9. The distributed Wi-Fi architecture is an architecture proposed in relation to the traditional Wi-Fi architecture. In this architecture, the terminal device, the primary relay device and the secondary relay device are mainly included, wherein the primary relay device works in the main In the routing mode, it has certain management capabilities. The relay device is a normal relay device that does not have a management function. It works in the slave route mode. In this architecture, the slave relay device passes the wired transmission medium or Wi-Fi. Accessing the WLAN and extending Wi-Fi coverage, the terminal device can be connected to the primary relay device or connected to the secondary relay device, but the packets that need to be sent to the Internet need to be forwarded through the primary relay device. The relay device acts as a gateway.
10、主中继设备,是一种网络管理设备,用于统一处理报文业务、业务配置等功能,该设备可直接与无线接入点(例如,宽带运营商)连接,也可以通过中间设备(例如,调制解调器)与无线接入点连接,为WLAN中的终端设备提供接入网功能,主中 继设备包括但不限于工作在主路由模式下的路由器、电力猫、无线中继器等。The primary relay device is a network management device that is used to process packet services and service configurations. The device can be directly connected to a wireless access point (for example, a broadband carrier) or an intermediate device. (for example, a modem) is connected to a wireless access point to provide access network functions for terminal devices in the WLAN, including but not limited to routers operating in the main routing mode, power cats, wireless repeaters, and the like.
11、从中继设备,可以通过有线传输介质、无线传输介质等媒介与主中继设备连接,扩展主路由设备的Wi-Fi覆盖范围或者有线连接范围,可以为处于同一WLAN中的终端设备提供Wi-Fi或者有线连接功能,从中继设备包括但不限于工作在从路由模式下的路由器、电力猫、无线中继器等。11. From the relay device, it can connect to the main relay device through a medium such as a wired transmission medium or a wireless transmission medium, and expand the Wi-Fi coverage range or the wired connection range of the main routing device, and can provide Wi for the terminal device in the same WLAN. -Fi or wired connection function, from relay devices including but not limited to routers operating in slave route mode, power cats, wireless repeaters, etc.
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述。In order to make the objects, technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the accompanying drawings.
本申请实施例提供的确定网络设备连接关系的方法可应用于各种场景下的WLAN网络,该WLAN网络包括但不限于校园WLAN网络、家庭WLAN网络、医院WLAN网络、企业WLAN网络、餐厅WLAN网络、商场WLAN网络、机场WLAN网络等等。The method for determining a network device connection relationship provided by the embodiment of the present application can be applied to a WLAN network in various scenarios, including but not limited to a campus WLAN network, a home WLAN network, a hospital WLAN network, a enterprise WLAN network, and a restaurant WLAN network. , shopping mall WLAN network, airport WLAN network and so on.
下面以应用于家庭WLAN网络为例,对本发明实施例的具体实施过程进行详细阐述,下述先简单介绍家庭WLAN网络的架构组成,具体如图1所示。The following is a detailed description of the specific implementation process of the embodiment of the present invention. The following describes the architecture of the home WLAN network, as shown in FIG. 1 .
参阅图1所示,为本申请实施例应用的家庭WLAN网络的架构示意图。如图1所示,图1所示的家庭WLAN网络架构中包括主中继设备、两个从中继设备以及终端设备,其中,两个从中继设备分别为从中继设备1和从中继设备2,终端设备包括手机A、手机B、手机C、电视机、台式电脑以及平板电脑。由图1可见,主中继设备与从中继设备1相连接,从中继设备1与从中继设备2相连接,手机A和电视机通过主中继设备接入internet,手机B和台式电脑通过从中继设备1连接至主中继设备,并通过主中继设备接入internet,手机C和平板电脑通过从中继设备2连接至从中继设备1,进而通过从中继设备1连接至主中继设备,并通过主中继设备接入internet,其中,对于图1中主中继设备与从中继设备、从中继设备1与从中继设备2以及终端设备与中继设备(从中继设备与主中继设备)之间的连接介质不做限定,可以是通过无线传输介质相连接,也可以是通过有线传输介质相连接。基于图1的家庭WLAN网络架构,本申请实施例中的网络拓扑图是指主中继设备、至少一个从中继设备以及终端设备之间的链路连接层级关系。图1所示的家庭WLAN网络为分布式Wi-Fi网络,在该网络中,从中继设备辅助主中继设备扩展其覆盖范围,例如,通常在客厅布置主中继设备,在卧室、洗手间、厨房等Wi-Fi信号薄弱点布置从中继设备以增强Wi-Fi覆盖,从中继设备通过有线传输介质或者无线传输介质与主中继设备连接,家庭终端设备无论连接在主中继设备、或从中继设备上均可正常进行网络通信。FIG. 1 is a schematic structural diagram of a home WLAN network applied to an embodiment of the present application. As shown in FIG. 1 , the home WLAN network architecture shown in FIG. 1 includes a primary relay device, two secondary relay devices, and a terminal device, wherein the two secondary relay devices are a secondary relay device 1 and a secondary relay device 2, respectively. Terminal devices include mobile phone A, mobile phone B, mobile phone C, television, desktop computer and tablet computer. As can be seen from FIG. 1, the primary relay device is connected to the secondary relay device 1, the secondary relay device 1 is connected to the secondary relay device 2, the mobile phone A and the television set are connected to the internet through the primary relay device, and the mobile phone B and the desktop computer pass through After the device 1 is connected to the primary relay device and accesses the internet through the primary relay device, the mobile phone C and the tablet computer are connected from the relay device 2 to the secondary relay device 1 and then from the relay device 1 to the primary relay device. And accessing the internet through the primary relay device, wherein, for the primary relay device and the secondary relay device, the secondary relay device 1 and the secondary relay device 2, and the terminal device and the relay device (from the relay device and the primary relay device) in FIG. The connection medium between the two is not limited, and may be connected through a wireless transmission medium or may be connected through a wired transmission medium. Based on the home WLAN network architecture of FIG. 1 , the network topology diagram in the embodiment of the present application refers to a link connection level relationship between the primary relay device, the at least one secondary relay device, and the terminal device. The home WLAN network shown in FIG. 1 is a distributed Wi-Fi network in which a secondary relay device is extended from a relay device to extend its coverage. For example, a main relay device is usually arranged in a living room, in a bedroom, a restroom, Wi-Fi signal weak points such as kitchen are arranged from the relay device to enhance Wi-Fi coverage, and the relay device is connected to the main relay device through a wired transmission medium or a wireless transmission medium, and the home terminal device is connected to the main relay device or Network communication can be performed normally on the device.
需要说明的是,图1仅以包括一个主中继设备、两个从中继设备以及六个终端设备的一个简单的家庭WLAN网络为例进行说明,实际应用中,家庭WLAN网络可包括多个主中继设备、多个从中继设备,以及多个终端设备。It should be noted that FIG. 1 is only an example of a simple home WLAN network including one primary relay device, two secondary relay devices, and six terminal devices. In an actual application, the home WLAN network may include multiple hosts. A relay device, a plurality of slave relay devices, and a plurality of terminal devices.
在家庭网络中采用分布式Wi-Fi架构之后,家庭网络中的中继设备与终端设备之间的连接关系变的较复杂,而通过家庭网络的网络拓扑图可以直观的看到家庭网络中各设备之间的连接关系,进而对整个网络的拓扑结构有整体的认识和了解,有效的帮助家庭用户或者网络管理人员进行网络故障定位和性能分析,因此,快速准确的确定完整的网络拓扑图是十分必要的。After the distributed Wi-Fi architecture is adopted in the home network, the connection relationship between the relay device and the terminal device in the home network becomes more complicated, and the network topology map of the home network can intuitively see the home network. The connection relationship between the devices, and thus the overall understanding and understanding of the topology of the entire network, effectively help the home user or network management personnel to perform network fault location and performance analysis, therefore, quickly and accurately determine the complete network topology map is Very necessary.
基于上述介绍,本申请提供一种确定网络设备连接关系的方法、设备及系统,用 以解决现有技术中由于无法考虑到某些网络设备,进而无法确定完整网络拓扑图的问题,以及由于需要额外获取网络中每个网络设备的FIB,导致复杂度较高的问题。其中,方法及设备是基于同一构思的,由于方法及设备解决问题的原理相似,因此设备与方法的实施可以相互参见,重复之处不再赘述。Based on the foregoing description, the present application provides a method, a device, and a system for determining a connection relationship of a network device, which are used to solve the problem that a certain network device cannot be determined in the prior art, and thus the complete network topology map cannot be determined, and Additional access to the FIB of each network device in the network results in a more complex problem. The method and the device are based on the same concept. Since the principles of the method and the device for solving the problem are similar, the implementation of the device and the method can be referred to each other, and the repeated description is not repeated.
在本申请实施例中,以确定图1中家庭WLAN网络的网络设备连接关系为例进行描述,但是并不限制本申请实施例应用到其他类型的网络中。参阅图2所示,该方法的具体流程可以包括:In the embodiment of the present application, the network device connection relationship of the home WLAN network in FIG. 1 is taken as an example for description, but the embodiment of the present application is not limited to be applied to other types of networks. Referring to FIG. 2, the specific process of the method may include:
S101:网络管理设备接收终端设备发送的IP报文,IP报文是经至少一个中继设备转发至网络管理设备的IP报文、且IP报文中顺序插入有终端设备的标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息。S101: The network management device receives the IP packet sent by the terminal device, where the IP packet is an IP packet that is forwarded to the network management device by the at least one relay device, and the identifier information and the IP packet of the terminal device are sequentially inserted into the IP packet. The identification information corresponding to the at least one relay device that passes through the text in sequence.
本申请实施例中,IP报文中顺序插入有终端设备的标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息,可以是在IP报文中用于插入标识信息的区域中从左向右顺序插入有终端设备的标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息,也可以是在IP报文中用于插入标识信息的区域中从右向左顺序插入有终端设备的标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息,当然,能够实现将终端设备的标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息顺序插入IP报文的方法均属于本申请保护的范畴,本申请对此不做限定。In the embodiment of the present application, the identifier information of the terminal device and the identifier information corresponding to the at least one relay device that the IP packet passes through are sequentially inserted in the IP packet, and may be an area for inserting the identifier information in the IP packet. The identification information of the terminal device and the identification information corresponding to the at least one relay device that the IP packet passes in sequence may be inserted from the left to the right, or may be in the area for inserting the identification information in the IP packet from the right to the right. The identification information of the terminal device and the identification information corresponding to the at least one relay device that the IP packet passes in sequence are inserted in the left-hand order. Of course, at least one relay device that sequentially passes the identification information of the terminal device and the IP packet respectively can be implemented. The method of inserting an IP packet in the sequence of the corresponding identification information is in the scope of protection of the present application, which is not limited in this application.
本申请实施例中,“顺序”的另一层含义是指终端设备的标识信息以及至少一个中继设备的标识信息插入IP报文中的先后顺序。In the embodiment of the present application, another meaning of the “sequence” refers to the sequence information of the terminal device and the sequence information of the at least one relay device inserted into the IP packet.
本申请实施例中,网络管理设备可以是图1中的主中继设备,也可以是具有上述功能的新增网络设备,当网络管理设备为主中继设备时,不需要在网络中新增设备,可节省硬件资源。本申请中以下均以网络管理设备为主中继设备为例进行说明。需要说明的是,当上述网络管理设备为主中继设备时,上述至少一个中继设备是指从中继设备。In this embodiment, the network management device may be the primary relay device in FIG. 1 or a newly added network device having the foregoing functions. When the network management device is the primary relay device, the network management device does not need to be added in the network. Equipment that saves hardware resources. The following takes the network management device as the primary relay device as an example for description. It should be noted that when the network management device is the primary relay device, the at least one relay device refers to the secondary relay device.
下面结合图1以网络管理设备为主中继设备为例对上述过程进行说明,假设上述终端设备为手机C,手机C接入internet之后,向internet发送IP报文,该IP报文必须由主中继设备转发至internet,具体的,该IP报文的传输过程为,先经过从中继设备2,由从中继设备2转发至从中继设备1,进而由从中继设备1转发至主中继设备,主中继设备接收手机C发送的IP报文并转发至internet。本申请实施例中,为标识IP报文顺序经过的网络设备,将该IP报文中顺序插入手机C的标识信息以及从中继设备2的标识信息以及从中继设备1的标识信息,以从中继设备1在IP报文中插入标识信息为例说明,从中继设备1接收其上一跳设备(从中继设备2)发送的IP报文,并在该IP报文用于插入标识信息的区域中、已经插入从中继设备2的标识信息之后的位置插入从中继设备1的标识信息,并向主中继设备转发插入标识信息的IP报文。The following takes the network management device as the primary relay device as an example to describe the foregoing process. Assume that the terminal device is the mobile phone C. After the mobile phone C accesses the Internet, the device sends an IP packet to the Internet. The IP packet must be sent by the host. The relay device forwards to the internet. Specifically, the transmission process of the IP packet is first, after the slave relay device 2, the slave relay device 2 is forwarded to the slave relay device 1, and then the slave relay device 1 is forwarded to the master relay device. The primary relay device receives the IP packet sent by the mobile phone C and forwards it to the internet. In the embodiment of the present application, in order to identify the network device through which the IP packet passes, the IP packet is sequentially inserted into the identification information of the mobile phone C, the identification information of the slave relay device 2, and the identification information of the slave relay device 1 to be relayed. The device 1 inserts the identifier information into the IP packet as an example. The relay device 1 receives the IP packet sent by the previous hop device (from the relay device 2), and the IP packet is used in the area for inserting the identifier information. The identification information of the slave relay device 1 is inserted from the position after the identification information of the relay device 2, and the IP packet in which the identification information is inserted is forwarded to the master relay device.
S102:网络管理设备解析IP报文,得到顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息。S102: The network management device parses the IP packet, and obtains the identifier information of the terminal device and the identifier information corresponding to the at least one relay device.
本申请实施例中,结合图1以网络管理设备为主中继设备、终端设备为手机C为例对上述过程进行说明,主中继设备接收到手机C发送的、顺序插入有手机C的标识 信息以及IP报文依次经过的从中继设备2和从中继设备1分别对应的标识信息的IP报文之后,解析该IP报文,得到顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息。In the embodiment of the present application, the foregoing process is described by taking the network management device as the primary relay device and the terminal device as the mobile phone C as an example. The primary relay device receives the identifier sent by the mobile phone C and sequentially inserted with the mobile phone C. After the information and the IP packet of the identification information corresponding to the relay device 2 and the relay device 1 are sequentially passed through the IP packet, the IP packet is parsed, and the identification information of the mobile phone C and the slave relay device 2 are obtained. Following the identification information corresponding to the device 1 respectively.
S103:网络管理设备根据顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息,确定终端设备以及至少一个中继设备之间的连接关系,并确定至少一个中继设备以及网络管理设备之间的连接关系。S103: The network management device determines the connection relationship between the terminal device and the at least one relay device according to the identification information of the terminal device and the identification information corresponding to the at least one relay device, and determines at least one relay device and the network. Manage the connection between devices.
本申请实施例中,结合图1以网络管理设备为主中继设备、终端设备为手机C为例对上述过程进行说明,主中继设备得到顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息之后,根据顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息,确定手机C与从中继设备1和从中继设备2之间的连接关系为:手机C连接从中继设备2连接从中继设备1。In the embodiment of the present application, the foregoing process is described by taking the network management device as the primary relay device and the terminal device as the mobile phone C as an example. The primary relay device obtains the identification information of the mobile phone C and the secondary relay device 2. After the identification information corresponding to the relay device 1 and the identification information of the mobile phone C and the identification information corresponding to the relay device 2 and the slave relay device 1 respectively, the mobile phone C and the slave relay device 1 and the slave relay device 2 are determined. The connection relationship is as follows: the mobile phone C connection is connected from the relay device 2 to the relay device 1.
本申请实施例中给出以下两种确定至少一个中继设备以及网络管理设备之间的连接关系的实现方式。The following two implementation manners for determining a connection relationship between at least one relay device and a network management device are given in the embodiment of the present application.
一种实现方式中,网络管理设备根据顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息,确定IP报文在被发送至网络管理设备时所经过的最后一个中继设备,网络管理设备将最后一个中继设备,确定为与网络管理设备直接相连的中继设备,并根据与网络管理设备直接相连的中继设备,确定网络管理设备以及至少一个中继设备之间的连接关系。In an implementation manner, the network management device determines, according to the identification information of the terminal device and the identification information corresponding to the at least one relay device, the last relay device that the IP packet passes when being sent to the network management device. The network management device determines the last relay device as a relay device directly connected to the network management device, and determines a network management device and at least one relay device according to the relay device directly connected to the network management device. Connection relationship.
本申请实施例中,结合图1以网络管理设备为主中继设备、终端设备为手机C为例对上述过程进行说明,主中继设备得到顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息之后,根据顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息,确定IP报文在被发送至主中继设备时所经过的最后一个中继设备为从中继设备1,主中继设备将从中继设备1确定为与其直接相连的中继设备,并根据与主中继设备直接相连的从中继设备1,确定主中继设备以及至少一个从中继设备之间的连接关系为:主中继设备连接从中继设备1连接从中继设备2。In the embodiment of the present application, the foregoing process is described by taking the network management device as the primary relay device and the terminal device as the mobile phone C as an example. The primary relay device obtains the identification information of the mobile phone C and the secondary relay device 2. After the identification information corresponding to the relay device 1 and the identification information of the mobile phone C and the identification information corresponding to the relay device 2 and the slave relay device 1 respectively, it is determined that the IP packet is sent to the primary relay device. The last relay device passed is the slave relay device 1, and the master relay device determines the relay device directly connected to the relay device 1 from the relay device 1, and determines the master according to the slave relay device 1 directly connected to the master relay device. The connection relationship between the relay device and the at least one slave relay device is that the master relay device connection is connected from the relay device 1 to the slave relay device 2.
另一种实现方式中,网络管理设备根据预先设置的对应关系以及至少一个中继设备分别对应的标识信息,确定与网络管理设备直接相连的中继设备,网络管理设备根据与网络管理设备直接相连的中继设备,确定网络管理设备以及至少一个中继设备之间的连接关系。In another implementation manner, the network management device determines, according to the preset correspondence relationship and the identifier information corresponding to the at least one relay device, a relay device directly connected to the network management device, where the network management device is directly connected according to the network management device. The relay device determines a connection relationship between the network management device and the at least one relay device.
其中,预先设置的对应关系中包括,与网络管理设备直接相连的中继设备的标识信息与网络管理设备的标识信息之间的对应关系。The pre-set correspondence includes a correspondence between the identifier information of the relay device directly connected to the network management device and the identifier information of the network management device.
本申请实施例中,结合图1以网络管理设备为主中继设备、终端设备为手机C为例对上述过程进行说明,主中继设备得到顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息之后,根据预先设置的从中继设备1的标识信息与主中继设备的标识信息之间的对应关系以及从中继设备1和从中继设备2分别对应的标识信息,确定与主中继设备直接相连的中继设备为从中继设备1,进而根据与主中继设备直接相连的从中继设备1,确定主中继设备以及至少一个从中继设备之间的连接关系为:主中继设备连接从中继设备1连接从中继设备2。In the embodiment of the present application, the foregoing process is described by taking the network management device as the primary relay device and the terminal device as the mobile phone C as an example. The primary relay device obtains the identification information of the mobile phone C and the secondary relay device 2. After the identification information corresponding to the relay device 1 respectively, the correspondence between the identification information of the slave relay device 1 and the identification information of the master relay device and the identifiers corresponding to the slave relay device 1 and the slave relay device 2 respectively according to the preset Information, determining that the relay device directly connected to the primary relay device is the secondary relay device 1, and further determining the connection between the primary relay device and the at least one secondary relay device according to the secondary relay device 1 directly connected to the primary relay device The relationship is that the primary relay device is connected from the relay device 1 to the secondary device 2.
本申请实施例中,网络中的终端设备可以是一个,也可以是多个。当网络中的终端设备为多个时,主中继设备可接收多个终端设备发送的多个IP报文,其中,终端设备与IP报文之间具有一一对应的关系,即,不同的终端设备向主中继设备发送针对自身、不同的IP报文,主中继设备通过对多个终端设备中包括的每一终端设备分别执行上述S101-S103,可针对每一终端设备确定出一个与中继设备(主中继设备和从中继设备)之间的连接关系,主中继设备通过将针对每一终端设备确定的连接关系进行融合,可得到网络中包括的所有网络设备(主中继设备、从中继设备以及全部终端设备)之间的完整连接关系。例如,针对图1所示的网络架构中,终端设备包括手机A、手机B、手机C、电视机、台式电脑以及平板电脑,针对手机A、手机B、手机C、电视机、台式电脑以及平板电脑分别执行上述S101-S103,即可确定手机A、手机B、手机C、电视机、台式电脑以及平板电脑与中继设备(主中继设备和从中继设备)之间的连接关系,主中继设备通过将针对每一终端设备确定的连接关系进行融合,进而可确定图1所示的家庭WLAN网络的完整网络拓扑图,使得网络维护人员可根据网络拓扑图维护网络设备的信息以及网络设备之间的连接关系,并通过网络拓扑图帮助网络管理人员对整个网络的拓扑结构有整体的认识和了解,有效的帮助网络管理人员进行网络故障定位和性能分析。In this embodiment, the terminal device in the network may be one or multiple. When there are multiple terminal devices in the network, the primary relay device can receive multiple IP packets sent by multiple terminal devices, where the terminal device has a one-to-one correspondence with the IP packets, that is, different The terminal device sends a different IP packet for itself to the primary relay device, and the primary relay device performs the foregoing S101-S103 for each terminal device included in the multiple terminal devices, and may determine one for each terminal device. With the connection relationship between the relay device (the primary relay device and the secondary relay device), the primary relay device can obtain all the network devices included in the network by fusing the connection relationship determined for each terminal device (mainly A complete connection between the device, the slave device, and all the terminal devices. For example, in the network architecture shown in FIG. 1, the terminal device includes mobile phone A, mobile phone B, mobile phone C, television, desktop computer, and tablet computer, for mobile phone A, mobile phone B, mobile phone C, television, desktop computer, and tablet. The computer performs the above S101-S103 respectively, and can determine the connection relationship between the mobile phone A, the mobile phone B, the mobile phone C, the television, the desktop computer, and the tablet computer and the relay device (the primary relay device and the secondary relay device). After the device is fused by the connection relationship determined for each terminal device, the complete network topology diagram of the home WLAN network shown in FIG. 1 can be determined, so that the network maintenance personnel can maintain the network device information and the network device according to the network topology map. The relationship between the network and the network topology helps network administrators to have an overall understanding and understanding of the topology of the entire network, effectively helping network administrators to locate and analyze network faults.
具体的,主中继设备在确定出针对每一终端设备与中继设备(主中继设备和从中继设备)之间的完整连接关系之后,可通过如下方式将针对每一终端设备确定的连接关系进行融合:主中继设备可根据接收到的所有终端设备发送的IP报文采用上述两种实现方式,确定所有与其直接相连的从中继设备,以确定出的与其直接相连的从中继设备为起点,根据顺序排列的终端设备的标识信息以及至少一个从中继设备的标识信息,确定与主中继设备直接相连的从中继设备,相连的下一级网络设备,以此类推,直至确定出全部网络设备的连接关系。Specifically, after determining, by the primary relay device, a complete connection relationship between each terminal device and the relay device (the primary relay device and the secondary relay device), the connection determined for each terminal device may be determined as follows The relationship is merged: the primary relay device can determine all the slave secondary devices directly connected to each other according to the received IP packets sent by all the terminal devices, and determine the slave secondary devices directly connected thereto. a starting point, according to the identification information of the terminal device arranged in order and the identification information of the at least one slave relay device, determining the slave relay device directly connected to the master relay device, the connected next-level network device, and so on, until all are determined The connection relationship of network devices.
需要说明的是,与主中继设备直接相连的终端设备在其发送的IP报文中仅携带自身的标识信息,对于直接与主中继设备相连的终端设备,主中继设备可采用如下方式确定连接关系。具体的,主中继设备接收到仅包括终端设备标识信息的IP报文之后,可确定该类终端设备是与其直接相连的终端设备。It should be noted that the terminal device directly connected to the primary relay device only carries its own identification information in the IP packet sent by the primary relay device. For the terminal device directly connected to the primary relay device, the primary relay device may adopt the following manner. Determine the connection relationship. Specifically, after receiving the IP packet including only the terminal device identification information, the primary relay device may determine that the terminal device is directly connected to the terminal device.
本申请实施例中,在确定网络中包括的主中继设备、从中继设备以及终端设备之间完整的连接关系之后,可进一步根据终端设备以及至少一个中继设备之间的连接关系、至少一个中继设备以及网络管理设备之间的连接关系,确定网络拓扑图。In the embodiment of the present application, after determining a complete connection relationship between the primary relay device, the secondary relay device, and the terminal device included in the network, the connection relationship between the terminal device and the at least one relay device may further be at least one The connection relationship between the relay device and the network management device determines the network topology map.
其中,网络拓扑图包括主中继设备、至少一个从中继设备以及终端设备之间的互连信息。The network topology diagram includes interconnection information between the primary relay device, the at least one secondary relay device, and the terminal device.
需要说明的是,本申请实施例中可在主中继设备中确定网络拓扑图,也可在终端设备中确定网络拓扑图,本申请不做限定。当在终端设备中确定网络拓扑图时,终端设备需要接收主中继设备确定的终端设备以及至少一个中继设备之间的连接关系、至少一个中继设备以及网络管理设备之间的连接关系,进而根据终端设备以及至少一个中继设备之间的连接关系、至少一个中继设备以及网络管理设备之间的连接关系,确定网络拓扑图,终端设备在确定出网络拓扑图之后,可在显示屏幕上显示该网络拓扑图。It should be noted that, in the embodiment of the present application, the network topology map may be determined in the primary relay device, and the network topology map may be determined in the terminal device, which is not limited in this application. When determining the network topology map in the terminal device, the terminal device needs to receive a connection relationship between the terminal device determined by the primary relay device and the at least one relay device, a connection relationship between the at least one relay device, and the network management device, And determining a network topology map according to the connection relationship between the terminal device and the at least one relay device, the connection relationship between the at least one relay device, and the network management device, where the terminal device may be in the display screen after determining the network topology map. The network topology map is displayed on it.
本申请实施例中,当在主中继设备确定出网络的网络拓扑图之后,用户可通过预先设置的与主中继设备对应的用户接口查看网络拓扑图,使得用户可通过网络拓扑图直观的看到网络中各设备之间的连接关系,进而对整个网络的拓扑结构有整体的认识和了解,有效的帮助用户或者网络管理人员进行网络故障定位和性能分析。In the embodiment of the present application, after the primary relay device determines the network topology map of the network, the user may view the network topology map through a preset user interface corresponding to the primary relay device, so that the user can intuitively access the network topology map. See the connection relationship between devices in the network, and then have an overall understanding and understanding of the topology of the entire network, effectively helping users or network managers to perform network fault location and performance analysis.
需要说明的是,预先设置的与主中继设备对应的用户接口可以是网址,也可以是研发人员开发的可使用户访问主中继设备的应用程序,本申请对此不做限定。例如,假设主中继设备为路由器,则用户可通过访问该路由器的网址查看网络拓扑图,当然,用户也可以使用终端设备下载研发人员开发的可访问该路由器的应用程序,在终端设备的显示屏幕上显示并查看网络拓扑图,参阅图3所示,图3为在终端设备的显示屏幕上显示网络拓扑图的示意图,用户可根据显示屏幕中显示的网络拓扑图,直观的查看终端设备与各个中继设备之间的连接关系。It should be noted that the user interface corresponding to the primary relay device may be a web address, or may be an application developed by the research and development personnel to enable the user to access the primary relay device, which is not limited in this application. For example, if the primary relay device is a router, the user can view the network topology map by accessing the website address of the router. Of course, the user can also use the terminal device to download an application developed by the developer and accessible to the router, and display the terminal device. The network topology map is displayed and viewed on the screen. Referring to FIG. 3, FIG. 3 is a schematic diagram showing the network topology diagram displayed on the display screen of the terminal device. The user can intuitively view the terminal device according to the network topology diagram displayed on the display screen. The connection relationship between each relay device.
进一步需要说明的是,本申请实施例中,可将网络拓扑图中包括的网络设备的属性设置为可操作,进而使得网络拓扑图中的网络设备与用户可交互。例如,可针对网络拓扑图中包括的网络设备设置用户可选选项,使得用户可通过触发相应选项控制网络设备执行相应的操作。例如,假设针对网络设备设置了控制网络设备接入网络或者断开网络的选项,则用户可通过触发该选项控制网络设备接入网络或者断开网络。再例如,假设针对某些网络设备设置了对各种常见应用的一键封杀选项,则用户可通过触发该选项禁止相应的网络设备运行常见的游戏、聊天等软件。再例如,假设针对某些网络设备设置了支持网址过滤的选项,则用户可通过触发该选项对网络设备访问各种网站的权限进行管控。当然,该网络拓扑图还可支持显示网络设备的名称、网络设备的速率、网络设备性能、链路质量、设备连接提醒等,使得用户可根据所显示的上述内容对网络进行管理。It should be further noted that, in the embodiment of the present application, the attributes of the network device included in the network topology map may be set to be operable, so that the network device in the network topology map can interact with the user. For example, user-selectable options can be set for network devices included in the network topology map so that the user can control the network device to perform the corresponding operation by triggering the corresponding option. For example, suppose that an option to control a network device to access a network or disconnect a network is set for a network device, the user can trigger the option to control the network device to access the network or disconnect the network. For another example, if a one-click blocking option for various common applications is set for some network devices, the user can disable the corresponding network device to run common games, chats, and the like by triggering the option. For another example, if an option to support URL filtering is set for some network devices, the user can trigger this option to control the access of the network device to various websites. Of course, the network topology map can also support displaying the name of the network device, the rate of the network device, the network device performance, the link quality, and the device connection reminder, so that the user can manage the network according to the displayed content.
本申请实施例中,以下详细描述一种S103的实现方式,参阅图4所示,该实现方式的具体流程可以包括:In the embodiment of the present application, an implementation manner of the S103 is described in detail below. Referring to FIG. 4, the specific process of the implementation may include:
S201:网络管理设备根据顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息,确定IP报文经过终端设备以及至少一个中继设备的顺序。S201: The network management device determines the sequence of the IP packet passing through the terminal device and the at least one relay device according to the identification information of the terminal device and the identification information corresponding to the at least one relay device.
本申请实施例中,所述顺序可以是指终端设备的标识信息以及至少一个中继设备分别对应的标识信息插入IP报文的先后顺序。In the embodiment of the present application, the sequence may refer to the sequence information of the terminal device and the sequence in which the identifier information corresponding to the at least one relay device is inserted into the IP packet.
本申请实施例中,结合图1以网络管理设备为主中继设备、终端设备包括手机A、手机B、手机C、电视机、台式电脑以及平板电脑为例,对S201的过程进行说明。主中继设备根据顺序排列的手机A的标识信息,确定手机A发送的IP报文未经过从中继设备转发,直接发送至主中继设备,即IP报文经过手机A和中继设备的顺序为:手机A、主中继设备,同样的,主中继设备根据顺序排列的电视机的标识信息,确定电视机发送的IP报文未经过从中继设备转发,直接发送至主中继设备,即IP报文经过电视机和中继设备的顺序为:电视机、主中继设备;主中继设备根据顺序排列的手机B的标识信息以及从中继设备1对应的标识信息,确定手机B发送的IP报文经过从中继设备1转发至主中继设备,即IP报文经过手机B和中继设备的顺序为:手机B、从中继设备1、主中继设备,同样的,主中继设备根据顺序排列的台式电脑的标识信息以及从中继设备1对应的标识信息,确定台式电脑发送的IP报文经过从中继设备1转 发至主中继设备,即IP报文经过台式电脑和中继设备的顺序为:台式电脑、从中继设备1、主中继设备;主中继设备根据顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息,确定手机C发送的IP报文依次经过从中继设备2、从中继设备1,进而转发至主中继设备,即IP报文经过手机C和中继设备的顺序为:手机C、从中继设备2、从中继设备1、主中继设备,同样的,主中继设备根据顺序排列的平板电脑的标识信息以及从中继设备2和从中继设备1分别对应的标识信息,确定平板电脑发送的IP报文依次经过从中继设备2、从中继设备1,进而转发至主中继设备,即IP报文经过平板电脑和中继设备的顺序为:平板电脑、从中继设备2、从中继设备1、主中继设备。In the embodiment of the present application, the process of the S201 is described by taking the network management device as the primary relay device and the terminal device including the mobile phone A, the mobile phone B, the mobile phone C, the television, the desktop computer, and the tablet computer as an example. The primary relay device determines that the IP packet sent by the mobile phone A is not forwarded from the relay device and is directly sent to the primary relay device, that is, the sequence of the IP packet passing through the mobile phone A and the relay device. For the mobile phone A and the primary relay device, the primary relay device determines that the IP packet sent by the television has not been forwarded from the relay device and is directly sent to the primary relay device according to the identification information of the televisions arranged in sequence. That is, the order of the IP packets passing through the television and the relay device is: the television and the main relay device; the primary relay device determines the mobile phone B to send according to the identification information of the mobile phone B and the identification information corresponding to the relay device 1 The IP packet is forwarded from the relay device 1 to the primary relay device, that is, the sequence of the IP packet passing through the mobile phone B and the relay device is: the mobile phone B, the secondary relay device 1, the primary relay device, and the same, the primary relay. The device determines, according to the identification information of the desktop computer and the identification information corresponding to the relay device 1, that the IP packet sent by the desktop computer is forwarded from the relay device 1 to the primary relay device, that is, the IP packet. The order of the desktop computer and the relay device is: desktop computer, slave relay device 1, master relay device; identification information of the mobile phone C arranged by the main relay device according to the order, and corresponding from the relay device 2 and the slave relay device 1, respectively The identification information is determined, and the IP packet sent by the mobile phone C is sequentially forwarded from the relay device 2, the relay device 1, and then to the primary relay device, that is, the sequence of the IP packet passing through the mobile phone C and the relay device is: the mobile phone C, Following the device 2, the slave relay device 1, the master relay device, and the same, the master relay device determines the tablet sending according to the identification information of the tablet computer arranged in order and the identification information corresponding to the relay device 2 and the slave relay device 1, respectively. The IP packets are sequentially forwarded from the relay device 2, the relay device 1, and then to the primary relay device, that is, the order in which the IP packets pass through the tablet and the relay device is: tablet, slave relay device 2, and relay device. 1. The main relay device.
S202:网络管理设备将IP报文经过终端设备以及至少一个中继设备的顺序,确定为终端设备与至少一个中继设备的连接顺序,并根据该连接顺序确定终端设备以及至少一个中继设备之间的连接关系。S202: The network management device determines, by using a sequence of the terminal device and the at least one relay device, a connection sequence between the terminal device and the at least one relay device, and determines, according to the connection sequence, the terminal device and the at least one relay device. The connection between the two.
本申请实施例中,结合图1以网络管理设备为主中继设备为例,对S202的过程进行说明,主中继设备根据顺序排列的手机A的标识信息,确定手机A发送的IP报文经过手机A和中继设备的顺序为:手机A、主中继设备之后,将IP报文经过手机A和中继设备的顺序:手机A、主中继设备,确定为手机A和中继设备的连接顺序,进而可根据该连接顺序确定手机A与中继设备的连接关系为:手机A连接主中继设备,同样的,主中继设备根据顺序排列的电视机的标识信息,确定电视机发送的IP报文经过电视机和中继设备的顺序为:电视机、主中继设备之后,将IP报文经过电视机和中继设备的顺序:电视机、主中继设备,确定为电视机和中继设备的连接顺序,进而可根据该连接顺序确定电视机与中继设备的连接关系为:电视机连接主中继设备;主中继设备根据顺序排列的手机B的标识信息以及从中继设备1对应的标识信息,确定手机B发送的IP报文经过手机B和中继设备的顺序为:手机B、从中继设备1、主中继设备之后,将IP报文经过手机B和中继设备的顺序:手机B、从中继设备1、主中继设备,确定为手机B和中继设备的连接顺序,进而可根据该连接顺序确定手机B与中继设备的连接关系为:手机B连接从中继设备1,从中继设备1连接主中继设备,同样的,主中继设备根据顺序排列的台式电脑的标识信息以及从中继设备1对应的标识信息,确定台式电脑发送的IP报文经过台式电脑和中继设备的顺序为:台式电脑、从中继设备1、主中继设备之后,将IP报文经过台式电脑和中继设备的顺序:台式电脑、从中继设备1、主中继设备,确定为台式电脑和中继设备的连接顺序,进而可根据该连接顺序确定台式电脑与中继设备的连接关系为:台式电脑连接从中继设备1,从中继设备1连接主中继设备;主中继设备根据顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息,确定IP报文经过手机C和中继设备的顺序为:手机C、从中继设备2、从中继设备1、主中继设备之后,将IP报文经过手机C和中继设备的顺序:手机C、从中继设备2、从中继设备1、主中继设备,确定为手机C和中继设备的连接顺序,进而可根据该连接顺序确定手机C与中继设备的连接关系为:手机C连接从中继设备2,从中继设备2连接从中继设备1,从中继设备1连接主中继设备,同样的,主中继设备根据顺序排列的平板电脑的标识信息以及从中继设备2和从中继设备1分别对应的标识信息,确定平板电脑发送的IP报文经过平板电脑 和中继设备的顺序为:平板电脑、从中继设备2、从中继设备1、主中继设备之后,将IP报文经过平板电脑和中继设备的顺序:平板电脑、从中继设备2、从中继设备1、主中继设备,确定为平板电脑和中继设备的连接顺序,进而可根据该连接顺序确定平板电脑与中继设备的连接关系为:平板电脑连接从中继设备2,从中继设备2连接从中继设备1,从中继设备1连接主中继设备。In the embodiment of the present application, the network management device is used as the primary relay device as an example, and the process of S202 is described. The primary relay device determines the IP packet sent by the mobile phone A according to the identification information of the mobile phone A. After the mobile phone A and the relay device are in the order of the mobile phone A and the primary relay device, the IP packets are passed through the sequence of the mobile phone A and the relay device: the mobile phone A and the primary relay device are determined as the mobile phone A and the relay device. The connection order, and then the connection relationship between the mobile phone A and the relay device is determined according to the connection order: the mobile phone A is connected to the main relay device, and the main relay device determines the television set according to the identification information of the televisions arranged in order. The sequence of sending IP packets through the TV and the relay device is: after the TV and the main relay device, the IP packets are passed through the TV and the relay device: the TV, the main relay device, and the TV is determined to be the TV. The connection sequence of the machine and the relay device, and then the connection relationship between the television and the relay device can be determined according to the connection order: the television is connected to the main relay device; the main relay device is arranged according to the sequence of the mobile phone B The identification information and the identification information corresponding to the relay device 1 determine that the IP packet sent by the mobile phone B passes through the mobile phone B and the relay device in the order of the mobile phone B, the secondary relay device 1, and the primary relay device, and then the IP packet passes. The sequence of the mobile phone B and the relay device: the mobile phone B, the secondary relay device 1, and the primary relay device are determined as the connection order of the mobile phone B and the relay device, and the connection relationship between the mobile phone B and the relay device can be determined according to the connection sequence. The mobile phone B is connected from the relay device 1 and the relay device 1 is connected to the main relay device. Similarly, the main relay device determines the desktop computer to send according to the identification information of the desktop computer and the identification information corresponding to the relay device 1. The order of the IP packets passing through the desktop computer and the relay device is: the order of the desktop computer and the relay device after the desktop computer, the slave relay device 1, and the primary relay device: the desktop computer and the slave relay device 1 The primary relay device is determined as the connection sequence of the desktop computer and the relay device, and then the connection relationship between the desktop computer and the relay device is determined according to the connection sequence: desktop power The brain is connected to the relay device 1 and the relay device 1 is connected to the primary relay device. The primary relay device determines the IP packet according to the identification information of the mobile phone C and the identification information corresponding to the relay device 2 and the secondary relay device 1 respectively. After the mobile phone C and the relay device are in the order of the mobile phone C, the secondary relay device 2, the secondary relay device 1, and the primary relay device, the IP packets are passed through the sequence of the mobile phone C and the relay device: the mobile phone C and the secondary relay device 2. The relay device 1 and the master relay device are determined as the connection order of the mobile phone C and the relay device, and then the connection relationship between the mobile phone C and the relay device is determined according to the connection sequence: the mobile phone C is connected to the relay device 2, The slave relay device 2 is connected to the slave relay device 1 and the slave relay device 1 is connected to the master relay device. Similarly, the master relay device arranges the identification information of the tablet computer according to the order and the identifiers corresponding to the slave relay device 2 and the slave relay device 1 respectively. The information determines that the IP packets sent by the tablet pass through the tablet and the relay device in the order of: tablet, slave device 2, slave device 1, and master relay device, and then report the IP packet. After the order of the tablet and the relay device: the tablet, the slave relay device 2, the slave relay device 1, the master relay device, determine the connection order of the tablet computer and the relay device, and then determine the tablet computer according to the connection order. The connection relationship of the relay device is: the tablet is connected from the relay device 2, the relay device 2 is connected to the slave relay device 1, and the relay device 1 is connected to the master relay device.
本申请实施例中,终端设备的标识信息可以包括终端设备的MAC地址、SN、URN以及URI中的至少一个。本申请实施例对终端设备的标识信息不做限定,终端设备的标识信息除可以是终端设备的MAC地址、SN、URN以及URI之外,还可以是用于标识终端设备的其它信息。In this embodiment, the identifier information of the terminal device may include at least one of a MAC address, an SN, a URN, and a URI of the terminal device. The identification information of the terminal device is not limited in the embodiment of the present application. The identification information of the terminal device may be other information for identifying the terminal device, in addition to the MAC address, the SN, the URN, and the URI of the terminal device.
本申请实施例中,中继设备的标识信息可以包括中继设备的MAC地址、SN、URN以及URI中的至少一个。本申请实施例对中继设备的标识信息不做限定,中继设备的标识信息除可以是中继设备的MAC地址、SN、URN以及URI之外,还可以是用于标识中继设备的其它信息。In this embodiment, the identifier information of the relay device may include at least one of a MAC address, an SN, a URN, and a URI of the relay device. The identification information of the relay device is not limited in this embodiment, and the identifier information of the relay device may be other than the MAC address, SN, URN, and URI of the relay device, and may be other for identifying the relay device. information.
本申请实施例中,中继设备在接收到上一跳设备发送的IP报文之后,有两种可能的处理方式。其中,所述上一跳设备为终端设备或不同于接收IP报文的中继设备的其它中继设备。In the embodiment of the present application, after receiving the IP packet sent by the last hop device, the relay device has two possible processing manners. The last hop device is a terminal device or another relay device different from the relay device that receives the IP packet.
一种可能的处理方式中,中继设备接收上一跳设备发送的IP报文,并在IP报文用于插入标识信息的区域中、已经插入上一跳设备的标识信息之后的位置插入中继设备的标识信息,并向网络管理设备转发插入标识信息的IP报文。In a possible processing manner, the relay device receives the IP packet sent by the last hop device, and inserts the location in the area where the IP packet is used to insert the identifier information after the identifier information of the previous hop device has been inserted. Following the identification information of the device, the IP packet inserted with the identification information is forwarded to the network management device.
本申请实施例以下均以网络管理设备为主中继设备为例进行说明。针对图1所示的家庭WLAN网络,以从中继设备2接收手机C发送的IP报文为例进行说明。在上述可能的处理方式中,假设从中继设备2接收到手机C发送的IP报文,在IP报文用于插入标识信息的区域中、已经插入手机C的标识信息之后的位置插入从中继设备2的标识信息,并将插入标识信息之后的IP报文转发至从中继设备1,从中继设备1在IP报文用于插入标识信息的区域中、已经插入从中继设备2的标识信息之后的位置插入从中继设备1的标识信息,并向主中继设备转发插入标识信息的IP报文,以使得主中继设备可接收到顺序插入有终端设备标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息的IP报文,进而根据接收到的IP报文执行图2或图4中的操作。The following takes the network management device as the primary relay device as an example for description. For the home WLAN network shown in FIG. 1 , an IP packet sent by the mobile phone C is received from the relay device 2 as an example. In the above-mentioned possible processing manner, it is assumed that the IP packet sent by the mobile phone C is received from the relay device 2, and the slave relay device is inserted at the position after the identification information of the mobile phone C has been inserted in the area where the IP packet is used for inserting the identification information. Identification information of 2, and forwarding the IP packet after the insertion of the identification information to the slave relay device 1, from the relay device 1 in the area where the IP packet is used to insert the identification information, after the identification information of the slave relay device 2 has been inserted The location inserts the identification information of the slave relay device 1 and forwards the IP packet inserted with the identifier information to the master relay device, so that the master relay device can receive at least one of the terminal device identifier information sequentially inserted and the IP packet sequentially passed. The IP packet corresponding to the identification information of the relay device, and then the operation in FIG. 2 or FIG. 4 is performed according to the received IP packet.
另一种可能的处理方式中,若从中继设备的上一跳设备为终端设备,则该从中继设备接收到终端设备发送的IP报文之后,在IP报文用于插入标识信息的区域中、顺序插入终端设备的标识信息以及该从中继设备的标识信息。通过该种处理方式可避免由于在IP报文传输过程中,插入IP报文中的终端设备的标识信息在IP报文传输过程中发生变化,导致的主中继设备无法识别终端设备的问题。In another possible processing manner, if the last hop device of the relay device is the terminal device, the slave device receives the IP packet sent by the terminal device, and then uses the IP packet for inserting the identifier information. And sequentially inserting the identification information of the terminal device and the identification information of the slave relay device. This type of processing can prevent the problem that the identity information of the terminal device inserted in the IP packet changes during the transmission of the IP packet during the IP packet transmission process, and the primary relay device cannot identify the terminal device.
参阅图5所示,针对图5所示的家庭WLAN网络,以从中继设备2接收手机C发送的IP报文为例进行说明。在上述可能的处理方式中,假设从中继设备2接收到手机C发送的IP报文,在IP报文用于插入标识信息的区域中、顺序插入手机C的标识信息以及从中继设备2的标识信息,并将插入标识信息之后的IP报文转发至从中继设备1,从中继设备1在IP报文用于插入标识信息的区域中、已经插入从中继设备2的 标识信息之后的位置插入从中继设备1的标识信息,并向主中继设备转发插入标识信息的IP报文,以使得主中继设备可接收到顺序插入有终端设备标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息的IP报文,进而根据接收到的IP报文执行图2或图4中的操作。Referring to FIG. 5, for the home WLAN network shown in FIG. 5, an IP packet sent by the mobile phone C is received from the relay device 2 as an example. In the above-mentioned possible processing manner, it is assumed that the IP packet sent by the mobile phone C is received from the relay device 2, and the identification information of the mobile phone C and the identification of the slave relay device 2 are sequentially inserted in the area where the IP packet is used to insert the identification information. Information, and the IP packet after the insertion of the identification information is forwarded to the slave relay device 1, and the slave relay device 1 inserts the location from the location after the identification information of the relay device 2 has been inserted in the area where the IP packet is used to insert the identification information. Following the identification information of the device 1 and forwarding the IP packet inserted with the identification information to the primary relay device, so that the primary relay device can receive the at least one relay device that sequentially inserts the terminal device identification information and the IP packet sequentially passes. The IP packets corresponding to the identification information respectively perform the operations in FIG. 2 or FIG. 4 according to the received IP packets.
需要说明的是,在上述另一种可能的处理方式中,由于与终端设备之间相连的中继设备会在IP报文中插入终端设备的标识信息,终端设备可以插入自身的标识信息,也可以不插入自身的标识信息,本申请不做限定。It should be noted that, in another possible processing manner, the terminal device may insert its own identification information, because the relay device connected to the terminal device inserts the identification information of the terminal device into the IP packet. The identification information of the user may not be inserted, and the application is not limited.
进一步需要说明的是,在上述另一种可能的处理方式中,与终端设备直接相连的中继设备可插入终端设备的标识信息,也可以插入终端设备与该中继设备之间的连接关系,以使得主中继设备能够判断终端设备与其直接相连的中继设备之间的连接关系。It should be further noted that, in another possible processing manner, the relay device directly connected to the terminal device may be inserted into the identification information of the terminal device, and may also be inserted into the connection relationship between the terminal device and the relay device. In order to enable the primary relay device to determine the connection relationship between the terminal device and the relay device directly connected thereto.
本申请实施例中,以下以直接连接终端设备的从中继设备,在IP报文中依次插入终端设备的标识信息以及从中继设备的标识信息为例,对确定网络拓扑图的流程进行说明,参阅图6所示。如图6所示,终端设备发起访问internet或者主中继设备的IP报文,当终端设备发送的IP报文经过网络节点时,判断该网络节点是否为从中继设备,若该网络节点不是从中继设备,则可确定该网络节点为主中继设备,若该网络节点是从中继设备,则进一步判断该从中继设备是否为IP报文经过的第一个从中继设备,若该从中继设备是IP报文经过的第一个从中继设备,则在该IP报文用于插入标识信息的区域依次插入终端设备的标识信息以及该从中继设备的标识信息,若该从中继设备不是IP报文经过的第一个从中继设备,则在该IP报文用于插入标识信息的区域、且已插入IP报文先前经过的设备对应的标识信息之后,插入该从中继设备的标识信息,将插入标识信息之后的IP报文转发至主中继设备,主中继设备解析IP报文,并确定网络拓扑图。In the embodiment of the present application, the following describes the process of determining the network topology map by using the slave device directly connected to the terminal device, inserting the identifier information of the terminal device and the identifier information of the relay device in the IP packet as an example. Figure 6 shows. As shown in FIG. 6, the terminal device initiates an IP packet accessing the Internet or the primary relay device. When the IP packet sent by the terminal device passes through the network node, it determines whether the network node is a secondary relay device, if the network node is not from the network node. The device may determine that the network node is the primary relay device, and if the network node is the secondary relay device, further determine whether the secondary relay device is the first secondary relay device through which the IP packet passes, and if the secondary relay device The first slave relay device that the IP packet passes through, and the identifier information of the terminal device and the identifier information of the slave relay device are sequentially inserted in the area where the IP packet is used to insert the identifier information, if the slave relay device is not an IP packet. After the first slave relay device passes, after the IP packet is used to insert the identifier information, and the identifier information corresponding to the device through which the IP packet has been inserted is inserted, the identifier information of the slave relay device is inserted. The IP packet after the identification information is inserted is forwarded to the primary relay device, and the primary relay device resolves the IP packet and determines the network topology map.
需要说明的是,本申请实施例中从中继设备可在驱动层或者内核层捕获终端设备发送的IP报文,并在驱动层或者内核层中,将捕获到的IP报文中用于插入标识信息的区域中插入从中继设备的标识信息,主中继设备接收到终端设备发送的经所述从中继设备转发的IP报文之后,在主中继设备的驱动层或者内核层解析该IP报文,解析IP报文之后并在主中继设备的应用层确定网络拓扑图,且,解析IP报文之后将插入IP报文的标识信息去除,并将去除标识信息后的IP报文转发至internet。参阅图7所示,以主中继设备以及从中继设备均以路由器为例,对上述过程进行说明,首先对主中继设备以及从中继设备的结构进行描述,主中继设备包括物理层、驱动层、内核层以及应用层,从中继设备包括物理层、驱动层以及内核层,主中继设备与从中继设备的物理层、驱动层以及内核层内部结构类似,其中,在物理层中均包括WIFI接口、局域网(local area network,LAN)1接口、LAN2接口以及广域网(wide area network,WAN)接口,在内核层中包括与物理层中的WIFI接口、LAN1接口、LAN2接口以及WAN接口分别对应的接口,以实现相应的功能,如图7中的wl0.1接口、eth0.1接口、eth0.2接口以及eth1接口,其中,LAN1接口、LAN2接口以及WAN接口为可见的物理接口,在图7中以实线表示,WIFI接口为不可见的虚拟接口,在图7中以虚线表示,WIFI接口用于接收终端设备发送的IP报文,从中继设备通过WAN接口连接主中继设备的LAN1接口或者LAN2接口,图7中以连接LAN1接口为例说明,主中继设备 的WAN接口连接internet。It should be noted that, in the embodiment of the present application, the IP packet sent by the terminal device can be captured from the relay device or the kernel layer, and the captured IP packet is used in the driver layer or the kernel layer to insert the identifier. The identification information of the slave relay device is inserted in the area of the information, and after receiving the IP packet sent by the terminal device and transmitted by the slave relay device, the master relay device parses the IP packet at the driver layer or the kernel layer of the master relay device. After the IP packet is parsed, the network topology map is determined at the application layer of the primary relay device, and after the IP packet is parsed, the identification information of the inserted IP packet is removed, and the IP packet after the identification information is removed is forwarded to the IP packet. Internet. Referring to FIG. 7 , the main relay device and the secondary relay device are both taken as an example to describe the foregoing process. First, the structure of the primary relay device and the secondary relay device is described. The primary relay device includes a physical layer. The driver layer, the kernel layer, and the application layer, the slave relay device includes a physical layer, a driver layer, and a kernel layer, and the primary relay device is similar to the internal structure of the slave device, the physical layer, the driver layer, and the kernel layer, wherein, in the physical layer, The system includes a WIFI interface, a local area network (LAN) 1 interface, a LAN 2 interface, and a wide area network (WAN) interface, and includes a WIFI interface, a LAN1 interface, a LAN2 interface, and a WAN interface in the physical layer respectively. Corresponding interfaces to implement the corresponding functions, such as wl0.1 interface, eth0.1 interface, eth0.2 interface, and eth1 interface in Figure 7, where LAN1 interface, LAN2 interface, and WAN interface are visible physical interfaces. In FIG. 7 , the WIFI interface is an invisible virtual interface, which is indicated by a dotted line in FIG. 7 , and the WIFI interface is used to receive an IP packet sent by the terminal device. The relay apparatus is connected via the WAN interface master relay device LAN1 LAN2 interface or interfaces, LAN1 is connected to the interface to FIG. 7 as an example, the primary relay WAN interface devices connect to the internet.
下面以上述图7中的主中继设备和从中继设备为例,对本申请实施例提供的方法进行说明。当从中继设备通过WIFI接口接收到终端设备发送的IP报文之后,从中继设备在驱动层或者内核层捕获终端设备发送的IP报文,并在驱动层或者内核层中,将捕获到的IP报文中用于插入标识信息的区域中插入从中继设备的标识信息,在另一种可能的实现方式中,当从中继设备通过WIFI接口接收到终端设备发送的IP报文之后,从中继设备在驱动层或者内核层捕获终端设备发送的IP报文,并在驱动层或者内核层中,将捕获到的IP报文中用于插入标识信息的区域中顺序插入终端设备的标识信息以及从中继设备的标识信息,之后通过从中继设备连接主中继设备的WAN接口将插入标识信息的IP报文发送至主中继设备,主中继设备通过连接从中继设备的LAN1接口接收从中继设备转发的插入终端设备标识信息以及从中继设备标识信息的IP报文,主中继设备接收到终端设备发送的经从中继设备转发的IP报文之后,在主中继设备的驱动层或者内核层解析该IP报文,并在主中继设备的应用层确定网络拓扑图,且,解析IP报文之后将插入IP报文的标识信息去除,并将去除标识信息后的IP报文转发至internet,进而可在实现终端设备与internet的交互的同时,确定网络中网络设备的连接关系。The method provided by the embodiment of the present application is described below by using the primary relay device and the secondary relay device in FIG. 7 as an example. After receiving the IP packet sent by the terminal device from the relay device through the WIFI interface, the relay device captures the IP packet sent by the terminal device at the driver layer or the kernel layer, and captures the IP address in the driver layer or the kernel layer. The identifier information of the slave relay device is inserted in the area for inserting the identifier information in the packet. In another possible implementation manner, after receiving the IP packet sent by the terminal device from the relay device through the WIFI interface, the slave relay device The IP packet sent by the terminal device is captured at the driver layer or the kernel layer, and the identification information of the terminal device and the slave relay are sequentially inserted into the area of the captured IP packet for inserting the identification information in the driver layer or the kernel layer. The identification information of the device is then sent to the primary relay device by the WAN interface that connects the primary relay device from the relay device to the primary relay device, and the primary relay device receives the relayed device from the LAN1 interface of the relay device through the connection. Inserting the terminal device identification information and the IP packet from the relay device identification information, and the primary relay device receives the transmission from the terminal device After the IP packet is forwarded from the relay device, the IP packet is parsed at the driver layer or the kernel layer of the master relay device, and the network topology map is determined at the application layer of the master relay device, and after the IP packet is parsed, The identification information of the inserted IP packet is removed, and the IP packet after the identification information is forwarded to the Internet, and the connection relationship between the network device and the network is determined.
本申请实施例中,为提高主中继设备的处理效率、以及节省IP报文的传输时间,可以在终端设备发送的首个IP报文中插入终端设备和从中继设备的标识信息,当然为提高确定网络设备连接关系的可靠性,也可以在终端设备发送的前N(N为大于等于2的正整数)个IP报文中插入终端设备和从中继设备的标识信息,终端设备不需要在发送的所有IP报文中插入终端设备和从中继设备的标识信息,进而可节省IP报文的传输时间。In the embodiment of the present application, in order to improve the processing efficiency of the primary relay device and save the transmission time of the IP packet, the identification information of the terminal device and the secondary relay device may be inserted into the first IP packet sent by the terminal device, of course, To improve the reliability of determining the connection relationship of the network device, the identification information of the terminal device and the secondary relay device may be inserted into the IP packets of the first N (N is a positive integer greater than or equal to 2) sent by the terminal device, and the terminal device does not need to be in the The identification information of the terminal device and the secondary relay device is inserted into all the IP packets sent, thereby saving the transmission time of the IP packets.
其中,N可根据实际应用中对可靠性要求的精度设置。Among them, N can be set according to the accuracy of reliability requirements in practical applications.
需要说明的是,本申请实施例中IP报文用于插入标识信息的区域,可以是IP报文的首部区域,例如,可以是IP报文首部的选项字段,当然,IP报文用于插入标识信息的区域也可以是IP报文的报体,本申请对IP报文用于插入标识信息的区域不做限定。It should be noted that, in the embodiment of the present application, the area in which the IP packet is used to insert the identifier information may be the header area of the IP packet, for example, may be an option field of the IP packet header, and of course, the IP packet is used for insertion. The area of the identifier information may also be a packet of the IP packet. The application does not limit the area in which the IP packet is used to insert the identifier information.
本申请实施例中,IP报文可以是传输控制协议(transmission control protocol,TCP)报文,也可以是用户数据报协议(user datagram protocol,UDP)报文,当然也可以是其它IP报文,本申请不做限定。In the embodiment of the present application, the IP packet may be a transmission control protocol (TCP) packet, or a user datagram protocol (UDP) packet, and may be other IP packets. This application is not limited.
本申请实施例中,在IP报文中插入网络设备(终端设备或中继设备)的标识信息之前,可预先设置用于标识插入格式以及插入长度的字段,具体的,插入格式用于标识插入的是网络设备的标识信息,预先设置的标识插入格式的字段占用一个字节,预先设置的标识插入长度的字段占用一个字节。参阅图8所示,图8中假设IP报文用于插入标识信息的区域为IP报文首部的选项字段。IP选项字段最大可使用40个字节,假设在图8中使用IP选项字段中40个字节,其中选取一个字节用于标识插入格式,选取一个字节用于标识插入长度,剩余的38字节用来插入网络设备的标识信息,假设插入IP报文的标识信息为对应设备的MAC地址,由于每一MAC地址占用6个字节,因此通过在IP首部选项字段中添加网络设备(终端设备或中继设备)的MAC地址, 最多可支持6级组网,参阅图9所示,图9为一个具体的6级组网结构,终端设备连接从中继设备5,可以认为是第一级组网,从中继设备5连接从中继设备4,可以认为是第二级组网,从中继设备4连接从中继设备3,可以认为是第三级组网,从中继设备3连接从中继设备2,可以认为是第四级组网,从中继设备2连接从中继设备1,可以认为是第五级组网,从中继设备1连接主中继设备,可以认为是第六级组网,其中,主中继设备连接internet。若终端设备想要与internet进行交互,可通过从中继设备5、从中继设备4、从中继设备3、从中继设备2、从中继设备1以及主中继设备与internet进行交互,本申请实施例中利用终端设备与internet进行交互时发送IP报文的过程,确定网络中网络设备(终端设备以及中继设备)之间的连接关系,只要终端设备向主中继设备发送IP报文,主中继设备就可以通过IP报文中携带的终端设备的标识信息以及IP报文所经过的从中继设备的标识信息,确定出终端设备与中继设备(主中继设备以及从中继设备)之间的连接关系,可降低确定网络设备连接关系的复杂度,且,由于不需要通过FIB确定网络设备之间的连接关系,故,不存在无法确定完整网络拓扑图的问题。In the embodiment of the present application, before the identifier information of the network device (the terminal device or the relay device) is inserted into the IP packet, a field for identifying the insertion format and the insertion length may be preset. Specifically, the insertion format is used for the identifier insertion. The identification information of the network device, the preset field of the identifier insertion format occupies one byte, and the preset field of the identifier insertion length occupies one byte. Referring to FIG. 8, the area in which the IP packet is used to insert the identification information in FIG. 8 is an option field of the IP packet header. The IP option field can use up to 40 bytes. Assume that 40 bytes in the IP option field are used in Figure 8, where one byte is selected to identify the insertion format, and one byte is used to identify the insertion length. The remaining 38 The byte is used to insert the identification information of the network device. It is assumed that the identification information of the inserted IP packet is the MAC address of the corresponding device. Since each MAC address occupies 6 bytes, the network device is added by adding the network device in the IP header option field. The MAC address of the device or the relay device can support up to 6 levels of networking. See Figure 9 for details. Figure 9 shows a specific 6-level networking structure. The terminal device is connected to the secondary device 5 and can be considered as the first level. The networking is connected from the relay device 5 to the secondary device 4, which can be regarded as a second-level networking. The secondary device is connected to the secondary device 3, and can be regarded as a third-level networking. The secondary device is connected to the secondary device. It can be considered as a fourth-level networking. The relay device 2 is connected to the secondary device 1 and can be regarded as a fifth-level network. The relay device 1 is connected to the primary relay device, which can be regarded as a sixth-level networking. Main Device connection internet. If the terminal device wants to interact with the Internet, the interaction between the relay device 5, the relay device 4, the relay device 3, the relay device 2, the relay device 1, and the primary relay device interacts with the Internet. The process of transmitting an IP packet when the terminal device interacts with the Internet, and determines the connection relationship between the network device (the terminal device and the relay device) in the network, as long as the terminal device sends an IP packet to the primary relay device, the main medium The device can determine the terminal device and the relay device (the primary relay device and the secondary relay device) by using the identification information of the terminal device carried in the IP packet and the identification information of the relay device that the IP packet passes through. The connection relationship can reduce the complexity of determining the connection relationship of the network device, and since there is no need to determine the connection relationship between the network devices through the FIB, there is no problem that the complete network topology map cannot be determined.
基于与方法实施例的同一发明构思,本申请实施例还提供了一种网络管理设备100,网络管理设备100用于实现图2以及图4所述的实施例描述的方法,参阅如图10所示,网络管理设备100包括存储器101、处理器102以及通信接口103。Based on the same inventive concept as the method embodiment, the embodiment of the present application further provides a network management device 100, which is used to implement the method described in the embodiments described in FIG. 2 and FIG. The network management device 100 includes a memory 101, a processor 102, and a communication interface 103.
所述存储器101,用于存储处理器102执行的计算机程序。处理器102,可以是一个中央处理单元(central processing unit,CPU),或者为数字处理单元等等。The memory 101 is configured to store a computer program executed by the processor 102. The processor 102 can be a central processing unit (CPU), or a digital processing unit or the like.
本申请实施例中不限定上述存储器101、处理器102以及通信接口103之间的具体连接介质。本申请实施例在图10中以存储器101、处理器102以及通信接口103之间通过总线104连接,总线104在图10中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线104可以分为地址总线、数据总线、控制总线等。为便于表示,图10中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The specific connection medium between the above-mentioned memory 101, the processor 102, and the communication interface 103 is not limited in the embodiment of the present application. In the embodiment of the present application, the memory 101, the processor 102, and the communication interface 103 are connected by a bus 104 in FIG. 10. The bus 104 is indicated by a thick line in FIG. 10, and the connection manner between other components is only illustrative. The description is not limited. The bus 104 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in FIG. 10, but it does not mean that there is only one bus or one type of bus.
存储器101可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器101也可以是非易失性存储器(non-volatile memory),例如只读存储器,快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)、或者存储器101是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器101可以是上述存储器的组合。The memory 101 may be a volatile memory such as a random-access memory (RAM); the memory 101 may also be a non-volatile memory such as a read only memory, flashing A flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or a memory 101 is a program code that can be used to carry or store a desired program or data structure and can be Any other medium accessed by the computer, but is not limited to this. The memory 101 can be a combination of the above memories.
处理器102以及通信接口103,用于实现如图2所示的确定网络设备连接关系的方法,包括:The processor 102 and the communication interface 103 are configured to implement a method for determining a connection relationship of a network device as shown in FIG. 2, including:
所述通信接口103,用于接收终端设备发送的IP报文,IP报文是经至少一个中继设备转发至所述通信接口103的IP报文、且IP报文中顺序插入有终端设备的标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息。The communication interface 103 is configured to receive an IP packet sent by the terminal device, where the IP packet is an IP packet that is forwarded to the communication interface 103 by the at least one relay device, and the terminal device is sequentially inserted into the IP packet. The identification information and the identification information corresponding to the at least one relay device that the IP packet passes in sequence.
所述处理器102,用于调用所述存储器101中存储的计算机程序执行:解析所述IP报文,得到顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息,根据顺序排列的端设备的标识信息以及至少一个中继设备分别对应的标识信息, 确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。The processor 102 is configured to invoke the computer program stored in the memory 101 to perform: parsing the IP packet, and obtaining identification information of the sequentially arranged terminal device and identification information corresponding to the at least one relay device respectively, according to the sequence. Determining the connection relationship between the terminal device and the at least one relay device, determining the connection relationship between the terminal device and the identification information corresponding to the at least one relay device, and determining the at least one relay device and the The connection between network management devices.
在一种可能的实现方式中,所述处理器102根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系时,具体用于:In a possible implementation, the processor 102 determines the terminal device and the at least one according to the identification information of the terminal device and the identification information corresponding to the at least one relay device. Following the connection relationship between devices, it is specifically used to:
根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序;将所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序,确定为所述终端设备与所述至少一个中继设备的连接顺序,并根据所述连接顺序确定所述终端设备以及所述至少一个中继设备之间的连接关系。Determining, according to the identification information of the terminal device and the identification information corresponding to the at least one relay device, the sequence of the IP packet passing through the terminal device and the at least one relay device; Determining, by the sequence of the terminal device and the at least one relay device, an order of connection between the terminal device and the at least one relay device, and determining the terminal device according to the connection sequence Determining a connection relationship between at least one relay device.
在一种可能的实现方式中,所述处理器102确定所述至少一个中继设备以及所述网络管理设备之间的连接关系时,具体用于:In a possible implementation, when the processor 102 determines the connection relationship between the at least one relay device and the network management device, specifically, the:
根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文在被发送至所述网络管理设备时所经过的最后一个中继设备;将所述最后一个中继设备,确定为与所述网络管理设备直接相连的中继设备,并根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。Determining, according to the identification information of the terminal device and the identification information corresponding to the at least one relay device, the last relay device that the IP packet passes when being sent to the network management device; Determining, as the relay device directly connected to the network management device, the last relay device, and determining the network management device and the at least one according to a relay device directly connected to the network management device The connection relationship between relay devices.
在一种可能的实现方式中,所述处理器102确定所述至少一个中继设备以及所述网络管理设备之间的连接关系时,具体用于:In a possible implementation, when the processor 102 determines the connection relationship between the at least one relay device and the network management device, specifically, the:
根据预先设置的对应关系以及所述至少一个中继设备分别对应的标识信息,确定与所述网络管理设备直接相连的中继设备;根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。Determining, according to the preset correspondence relationship and the identification information corresponding to the at least one relay device, a relay device directly connected to the network management device; determining, according to the relay device directly connected to the network management device A connection relationship between the network management device and the at least one relay device.
其中,所述预先设置的对应关系中包括,与所述网络管理设备直接相连的中继设备的标识信息与所述网络管理设备的标识信息之间的对应关系。The pre-set correspondence includes a correspondence between the identifier information of the relay device directly connected to the network management device and the identifier information of the network management device.
在一种可能的实现方式中,所述终端设备的标识信息包括所述终端设备的MAC地址、SN、URN以及URI中的至少一个。In a possible implementation manner, the identifier information of the terminal device includes at least one of a MAC address, an SN, a URN, and a URI of the terminal device.
在一种可能的实现方式中,所述中继设备的标识信息包括所述中继设备的MAC地址、SN、URN以及URI中的至少一个。In a possible implementation manner, the identifier information of the relay device includes at least one of a MAC address, an SN, a URN, and a URI of the relay device.
在一种可能的实现方式中,所述IP报文为所述终端设备发送的首个IP报文。In a possible implementation, the IP packet is the first IP packet sent by the terminal device.
基于与方法实施例的同一发明构思,本申请实施例还提供了一种中继设备200,中继设备200用于实现图2以及图4所述的实施例描述的方法,参阅如图11所示,中继设备200包括存储器201、处理器202以及通信接口203。Based on the same inventive concept as the method embodiment, the embodiment of the present application further provides a relay device 200, which is used to implement the method described in the embodiment described in FIG. 2 and FIG. The relay device 200 includes a memory 201, a processor 202, and a communication interface 203.
所述存储器201,用于存储处理器202执行的计算机程序。处理器202,可以是一个中央处理单元(central processing unit,CPU),或者为数字处理单元等等。The memory 201 is configured to store a computer program executed by the processor 202. The processor 202 can be a central processing unit (CPU), or a digital processing unit or the like.
本申请实施例中不限定上述存储器201、处理器202以及通信接口203之间的具体连接介质。本申请实施例在图11中以存储器201、处理器202以及通信接口203之间通过总线204连接,总线204在图11中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线204可以分为地址总线、数据总线、控制总线等。为便于表示,图11中仅用一条粗线表示,但并不表示仅有一根总线或一种 类型的总线。The specific connection medium between the above-mentioned memory 201, the processor 202, and the communication interface 203 is not limited in the embodiment of the present application. In the embodiment of the present application, the memory 201, the processor 202, and the communication interface 203 are connected by a bus 204 in FIG. 11. The bus 204 is indicated by a thick line in FIG. 11, and the connection manner between other components is only illustrative. The description is not limited. The bus 204 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 11, but it does not mean that there is only one bus or one type of bus.
存储器201可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器201也可以是非易失性存储器(non-volatile memory),例如只读存储器,快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)、或者存储器201是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器201可以是上述存储器的组合。The memory 201 may be a volatile memory, such as a random-access memory (RAM); the memory 201 may also be a non-volatile memory, such as a read-only memory, flashing A flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or a memory 201 is a program code that can be used to carry or store a desired program or data structure and can be Any other medium accessed by the computer, but is not limited to this. The memory 201 may be a combination of the above memories.
处理器202以及通信接口203,用于实现如图2所示的确定网络设备连接关系的方法,包括:The processor 202 and the communication interface 203 are used to implement the method for determining the connection relationship of the network device as shown in FIG. 2, including:
所述通信接口203,用于接收上一跳设备发送的IP报文。The communication interface 203 is configured to receive an IP packet sent by the last hop device.
所述处理器202,用于调用所述存储器201中存储的计算机程序执行:在所述IP报文用于插入标识信息的区域中、已经插入所述上一跳设备的标识信息之后的位置插入所述中继设备的标识信息。The processor 202 is configured to invoke a computer program stored in the memory 201 to perform: insertion in a location after the identification information of the previous hop device has been inserted in an area where the IP packet is used to insert the identification information. Identification information of the relay device.
所述通信接口203,还用于向网络管理设备转发插入标识信息的IP报文。The communication interface 203 is further configured to forward an IP packet inserted with the identifier information to the network management device.
其中,所述上一跳设备为终端设备或不同于所述中继设备的其它中继设备。The last hop device is a terminal device or other relay device different from the relay device.
在一种可能的实现方式中,若所述上一跳设备为终端设备,则所述处理器202还用于:In a possible implementation, if the last hop device is a terminal device, the processor 202 is further configured to:
在所述通信接口203接收到终端设备发送的IP报文之后,在所述IP报文用于插入标识信息的区域中、顺序插入所述终端设备的标识信息以及所述中继设备的标识信息。After the communication interface 203 receives the IP packet sent by the terminal device, the identifier information of the terminal device and the identifier information of the relay device are sequentially inserted in an area where the IP packet is used to insert the identifier information. .
基于与方法实施例的同一发明构思,本申请实施例还提供了一种终端设备300,终端设备300用于实现图2以及图4所述的实施例描述的方法,参阅如图12所示,终端设备300包括存储器301、处理器302、通信接口303以及显示屏幕304。Based on the same inventive concept as the method embodiment, the embodiment of the present application further provides a terminal device 300, which is used to implement the method described in the embodiment of FIG. 2 and FIG. 4, as shown in FIG. The terminal device 300 includes a memory 301, a processor 302, a communication interface 303, and a display screen 304.
所述存储器301,用于存储处理器302执行的计算机程序。处理器302,可以是一个中央处理单元(central processing unit,CPU),或者为数字处理单元等等。The memory 301 is configured to store a computer program executed by the processor 302. The processor 302 can be a central processing unit (CPU), or a digital processing unit or the like.
本申请实施例中不限定上述存储器301、处理器302以及通信接口303之间的具体连接介质。本申请实施例在图12中以存储器301、处理器302、通信接口303以及显示屏幕304之间通过总线305连接,总线305在图12中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线305可以分为地址总线、数据总线、控制总线等。为便于表示,图12中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The specific connection medium between the foregoing memory 301, the processor 302, and the communication interface 303 is not limited in the embodiment of the present application. In the embodiment of the present application, the memory 301, the processor 302, the communication interface 303, and the display screen 304 are connected by a bus 305 in FIG. 12, and the bus 305 is indicated by a thick line in FIG. 12, and the connection manner between other components is only It is intended to be illustrative and not limited. The bus 305 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 12, but it does not mean that there is only one bus or one type of bus.
存储器301可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器301也可以是非易失性存储器(non-volatile memory),例如只读存储器,快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)、或者存储器301是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器301可以是上述存储器的组合。The memory 301 may be a volatile memory, such as a random-access memory (RAM); the memory 301 may also be a non-volatile memory, such as a read-only memory, flashing A flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or a memory 301 is a program code that can be used to carry or store a desired program or data structure and can be Any other medium accessed by the computer, but is not limited to this. The memory 301 can be a combination of the above memories.
显示屏幕304可以采用液晶显示器(liquid crystal display,LCD)或OLED(organic light-emitting diode,有机发光二极管)等形式来配置。The display screen 304 can be configured in the form of a liquid crystal display (LCD) or an OLED (organic light-emitting diode).
存储器301、处理器302、通信接口303以及显示屏幕304,用于实现如图2所示的确定网络设备连接关系的方法,包括:The memory 301, the processor 302, the communication interface 303, and the display screen 304 are used to implement the method for determining the connection relationship of the network device as shown in FIG. 2, including:
所述存储器301存储有计算机程序;The memory 301 stores a computer program;
所述通信接口303,用于接收网络管理设备确定的所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系。The communication interface 303 is configured to receive a connection relationship between the terminal device and the at least one relay device determined by the network management device, a connection relationship between the at least one relay device, and the network management device .
所述处理器302,用于根据接收到的所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系,确定网络拓扑图。The processor 302 is configured to determine, according to the received connection relationship between the terminal device and the at least one relay device, the connection relationship between the at least one relay device, and the network management device, Network topology diagram.
其中,所述网络拓扑图包括所述至少一个中继设备、所述终端设备以及所述网络管理设备之间的互连信息。The network topology diagram includes interconnection information between the at least one relay device, the terminal device, and the network management device.
所述显示屏幕304,用于显示所述网络拓扑图。The display screen 304 is configured to display the network topology map.
基于与方法实施例的同一发明构思,本申请实施例还提供了一种网络管理设备400,网络管理设备400用于实现图2以及图4所述的实施例描述的方法,参阅如图13所示,网络管理设备400包括接收模块401以及处理模块402。Based on the same inventive concept as the method embodiment, the embodiment of the present application further provides a network management device 400, which is used to implement the method described in the embodiments described in FIG. 2 and FIG. The network management device 400 includes a receiving module 401 and a processing module 402.
所述接收模块401,用于接收终端设备发送的互联网协议IP报文,所述IP报文是经至少一个中继设备转发至所述网络管理设备的IP报文、且所述IP报文中顺序插入有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的标识信息。The receiving module 401 is configured to receive an Internet Protocol (IP) packet sent by the terminal device, where the IP packet is an IP packet that is forwarded to the network management device by the at least one relay device, and the IP packet is in the IP packet. The identification information of the terminal device and the identification information corresponding to the at least one relay device that the IP packet passes in sequence are sequentially inserted.
所述处理模块402,用于解析所述接收模块401接收到的所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,并根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。The processing module 402 is configured to parse the IP packet received by the receiving module 401, and obtain the identification information of the terminal device and the identifier information corresponding to the at least one relay device, and according to the Determining a connection relationship between the terminal device and the at least one relay device, and determining the at least one of the identification information of the terminal device and the identification information corresponding to the at least one relay device A connection relationship between the device and the network management device.
在一种可能的实现方式中,所述处理模块402根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系时,具体用于:In a possible implementation, the processing module 402 determines the terminal device and the at least one according to the identification information of the terminal device and the identification information corresponding to the at least one relay device. Following the connection relationship between devices, it is specifically used to:
根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序;将所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序,确定为所述终端设备与所述至少一个中继设备的连接顺序,并根据所述连接顺序确定所述终端设备以及所述至少一个中继设备之间的连接关系。Determining, according to the identification information of the terminal device and the identification information corresponding to the at least one relay device, the sequence of the IP packet passing through the terminal device and the at least one relay device; Determining, by the sequence of the terminal device and the at least one relay device, an order of connection between the terminal device and the at least one relay device, and determining the terminal device according to the connection sequence Determining a connection relationship between at least one relay device.
在一种可能的实现方式中,所述处理模块402确定所述至少一个中继设备以及所述网络管理设备之间的连接关系时,具体用于:In a possible implementation manner, when the processing module 402 determines the connection relationship between the at least one relay device and the network management device, specifically:
根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文在被发送至所述网络管理设备时所经过的最后一个中继设备;将所述最后一个中继设备,确定为与所述网络管理设备直接相连的中继设备,并根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。Determining, according to the identification information of the terminal device and the identification information corresponding to the at least one relay device, the last relay device that the IP packet passes when being sent to the network management device; Determining, as the relay device directly connected to the network management device, the last relay device, and determining the network management device and the at least one according to a relay device directly connected to the network management device The connection relationship between relay devices.
在一种可能的实现方式中,所述处理模块402确定所述至少一个中继设备以及所述网络管理设备之间的连接关系时,具体用于:In a possible implementation manner, when the processing module 402 determines the connection relationship between the at least one relay device and the network management device, specifically:
根据预先设置的对应关系以及所述至少一个中继设备分别对应的标识信息,确定与所述网络管理设备直接相连的中继设备;根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。Determining, according to the preset correspondence relationship and the identification information corresponding to the at least one relay device, a relay device directly connected to the network management device; determining, according to the relay device directly connected to the network management device A connection relationship between the network management device and the at least one relay device.
其中,所述预先设置的对应关系中包括,与所述网络管理设备直接相连的中继设备的标识信息与所述网络管理设备的标识信息之间的对应关系。The pre-set correspondence includes a correspondence between the identifier information of the relay device directly connected to the network management device and the identifier information of the network management device.
在一种可能的实现方式中,所述终端设备的标识信息包括所述终端设备的MAC地址、SN、URN以及URI中的至少一个。In a possible implementation manner, the identifier information of the terminal device includes at least one of a MAC address, an SN, a URN, and a URI of the terminal device.
在一种可能的实现方式中,所述中继设备的标识信息包括所述中继设备的MAC地址、SN、URN以及URI中的至少一个。In a possible implementation manner, the identifier information of the relay device includes at least one of a MAC address, an SN, a URN, and a URI of the relay device.
在一种可能的实现方式中,所述IP报文为所述终端设备发送的首个IP报文。In a possible implementation, the IP packet is the first IP packet sent by the terminal device.
本发明实施例还提供了一种在网络管理设备中使用的芯片,包括通信接口和处理器;An embodiment of the present invention further provides a chip used in a network management device, including a communication interface and a processor;
所述通信接口,用于接收终端设备发送的互联网协议IP报文,所述IP报文是经至少一个中继设备转发至所述网络管理设备的IP报文、且所述IP报文中顺序插入有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的标识信息;所述处理器,用于解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,并根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。The communication interface is configured to receive an Internet Protocol (IP) packet sent by the terminal device, where the IP packet is an IP packet that is forwarded to the network management device by the at least one relay device, and the IP packet is in the sequence The identifier information of the terminal device and the identification information corresponding to the at least one relay device that the IP packet passes in sequence; the processor is configured to parse the IP packet, and obtain the terminal arranged in sequence And the identification information of the device and the identification information corresponding to the at least one relay device, and determining the terminal device according to the identification information of the terminal device and the identification information corresponding to the at least one relay device. a connection relationship between the at least one relay device, and determining a connection relationship between the at least one relay device and the network management device.
本发明实施例还提供了一种确定网络设备连接关系的系统,包括中继设备、网络管理设备以及终端设备;The embodiment of the invention further provides a system for determining a connection relationship of a network device, including a relay device, a network management device, and a terminal device;
所述中继设备,用于接收上一跳设备发送的互联网协议IP报文,在所述IP报文用于插入标识信息的区域中、已经插入所述上一跳设备的标识信息之后的位置插入所述中继设备的标识信息,并向网络管理设备转发插入标识信息的IP报文,其中,所述上一跳设备为所述终端设备或不同于所述中继设备的其它中继设备;所述网络管理设备,用于接收所述插入标识信息的IP报文,解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系;所述终端设备用于接收所述网络管理设备确定的所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系,确定并显示网络拓扑图,所述网络拓扑图包括所述至少一个中继设备、所述终端设备以及所述网络管理设备之间的互连信息。The relay device is configured to receive an Internet Protocol IP packet sent by the last hop device, where the IP packet is used to insert the identifier information, and the location after the identifier information of the previous hop device has been inserted Inserting the identification information of the relay device, and forwarding the IP packet inserted with the identifier information to the network management device, where the last hop device is the terminal device or other relay device different from the relay device The network management device is configured to receive the IP packet with the inserted identifier information, parse the IP packet, and obtain the identifier information of the terminal device and the identifier corresponding to the at least one relay device. And determining, according to the identification information of the terminal device and the identification information corresponding to the at least one relay device, the connection relationship between the terminal device and the at least one relay device, and determining the a connection relationship between the at least one relay device and the network management device; the terminal device is configured to receive the end determined by the network management device Determining and displaying a network topology map, the network topology map including the connection relationship between the end device and the at least one relay device, the connection relationship between the at least one relay device, and the network management device Interconnection information between at least one relay device, the terminal device, and the network management device.
本发明实施例还提供了一种计算机可读存储介质,存储为执行上述处理器所需执行的计算机软件指令,其包含用于执行上述处理器所需执行的程序。The embodiment of the invention further provides a computer readable storage medium, which is stored as computer software instructions for executing the above-mentioned processor, and includes a program for executing the above-mentioned processor.
本申请实施例中还提供了一种计算机程序产品,所述计算机程序产品中存储有指 令,当其在计算机上运行时,使得计算机执行上述第一方面或上述第一方面的任意一种可能的设计中所述的方法。Also provided in the embodiment of the present application is a computer program product, where the computer program product stores instructions, when executed on a computer, causing the computer to perform any of the above first aspects or any of the above first aspects. The method described in the design.
综上所述,本申请实施例提供了一种确定网络设备连接关系的方法、设备及系统,通过上述方法,只要终端设备向网络管理设备发送IP报文,网络管理设备就可以通过IP报文中携带的终端设备的标识信息以及IP报文所经过的中继设备的标识信息,确定出终端设备与中继设备之间的连接关系。相比现有技术,本申请提供的确定网络设备连接关系的方法,网络管理设备不需要额外获取终端设备和中继设备的FIB,通过在终端设备发送的IP报文中插入标识信息,即可确定出网络设备的连接关系,可降低确定网络设备连接关系的复杂度,且,也不需要通过FIB确定网络设备之间的连接关系,故,不存在由于通过FIB信息只能获取部分网络设备的信息,导致无法确定完整网络拓扑图的问题。In summary, the embodiment of the present application provides a method, a device, and a system for determining a connection relationship of a network device. The network management device can pass an IP packet as long as the terminal device sends an IP packet to the network management device. The identification information of the terminal device carried in the terminal device and the identification information of the relay device that the IP packet passes through determine the connection relationship between the terminal device and the relay device. Compared with the prior art, the method for determining the connection relationship of the network device provided by the application, the network management device does not need to obtain the FIB of the terminal device and the relay device, and inserts the identifier information into the IP packet sent by the terminal device. The connection relationship of the network device is determined, the complexity of determining the connection relationship of the network device is reduced, and the connection relationship between the network devices is not determined by the FIB. Therefore, there is no part of the network device that can only be obtained through the FIB information. Information that caused the problem of not being able to determine the complete network topology map.
本领域内的技术人员应明白,本申请实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system, or computer program product. Thus, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware. Moreover, the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
尽管已描述了本申请中一些可能的实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括本申请实施例以及落入本申请范围的所有变更和修改。Although some of the possible embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to the embodiments once they become aware of the basic inventive concept. Therefore, the appended claims are intended to be interpreted as including the embodiment of the invention, and all modifications and variations falling within the scope of the application.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。It will be apparent to those skilled in the art that various modifications and changes can be made in the present application without departing from the spirit and scope of the application. Thus, it is intended that the present invention cover the modifications and variations of the present invention.

Claims (24)

  1. 一种确定网络设备连接关系的方法,其特征在于,包括:A method for determining a connection relationship of a network device, comprising:
    网络管理设备接收终端设备发送的互联网协议IP报文,所述IP报文是经至少一个中继设备转发至所述网络管理设备的IP报文、且所述IP报文中顺序插入有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的标识信息;The network management device receives an Internet Protocol (IP) packet sent by the terminal device, where the IP packet is an IP packet that is forwarded to the network management device by the at least one relay device, and the IP packet is sequentially inserted into the IP packet. The identification information of the terminal device and the identification information corresponding to the at least one relay device that the IP packet passes in sequence;
    所述网络管理设备解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息;The network management device parses the IP packet, and obtains the identification information of the terminal device and the identifier information corresponding to the at least one relay device.
    所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。Determining, by the network management device, the connection relationship between the terminal device and the at least one relay device according to the identification information of the terminal device and the identification information corresponding to the at least one relay device. Determining a connection relationship between the at least one relay device and the network management device.
  2. 如权利要求1所述的方法,其特征在于,所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,包括:The method according to claim 1, wherein the network management device determines the terminal device and the device according to the identification information of the terminal device and the identification information corresponding to the at least one relay device. The connection relationship between the at least one relay device includes:
    所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序;Determining, by the network management device, that the IP packet passes the terminal device and the at least one relay device according to the identification information of the terminal device and the identification information corresponding to the at least one relay device. order;
    所述网络管理设备将所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序,确定为所述终端设备与所述至少一个中继设备的连接顺序,并根据所述连接顺序确定所述终端设备以及所述至少一个中继设备之间的连接关系。Determining, by the network management device, the sequence of the IP packet passing the terminal device and the at least one relay device as a connection sequence of the terminal device and the at least one relay device, and according to the connection The connection relationship between the terminal device and the at least one relay device is determined in sequence.
  3. 如权利要求1或2所述的方法,其特征在于,确定所述至少一个中继设备以及所述网络管理设备之间的连接关系,包括:The method of claim 1 or 2, wherein determining the connection relationship between the at least one relay device and the network management device comprises:
    所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文在被发送至所述网络管理设备时所经过的最后一个中继设备;Determining, by the network management device, the last of the IP packets sent to the network management device, according to the identification information of the terminal device and the identification information corresponding to the at least one relay device. a relay device;
    所述网络管理设备将所述最后一个中继设备,确定为与所述网络管理设备直接相连的中继设备,并根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。Determining, by the network management device, the last relay device as a relay device directly connected to the network management device, and determining the network management device according to a relay device directly connected to the network management device And a connection relationship between the at least one relay device.
  4. 如权利要求1或2所述的方法,其特征在于,确定所述至少一个中继设备以及所述网络管理设备之间的连接关系,包括:The method of claim 1 or 2, wherein determining the connection relationship between the at least one relay device and the network management device comprises:
    所述网络管理设备根据预先设置的对应关系以及所述至少一个中继设备分别对应的标识信息,确定与所述网络管理设备直接相连的中继设备;Determining, by the network management device, a relay device directly connected to the network management device according to a preset correspondence relationship and identifier information corresponding to the at least one relay device respectively;
    其中,所述预先设置的对应关系中包括,与所述网络管理设备直接相连的中继设备的标识信息与所述网络管理设备的标识信息之间的对应关系;The pre-set correspondence includes a correspondence between the identifier information of the relay device directly connected to the network management device and the identifier information of the network management device.
    所述网络管理设备根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。The network management device determines a connection relationship between the network management device and the at least one relay device according to a relay device directly connected to the network management device.
  5. 如权利要求1至4任一项所述的方法,其特征在于,所述终端设备的标识信息包括所述终端设备的介质访问控制MAC地址、序列号SN、统一资源名称URN以及 统一资源标识符URI中的至少一个。The method according to any one of claims 1 to 4, wherein the identification information of the terminal device comprises a media access control MAC address, a serial number SN, a uniform resource name URN, and a uniform resource identifier of the terminal device. At least one of the URIs.
  6. 如权利要求1至5任一项所述的方法,其特征在于,所述中继设备的标识信息包括所述中继设备的介质访问控制MAC地址、序列号SN、统一资源名称URN以及统一资源标识符URI中的至少一个。The method according to any one of claims 1 to 5, wherein the identification information of the relay device comprises a medium access control MAC address, a serial number SN, a uniform resource name URN, and a unified resource of the relay device. At least one of the identifier URIs.
  7. 如权利要求1至6任一项所述的方法,其特征在于,所述IP报文为所述终端设备发送的首个IP报文。The method according to any one of claims 1 to 6, wherein the IP packet is the first IP packet sent by the terminal device.
  8. 一种确定网络设备连接关系的方法,其特征在于,包括:A method for determining a connection relationship of a network device, comprising:
    中继设备接收上一跳设备发送的互联网协议IP报文,并在所述IP报文用于插入标识信息的区域中、已经插入所述上一跳设备的标识信息之后的位置插入所述中继设备的标识信息;The relay device receives the Internet Protocol IP packet sent by the last hop device, and inserts the location in the area where the IP packet is used to insert the identifier information after the identifier information of the previous hop device has been inserted. Following the identification information of the device;
    所述中继设备向网络管理设备转发插入标识信息的IP报文;Transmitting, by the relay device, an IP packet inserted with the identifier information to the network management device;
    其中,所述上一跳设备为终端设备或不同于所述中继设备的其它中继设备。The last hop device is a terminal device or other relay device different from the relay device.
  9. 如权利要求8所述的方法,其特征在于,若所述上一跳设备为终端设备,则所述中继设备接收到终端设备发送的IP报文之后,还包括:The method according to claim 8, wherein, if the last hop device is a terminal device, after the relay device receives the IP packet sent by the terminal device, the method further includes:
    所述中继设备在所述IP报文用于插入标识信息的区域中、顺序插入所述终端设备的标识信息以及所述中继设备的标识信息。The relay device inserts the identification information of the terminal device and the identification information of the relay device in an area in which the IP packet is used to insert the identification information.
  10. 一种网络管理设备,其特征在于,包括处理器、存储器和通信接口;A network management device, comprising: a processor, a memory, and a communication interface;
    所述存储器存储有计算机程序;The memory stores a computer program;
    所述通信接口,用于接收终端设备发送的互联网协议IP报文,所述IP报文是经至少一个中继设备转发至所述通信接口的IP报文、且所述IP报文中顺序插入有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的标识信息;The communication interface is configured to receive an Internet Protocol (IP) packet sent by the terminal device, where the IP packet is an IP packet that is forwarded to the communication interface by the at least one relay device, and the IP packet is sequentially inserted. And the identifier information of the terminal device and the identifier information corresponding to the at least one relay device that the IP packet passes in sequence;
    所述处理器,用于调用所述存储器中存储的计算机程序执行:The processor is configured to invoke a computer program stored in the memory to execute:
    解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。Parsing the IP packet, and obtaining the identification information of the terminal device and the identification information corresponding to the at least one relay device, the identification information of the terminal device and the at least one relay according to the order Determining a connection relationship between the terminal device and the at least one relay device, and determining a connection relationship between the at least one relay device and the network management device.
  11. 如权利要求10所述的网络管理设备,其特征在于,所述处理器根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系时,具体用于:The network management device according to claim 10, wherein the processor determines the terminal device according to the identification information of the terminal device and the identification information corresponding to the at least one relay device. When the connection relationship between the at least one relay device is specifically used to:
    根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序;Determining an order in which the IP packet passes the terminal device and the at least one relay device according to the identification information of the terminal device and the identification information corresponding to the at least one relay device;
    将所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序,确定为所述终端设备与所述至少一个中继设备的连接顺序,并根据所述连接顺序确定所述终端设备以及所述至少一个中继设备之间的连接关系。Determining, by the sequence of the IP packet, the terminal device and the at least one relay device, a connection sequence of the terminal device and the at least one relay device, and determining the terminal according to the connection sequence A connection relationship between the device and the at least one relay device.
  12. 如权利要求10或11所述的网络管理设备,其特征在于,所述处理器确定所述至少一个中继设备以及所述网络管理设备之间的连接关系时,具体用于:The network management device according to claim 10 or 11, wherein when the processor determines the connection relationship between the at least one relay device and the network management device, the method is specifically configured to:
    根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文在被发送至所述网络管理设备时所经过的最后一个中继设 备;Determining, according to the identification information of the terminal device and the identification information corresponding to the at least one relay device, the last relay device that the IP packet passes when being sent to the network management device;
    将所述最后一个中继设备,确定为与所述网络管理设备直接相连的中继设备,并根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。Determining, as the relay device directly connected to the network management device, the last relay device, and determining the network management device and the at least one according to a relay device directly connected to the network management device The connection relationship between relay devices.
  13. 如权利要求10或11所述的网络管理设备,其特征在于,所述处理器确定所述至少一个中继设备以及所述网络管理设备之间的连接关系时,具体用于:The network management device according to claim 10 or 11, wherein when the processor determines the connection relationship between the at least one relay device and the network management device, the method is specifically configured to:
    根据预先设置的对应关系以及所述至少一个中继设备分别对应的标识信息,确定与所述网络管理设备直接相连的中继设备;Determining, according to the preset correspondence relationship and the identification information corresponding to the at least one relay device, the relay device directly connected to the network management device;
    其中,所述预先设置的对应关系中包括,与所述网络管理设备直接相连的中继设备的标识信息与所述网络管理设备的标识信息之间的对应关系;The pre-set correspondence includes a correspondence between the identifier information of the relay device directly connected to the network management device and the identifier information of the network management device.
    根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。And determining, according to the relay device directly connected to the network management device, a connection relationship between the network management device and the at least one relay device.
  14. 如权利要求10至13任一项所述的网络管理设备,其特征在于,所述终端设备的标识信息包括所述终端设备的介质访问控制MAC地址、序列号SN、统一资源名称URN以及统一资源标识符URI中的至少一个。The network management device according to any one of claims 10 to 13, wherein the identification information of the terminal device comprises a media access control MAC address, a serial number SN, a uniform resource name URN, and a unified resource of the terminal device. At least one of the identifier URIs.
  15. 如权利要求10至14任一项所述的网络管理设备,其特征在于,所述中继设备的标识信息包括所述中继设备的介质访问控制MAC地址、序列号SN、统一资源名称URN以及统一资源标识符URI中的至少一个。The network management device according to any one of claims 10 to 14, wherein the identification information of the relay device comprises a media access control MAC address, a serial number SN, a uniform resource name URN of the relay device, and At least one of the uniform resource identifier URIs.
  16. 如权利要求10至15任一项所述的网络管理设备,其特征在于,所述IP报文为所述终端设备发送的首个IP报文。The network management device according to any one of claims 10 to 15, wherein the IP packet is the first IP packet sent by the terminal device.
  17. 一种中继设备,其特征在于,包括处理器、存储器和通信接口;A relay device, comprising: a processor, a memory, and a communication interface;
    所述存储器存储有计算机程序;The memory stores a computer program;
    所述通信接口,用于接收上一跳设备发送的互联网协议IP报文;The communication interface is configured to receive an Internet Protocol IP packet sent by the last hop device;
    所述处理器,用于调用所述存储器中存储的计算机程序执行:The processor is configured to invoke a computer program stored in the memory to execute:
    在所述IP报文用于插入标识信息的区域中、已经插入所述上一跳设备的标识信息之后的位置插入所述中继设备的标识信息;Inserting the identification information of the relay device in a location after the identifier information of the previous hop device has been inserted into the area where the IP packet is used to insert the identifier information;
    所述通信接口,还用于向网络管理设备转发插入标识信息的IP报文;The communication interface is further configured to forward an IP packet inserted with the identifier information to the network management device;
    其中,所述上一跳设备为终端设备或不同于所述中继设备的其它中继设备。The last hop device is a terminal device or other relay device different from the relay device.
  18. 如权利要求17所述的中继设备,其特征在于,若所述上一跳设备为终端设备,则所述处理器还用于:The relay device according to claim 17, wherein if the last hop device is a terminal device, the processor is further configured to:
    在所述通信接口接收到终端设备发送的IP报文之后,在所述IP报文用于插入标识信息的区域中、顺序插入所述终端设备的标识信息以及所述中继设备的标识信息。After the communication interface receives the IP packet sent by the terminal device, the identifier information of the terminal device and the identifier information of the relay device are sequentially inserted in an area where the IP packet is used to insert the identifier information.
  19. 一种终端设备,其特征在于,包括处理器、存储器、通信接口以及显示屏幕;A terminal device, comprising: a processor, a memory, a communication interface, and a display screen;
    所述存储器存储有计算机程序;The memory stores a computer program;
    所述通信接口,用于接收基于权利要求10至16任一项所述的网络管理设备确定的所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系;The communication interface, configured to receive a connection relationship between the terminal device and the at least one relay device determined by the network management device according to any one of claims 10 to 16, the at least one relay device And a connection relationship between the network management devices;
    所述处理器,用于根据接收到的所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系,确定网络 拓扑图,所述网络拓扑图包括所述至少一个中继设备、所述终端设备以及所述网络管理设备之间的互连信息;The processor is configured to determine a network according to the received connection relationship between the terminal device and the at least one relay device, the connection relationship between the at least one relay device, and the network management device a topology map, where the network topology diagram includes interconnection information between the at least one relay device, the terminal device, and the network management device;
    所述显示屏幕,用于显示所述网络拓扑图。The display screen is configured to display the network topology map.
  20. 一种确定网络设备连接关系的系统,其特征在于,包括中继设备、网络管理设备以及终端设备;A system for determining a connection relationship of a network device, comprising: a relay device, a network management device, and a terminal device;
    所述中继设备,用于接收上一跳设备发送的互联网协议IP报文,在所述IP报文用于插入标识信息的区域中、已经插入所述上一跳设备的标识信息之后的位置插入所述中继设备的标识信息,并向网络管理设备转发插入标识信息的IP报文,其中,所述上一跳设备为所述终端设备或不同于所述中继设备的其它中继设备;The relay device is configured to receive an Internet Protocol IP packet sent by the last hop device, where the IP packet is used to insert the identifier information, and the location after the identifier information of the previous hop device has been inserted Inserting the identification information of the relay device, and forwarding the IP packet inserted with the identifier information to the network management device, where the last hop device is the terminal device or other relay device different from the relay device ;
    所述网络管理设备,用于接收所述插入标识信息的IP报文,解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系,还用于向终端设备发送所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系;The network management device is configured to receive the IP packet that is inserted into the identifier information, and parse the IP packet, and obtain the identifier information of the terminal device and the identifier information corresponding to the at least one relay device. Determining, according to the identification information of the terminal device and the identification information corresponding to the at least one relay device, a connection relationship between the terminal device and the at least one relay device, and determining the at least a connection relationship between the relay device and the network management device, and is further configured to send, to the terminal device, a connection relationship between the terminal device and the at least one relay device, the at least one relay device, and the Describe the connection relationship between network management devices;
    所述终端设备用于接收所述网络管理设备确定的所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系,确定并显示网络拓扑图,所述网络拓扑图包括所述至少一个中继设备、所述终端设备以及所述网络管理设备之间的互连信息。The terminal device is configured to receive a connection relationship between the terminal device and the at least one relay device determined by the network management device, a connection relationship between the at least one relay device, and the network management device Determining and displaying a network topology diagram, the network topology diagram including interconnection information between the at least one relay device, the terminal device, and the network management device.
  21. 一种网络管理设备,其特征在于,包括接收模块以及处理模块;A network management device, comprising: a receiving module and a processing module;
    所述接收模块,用于接收终端设备发送的互联网协议IP报文,所述IP报文是经至少一个中继设备转发至所述网络管理设备的IP报文、且所述IP报文中顺序插入有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的标识信息;The receiving module is configured to receive an Internet Protocol (IP) packet sent by the terminal device, where the IP packet is an IP packet that is forwarded to the network management device by the at least one relay device, and the IP packet is in the sequence The identification information of the terminal device and the identification information corresponding to the at least one relay device that the IP packet passes in sequence;
    所述处理模块,用于解析所述接收模块接收到的所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,并根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。The processing module is configured to parse the IP packet received by the receiving module, and obtain the identification information of the terminal device and the identification information corresponding to the at least one relay device, which are sequentially arranged, and are arranged according to the order The identification information of the terminal device and the identification information corresponding to the at least one relay device respectively, determining a connection relationship between the terminal device and the at least one relay device, and determining the at least one relay device And a connection relationship between the network management devices.
  22. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机可执行指令,所述计算机可执行指令在被计算机调用时,使所述计算机执行如权利要求1至9任一项所述的方法。A computer storage medium, characterized in that the computer storage medium stores computer executable instructions that, when invoked by a computer, cause the computer to perform the method of any one of claims 1 to 9. Methods.
  23. 一种计算机程序产品,其特征在于,所述计算机程序产品在被计算机调用时,使得计算机执行如权利要求1至9任一项所述的方法。A computer program product, wherein the computer program product, when invoked by a computer, causes the computer to perform the method of any one of claims 1 to 9.
  24. 一种在网络管理设备中使用的芯片,其特征在于,包括通信接口和处理器;A chip for use in a network management device, comprising: a communication interface and a processor;
    所述通信接口,用于接收终端设备发送的互联网协议IP报文,所述IP报文是经至少一个中继设备转发至所述网络管理设备的IP报文、且所述IP报文中顺序插入有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的 标识信息;The communication interface is configured to receive an Internet Protocol (IP) packet sent by the terminal device, where the IP packet is an IP packet that is forwarded to the network management device by the at least one relay device, and the IP packet is in the sequence The identification information of the terminal device and the identification information corresponding to the at least one relay device that the IP packet passes in sequence;
    所述处理器,用于解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,并根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。The processor is configured to parse the IP packet, and obtain the identification information of the terminal device and the identifier information corresponding to the at least one relay device, and the identifiers of the terminal devices are sequentially arranged according to the sequence. Determining, by the information and the identifier information corresponding to the at least one relay device, a connection relationship between the terminal device and the at least one relay device, and determining the at least one relay device and the network management device The connection between the two.
PCT/CN2018/102710 2017-12-28 2018-08-28 Method, device and system for determining connection relation of network devices WO2019128273A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711464187.0A CN109981329A (en) 2017-12-28 2017-12-28 Determine the method, equipment and system of network equipment connection relationship
CN201711464187.0 2017-12-28

Publications (1)

Publication Number Publication Date
WO2019128273A1 true WO2019128273A1 (en) 2019-07-04

Family

ID=67062990

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/102710 WO2019128273A1 (en) 2017-12-28 2018-08-28 Method, device and system for determining connection relation of network devices

Country Status (2)

Country Link
CN (1) CN109981329A (en)
WO (1) WO2019128273A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934341A (en) * 2021-10-20 2022-01-14 迈普通信技术股份有限公司 Network policy topology display method and device, electronic equipment and storage medium
CN116033365A (en) * 2023-03-22 2023-04-28 新华三技术有限公司 Communication method, device, electronic equipment and storage medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756756B (en) * 2020-06-28 2022-08-05 深圳市信锐网科技术有限公司 Terminal network control method and device, electronic equipment and storage medium
CN112234712B (en) * 2020-10-12 2022-06-10 国网河北省电力有限公司信息通信分公司 Power distribution network topology identification method
CN113162824B (en) * 2021-04-13 2022-11-04 深圳市奇虎智能科技有限公司 Method, system, storage medium and computer equipment for identifying equipment under sub-routing by router
CN113179225B (en) * 2021-04-26 2022-11-04 深圳市奇虎智能科技有限公司 Application identification and processing method and system of sub-route, storage medium and computer equipment
CN114884765A (en) * 2022-01-14 2022-08-09 天地融科技股份有限公司 PLC bus communication method and system based on relay equipment and relay equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624935A (en) * 2011-01-26 2012-08-01 华为技术有限公司 Method, device and system for forwarding packet
US20120320795A1 (en) * 2008-12-30 2012-12-20 Juniper Networks, Inc. Method and apparatus for determining a network topology during network provisioning
CN105991334A (en) * 2015-02-28 2016-10-05 中国移动通信集团广西有限公司 Network topology self-discovering method and device
CN106209653A (en) * 2014-09-22 2016-12-07 来克莎科技有限公司 Routing framework
CN107104824A (en) * 2017-03-31 2017-08-29 紫光华山信息技术有限公司 A kind of network topology determines method and apparatus

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047618B (en) * 2006-03-29 2013-11-06 华为技术有限公司 Method and system for acquiring network route information
CN106936656B (en) * 2015-12-30 2020-01-03 华为技术有限公司 Method, device and system for realizing packet loss detection
CN106411642B (en) * 2016-09-21 2019-09-17 杭州迪普科技股份有限公司 A kind of method and apparatus of message forwarding path detection
CN106452862A (en) * 2016-09-29 2017-02-22 北京东土科技股份有限公司 Method and device for determining loop network
CN106470213A (en) * 2016-10-17 2017-03-01 杭州迪普科技股份有限公司 A kind of source tracing method of attack message and device
CN106452963A (en) * 2016-10-18 2017-02-22 北京东土科技股份有限公司 Network path sensing method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120320795A1 (en) * 2008-12-30 2012-12-20 Juniper Networks, Inc. Method and apparatus for determining a network topology during network provisioning
CN102624935A (en) * 2011-01-26 2012-08-01 华为技术有限公司 Method, device and system for forwarding packet
CN106209653A (en) * 2014-09-22 2016-12-07 来克莎科技有限公司 Routing framework
CN105991334A (en) * 2015-02-28 2016-10-05 中国移动通信集团广西有限公司 Network topology self-discovering method and device
CN107104824A (en) * 2017-03-31 2017-08-29 紫光华山信息技术有限公司 A kind of network topology determines method and apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934341A (en) * 2021-10-20 2022-01-14 迈普通信技术股份有限公司 Network policy topology display method and device, electronic equipment and storage medium
CN113934341B (en) * 2021-10-20 2024-04-09 迈普通信技术股份有限公司 Network policy topology display method and device, electronic equipment and storage medium
CN116033365A (en) * 2023-03-22 2023-04-28 新华三技术有限公司 Communication method, device, electronic equipment and storage medium
CN116033365B (en) * 2023-03-22 2023-06-20 新华三技术有限公司 Communication method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109981329A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
WO2019128273A1 (en) Method, device and system for determining connection relation of network devices
CN106452857B (en) Method for generating configuration information and network control unit
US7995483B1 (en) Simultaneously testing connectivity to multiple remote maintenance endpoints of the same maintenance association
WO2018120798A1 (en) Vxlan packet processing method, device and system
US10439931B2 (en) Data packet processing method, service node, and delivery node
JP5855630B2 (en) Management server and management method for managing cloud appliance of virtual local area network
EP2843906B1 (en) Method, apparatus, and system for data transmission
EP2951953A1 (en) Method of managing zigbee network in the internet of things
CN103580980A (en) Automatic searching and automatic configuration method and device of VN
CN110798403B (en) Communication method, communication device and communication system
KR20150022722A (en) Communications device utilizing a central discovery mechanism, and respective method
CN109474495B (en) Tunnel detection method and device
US20180083850A1 (en) Service performance monitoring in a virtualized communication network
JP7053901B2 (en) Loop avoidance communication method, loop avoidance communication device and loop avoidance communication system
WO2016202056A1 (en) Home network service sharing method and apparatus
US8964749B2 (en) Method, device and system for establishing a pseudo wire
JP7124206B2 (en) Packet processing methods and gateway devices
US10880162B1 (en) Linking logical broadcast domains
CN108737183B (en) Method and device for monitoring forwarding table item
CN107547665A (en) A kind of method, equipment and the system of dhcp address distribution
US11863394B2 (en) Connectivity detection session creation method, network device, and system
JP2014513453A (en) Communication method for wireless terminal and host device, wireless terminal, and host device
WO2019196914A1 (en) Method for discovering forwarding path, and related device thereof
CN104486217A (en) Cross network message transmitting method and equipment
US10764330B2 (en) LAN/SAN network security management

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: 18894467

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18894467

Country of ref document: EP

Kind code of ref document: A1