WO2019128273A1 - 确定网络设备连接关系的方法、设备及*** - Google Patents
确定网络设备连接关系的方法、设备及*** Download PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 83
- 230000015654 memory Effects 0.000 claims description 67
- 238000004891 communication Methods 0.000 claims description 45
- 238000010586 diagram Methods 0.000 claims description 31
- 238000012545 processing Methods 0.000 claims description 30
- 238000004590 computer program Methods 0.000 claims description 22
- 230000005540 biological transmission Effects 0.000 description 22
- 230000006870 function Effects 0.000 description 20
- 238000013461 design Methods 0.000 description 15
- 230000008569 process Effects 0.000 description 14
- 238000003780 insertion Methods 0.000 description 12
- 230000037431 insertion Effects 0.000 description 12
- 230000006855 networking Effects 0.000 description 7
- 101100048435 Caenorhabditis elegans unc-18 gene Proteins 0.000 description 4
- 230000006399 behavior Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 241000282326 Felis catus Species 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 101100513046 Neurospora crassa (strain ATCC 24698 / 74-OR23-1A / CBS 708.71 / DSM 1257 / FGSC 987) eth-1 gene Proteins 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/12—Discovery or management of network topologies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/146—Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing 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.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
一种确定网络设备连接关系的方法、设备及***,用以解决现有技术中无法确定网络设备之间完整连接关系以及复杂度较高的问题。本申请中,网络管理设备接收终端设备发送的IP报文,所述IP报文是经至少一个中继设备转发至网络管理设备的IP报文、且所述IP报文中顺序***有终端设备的标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息,并解析该IP报文,得到顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息,根据顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息,确定终端设备以及至少一个中继设备之间的连接关系,并确定至少一个中继设备以及网络管理设备之间的连接关系。
Description
本申请要求于2017年12月28日提交中国专利局、申请号为201711464187.0、申请名称为“确定网络设备连接关系的方法、设备及***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及网络管理技术领域,尤其涉及一种确定网络设备连接关系的方法、设备及***。
在一个通信网络中,确定该通信网络中包括的各个网络设备之间的连接关系,有助于对整个通信网络的结构有整体的认识和了解,可帮助用户或者网络管理人员进行网络故障定位和性能分析。
现有技术中,主要基于简单网络管理协议(simple network management protocol,SNMP)确定网络拓扑,具体的,采用SNMP协议获取网络中每个网络设备的转发信息库(forward information base,FIB),并从获取到的FIB中确定路由转发表,根据路由转发表中的转发关系确定网络设备之间的连接关系。由于每个网络设备的路由转发表中仅记录了报文传输最优路径所经过的网络设备的信息,对于最优路径不经过的网络设备的信息不能通过上述FIB信息获取到,因此,在确定网络中网络设备之间的连接关系时,无法考虑到某些网络设备,进而导致无法确定网络设备之间完整的连接关系。此外,上述方法需要额外获取网络中每个网络设备的FIB,复杂度较高。
发明内容
本申请实施例提供一种确定网络设备连接关系的方法、设备及***,用以解决现有技术中由于无法考虑到某些网络设备,进而导致无法确定网络设备之间完整的连接关系的问题,以及由于需要额外获取网络中每个网络设备的FIB,导致复杂度较高的问题。
第一方面,本申请实施例提供一种确定网络设备连接关系的方法,所述方法包括:终端设备经至少一个中继设备向网络管理设备发送互联网协议(internet protocol,IP)报文,中继设备接收上一跳设备(终端设备或不同于所述中继设备的其它中继设备)发送的IP报文,并在所述IP报文用于***标识信息的区域中、已经***所述上一跳设备的标识信息之后的位置***所述中继设备的标识信息,向网络管理设备转发***标识信息的IP报文,网络管理设备接收所述终端设备发送的IP报文,其中,所述IP报文是经至少一个中继设备转发至所述网络管理设备的IP报文、且所述IP报文中顺序***有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的标识信息,所述网络管理设备接收到终端设备发送的IP报文之后,解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对 应的标识信息,并根据顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息,确定终端设备以及至少一个中继设备之间的连接关系,并确定至少一个中继设备以及网络管理设备之间的连接关系。
通过上述方法,只要终端设备向网络管理设备发送IP报文,网络管理设备就可以通过IP报文中携带的终端设备的标识信息以及IP报文所经过的中继设备的标识信息,确定出终端设备与中继设备之间的连接关系。相比现有技术,本申请提供的确定网络设备连接关系的方法,网络管理设备不需要额外获取终端设备和中继设备的FIB,通过在终端设备发送的IP报文中***标识信息,即可确定出网络设备的连接关系,可降低确定网络设备连接关系的复杂度,且,也不需要通过FIB确定网络设备之间的连接关系,故,不存在由于通过FIB信息只能获取部分网络设备的信息,导致无法确定完整网络拓扑图的问题。
在一种可能的设计中,若中继设备的上一跳设备为终端设备,则所述中继设备接收到终端设备发送的IP报文之后,在所述IP报文用于***标识信息的区域中、顺序***所述终端设备的标识信息以及所述中继设备的标识信息。
通过上述方法,可避免由于终端设备的标识信息在传输过程中发生变化而导致网络管理设备无法识别终端设备的问题。
在一种可能的设计中,所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,具体可采用如下方式:
所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序,并将所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序,确定为所述终端设备与所述至少一个中继设备的连接顺序,进而根据所述连接顺序确定所述终端设备以及所述至少一个中继设备之间的连接关系。
通过上述方法,网络管理设备不依赖终端设备和中继设备上报FIB信息,即可确定所述终端设备与所述至少一个中继设备之间的连接关系,在确定完整网络拓扑图的同时,可降低确定网络拓扑图的复杂度。
本申请实施例中以下给出两种确定所述至少一个中继设备以及所述网络管理设备之间的连接关系的实施方式。
在一种可能的设计中,所述网络管理设备确定所述至少一个中继设备以及所述网络管理设备之间的连接关系,具体可采用如下方式:
所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文在被发送至所述网络管理设备时所经过的最后一个中继设备;所述网络管理设备将所述最后一个中继设备,确定为与所述网络管理设备直接相连的中继设备,并根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。
通过上述方法,网络管理设备不依赖终端设备和中继设备上报FIB信息,即可确定所述网络管理设备以及所述至少一个中继设备之间的连接关系,可降低确定网络拓扑图的复杂度。
在另一种可能的设计中,所述网络管理设备确定所述至少一个中继设备以及所述网络管理设备之间的连接关系,具体可采用如下方式:
所述网络管理设备根据预先设置的对应关系以及所述至少一个中继设备分别对应的标识信息,确定与所述网络管理设备直接相连的中继设备;所述网络管理设备根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。
其中,所述预先设置的对应关系中包括,与所述网络管理设备直接相连的中继设备的标识信息与所述网络管理设备的标识信息之间的对应关系。
通过上述方法,网络管理设备不依赖终端设备和中继设备上报FIB信息,即可确定所述网络管理设备以及所述至少一个中继设备之间的连接关系,可降低确定网络拓扑图的复杂度。
在一种可能的设计中,所述终端设备的标识信息包括所述终端设备的介质访问控制(media access control,MAC)地址、序列号(serial number,SN)、统一资源名称(uniform resource name,URN)以及统一资源标识符(uniform resource identifier,URI)中的至少一个。本申请实施例中对所述终端设备的标识信息不做限定,所述终端设备的标识信息除可以是终端设备的MAC地址、SN、URN以及URI之外,还可以是用于标识终端设备的其它信息。
在一种可能的设计中,所述中继设备的标识信息包括所述中继设备的MAC地址、SN、URN以及URI中的至少一个。本申请实施例中对所述中继设备的标识信息不做限定,所述中继设备的标识信息除可以是中继设备的MAC地址、SN、URN以及URI之外,还可以是用于标识中继设备的其它信息。
在一种可能的设计中,所述IP报文可以为所述终端设备发送的首个IP报文。
通过上述方法,终端设备不需要在向网络管理设备发送的所有IP报文中均***终端设备和中继设备的标识信息,只需在终端设备向网络管理设备发送的首个IP报文中***所述终端设备和中继设备的标识信息,可节省IP报文的传输时间,且可提高网络管理设备的处理效率。当然为提高确定网络设备连接关系的可靠性,所述IP报文也可以为所述终端设备发送的前N(N为大于等于2的正整数)个IP报文,N可根据实际应用中对可靠性要求的精度设置。
第二方面,本申请实施例提供一种网络管理设备,所述网络管理设备具有实现上述第一方面方法示例中网络管理设备行为的功能。所述功能可以通过硬件实现,也可以通过软件来实现。
在一种可能的设计中,所述网络管理设备包括处理器、存储器、通信接口和总线,其中,所述处理器、所述存储器以及所述通信接口通过所述总线连接;所述处理器调用存储在所述存储器中的指令以执行上述第一方面所述的方法以及第一方面中的任意一种可能的设计,所述通信接口,用于接收或者发送IP报文。
第三方面,本申请实施例提供一种中继设备,该中继设备具有实现上述第一方面方法示例中中继设备行为的功能。所述功能可以通过硬件实现,也可以通过软件来实现。
在一种可能的设计中,所述中继设备的结构中包括处理器、存储器、通信接口和 总线,其中,所述处理器、所述存储器以及所述通信接口通过所述总线连接;所述处理器调用存储在所述存储器中的指令以执行第一方面所述的方法以及第一方面中的任意一种可能的设计,所述通信接口,用于接收或者发送IP报文。
第四方面,本申请实施例中还提供一种终端设备,该终端设备具有实现上述第一方面方法示例中终端设备行为的功能。所述功能可以通过硬件实现,也可以通过软件来实现。
在一种可能的设计中,所述终端设备的结构中包括处理器、存储器、通信接口、显示屏幕和总线,其中,所述处理器、所述存储器、所述通信接口以及所述显示屏幕通过所述总线连接;所述处理器调用存储在所述存储器中的指令,执行上述方法,所述显示屏幕,用于显示信息。
第五方面,本申请实施例中还提供一种确定网络设备连接关系的***,该***包括上述第二方面所描述的网络管理设备、上述第三方面所描述的中继设备以及上述第四方面所描述的终端设备。
第六方面,本申请实施例提供一种网络管理设备,所述网络管理设备具有实现上述第一方面方法示例中网络管理设备行为的功能。所述功能可以通过硬件实现,也可以通过软件来实现。
在一种可能的设计中,所述网络管理设备包括接收模块和处理模块,所述接收模块和所述处理模块用于执行上述第一方面所述的方法以及第一方面中的任意一种可能的设计。
第七方面,本申请实施例中还提供一种计算机存储介质,所述计算机存储介质存储有计算机可执行指令,所述计算机可执行指令在被计算机调用时,使所述计算机执行上述第一方面或上述第一方面的任意一种设计提供的方法。
第八方面,本申请实施例中还提供一种计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或上述第一方面的任意一种可能的设计中所述的方法。
第九方面,本申请实施例提供一种在网络管理设备中使用的芯片,所述芯片与存储器相连,用于读取并执行所述存储器中存储的软件程序,以实现上述第一方面以及第一方面中包括的任意一种设计提供的方法。
图1为本申请提供的一种家庭WLAN网络的架构示意图;
图2为本申请提供的一种确定网络拓扑图的方法流程图;
图3为本申请提供的一种在终端设备上显示网络拓扑图的示意图;
图4为本申请提供的另一种确定网络拓扑图的方法流程图;
图5为本申请提供的一种在IP报文中***标识信息的示意图;
图6为本申请提供的一种确定网络拓扑图的流程示意图;
图7为本申请提供的一种IP报文解析示意图;
图8为本申请提供的一种在IP报文中用于***标识信息的区域示意图;
图9为本申请提供的另一种家庭WLAN网络的结构示意图;
图10为本申请提供的一种网络管理设备结构示意图;
图11为本申请提供的一种中继设备结构示意图;
图12为本申请提供的一种终端设备结构示意图
图13为本申请提供的另一种网络管理设备结构示意图。
本申请实施例提供了一种确定网络设备连接关系的方法、设备及***,用以解决现有技术中由于无法考虑到某些网络设备,进而导致无法确定网络设备之间完整的连接关系的问题,以及由于需要额外获取网络中每个网络设备的FIB,导致复杂度较高的问题。
首先,对本申请实施例中的部分用语进行解释说明,以便使本领域技术人员理解。
1、网络拓扑(network topology),是指一个通信网络中,各个网络设备之间的连接关系。
2、网络设备,可以包括网络管理设备、中继设备和终端设备等设备,其中,网络设备可等效为网络节点,本申请实施例以下对网络设备与网络节点不做区分,中继设备是指具有路由功能、为终端设备提供无线接入网络或有线接入网络功能的设备,主要包括路由器、交换机、网桥、集线器以及能够提供无线接入网络功能的终端设备等。
3、网络管理设备,在通信网络中主要用于网络管理,以及为终端设备提供无线接入网络或有线接入网络功能,可以包括负责将终端设备接入因特网(internet)的路由器、交换机等。
4、终端设备,可以包括手机、平板电脑、笔记本电脑、台式电脑、个人数字助理(personal digital assistant,PDA)、以及具有无线连接功能的电视机、智能手表、空调、电冰箱、热水器、无线插座等设备。
5、网络拓扑图,是指由网络设备和传输介质构成的网络结构图。
6、传输介质,可以是无线传输介质或者有线传输介质,其中,有线传输介质可以包括双绞线、同轴电缆、光纤等,无线传输介质可以包括微波、红外线以及激光等。
7、无线保真技术(wireless fidelity,Wi-Fi),是一种允许终端设备连接到一个无线局域网(wireless local area networks,WLAN)的技术。
8、传统Wi-Fi架构,是指由终端设备和一个中继设备构成的二级架构,在这种架构中,所有终端设备均连接至同一个中继设备,通过该架构中仅有的一个中继设备接入网络(例如,因特网或者WLAN)。
9、分布式Wi-Fi架构,是相对传统Wi-Fi架构提出的一种架构,在这种架构中主要包括终端设备,主中继设备和从中继设备,其中,主中继设备工作在主路由模式下,具备一定的管理能力,从中继设备是不具有管理功能的普通中继设备,工作在从路由模式下,在这种架构中,将从中继设备通过有线传输介质或者Wi-Fi等接入WLAN,扩展Wi-Fi覆盖范围,终端设备可以连接至主中继设备,也可以连接至从中继设备,但需要发送至因特网(internet)的报文均需要通过主中继设备转发,主中继设备相当于网关的作用。
10、主中继设备,是一种网络管理设备,用于统一处理报文业务、业务配置等功能,该设备可直接与无线接入点(例如,宽带运营商)连接,也可以通过中间设备(例如,调制解调器)与无线接入点连接,为WLAN中的终端设备提供接入网功能,主中 继设备包括但不限于工作在主路由模式下的路由器、电力猫、无线中继器等。
11、从中继设备,可以通过有线传输介质、无线传输介质等媒介与主中继设备连接,扩展主路由设备的Wi-Fi覆盖范围或者有线连接范围,可以为处于同一WLAN中的终端设备提供Wi-Fi或者有线连接功能,从中继设备包括但不限于工作在从路由模式下的路由器、电力猫、无线中继器等。
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述。
本申请实施例提供的确定网络设备连接关系的方法可应用于各种场景下的WLAN网络,该WLAN网络包括但不限于校园WLAN网络、家庭WLAN网络、医院WLAN网络、企业WLAN网络、餐厅WLAN网络、商场WLAN网络、机场WLAN网络等等。
下面以应用于家庭WLAN网络为例,对本发明实施例的具体实施过程进行详细阐述,下述先简单介绍家庭WLAN网络的架构组成,具体如图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覆盖,从中继设备通过有线传输介质或者无线传输介质与主中继设备连接,家庭终端设备无论连接在主中继设备、或从中继设备上均可正常进行网络通信。
需要说明的是,图1仅以包括一个主中继设备、两个从中继设备以及六个终端设备的一个简单的家庭WLAN网络为例进行说明,实际应用中,家庭WLAN网络可包括多个主中继设备、多个从中继设备,以及多个终端设备。
在家庭网络中采用分布式Wi-Fi架构之后,家庭网络中的中继设备与终端设备之间的连接关系变的较复杂,而通过家庭网络的网络拓扑图可以直观的看到家庭网络中各设备之间的连接关系,进而对整个网络的拓扑结构有整体的认识和了解,有效的帮助家庭用户或者网络管理人员进行网络故障定位和性能分析,因此,快速准确的确定完整的网络拓扑图是十分必要的。
基于上述介绍,本申请提供一种确定网络设备连接关系的方法、设备及***,用 以解决现有技术中由于无法考虑到某些网络设备,进而无法确定完整网络拓扑图的问题,以及由于需要额外获取网络中每个网络设备的FIB,导致复杂度较高的问题。其中,方法及设备是基于同一构思的,由于方法及设备解决问题的原理相似,因此设备与方法的实施可以相互参见,重复之处不再赘述。
在本申请实施例中,以确定图1中家庭WLAN网络的网络设备连接关系为例进行描述,但是并不限制本申请实施例应用到其他类型的网络中。参阅图2所示,该方法的具体流程可以包括:
S101:网络管理设备接收终端设备发送的IP报文,IP报文是经至少一个中继设备转发至网络管理设备的IP报文、且IP报文中顺序***有终端设备的标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息。
本申请实施例中,IP报文中顺序***有终端设备的标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息,可以是在IP报文中用于***标识信息的区域中从左向右顺序***有终端设备的标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息,也可以是在IP报文中用于***标识信息的区域中从右向左顺序***有终端设备的标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息,当然,能够实现将终端设备的标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息顺序***IP报文的方法均属于本申请保护的范畴,本申请对此不做限定。
本申请实施例中,“顺序”的另一层含义是指终端设备的标识信息以及至少一个中继设备的标识信息***IP报文中的先后顺序。
本申请实施例中,网络管理设备可以是图1中的主中继设备,也可以是具有上述功能的新增网络设备,当网络管理设备为主中继设备时,不需要在网络中新增设备,可节省硬件资源。本申请中以下均以网络管理设备为主中继设备为例进行说明。需要说明的是,当上述网络管理设备为主中继设备时,上述至少一个中继设备是指从中继设备。
下面结合图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报文。
S102:网络管理设备解析IP报文,得到顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息。
本申请实施例中,结合图1以网络管理设备为主中继设备、终端设备为手机C为例对上述过程进行说明,主中继设备接收到手机C发送的、顺序***有手机C的标识 信息以及IP报文依次经过的从中继设备2和从中继设备1分别对应的标识信息的IP报文之后,解析该IP报文,得到顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息。
S103:网络管理设备根据顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息,确定终端设备以及至少一个中继设备之间的连接关系,并确定至少一个中继设备以及网络管理设备之间的连接关系。
本申请实施例中,结合图1以网络管理设备为主中继设备、终端设备为手机C为例对上述过程进行说明,主中继设备得到顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息之后,根据顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息,确定手机C与从中继设备1和从中继设备2之间的连接关系为:手机C连接从中继设备2连接从中继设备1。
本申请实施例中给出以下两种确定至少一个中继设备以及网络管理设备之间的连接关系的实现方式。
一种实现方式中,网络管理设备根据顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息,确定IP报文在被发送至网络管理设备时所经过的最后一个中继设备,网络管理设备将最后一个中继设备,确定为与网络管理设备直接相连的中继设备,并根据与网络管理设备直接相连的中继设备,确定网络管理设备以及至少一个中继设备之间的连接关系。
本申请实施例中,结合图1以网络管理设备为主中继设备、终端设备为手机C为例对上述过程进行说明,主中继设备得到顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息之后,根据顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息,确定IP报文在被发送至主中继设备时所经过的最后一个中继设备为从中继设备1,主中继设备将从中继设备1确定为与其直接相连的中继设备,并根据与主中继设备直接相连的从中继设备1,确定主中继设备以及至少一个从中继设备之间的连接关系为:主中继设备连接从中继设备1连接从中继设备2。
另一种实现方式中,网络管理设备根据预先设置的对应关系以及至少一个中继设备分别对应的标识信息,确定与网络管理设备直接相连的中继设备,网络管理设备根据与网络管理设备直接相连的中继设备,确定网络管理设备以及至少一个中继设备之间的连接关系。
其中,预先设置的对应关系中包括,与网络管理设备直接相连的中继设备的标识信息与网络管理设备的标识信息之间的对应关系。
本申请实施例中,结合图1以网络管理设备为主中继设备、终端设备为手机C为例对上述过程进行说明,主中继设备得到顺序排列的手机C的标识信息以及从中继设备2和从中继设备1分别对应的标识信息之后,根据预先设置的从中继设备1的标识信息与主中继设备的标识信息之间的对应关系以及从中继设备1和从中继设备2分别对应的标识信息,确定与主中继设备直接相连的中继设备为从中继设备1,进而根据与主中继设备直接相连的从中继设备1,确定主中继设备以及至少一个从中继设备之间的连接关系为:主中继设备连接从中继设备1连接从中继设备2。
本申请实施例中,网络中的终端设备可以是一个,也可以是多个。当网络中的终端设备为多个时,主中继设备可接收多个终端设备发送的多个IP报文,其中,终端设备与IP报文之间具有一一对应的关系,即,不同的终端设备向主中继设备发送针对自身、不同的IP报文,主中继设备通过对多个终端设备中包括的每一终端设备分别执行上述S101-S103,可针对每一终端设备确定出一个与中继设备(主中继设备和从中继设备)之间的连接关系,主中继设备通过将针对每一终端设备确定的连接关系进行融合,可得到网络中包括的所有网络设备(主中继设备、从中继设备以及全部终端设备)之间的完整连接关系。例如,针对图1所示的网络架构中,终端设备包括手机A、手机B、手机C、电视机、台式电脑以及平板电脑,针对手机A、手机B、手机C、电视机、台式电脑以及平板电脑分别执行上述S101-S103,即可确定手机A、手机B、手机C、电视机、台式电脑以及平板电脑与中继设备(主中继设备和从中继设备)之间的连接关系,主中继设备通过将针对每一终端设备确定的连接关系进行融合,进而可确定图1所示的家庭WLAN网络的完整网络拓扑图,使得网络维护人员可根据网络拓扑图维护网络设备的信息以及网络设备之间的连接关系,并通过网络拓扑图帮助网络管理人员对整个网络的拓扑结构有整体的认识和了解,有效的帮助网络管理人员进行网络故障定位和性能分析。
具体的,主中继设备在确定出针对每一终端设备与中继设备(主中继设备和从中继设备)之间的完整连接关系之后,可通过如下方式将针对每一终端设备确定的连接关系进行融合:主中继设备可根据接收到的所有终端设备发送的IP报文采用上述两种实现方式,确定所有与其直接相连的从中继设备,以确定出的与其直接相连的从中继设备为起点,根据顺序排列的终端设备的标识信息以及至少一个从中继设备的标识信息,确定与主中继设备直接相连的从中继设备,相连的下一级网络设备,以此类推,直至确定出全部网络设备的连接关系。
需要说明的是,与主中继设备直接相连的终端设备在其发送的IP报文中仅携带自身的标识信息,对于直接与主中继设备相连的终端设备,主中继设备可采用如下方式确定连接关系。具体的,主中继设备接收到仅包括终端设备标识信息的IP报文之后,可确定该类终端设备是与其直接相连的终端设备。
本申请实施例中,在确定网络中包括的主中继设备、从中继设备以及终端设备之间完整的连接关系之后,可进一步根据终端设备以及至少一个中继设备之间的连接关系、至少一个中继设备以及网络管理设备之间的连接关系,确定网络拓扑图。
其中,网络拓扑图包括主中继设备、至少一个从中继设备以及终端设备之间的互连信息。
需要说明的是,本申请实施例中可在主中继设备中确定网络拓扑图,也可在终端设备中确定网络拓扑图,本申请不做限定。当在终端设备中确定网络拓扑图时,终端设备需要接收主中继设备确定的终端设备以及至少一个中继设备之间的连接关系、至少一个中继设备以及网络管理设备之间的连接关系,进而根据终端设备以及至少一个中继设备之间的连接关系、至少一个中继设备以及网络管理设备之间的连接关系,确定网络拓扑图,终端设备在确定出网络拓扑图之后,可在显示屏幕上显示该网络拓扑图。
本申请实施例中,当在主中继设备确定出网络的网络拓扑图之后,用户可通过预先设置的与主中继设备对应的用户接口查看网络拓扑图,使得用户可通过网络拓扑图直观的看到网络中各设备之间的连接关系,进而对整个网络的拓扑结构有整体的认识和了解,有效的帮助用户或者网络管理人员进行网络故障定位和性能分析。
需要说明的是,预先设置的与主中继设备对应的用户接口可以是网址,也可以是研发人员开发的可使用户访问主中继设备的应用程序,本申请对此不做限定。例如,假设主中继设备为路由器,则用户可通过访问该路由器的网址查看网络拓扑图,当然,用户也可以使用终端设备下载研发人员开发的可访问该路由器的应用程序,在终端设备的显示屏幕上显示并查看网络拓扑图,参阅图3所示,图3为在终端设备的显示屏幕上显示网络拓扑图的示意图,用户可根据显示屏幕中显示的网络拓扑图,直观的查看终端设备与各个中继设备之间的连接关系。
进一步需要说明的是,本申请实施例中,可将网络拓扑图中包括的网络设备的属性设置为可操作,进而使得网络拓扑图中的网络设备与用户可交互。例如,可针对网络拓扑图中包括的网络设备设置用户可选选项,使得用户可通过触发相应选项控制网络设备执行相应的操作。例如,假设针对网络设备设置了控制网络设备接入网络或者断开网络的选项,则用户可通过触发该选项控制网络设备接入网络或者断开网络。再例如,假设针对某些网络设备设置了对各种常见应用的一键封杀选项,则用户可通过触发该选项禁止相应的网络设备运行常见的游戏、聊天等软件。再例如,假设针对某些网络设备设置了支持网址过滤的选项,则用户可通过触发该选项对网络设备访问各种网站的权限进行管控。当然,该网络拓扑图还可支持显示网络设备的名称、网络设备的速率、网络设备性能、链路质量、设备连接提醒等,使得用户可根据所显示的上述内容对网络进行管理。
本申请实施例中,以下详细描述一种S103的实现方式,参阅图4所示,该实现方式的具体流程可以包括:
S201:网络管理设备根据顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息,确定IP报文经过终端设备以及至少一个中继设备的顺序。
本申请实施例中,所述顺序可以是指终端设备的标识信息以及至少一个中继设备分别对应的标识信息***IP报文的先后顺序。
本申请实施例中,结合图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、主中继设备。
S202:网络管理设备将IP报文经过终端设备以及至少一个中继设备的顺序,确定为终端设备与至少一个中继设备的连接顺序,并根据该连接顺序确定终端设备以及至少一个中继设备之间的连接关系。
本申请实施例中,结合图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连接主中继设备。
本申请实施例中,终端设备的标识信息可以包括终端设备的MAC地址、SN、URN以及URI中的至少一个。本申请实施例对终端设备的标识信息不做限定,终端设备的标识信息除可以是终端设备的MAC地址、SN、URN以及URI之外,还可以是用于标识终端设备的其它信息。
本申请实施例中,中继设备的标识信息可以包括中继设备的MAC地址、SN、URN以及URI中的至少一个。本申请实施例对中继设备的标识信息不做限定,中继设备的标识信息除可以是中继设备的MAC地址、SN、URN以及URI之外,还可以是用于标识中继设备的其它信息。
本申请实施例中,中继设备在接收到上一跳设备发送的IP报文之后,有两种可能的处理方式。其中,所述上一跳设备为终端设备或不同于接收IP报文的中继设备的其它中继设备。
一种可能的处理方式中,中继设备接收上一跳设备发送的IP报文,并在IP报文用于***标识信息的区域中、已经***上一跳设备的标识信息之后的位置***中继设备的标识信息,并向网络管理设备转发***标识信息的IP报文。
本申请实施例以下均以网络管理设备为主中继设备为例进行说明。针对图1所示的家庭WLAN网络,以从中继设备2接收手机C发送的IP报文为例进行说明。在上述可能的处理方式中,假设从中继设备2接收到手机C发送的IP报文,在IP报文用于***标识信息的区域中、已经***手机C的标识信息之后的位置***从中继设备2的标识信息,并将***标识信息之后的IP报文转发至从中继设备1,从中继设备1在IP报文用于***标识信息的区域中、已经***从中继设备2的标识信息之后的位置***从中继设备1的标识信息,并向主中继设备转发***标识信息的IP报文,以使得主中继设备可接收到顺序***有终端设备标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息的IP报文,进而根据接收到的IP报文执行图2或图4中的操作。
另一种可能的处理方式中,若从中继设备的上一跳设备为终端设备,则该从中继设备接收到终端设备发送的IP报文之后,在IP报文用于***标识信息的区域中、顺序***终端设备的标识信息以及该从中继设备的标识信息。通过该种处理方式可避免由于在IP报文传输过程中,***IP报文中的终端设备的标识信息在IP报文传输过程中发生变化,导致的主中继设备无法识别终端设备的问题。
参阅图5所示,针对图5所示的家庭WLAN网络,以从中继设备2接收手机C发送的IP报文为例进行说明。在上述可能的处理方式中,假设从中继设备2接收到手机C发送的IP报文,在IP报文用于***标识信息的区域中、顺序***手机C的标识信息以及从中继设备2的标识信息,并将***标识信息之后的IP报文转发至从中继设备1,从中继设备1在IP报文用于***标识信息的区域中、已经***从中继设备2的 标识信息之后的位置***从中继设备1的标识信息,并向主中继设备转发***标识信息的IP报文,以使得主中继设备可接收到顺序***有终端设备标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息的IP报文,进而根据接收到的IP报文执行图2或图4中的操作。
需要说明的是,在上述另一种可能的处理方式中,由于与终端设备之间相连的中继设备会在IP报文中***终端设备的标识信息,终端设备可以***自身的标识信息,也可以不***自身的标识信息,本申请不做限定。
进一步需要说明的是,在上述另一种可能的处理方式中,与终端设备直接相连的中继设备可***终端设备的标识信息,也可以***终端设备与该中继设备之间的连接关系,以使得主中继设备能够判断终端设备与其直接相连的中继设备之间的连接关系。
本申请实施例中,以下以直接连接终端设备的从中继设备,在IP报文中依次***终端设备的标识信息以及从中继设备的标识信息为例,对确定网络拓扑图的流程进行说明,参阅图6所示。如图6所示,终端设备发起访问internet或者主中继设备的IP报文,当终端设备发送的IP报文经过网络节点时,判断该网络节点是否为从中继设备,若该网络节点不是从中继设备,则可确定该网络节点为主中继设备,若该网络节点是从中继设备,则进一步判断该从中继设备是否为IP报文经过的第一个从中继设备,若该从中继设备是IP报文经过的第一个从中继设备,则在该IP报文用于***标识信息的区域依次***终端设备的标识信息以及该从中继设备的标识信息,若该从中继设备不是IP报文经过的第一个从中继设备,则在该IP报文用于***标识信息的区域、且已***IP报文先前经过的设备对应的标识信息之后,***该从中继设备的标识信息,将***标识信息之后的IP报文转发至主中继设备,主中继设备解析IP报文,并确定网络拓扑图。
需要说明的是,本申请实施例中从中继设备可在驱动层或者内核层捕获终端设备发送的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。
下面以上述图7中的主中继设备和从中继设备为例,对本申请实施例提供的方法进行说明。当从中继设备通过WIFI接口接收到终端设备发送的IP报文之后,从中继设备在驱动层或者内核层捕获终端设备发送的IP报文,并在驱动层或者内核层中,将捕获到的IP报文中用于***标识信息的区域中***从中继设备的标识信息,在另一种可能的实现方式中,当从中继设备通过WIFI接口接收到终端设备发送的IP报文之后,从中继设备在驱动层或者内核层捕获终端设备发送的IP报文,并在驱动层或者内核层中,将捕获到的IP报文中用于***标识信息的区域中顺序***终端设备的标识信息以及从中继设备的标识信息,之后通过从中继设备连接主中继设备的WAN接口将***标识信息的IP报文发送至主中继设备,主中继设备通过连接从中继设备的LAN1接口接收从中继设备转发的***终端设备标识信息以及从中继设备标识信息的IP报文,主中继设备接收到终端设备发送的经从中继设备转发的IP报文之后,在主中继设备的驱动层或者内核层解析该IP报文,并在主中继设备的应用层确定网络拓扑图,且,解析IP报文之后将***IP报文的标识信息去除,并将去除标识信息后的IP报文转发至internet,进而可在实现终端设备与internet的交互的同时,确定网络中网络设备的连接关系。
本申请实施例中,为提高主中继设备的处理效率、以及节省IP报文的传输时间,可以在终端设备发送的首个IP报文中***终端设备和从中继设备的标识信息,当然为提高确定网络设备连接关系的可靠性,也可以在终端设备发送的前N(N为大于等于2的正整数)个IP报文中***终端设备和从中继设备的标识信息,终端设备不需要在发送的所有IP报文中***终端设备和从中继设备的标识信息,进而可节省IP报文的传输时间。
其中,N可根据实际应用中对可靠性要求的精度设置。
需要说明的是,本申请实施例中IP报文用于***标识信息的区域,可以是IP报文的首部区域,例如,可以是IP报文首部的选项字段,当然,IP报文用于***标识信息的区域也可以是IP报文的报体,本申请对IP报文用于***标识信息的区域不做限定。
本申请实施例中,IP报文可以是传输控制协议(transmission control protocol,TCP)报文,也可以是用户数据报协议(user datagram protocol,UDP)报文,当然也可以是其它IP报文,本申请不做限定。
本申请实施例中,在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确定网络设备之间的连接关系,故,不存在无法确定完整网络拓扑图的问题。
基于与方法实施例的同一发明构思,本申请实施例还提供了一种网络管理设备100,网络管理设备100用于实现图2以及图4所述的实施例描述的方法,参阅如图10所示,网络管理设备100包括存储器101、处理器102以及通信接口103。
所述存储器101,用于存储处理器102执行的计算机程序。处理器102,可以是一个中央处理单元(central processing unit,CPU),或者为数字处理单元等等。
本申请实施例中不限定上述存储器101、处理器102以及通信接口103之间的具体连接介质。本申请实施例在图10中以存储器101、处理器102以及通信接口103之间通过总线104连接,总线104在图10中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线104可以分为地址总线、数据总线、控制总线等。为便于表示,图10中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
存储器101可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器101也可以是非易失性存储器(non-volatile memory),例如只读存储器,快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)、或者存储器101是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器101可以是上述存储器的组合。
处理器102以及通信接口103,用于实现如图2所示的确定网络设备连接关系的方法,包括:
所述通信接口103,用于接收终端设备发送的IP报文,IP报文是经至少一个中继设备转发至所述通信接口103的IP报文、且IP报文中顺序***有终端设备的标识信息以及IP报文依次经过的至少一个中继设备分别对应的标识信息。
所述处理器102,用于调用所述存储器101中存储的计算机程序执行:解析所述IP报文,得到顺序排列的终端设备的标识信息以及至少一个中继设备分别对应的标识信息,根据顺序排列的端设备的标识信息以及至少一个中继设备分别对应的标识信息, 确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。
在一种可能的实现方式中,所述处理器102根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系时,具体用于:
根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序;将所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序,确定为所述终端设备与所述至少一个中继设备的连接顺序,并根据所述连接顺序确定所述终端设备以及所述至少一个中继设备之间的连接关系。
在一种可能的实现方式中,所述处理器102确定所述至少一个中继设备以及所述网络管理设备之间的连接关系时,具体用于:
根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文在被发送至所述网络管理设备时所经过的最后一个中继设备;将所述最后一个中继设备,确定为与所述网络管理设备直接相连的中继设备,并根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。
在一种可能的实现方式中,所述处理器102确定所述至少一个中继设备以及所述网络管理设备之间的连接关系时,具体用于:
根据预先设置的对应关系以及所述至少一个中继设备分别对应的标识信息,确定与所述网络管理设备直接相连的中继设备;根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。
其中,所述预先设置的对应关系中包括,与所述网络管理设备直接相连的中继设备的标识信息与所述网络管理设备的标识信息之间的对应关系。
在一种可能的实现方式中,所述终端设备的标识信息包括所述终端设备的MAC地址、SN、URN以及URI中的至少一个。
在一种可能的实现方式中,所述中继设备的标识信息包括所述中继设备的MAC地址、SN、URN以及URI中的至少一个。
在一种可能的实现方式中,所述IP报文为所述终端设备发送的首个IP报文。
基于与方法实施例的同一发明构思,本申请实施例还提供了一种中继设备200,中继设备200用于实现图2以及图4所述的实施例描述的方法,参阅如图11所示,中继设备200包括存储器201、处理器202以及通信接口203。
所述存储器201,用于存储处理器202执行的计算机程序。处理器202,可以是一个中央处理单元(central processing unit,CPU),或者为数字处理单元等等。
本申请实施例中不限定上述存储器201、处理器202以及通信接口203之间的具体连接介质。本申请实施例在图11中以存储器201、处理器202以及通信接口203之间通过总线204连接,总线204在图11中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线204可以分为地址总线、数据总线、控制总线等。为便于表示,图11中仅用一条粗线表示,但并不表示仅有一根总线或一种 类型的总线。
存储器201可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器201也可以是非易失性存储器(non-volatile memory),例如只读存储器,快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)、或者存储器201是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器201可以是上述存储器的组合。
处理器202以及通信接口203,用于实现如图2所示的确定网络设备连接关系的方法,包括:
所述通信接口203,用于接收上一跳设备发送的IP报文。
所述处理器202,用于调用所述存储器201中存储的计算机程序执行:在所述IP报文用于***标识信息的区域中、已经***所述上一跳设备的标识信息之后的位置***所述中继设备的标识信息。
所述通信接口203,还用于向网络管理设备转发***标识信息的IP报文。
其中,所述上一跳设备为终端设备或不同于所述中继设备的其它中继设备。
在一种可能的实现方式中,若所述上一跳设备为终端设备,则所述处理器202还用于:
在所述通信接口203接收到终端设备发送的IP报文之后,在所述IP报文用于***标识信息的区域中、顺序***所述终端设备的标识信息以及所述中继设备的标识信息。
基于与方法实施例的同一发明构思,本申请实施例还提供了一种终端设备300,终端设备300用于实现图2以及图4所述的实施例描述的方法,参阅如图12所示,终端设备300包括存储器301、处理器302、通信接口303以及显示屏幕304。
所述存储器301,用于存储处理器302执行的计算机程序。处理器302,可以是一个中央处理单元(central processing unit,CPU),或者为数字处理单元等等。
本申请实施例中不限定上述存储器301、处理器302以及通信接口303之间的具体连接介质。本申请实施例在图12中以存储器301、处理器302、通信接口303以及显示屏幕304之间通过总线305连接,总线305在图12中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线305可以分为地址总线、数据总线、控制总线等。为便于表示,图12中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
存储器301可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器301也可以是非易失性存储器(non-volatile memory),例如只读存储器,快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)、或者存储器301是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器301可以是上述存储器的组合。
显示屏幕304可以采用液晶显示器(liquid crystal display,LCD)或OLED(organic light-emitting diode,有机发光二极管)等形式来配置。
存储器301、处理器302、通信接口303以及显示屏幕304,用于实现如图2所示的确定网络设备连接关系的方法,包括:
所述存储器301存储有计算机程序;
所述通信接口303,用于接收网络管理设备确定的所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系。
所述处理器302,用于根据接收到的所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系,确定网络拓扑图。
其中,所述网络拓扑图包括所述至少一个中继设备、所述终端设备以及所述网络管理设备之间的互连信息。
所述显示屏幕304,用于显示所述网络拓扑图。
基于与方法实施例的同一发明构思,本申请实施例还提供了一种网络管理设备400,网络管理设备400用于实现图2以及图4所述的实施例描述的方法,参阅如图13所示,网络管理设备400包括接收模块401以及处理模块402。
所述接收模块401,用于接收终端设备发送的互联网协议IP报文,所述IP报文是经至少一个中继设备转发至所述网络管理设备的IP报文、且所述IP报文中顺序***有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的标识信息。
所述处理模块402,用于解析所述接收模块401接收到的所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,并根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。
在一种可能的实现方式中,所述处理模块402根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系时,具体用于:
根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序;将所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序,确定为所述终端设备与所述至少一个中继设备的连接顺序,并根据所述连接顺序确定所述终端设备以及所述至少一个中继设备之间的连接关系。
在一种可能的实现方式中,所述处理模块402确定所述至少一个中继设备以及所述网络管理设备之间的连接关系时,具体用于:
根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文在被发送至所述网络管理设备时所经过的最后一个中继设备;将所述最后一个中继设备,确定为与所述网络管理设备直接相连的中继设备,并根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。
在一种可能的实现方式中,所述处理模块402确定所述至少一个中继设备以及所述网络管理设备之间的连接关系时,具体用于:
根据预先设置的对应关系以及所述至少一个中继设备分别对应的标识信息,确定与所述网络管理设备直接相连的中继设备;根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。
其中,所述预先设置的对应关系中包括,与所述网络管理设备直接相连的中继设备的标识信息与所述网络管理设备的标识信息之间的对应关系。
在一种可能的实现方式中,所述终端设备的标识信息包括所述终端设备的MAC地址、SN、URN以及URI中的至少一个。
在一种可能的实现方式中,所述中继设备的标识信息包括所述中继设备的MAC地址、SN、URN以及URI中的至少一个。
在一种可能的实现方式中,所述IP报文为所述终端设备发送的首个IP报文。
本发明实施例还提供了一种在网络管理设备中使用的芯片,包括通信接口和处理器;
所述通信接口,用于接收终端设备发送的互联网协议IP报文,所述IP报文是经至少一个中继设备转发至所述网络管理设备的IP报文、且所述IP报文中顺序***有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的标识信息;所述处理器,用于解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,并根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。
本发明实施例还提供了一种确定网络设备连接关系的***,包括中继设备、网络管理设备以及终端设备;
所述中继设备,用于接收上一跳设备发送的互联网协议IP报文,在所述IP报文用于***标识信息的区域中、已经***所述上一跳设备的标识信息之后的位置***所述中继设备的标识信息,并向网络管理设备转发***标识信息的IP报文,其中,所述上一跳设备为所述终端设备或不同于所述中继设备的其它中继设备;所述网络管理设备,用于接收所述***标识信息的IP报文,解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系;所述终端设备用于接收所述网络管理设备确定的所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系,确定并显示网络拓扑图,所述网络拓扑图包括所述至少一个中继设备、所述终端设备以及所述网络管理设备之间的互连信息。
本发明实施例还提供了一种计算机可读存储介质,存储为执行上述处理器所需执行的计算机软件指令,其包含用于执行上述处理器所需执行的程序。
本申请实施例中还提供了一种计算机程序产品,所述计算机程序产品中存储有指 令,当其在计算机上运行时,使得计算机执行上述第一方面或上述第一方面的任意一种可能的设计中所述的方法。
综上所述,本申请实施例提供了一种确定网络设备连接关系的方法、设备及***,通过上述方法,只要终端设备向网络管理设备发送IP报文,网络管理设备就可以通过IP报文中携带的终端设备的标识信息以及IP报文所经过的中继设备的标识信息,确定出终端设备与中继设备之间的连接关系。相比现有技术,本申请提供的确定网络设备连接关系的方法,网络管理设备不需要额外获取终端设备和中继设备的FIB,通过在终端设备发送的IP报文中***标识信息,即可确定出网络设备的连接关系,可降低确定网络设备连接关系的复杂度,且,也不需要通过FIB确定网络设备之间的连接关系,故,不存在由于通过FIB信息只能获取部分网络设备的信息,导致无法确定完整网络拓扑图的问题。
本领域内的技术人员应明白,本申请实施例可提供为方法、***、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请中一些可能的实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括本申请实施例以及落入本申请范围的所有变更和修改。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。
Claims (24)
- 一种确定网络设备连接关系的方法,其特征在于,包括:网络管理设备接收终端设备发送的互联网协议IP报文,所述IP报文是经至少一个中继设备转发至所述网络管理设备的IP报文、且所述IP报文中顺序***有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的标识信息;所述网络管理设备解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息;所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。
- 如权利要求1所述的方法,其特征在于,所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,包括:所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序;所述网络管理设备将所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序,确定为所述终端设备与所述至少一个中继设备的连接顺序,并根据所述连接顺序确定所述终端设备以及所述至少一个中继设备之间的连接关系。
- 如权利要求1或2所述的方法,其特征在于,确定所述至少一个中继设备以及所述网络管理设备之间的连接关系,包括:所述网络管理设备根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文在被发送至所述网络管理设备时所经过的最后一个中继设备;所述网络管理设备将所述最后一个中继设备,确定为与所述网络管理设备直接相连的中继设备,并根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。
- 如权利要求1或2所述的方法,其特征在于,确定所述至少一个中继设备以及所述网络管理设备之间的连接关系,包括:所述网络管理设备根据预先设置的对应关系以及所述至少一个中继设备分别对应的标识信息,确定与所述网络管理设备直接相连的中继设备;其中,所述预先设置的对应关系中包括,与所述网络管理设备直接相连的中继设备的标识信息与所述网络管理设备的标识信息之间的对应关系;所述网络管理设备根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。
- 如权利要求1至4任一项所述的方法,其特征在于,所述终端设备的标识信息包括所述终端设备的介质访问控制MAC地址、序列号SN、统一资源名称URN以及 统一资源标识符URI中的至少一个。
- 如权利要求1至5任一项所述的方法,其特征在于,所述中继设备的标识信息包括所述中继设备的介质访问控制MAC地址、序列号SN、统一资源名称URN以及统一资源标识符URI中的至少一个。
- 如权利要求1至6任一项所述的方法,其特征在于,所述IP报文为所述终端设备发送的首个IP报文。
- 一种确定网络设备连接关系的方法,其特征在于,包括:中继设备接收上一跳设备发送的互联网协议IP报文,并在所述IP报文用于***标识信息的区域中、已经***所述上一跳设备的标识信息之后的位置***所述中继设备的标识信息;所述中继设备向网络管理设备转发***标识信息的IP报文;其中,所述上一跳设备为终端设备或不同于所述中继设备的其它中继设备。
- 如权利要求8所述的方法,其特征在于,若所述上一跳设备为终端设备,则所述中继设备接收到终端设备发送的IP报文之后,还包括:所述中继设备在所述IP报文用于***标识信息的区域中、顺序***所述终端设备的标识信息以及所述中继设备的标识信息。
- 一种网络管理设备,其特征在于,包括处理器、存储器和通信接口;所述存储器存储有计算机程序;所述通信接口,用于接收终端设备发送的互联网协议IP报文,所述IP报文是经至少一个中继设备转发至所述通信接口的IP报文、且所述IP报文中顺序***有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的标识信息;所述处理器,用于调用所述存储器中存储的计算机程序执行:解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。
- 如权利要求10所述的网络管理设备,其特征在于,所述处理器根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系时,具体用于:根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序;将所述IP报文经过所述终端设备以及所述至少一个中继设备的顺序,确定为所述终端设备与所述至少一个中继设备的连接顺序,并根据所述连接顺序确定所述终端设备以及所述至少一个中继设备之间的连接关系。
- 如权利要求10或11所述的网络管理设备,其特征在于,所述处理器确定所述至少一个中继设备以及所述网络管理设备之间的连接关系时,具体用于:根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述IP报文在被发送至所述网络管理设备时所经过的最后一个中继设 备;将所述最后一个中继设备,确定为与所述网络管理设备直接相连的中继设备,并根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。
- 如权利要求10或11所述的网络管理设备,其特征在于,所述处理器确定所述至少一个中继设备以及所述网络管理设备之间的连接关系时,具体用于:根据预先设置的对应关系以及所述至少一个中继设备分别对应的标识信息,确定与所述网络管理设备直接相连的中继设备;其中,所述预先设置的对应关系中包括,与所述网络管理设备直接相连的中继设备的标识信息与所述网络管理设备的标识信息之间的对应关系;根据与所述网络管理设备直接相连的中继设备,确定所述网络管理设备以及所述至少一个中继设备之间的连接关系。
- 如权利要求10至13任一项所述的网络管理设备,其特征在于,所述终端设备的标识信息包括所述终端设备的介质访问控制MAC地址、序列号SN、统一资源名称URN以及统一资源标识符URI中的至少一个。
- 如权利要求10至14任一项所述的网络管理设备,其特征在于,所述中继设备的标识信息包括所述中继设备的介质访问控制MAC地址、序列号SN、统一资源名称URN以及统一资源标识符URI中的至少一个。
- 如权利要求10至15任一项所述的网络管理设备,其特征在于,所述IP报文为所述终端设备发送的首个IP报文。
- 一种中继设备,其特征在于,包括处理器、存储器和通信接口;所述存储器存储有计算机程序;所述通信接口,用于接收上一跳设备发送的互联网协议IP报文;所述处理器,用于调用所述存储器中存储的计算机程序执行:在所述IP报文用于***标识信息的区域中、已经***所述上一跳设备的标识信息之后的位置***所述中继设备的标识信息;所述通信接口,还用于向网络管理设备转发***标识信息的IP报文;其中,所述上一跳设备为终端设备或不同于所述中继设备的其它中继设备。
- 如权利要求17所述的中继设备,其特征在于,若所述上一跳设备为终端设备,则所述处理器还用于:在所述通信接口接收到终端设备发送的IP报文之后,在所述IP报文用于***标识信息的区域中、顺序***所述终端设备的标识信息以及所述中继设备的标识信息。
- 一种终端设备,其特征在于,包括处理器、存储器、通信接口以及显示屏幕;所述存储器存储有计算机程序;所述通信接口,用于接收基于权利要求10至16任一项所述的网络管理设备确定的所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系;所述处理器,用于根据接收到的所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系,确定网络 拓扑图,所述网络拓扑图包括所述至少一个中继设备、所述终端设备以及所述网络管理设备之间的互连信息;所述显示屏幕,用于显示所述网络拓扑图。
- 一种确定网络设备连接关系的***,其特征在于,包括中继设备、网络管理设备以及终端设备;所述中继设备,用于接收上一跳设备发送的互联网协议IP报文,在所述IP报文用于***标识信息的区域中、已经***所述上一跳设备的标识信息之后的位置***所述中继设备的标识信息,并向网络管理设备转发***标识信息的IP报文,其中,所述上一跳设备为所述终端设备或不同于所述中继设备的其它中继设备;所述网络管理设备,用于接收所述***标识信息的IP报文,解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系,还用于向终端设备发送所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系;所述终端设备用于接收所述网络管理设备确定的所述终端设备以及所述至少一个中继设备之间的连接关系、所述至少一个中继设备以及所述网络管理设备之间的连接关系,确定并显示网络拓扑图,所述网络拓扑图包括所述至少一个中继设备、所述终端设备以及所述网络管理设备之间的互连信息。
- 一种网络管理设备,其特征在于,包括接收模块以及处理模块;所述接收模块,用于接收终端设备发送的互联网协议IP报文,所述IP报文是经至少一个中继设备转发至所述网络管理设备的IP报文、且所述IP报文中顺序***有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的标识信息;所述处理模块,用于解析所述接收模块接收到的所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,并根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。
- 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机可执行指令,所述计算机可执行指令在被计算机调用时,使所述计算机执行如权利要求1至9任一项所述的方法。
- 一种计算机程序产品,其特征在于,所述计算机程序产品在被计算机调用时,使得计算机执行如权利要求1至9任一项所述的方法。
- 一种在网络管理设备中使用的芯片,其特征在于,包括通信接口和处理器;所述通信接口,用于接收终端设备发送的互联网协议IP报文,所述IP报文是经至少一个中继设备转发至所述网络管理设备的IP报文、且所述IP报文中顺序***有所述终端设备的标识信息以及所述IP报文依次经过的至少一个中继设备分别对应的 标识信息;所述处理器,用于解析所述IP报文,得到顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,并根据顺序排列的所述终端设备的标识信息以及所述至少一个中继设备分别对应的标识信息,确定所述终端设备以及所述至少一个中继设备之间的连接关系,并确定所述至少一个中继设备以及所述网络管理设备之间的连接关系。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711464187.0 | 2017-12-28 | ||
CN201711464187.0A CN109981329A (zh) | 2017-12-28 | 2017-12-28 | 确定网络设备连接关系的方法、设备及*** |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019128273A1 true WO2019128273A1 (zh) | 2019-07-04 |
Family
ID=67062990
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/102710 WO2019128273A1 (zh) | 2017-12-28 | 2018-08-28 | 确定网络设备连接关系的方法、设备及*** |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109981329A (zh) |
WO (1) | WO2019128273A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113934341A (zh) * | 2021-10-20 | 2022-01-14 | 迈普通信技术股份有限公司 | 网络策略拓扑的显示方法、装置、电子设备及存储介质 |
CN116033365A (zh) * | 2023-03-22 | 2023-04-28 | 新华三技术有限公司 | 一种通信方法、装置、电子设备及存储介质 |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111756756B (zh) * | 2020-06-28 | 2022-08-05 | 深圳市信锐网科技术有限公司 | 一种终端网络控制方法、装置及电子设备和存储介质 |
CN112234712B (zh) * | 2020-10-12 | 2022-06-10 | 国网河北省电力有限公司信息通信分公司 | 配电网拓扑辨识方法 |
CN113162824B (zh) * | 2021-04-13 | 2022-11-04 | 深圳市奇虎智能科技有限公司 | 路由器对子路由下的设备识别方法、***、存储介质及计算机设备 |
CN113179225B (zh) * | 2021-04-26 | 2022-11-04 | 深圳市奇虎智能科技有限公司 | 子路由的应用识别与处理方法、***、存储介质及计算机设备 |
CN116137594A (zh) * | 2021-11-18 | 2023-05-19 | ***通信集团重庆有限公司 | 一种网络拓扑的生成方法、装置、设备及存储介质 |
CN114884765B (zh) * | 2022-01-14 | 2024-06-21 | 天地融科技股份有限公司 | 基于中继设备的plc总线通信方法、***及中继设备 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102624935A (zh) * | 2011-01-26 | 2012-08-01 | 华为技术有限公司 | 一种转发报文的方法,装置和*** |
US20120320795A1 (en) * | 2008-12-30 | 2012-12-20 | Juniper Networks, Inc. | Method and apparatus for determining a network topology during network provisioning |
CN105991334A (zh) * | 2015-02-28 | 2016-10-05 | ***通信集团广西有限公司 | 一种网络拓扑自发现方法及装置 |
CN106209653A (zh) * | 2014-09-22 | 2016-12-07 | 来克莎科技有限公司 | 路由架构 |
CN107104824A (zh) * | 2017-03-31 | 2017-08-29 | 紫光华山信息技术有限公司 | 一种网络拓扑确定方法和装置 |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101047618B (zh) * | 2006-03-29 | 2013-11-06 | 华为技术有限公司 | 获取网络路径信息的方法和*** |
CN106936656B (zh) * | 2015-12-30 | 2020-01-03 | 华为技术有限公司 | 一种实现丢包检测的方法、装置和*** |
CN106411642B (zh) * | 2016-09-21 | 2019-09-17 | 杭州迪普科技股份有限公司 | 一种报文转发路径探测的方法和装置 |
CN106452862A (zh) * | 2016-09-29 | 2017-02-22 | 北京东土科技股份有限公司 | 一种确定环形网络的方法及装置 |
CN106470213A (zh) * | 2016-10-17 | 2017-03-01 | 杭州迪普科技股份有限公司 | 一种攻击报文的溯源方法和装置 |
CN106452963A (zh) * | 2016-10-18 | 2017-02-22 | 北京东土科技股份有限公司 | 网络路径侦测方法和*** |
-
2017
- 2017-12-28 CN CN201711464187.0A patent/CN109981329A/zh active Pending
-
2018
- 2018-08-28 WO PCT/CN2018/102710 patent/WO2019128273A1/zh active Application Filing
Patent Citations (5)
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 (zh) * | 2011-01-26 | 2012-08-01 | 华为技术有限公司 | 一种转发报文的方法,装置和*** |
CN106209653A (zh) * | 2014-09-22 | 2016-12-07 | 来克莎科技有限公司 | 路由架构 |
CN105991334A (zh) * | 2015-02-28 | 2016-10-05 | ***通信集团广西有限公司 | 一种网络拓扑自发现方法及装置 |
CN107104824A (zh) * | 2017-03-31 | 2017-08-29 | 紫光华山信息技术有限公司 | 一种网络拓扑确定方法和装置 |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113934341A (zh) * | 2021-10-20 | 2022-01-14 | 迈普通信技术股份有限公司 | 网络策略拓扑的显示方法、装置、电子设备及存储介质 |
CN113934341B (zh) * | 2021-10-20 | 2024-04-09 | 迈普通信技术股份有限公司 | 网络策略拓扑的显示方法、装置、电子设备及存储介质 |
CN116033365A (zh) * | 2023-03-22 | 2023-04-28 | 新华三技术有限公司 | 一种通信方法、装置、电子设备及存储介质 |
CN116033365B (zh) * | 2023-03-22 | 2023-06-20 | 新华三技术有限公司 | 一种通信方法、装置、电子设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN109981329A (zh) | 2019-07-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019128273A1 (zh) | 确定网络设备连接关系的方法、设备及*** | |
CN106452857B (zh) | 生成配置信息的方法和网络控制单元 | |
US7995483B1 (en) | Simultaneously testing connectivity to multiple remote maintenance endpoints of the same maintenance association | |
WO2018120798A1 (zh) | Vxlan报文处理方法、设备及*** | |
JP5855630B2 (ja) | 仮想ローカルエリアネットワークのクラウドアプライアンスを管理するための管理サーバおよびその管理方法 | |
US10439931B2 (en) | Data packet processing method, service node, and delivery node | |
CN104883547B (zh) | 基于网络接入设备物理端口接入ipc的方法及nvr | |
CN110798403B (zh) | 通信方法、通信设备和通信*** | |
WO2014118622A1 (en) | Method of managing zigbee network in the internet of things | |
CN103580980A (zh) | 虚拟网络自动发现和自动配置的方法及其装置 | |
KR20150022722A (ko) | 중앙 탐색 메커니즘을 이용하는 통신 장치 및 그 방법 | |
CN109474495B (zh) | 一种隧道检测方法及装置 | |
US20180083850A1 (en) | Service performance monitoring in a virtualized communication network | |
JP7053901B2 (ja) | ループ回避通信方法、ループ回避通信デバイスおよびループ回避通信システム | |
WO2016202056A1 (zh) | 一种家庭网络服务共享的方法及装置 | |
US8964749B2 (en) | Method, device and system for establishing a pseudo wire | |
JP7124206B2 (ja) | パケット処理方法およびゲートウェイ・デバイス | |
US10880162B1 (en) | Linking logical broadcast domains | |
CN107547665A (zh) | 一种dhcp地址分配的方法、设备及*** | |
US11863394B2 (en) | Connectivity detection session creation method, network device, and system | |
JP2014513453A (ja) | 無線端末及びホストデバイスのための通信方法、無線端末、及びホストデバイス | |
WO2019196914A1 (zh) | 一种发现转发路径的方法及其相关设备 | |
CN104486217A (zh) | 跨网络的报文转发方法和设备 | |
CN104468158B (zh) | 一种节点间状态通告的方法和设备 | |
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 |