WO2022037322A1 - Network topology management system and method for home networking - Google Patents

Network topology management system and method for home networking Download PDF

Info

Publication number
WO2022037322A1
WO2022037322A1 PCT/CN2021/106059 CN2021106059W WO2022037322A1 WO 2022037322 A1 WO2022037322 A1 WO 2022037322A1 CN 2021106059 W CN2021106059 W CN 2021106059W WO 2022037322 A1 WO2022037322 A1 WO 2022037322A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
routing
routing device
mac address
main
Prior art date
Application number
PCT/CN2021/106059
Other languages
French (fr)
Chinese (zh)
Inventor
何昆鹏
Original Assignee
烽火通信科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 烽火通信科技股份有限公司 filed Critical 烽火通信科技股份有限公司
Priority to MX2022008972A priority Critical patent/MX2022008972A/en
Publication of WO2022037322A1 publication Critical patent/WO2022037322A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks

Definitions

  • the present invention relates to the technical field of home networking, in particular to a system and method for network topology management of home networking.
  • a home networking device is generally composed of a main routing device + n sub-routing devices.
  • the topology structure will form a multi-level home network topology.
  • the technical problem to be solved by the present invention is that with the gradual maturity of home networking technology, networking through main routing device + sub-routing device has become a common method for home network extension.
  • how to manage the complete topology information of the main and sub-routing devices and the connected terminal devices in the home networking network is a problem that needs to be solved at present.
  • the main routing device can obtain information such as the device IP addresses, MAC addresses and other information of all the attached terminals through the dynamic host configuration protocol DHCP request message for obtaining the addresses of the attached devices, but cannot obtain complete network topology information. It is unknown through which sub-routing device the connected terminal device is connected, and whether the connected terminal device or the sub-routing device is requesting address allocation.
  • the present invention adopts following technical scheme:
  • the present invention includes a system for home networking network topology management, the system includes a main routing device, one or more sub-routing devices, and one or more terminal devices, and the sub-routing devices are wired or wireless. , access the main routing device or other sub-routing devices located on its upstream, and the terminal device accesses the main routing device or sub-routing device through wired or wireless means, specifically:
  • the main routing device works in routing mode, and the main routing device provides wired and/or wireless link channels for each terminal device and sub-routing device inside the home network to access the home network; wherein, the main routing device assigns IP to the sub-routing device and the terminal device. address;
  • the bridge mode in which the sub-routing device works establishes a link channel with the main routing device through wired and/or wireless means for the downlink sub-routing device and/or the connected terminal device that has completed the access; the sub-routing device and the main routing device A dedicated management channel is also established therebetween for the sub-routing device to report the information of the connected terminal device and/or the information of the downlink sub-routing device that forms an access relationship with it.
  • each entry in the networking topology information database is information of a device in the home networking device, and the device information includes device MAC address, device type, device name, device IP address, device access mode, and access interface.
  • the devices include sub-routing devices and terminal devices;
  • the device type, device access mode, access interface name, device access status, and uplink device MAC address/downlink device MAC address are sent to the main routing device by the sub-routing device by transmitting private protocol messages through the dedicated management channel , and other information is obtained by the main routing device from the DHCP exchange message.
  • the method further includes:
  • the sub-routing device sends private protocol messages to the main routing device through the dedicated management channel;
  • the main routing device After receiving the private protocol message of the sub-routing device, the main routing device uses the device MAC address of the sub-routing device as a search key to search in the networking topology information database; Describe the information of the sub-routing device; if found, update the device type corresponding to the record of the sub-routing device in the networking topology information database to the sub-routing type;
  • the sub-routing device After the sub-routing device is successfully registered, check whether the local device database of the sub-routing device has access to the device, and if so, send the device MAC address and device access mode of the sub-routing device to the main router through the dedicated management channel.
  • the device, the main routing device updates the networking topology information database; wherein, the attached devices include sub-routing devices and/or terminal devices.
  • the system further includes:
  • the main routing device obtains one or more of the device IP address, device MAC address and device name of the sub-routing device or terminal according to the DHCP exchange message with the sub-routing device or terminal device;
  • the main routing device uses the device MAC address of the sub-routing device or terminal device as a search key to search for the corresponding sub-routing device or terminal device in the networking topology information database; If it is not found, a record will be added to the network topology information database to record the corresponding information.
  • each sub-routing device sends a link layer discovery protocol packet to the neighboring device through the WAN side interface.
  • the information obtained in the link layer discovery protocol message includes: device MAC address and device type; when the uplink device is a sub-routing device, the uplink device stores the MAC address according to the device MAC address in the link layer discovery protocol message.
  • the upstream device is the main routing device
  • the uplink device searches for the access interface name of the corresponding sub-routing device in the address learning table storing the MAC address according to the device MAC address in the link layer discovery protocol message, and stores the device MAC address, device type and search
  • the outgoing access interface name is written into the networking topology information database
  • the local attached device database maintained by each sub-routing device is used when the sub-routing device reports the information of the attached terminal device and/or the information of the downstream sub-routing device that forms an access relationship with it through private protocol messages.
  • each main routing device or sub-routing device when the terminal device accesses in a wired manner and the corresponding terminal device does not support the link layer discovery protocol message, each main routing device or sub-routing device also obtains the access master according to the MAC address access message.
  • Information about the terminal devices attached to the routing device or sub-routing device including:
  • the sub-routing device If the sub-routing device receives the MAC address access message, it searches the local attached device database to see whether the interface carried in the corresponding MAC address access message has been connected to the sub-routing device; if the main routing device receives the MAC address access After the message, find out whether the interface carried in the corresponding MAC address access message has accessed the sub-routing device from the networking topology information database;
  • the MAC address access message is not processed, and the device corresponding to the device MAC address is not a directly connected device;
  • the device information carried in the MAC address access message corresponds to a directly connected terminal device, and the device information carried in the MAC address access message is stored in the local connected device.
  • the device database or the networking topology information database In the device database or the networking topology information database.
  • each sub-routing device directly saves the corresponding device information in the local connected device database according to the device MAC address and the name of the WiFi interface connected in the WiFi online and offline message after receiving the WiFi online and offline message;
  • the main routing device After receiving the WiFi online and offline message, the main routing device directly saves the corresponding device information in the networking topology information database according to the device MAC address and the name of the connected WiFi interface in the WiFi online and offline message.
  • the system further includes:
  • the sub-routing device obtains the device MAC address and device access mode of the terminal device, and the sub-routing device sends the directly connected terminal device MAC address, device access mode and the sub-routing device's own device MAC address through the dedicated management channel. Send to the main routing device;
  • the main routing device After receiving the information sent by the sub-routing device, the main routing device uses the device MAC address of the terminal device carried in the information content as a search key to search in the networking topology information database to determine whether there is corresponding device information; If found, add a record in the networking topology information database and add the device MAC address of the corresponding terminal device, the device access mode, and the device MAC address of the sub-routing device itself into the networking topology information database; Then the confirmation of the device access mode and the device MAC address of the sub-routing device itself is completed.
  • the device when a device on the sub-routing device or the main routing device goes offline, an event notification that the device goes offline is received, wherein the device includes a terminal device and/or a sub-routing device, and the system further includes:
  • the sub-routing device determines whether the sub-routing device that receives the event notification that the device goes offline has obtained the IP address assigned by the main route; if it has obtained the IP address, it will go offline
  • the device MAC address of the device is sent to the main routing device; the corresponding offline device information is deleted in the local device database of the sub-routing device;
  • the main routing device receives the event notification that the device goes offline, the device MAC address of the device is used as a search key to search in the networking topology information database and delete the device information, if the device type of the offline device is For sub-routing devices, the main routing device traverses the networking topology information database, and deletes the information of the sub-routing devices whose MAC address is the device; wherein, the sub-routing device information includes sub-routing devices and/or terminal devices.
  • the present invention also provides a method for home networking network topology management, which is applied to the system for home networking network topology management described in the first aspect, and the method includes:
  • the main routing device obtains the downstream sub-routing device information and/or the attached terminal device information of each sub-routing device through the dedicated management channel established with the sub-routing device , and also obtain one or more of the device IP address, device MAC address, and device name of the sub-routing device or terminal device from the DHCP exchange message;
  • the content obtained from the dedicated management channel and the content obtained in the DHCP exchange message are combined to generate a complete home network topology.
  • the present invention further provides an apparatus for managing a network topology in a home networking, which is used to implement the method for managing a network topology in a home networking described in the second aspect, and the apparatus includes:
  • the at least one processor and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the processor for The home networking network topology management method described in the second aspect is executed.
  • the present invention also provides a non-volatile computer storage medium storing computer-executable instructions, the computer-executable instructions being executed by one or more processors for completing the second The home networking network topology management method described in the aspect.
  • the invention provides a system and method for home networking network topology management, which can present a complete and intuitive home network topology structure to users, and is convenient for users to operate and manage devices in the network topology through complete topology information.
  • FIG. 1 is a home networking topology diagram of a home networking network topology management provided by an embodiment of the present invention
  • FIG. 2 is a schematic diagram of fields of a networking topology information database for home networking network topology management provided by an embodiment of the present invention
  • FIG. 3 is a related packet capture content of a home networking network topology management provided by an embodiment of the present invention.
  • FIG. 4 is a related packet capture content of a home networking network topology management provided by an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a method for managing network topology in a home networking according to an embodiment of the present invention
  • FIG. 6 is a schematic flowchart of a method for managing network topology in a home networking according to an embodiment of the present invention
  • FIG. 7 is a system block diagram of a home networking network topology management provided by an embodiment of the present invention.
  • FIG. 8 is a management process of adding a device to a home network in a method for managing a network topology of a home networking according to an embodiment of the present invention
  • FIG. 9 is a management flow of device acquisition of IP addresses in a method for home networking network topology management provided by an embodiment of the present invention.
  • 10 is a management flow of a device leaving a home network in a method for managing network topology in a home networking provided by an embodiment of the present invention
  • 11 is a flow chart of sub-routing device registration and heartbeat maintenance management in a method for home networking network topology management provided by an embodiment of the present invention
  • FIG. 12 is a schematic structural diagram of an apparatus for network topology management of a home networking according to an embodiment of the present invention.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • Embodiment 1 of the present invention provides a system and method for home networking network topology management. As shown in FIG. 1 , it is a networking diagram of a system for network topology management of a home networking.
  • the system includes a main routing device, one or more sub-routing devices, and one or more terminal devices.
  • the sub-routing device is connected to the main routing device or other sub-routing devices located on its upstream through wired or wireless means.
  • the terminal device is connected to the main routing device or sub-routing device through wired or wireless means, specifically:
  • the main routing device works in routing mode, and the main routing device provides wired and/or wireless link channels for each terminal device and sub-routing device inside the home network to access the home network; wherein, the main routing device assigns IP to the sub-routing device and the terminal device. address;
  • the bridge mode in which the sub-routing device works establishes a link channel with the main routing device through wired and/or wireless means for the downlink sub-routing device and/or the connected terminal device that has completed the access; the sub-routing device and the main routing device There is also an exclusive management channel (based on the IP address assigned by the main routing device to the sub-routing device), which is used for the sub-routing device to report the information of the connected terminal device and/or the downlink sub-routing device that forms an access relationship with it. Information about the routing device.
  • the embodiments of the present invention provide a system for home networking network topology management, which can present a complete and intuitive home network topology structure to users; users can operate and manage devices in the network topology through complete topology information. It overcomes the problem in the prior art that the main routing device can obtain the device IP address, device MAC address and other information of all the attached terminals from the dynamic host configuration protocol DHCP request message for obtaining the address of the attached device, but cannot obtain the complete network. Topology information, such as the following sub-routing device through which the terminal device is connected is unknown, and whether it is the sub-routing device or the sub-routing device that requests address allocation.
  • DHCP Dynamic Host Configuration Protocol
  • DHCP Dynamic Host Configuration Protocol
  • the system when the terminal device accesses the sub-routing device in a wired or wireless manner, the system further includes:
  • the sub-routing device obtains the device MAC address and device access mode (including wireless and wired mode) of the terminal device.
  • the MAC address of the device is sent to the main routing device through the dedicated management channel; the specific implementation can refer to the existing related protocol messages, and based on the sub-routing device and the main routing device knowing the corresponding transmission protocol, the message field is customized. mode, completes the transmission of the device MAC address of the terminal device, the device access mode, and the device MAC address information of the sub-routing device itself.
  • the main routing device After receiving the information sent by the sub-routing device, the main routing device uses the device MAC address of the terminal device carried in the information as a search key to search in the networking topology information database (for example, directly in the networking topology information database). If there is no corresponding device information, add a record to the network topology information database and add the device MAC address, device access mode and sub-routing device of the corresponding terminal device. Its own device MAC address (for example, including the sub-router's own MAC address) is added to the networking topology information database; if it is found, the device access mode and the sub-router's own device MAC address are confirmed.
  • the networking topology information database for example, directly in the networking topology information database.
  • the device MAC address of the terminal device, the device access mode, and the device MAC address of the sub-routing device are composed of key information content as a record.
  • the networking topology information When displaying the networking topology information, it can be recorded according to the networking topology information database. A number of corresponding records are generated to complete the network generation.
  • the purpose of the above confirmation is that if part of the information has changed, it is necessary to make a security judgment (this is not an improvement point of the present invention, so it will not be repeated), and to determine whether to update the records in the networking topology information database. content.
  • the system when the terminal device or the sub-routing device obtains the IP address from the main routing device, the system further includes:
  • the main routing device obtains one or more of the device IP address, device MAC address and device name of the sub-routing device or terminal device according to the DHCP exchange message with the sub-routing device or terminal device;
  • the main routing device uses the device MAC address of the sub-routing device or terminal device as a search key to search for the corresponding sub-routing device or terminal device in the networking topology information database; If it is not found, a record will be added to the network topology information database to record the corresponding information.
  • the networking topology information database is usually maintained locally on the main routing device; however, as an optional solution, it is not excluded to store and store the networking topology information database through an independent storage device. maintain.
  • Figure 2 a schematic diagram of the content structure of a piece of topology information in the networking topology information database, each entry in the networking topology information database is the information of a device in the home networking device, and the device information includes the device MAC address, One of device type, device name, device IP address, device access method, access interface name, device access status (including device online status and device offline status), uplink device MAC address and downlink device MAC address, or It should be noted that when the corresponding information is specifically implemented, it serves for the topology network to be displayed and the device subject.
  • the network construction requirements between the sub-routers can be completed, and which one to choose depends on the network requirements and usage habits; and the access interface name is a device (especially referring to the main routing device and the sub-routing device)
  • the access interface name is a device (especially referring to the main routing device and the sub-routing device)
  • an access interface it expression form can be a string or a series of numbers, specifically in other embodiments of the present invention, it can also be expressed as the name of the WiFi interface, the interface number in the ARP message, etc.
  • the device access method is optional and does not substantially affect the networking relationship.
  • the device type, device access method, access interface name, device access status, and uplink device MAC address/downlink device MAC address are sent to the main routing device by means of private protocol messages transmitted through the dedicated management channel, and other information
  • the device MAC address, device IP address, and device name of the terminal device are obtained from the DHCP exchange message.
  • the DHCP exchange message is shown in Figure 3 below.
  • the DHCP Request message sent by the terminal device or sub-routing device to the main route is as follows.
  • the message contains the device MAC address (Client MAC address) and device name ( Host Name).
  • the DHCP ACK message returned by the main route to the sub-router or terminal device is as follows.
  • the message carries the device MAC address (Client MAC address) and device IP address (Your Client IP address) of the end device or sub-route device address) and device type (Option 60vendor class identifier).
  • Device MAC address It can be obtained through Link Layer Discovery Protocol (LLDP) packets, WiFi online and offline messages, or ARP packets.
  • LLDP Link Layer Discovery Protocol
  • the device type of the sub-route can be obtained from the LLDP message, or it can be analyzed and judged from the registration message sent by the sub-route to the main route.
  • Device name It can be obtained from the DHCP message.
  • Device IP address It can be obtained from ARP message or from DHCP message.
  • Device access mode and access interface name You can determine the device access mode and access interface name by looking up the network interface corresponding to the MAC address in the MAC address learning table.
  • Upstream MAC address When reporting the directly attached device for the sub-router through a private protocol, fill in its own MAC address in the message, and the main route can obtain the upstream device MAC corresponding to the attached device according to the message.
  • the LLDP message is a layer-2 message that advertises the device's own information to neighbors
  • the DHCP message is a message for the sub-routing device and the terminal device to obtain an address from the DHCP server. Route device communication.
  • An embodiment of the present invention provides a method for home networking network topology management.
  • the method is performed based on the system for home networking network topology management proposed in Embodiment 1. As shown in FIG. 5 , the method includes:
  • the main routing device obtains downlink sub-routing device information and/or downlink sub-routing device information of each sub-routing device through a dedicated management channel established with the sub-routing device information of the connected terminal device, and also obtain one or more of the device IP address, device MAC address, and device name of the sub-routing device or the terminal device from the DHCP exchange message.
  • step 202 according to the device MAC address, the content obtained by the dedicated management channel and the content obtained in the DHCP exchange message are combined to generate a complete home network networking topology.
  • the embodiments of the present invention provide a system for home networking network topology management, which can present a complete and intuitive home network topology structure to users; users can operate and manage devices in the network topology through complete topology information.
  • the main routing device When the main routing device receives a DHCP request from a sub-router or an attached terminal device, it only knows that the sub-routing device or attached terminal device is an internal device in the network, but does not know whether the device is directly attached to the main routing device or not. On other sub-routing devices, the main routing device cannot know the topology relationship among the main routing device, sub-routing devices, and terminal devices.
  • Each main/sub-routing device can determine its directly attached device in several ways:
  • the first method After each sub-routing device obtains an IP address, the device access management module will send LLDP packets to the neighbor device through the WAN side interface.
  • the upstream device of the sub-routing device (the upstream device may be a sub-routing or After the device access management module in the main route) receives the LLDP message, it can obtain the following information from the LLDP message: device MAC address (chassis ID), device type (System Description), where the device type can be customized. If it is "Agent", it indicates that the device is a sub-routing device.
  • Other terminal devices that support the LLDP protocol (not all terminal devices support LLDP) will also send LLDP packets.
  • the device type is defined by the device manufacturer.
  • the device type of the non-Agent device is obtained from the DHCP message.
  • the uplink device can find out which interface the sub-routing device accesses from in the MAC address learning table according to the device MAC address in the LLDP message, and the device access management module writes the device MAC address, device type, and access interface name into the local In the corresponding database (that is, the networking topology information database of the main routing device and the local attached device database of the sub-routing device).
  • the device access management module writes the device MAC address, device type, and access interface name into the local In the corresponding database (that is, the networking topology information database of the main routing device and the local attached device database of the sub-routing device).
  • an upstream device receives an LLDP message sent by a sub-route or terminal device, it indicates that the sub-route device is the device directly attached to the upstream device. Topological relationships of some terminal devices and their upstream devices. Therefore, there are further the second and third points proposed below, which are used to make up for the deficiencies
  • the second method the terminal device directly connected to WiFi access will notify the device access management module through the WiFi log-off and log-off message. line), the name of the connected WiFi interface (that is, a specific form of the name of the access interface), after receiving the message, the sub-route or main route device directly saves the device information in the local corresponding database without filtering.
  • the access message (for example, it can be used in the ARP message, and the ARP message does not carry the interface number (that is, the specific representation of the access interface name), but the main routing device/sub-routing device can infer the corresponding MAC address based on which interface receives the ARP message. interface number) to obtain the information of the terminal device accessing the device, including the MAC address of the device and the name of the access interface, but the device information obtained from the MAC address access message of the device is not all that of the main/sub-routing device.
  • the device is directly connected to the device. Some devices are accessed through the next-level sub-route. Therefore, a filter needs to be performed.
  • After receiving the MAC address access message check whether the corresponding interface (that is, the access interface name) is from the local corresponding database. If the sub-routing device has been accessed and the MAC address access message has not been processed, the device corresponding to the device MAC address is not a directly connected device. If it has not been accessed, it indicates that the device information carried in the MAC address access message corresponds to a directly connected terminal device, and the device information carried in the MAC address access message is stored in the local connected device. in the device database.
  • the first mode, the second mode and the third mode can be appropriately combined in the specific implementation process, and the solution after the combination usually needs to deduplicate the acquired data; wherein, the second mode makes up for the When the connected device connected wirelessly does not support LLDP packets, the third method further makes up for the possible omissions of the first method, and uses the analysis result of the first method as the filtering basis, which improves the processing efficiency. effectiveness.
  • the embodiment of the present invention it is not excluded that in certain scenarios, any one of the above-mentioned first method or the second method can be directly applied to complete the judgment of the directly connected device, and the corresponding solution also belongs to the protection scope of the present invention. Inside.
  • the sub-routing device or the main routing device when a terminal device is connected to the sub-routing device or the main routing device, the sub-routing device or the main routing device receives the online message of the terminal device, and the method specifically includes:
  • the sub-routing device If the sub-routing device is accessed by a terminal device, the sub-routing device obtains the MAC address of the terminal device, the device access method, and the MAC address of the sub-routing device itself, and the sub-routing device determines whether it has an IP address assigned to it. If an IP address has not been assigned by the main routing device, the local device database will be updated; if an IP address has been assigned, the acquired terminal device information and its own MAC address will be sent to the main routing device through a dedicated management channel. It should be noted here that in the specific implementation process, the sub-routing device determines whether it is assigned an IP address, and if it has not been assigned an IP address by the main routing device, it updates the local device database.
  • the sub-routing device After the sub-routing device determines to obtain the IP address assigned by the main routing device, it will report the updated local device database to the main routing device as soon as possible.
  • the database of all locally attached devices may be reported, or the device information updated before the IP address assigned by the main routing device is obtained.
  • the locally attached device database in the sub-routing device is usually also reported to the main routing device according to a preset policy, and the corresponding policy includes periodic reporting, or, according to local updates Report after the number of times reaches the preset number, or a combination of the above two methods, and so on.
  • the main routing device After receiving the information sent by the sub-routing device, the main routing device uses the device MAC address of the terminal device as a search key to search in the networking topology information database; if the terminal device is found, it updates the device access mode and uplink. Access device MAC (that is, the MAC address of the sub-route); if the terminal device is not found, add a new record in the networking topology information database, and write the terminal device MAC, device access mode and uplink connection. Enter the device MAC.
  • Access device MAC that is, the MAC address of the sub-route
  • a terminal device or a sub-routing device is also involved, and the method process for obtaining an IP address, as shown in FIG. 6 , includes:
  • step 301 the terminal device or the sub-routing device sends a request message for acquiring the device IP address of the terminal device to the main routing device.
  • the main routing device parses the device IP address, device MAC address and device name related information from the DHCP exchange message, and searches in the networking topology information database according to the device MAC address; wherein, the device IP address
  • the address, device MAC address and device name parameters include those belonging to sub-routing devices and/or those belonging to terminal devices.
  • step 303 if found, add the device IP address and device name of the terminal device to the networking topology information database; if not found, then add a new record, write the device IP address, MAC address and device name One or more of the names.
  • the present invention also relates to receiving an event notification that the device goes offline when a device on the sub-routing device or the main routing device goes offline, wherein the device includes a terminal device and/or a sub-routing device, and the method further includes:
  • the sub-routing device or the main routing device After the sub-routing device or the main routing device receives the event notification that the device goes offline, it updates the local corresponding database of the device MAC address of the offline device. Delete in the local corresponding database.
  • a column of offline state parameter attributes may also be added to the local corresponding database, and when the local corresponding database is regularly maintained, if the corresponding offline implementation exceeds a preset threshold, deletion processing is performed.
  • the sub-routing device determines whether the sub-routing device that receives the event notification that the device goes offline has obtained the IP address assigned by the main route; if it has obtained the IP address, it will go offline
  • the device MAC address of the device is sent to the main routing device; the corresponding offline device information is deleted in the local device database of the sub-routing device;
  • the main routing device receives the event notification that the device goes offline, the device MAC address of the device is used as a search key to search in the networking topology information database and delete the device information, if the device type of the offline device is For sub-routing devices, the main routing device traverses the networking topology information database, and deletes the information of the sub-routing devices whose MAC address is the device; wherein, the sub-routing device information includes sub-routing devices and/or terminal devices.
  • the method also includes a heartbeat maintenance and management process of a sub-routing device, specifically:
  • the first sub-routing device After successfully registering with the main routing device, the first sub-routing device periodically sends a heartbeat message to the main routing device.
  • the main routing device does not receive the heartbeat message of the first sub-routing device within the preset time, it will store the relevant information of the first sub-routing device and each device connected to the first sub-routing device in the networking topology information database. delete. That is, all records in which the MAC address of the upstream device is the same as the MAC address of the device of the first sub-routing device are deleted.
  • the "first sub-routing device" in the description is only a "first" label added for the convenience of quoting in the process of content expansion, and has no special limiting meaning in the specific implementation identification process.
  • FIG. 7 it is a system block diagram of a home networking network topology management applicable to an embodiment of the present invention.
  • many functional modules are introduced into the present invention to describe the functions of the main routing device and the sub-routing device.
  • the device access management module, DHCP Server module, networking management Server module and networking topology information database of the main routing device are composed of four parts.
  • the device access management module, DHCP Client module, networking management Client module and The local device database is composed of four parts.
  • the DHCP Server module of the main routing device assigns IP addresses to the sub-routing devices and terminal devices of the home network; the device access management module of the main routing device manages wired and wireless devices that directly access the device through wired and wireless;
  • the networking management Server module of the routing device is used to communicate with the networking management Client module of the sub-routing device to manage sub-routing devices and terminal devices that are not directly connected to the device; the DHCP Client module of the sub-routing device
  • the DHCP Server module obtains the address of the management connection, and the sub-routing device uses this address to establish socket communication with the main routing device; the device of the sub-routing device is connected to the management module to manage the sub-routing devices that directly access the device through wired and/or wireless
  • the figure is a device joining management process involved in a method for managing a network topology of a home networking.
  • step 401 when a device in the sub-routing device/main routing device is connected in a wired or wireless manner, the device access management module of the sub-routing device/main routing device will receive a corresponding device online message.
  • step 402 different processing flows are performed respectively according to whether the sub-routing device or the main routing device receives the device online message. If the subject of the online message is the sub-routing device, step 403 is executed; if the subject of the online message is not the sub-routing device, that is, if the subject of the online message is the main routing device, step 406 is executed.
  • the device access management module of the sub-routing device obtains the MAC address of the access device, the device access mode, and the device MAC address of the device, and sends them to the network management client module of the device by means of internal communication.
  • step 404 it is judged for the sub-routing device whether the device has obtained the IP address allocated by the main route. If the IP address allocated by the main route has not been obtained, go to step 408 to update the local device database. At this time, the process ends; otherwise, go to step 408. Step 405.
  • step 405 the networking management Client module sends the information to the networking management Server module of the main router, and then proceeds to step 407 .
  • step 406 the device access management module of the main routing device obtains the device MAC address of the access device, the device access mode, and the device MAC address of the device as the uplink device MAC address, and sends it to the network management server of the main routing device. module, and then go to step 407.
  • the network management server module of the main route uses the device MAC address as a search key to search in the network topology information database. If the device is found, update the device access mode and the MAC address of the upstream device; if not, add a new record in the networking topology information database and write the corresponding device MAC, device access mode and uplink access device MAC address After that, end the process.
  • step 408 the local attached device database of the sub-routing device is updated, and the process ends.
  • the figure is a schematic diagram of the management process flow of the device acquiring an IP address in a method for network topology management of a home network, including:
  • step 501 the DHCP Client module of the terminal device or the sub-routing device obtains the device IP address from the main-routing device.
  • the DHCP Server module of the main routing device parses the device MAC address, device IP address, device name and other information from the DHCP exchange message, and sends the information to the network management of the main routing device through internal message communication Server module.
  • the network management server module of the main routing device uses the device MAC address as a search key to search in the network topology information database, and if found, adds the device IP address and device name to the group In the network topology information database; if not found, a new record will be added, and related information such as device MAC address, device IP address and device name will be written.
  • the figure shows the management process of device leaving in a method for network topology management in a home network, including:
  • step 601 when a device on the sub-routing device/main routing device goes offline, the device access management module of the sub-routing device/main routing device will receive an offline message of the device.
  • step 602 it is determined whether the main routing device or the sub-routing device receives the offline message of the device. If the judgment result is a sub-routing device, step 603 is performed; otherwise, step 606 is performed.
  • step 603 the device access management module of the sub-routing device sends the device MAC address of the offline device to the networking management Client module by means of internal message communication.
  • step 604 it is determined whether the sub-router has obtained the IP address assigned to itself by the main routing device before receiving the offline message of the corresponding attached device. If the IP address assigned to the self by the main routing device is obtained, step S605 is performed; otherwise, step 608 is performed.
  • step 605 the networking management client module sends the device MAC address of the corresponding offline device to the networking management server module of the main router, and the process proceeds to step 607 .
  • the MAC address of the carrying device and the access state information (ie the offline state) of the corresponding device are sent specifically.
  • step 606 the device access management module of the main routing device obtains the MAC address of the offline device, the device access mode, and the device MAC address of the device, and sends them to the network management server module of the device.
  • the network management server module of the main route uses the device MAC address carried in the corresponding message as a search key to search in the networking topology information database and delete the device information, if the offline device
  • the device type of the device is a sub-router
  • the main routing device traverses the networking topology information database, deletes the device information whose MAC address of the upstream device is this device, and ends the process.
  • the attached device information includes sub-routing devices and/or terminal devices.
  • step 608 the local attached device database of the sub-routing device is updated, and the process ends.
  • the figure is a flow of sub-routing device registration and heartbeat maintenance management in a method for home networking network topology management.
  • the methods include:
  • step 701 the networking management Client module of the sub-routing device sends a registration message to the networking management Server module of the main routing.
  • the main routing device uses the MAC address of the sub-routing device as a key to search in the networking topology information database.
  • the relevant information of the sub-routing device is added to the information database, including the IP address of the sub-routing device, the MAC address of the sub-routing device, and the information that the device type is "sub-routing"; if found, the device type of the sub-routing device Change it to "subroute”.
  • step 703 the main routing device replies to the sub-routing device a successful registration message.
  • step 704 after the sub-routing device is successfully registered, it is searched whether the local device database of the sub-routing device has access to the device.
  • the main routing device the main routing device updates the network topology information database, the update process refers to the device access process in FIG. 8, and after the update, step 706 is executed to reply that the sub-route is updated successfully.
  • step 707 and step 708 it is a heartbeat message between the sub-router and the main route, and the sub-router regularly sends a heartbeat message to the main route after successfully registering with the main route.
  • step 709 if the main route does not receive the heartbeat message of the sub-route within the specified time, the relevant information of the sub-route and the devices attached to the sub-route is deleted from the networking topology information database.
  • FIG. 12 it is a schematic structural diagram of a home networking network topology management apparatus according to an embodiment of the present invention.
  • the home networking network topology management apparatus in this embodiment includes one or more processors 21 and a memory 22 .
  • one processor 21 is taken as an example in FIG. 12 .
  • the processor 21 and the memory 22 may be connected by a bus or in other ways, and the connection by a bus is taken as an example in FIG. 12 .
  • the memory 22 can be used to store non-volatile software programs and non-volatile computer-executable programs, such as the home networking network topology management method in Embodiment 1.
  • the processor 21 executes the home networking network topology management method by running the non-volatile software programs and instructions stored in the memory 22 .
  • Memory 22 may include high speed random access memory, and may also include nonvolatile memory, such as at least one magnetic disk storage device, flash memory device, or other nonvolatile solid state storage device.
  • the memory 22 may optionally include memory located remotely from the processor 21, and these remote memories may be connected to the processor 21 through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the program instructions/modules are stored in the memory 22, and when executed by the one or more processors 21, execute the home networking network topology management method in the above Embodiment 1, for example, execute the above-described diagram. 5.

Abstract

The present invention relates to the technical field of home networking, and provides a network topology management system and method for home networking. In said system, a main routing device works in a routing mode, and the main routing device provides a wired and/or wireless link channel for various terminal devices and sub-routing devices inside a home network to access the home network; the sub-routing devices work in a bridging mode and establish, for a downlink sub-routing device and/or a subordinate terminal device which correspondingly complete access, a link channel with the main routing device in a wired and/or wireless manner; and the sub-routing devices further establish a dedicated management channel with the main routing device for the sub-routing devices to report information of the subordinate terminal device and/or information of the downlink sub-routing device forming an access relationship with the sub-routing devices. The present invention can present a complete and intuitive home network topology structure to users, so that the users can operate and manage devices in the network topology by means of complete topology information.

Description

一种家庭组网网络拓扑管理的系统和方法A system and method for network topology management of home networking 技术领域technical field
本发明涉及家庭组网技术领域,特别是涉及一种家庭组网网络拓扑管理的系统和方法。The present invention relates to the technical field of home networking, in particular to a system and method for network topology management of home networking.
背景技术Background technique
随着社会的发展,人们生活质量的提高,宽带已成为家庭生活必不可少的一部分,越来越多的工作生活依赖于网络,家里的各种智能物联设备需要接入家庭网络,因此一台无线路由器已经无法满足家庭面积较大、家装环境复杂的用户,通过主路由设备+子路由设备组网已成为家庭网络延伸的常用方法。家庭组网设备一般是一个主路由设备+n个子路由设备组成。主路由设备与子路由设备之间,子路由设备与子路由设备之间通过有线、WiFi或其他方式连接,主路由设备、子路由设备以及在主/子路由设备上下挂的智能终端之间的拓扑结构会形成多级家庭网络拓扑,随着智能终端的类型越来越多,用户如何通过可视化界面方便直观的了解、管理家庭网络拓扑成为目前急需解决的问题。With the development of society and the improvement of people's quality of life, broadband has become an indispensable part of family life. More and more work and life depend on the network. Various smart IoT devices in the home need to be connected to the home network. Therefore, a Wireless routers can no longer meet the needs of users with large family areas and complex home decoration environments. Networking through the main routing device + sub-routing device has become a common method for home network extension. A home networking device is generally composed of a main routing device + n sub-routing devices. Between the main routing device and the sub-routing device, the sub-routing device and the sub-routing device are connected by wired, WiFi or other means, and between the main routing device, the sub-routing device, and the smart terminals hanging up and down the main/sub-routing device. The topology structure will form a multi-level home network topology. With the increasing number of types of smart terminals, how users can easily and intuitively understand and manage the home network topology through a visual interface has become an urgent problem to be solved.
发明内容SUMMARY OF THE INVENTION
本发明要解决的技术问题是随着家庭组网技术逐渐基于成熟,通过主路由设备+子路由设备组网已成为家庭网络延伸的常用方法。但如何管理家庭组网网络中主、子路由设备及下挂终端设备完整的拓扑信息是目前需要解决的问题。The technical problem to be solved by the present invention is that with the gradual maturity of home networking technology, networking through main routing device + sub-routing device has become a common method for home network extension. However, how to manage the complete topology information of the main and sub-routing devices and the connected terminal devices in the home networking network is a problem that needs to be solved at present.
现有技术中,主路由设备可以通过下挂设备获取地址的动态主机配置协议DHCP请求报文中获取所有下挂终端的设备IP地址、MAC地址等信息,但并不能获取完整的网络拓扑信息,如下挂终端设备是通过哪个子路由设备接入的并不知道,请求分配地址的是下挂的终端设备还是子路由设备也不知道。In the prior art, the main routing device can obtain information such as the device IP addresses, MAC addresses and other information of all the attached terminals through the dynamic host configuration protocol DHCP request message for obtaining the addresses of the attached devices, but cannot obtain complete network topology information. It is unknown through which sub-routing device the connected terminal device is connected, and whether the connected terminal device or the sub-routing device is requesting address allocation.
本发明采用如下技术方案:The present invention adopts following technical scheme:
第一方面,本发明包括一种家庭组网网络拓扑管理的系统,系统中包括一个主路由设备、一个或者多个子路由设备、一个或者多个终端设备组成,子路由设备通过有线或无线的方式,接入主路由设备或者接入位于其上行的其他子路由设备,终端设备通过有线或无线的方式接入主路由设备或者子路由设备,具体的:In the first aspect, the present invention includes a system for home networking network topology management, the system includes a main routing device, one or more sub-routing devices, and one or more terminal devices, and the sub-routing devices are wired or wireless. , access the main routing device or other sub-routing devices located on its upstream, and the terminal device accesses the main routing device or sub-routing device through wired or wireless means, specifically:
主路由设备工作在路由模式,主路由设备提供有线和/或无线链路通道供家庭网络内部的各个终端设备和子路由设备接入家庭网络;其中,主路由设备给子路由设备和终端设备分配IP地址;The main routing device works in routing mode, and the main routing device provides wired and/or wireless link channels for each terminal device and sub-routing device inside the home network to access the home network; wherein, the main routing device assigns IP to the sub-routing device and the terminal device. address;
子路由设备工作的桥接模式,为对应完成接入的下行子路由设备和/或下挂的终端设备,通过有线和/或无线方式与主路由设备建立链路通道;子路由设备与主路由设备之间还建立有一条专属管理通道,用于子路由设备上报下挂的终端设备的信息和/或与之构成接入关系的下行子路由设备的信息。The bridge mode in which the sub-routing device works, establishes a link channel with the main routing device through wired and/or wireless means for the downlink sub-routing device and/or the connected terminal device that has completed the access; the sub-routing device and the main routing device A dedicated management channel is also established therebetween for the sub-routing device to report the information of the connected terminal device and/or the information of the downlink sub-routing device that forms an access relationship with it.
优选的,组网拓扑信息数据库中的每一个条目为家庭组网设备中的一个设 备的信息,设备信息包括设备MAC地址、设备类型、设备名称、设备IP地址、设备接入方式、接入接口名称、设备接入状态、上行设备MAC地址和下行设备MAC地址中的一项或者多项;所述设备包括子路由设备和终端设备;Preferably, each entry in the networking topology information database is information of a device in the home networking device, and the device information includes device MAC address, device type, device name, device IP address, device access mode, and access interface. One or more of name, device access status, uplink device MAC address and downlink device MAC address; the devices include sub-routing devices and terminal devices;
其中,设备类型、设备接入方式、接入接口名称、设备接入状态、以及上行设备MAC地址/下行设备MAC地址,由子路由设备通过专属管理通道传递私有协议消息的方式,发送给主路由设备,其它信息则是主路由设备从DHCP交互报文中获取。Among them, the device type, device access mode, access interface name, device access status, and uplink device MAC address/downlink device MAC address are sent to the main routing device by the sub-routing device by transmitting private protocol messages through the dedicated management channel , and other information is obtained by the main routing device from the DHCP exchange message.
优选的,子路由设备获取到主路由设备分配的设备IP地址后,方法还包括:Preferably, after the sub-routing device obtains the device IP address allocated by the main routing device, the method further includes:
子路由设备通过专属管理通道向主路由设备发送私有协议消息;The sub-routing device sends private protocol messages to the main routing device through the dedicated management channel;
主路由设备收到子路由设备的私有协议消息后,将子路由设备的设备MAC地址作为搜索关键字在组网拓扑信息数据库中查找;若未查到,则在组网拓扑信息数据库中增加所述子路由设备的信息;若查到,则把所述子路由设备在组网拓扑信息数据库中对应记录的设备类型更新为子路由类型;After receiving the private protocol message of the sub-routing device, the main routing device uses the device MAC address of the sub-routing device as a search key to search in the networking topology information database; Describe the information of the sub-routing device; if found, update the device type corresponding to the record of the sub-routing device in the networking topology information database to the sub-routing type;
子路由设备注册成功后,查找子路由设备的本地下挂设备数据库是否已经有设备接入,如果有则把下挂设备的设备MAC地址和设备接入方式通过所述专属管理通道发送给主路由设备,主路由设备更新组网拓扑信息数据库;其中,下挂设备包括子路由设备和/或终端设备。After the sub-routing device is successfully registered, check whether the local device database of the sub-routing device has access to the device, and if so, send the device MAC address and device access mode of the sub-routing device to the main router through the dedicated management channel. The device, the main routing device updates the networking topology information database; wherein, the attached devices include sub-routing devices and/or terminal devices.
优选的,终端设备或子路由设备向主路由设备获取IP地址时,系统还包括:Preferably, when the terminal device or the sub-routing device obtains the IP address from the main routing device, the system further includes:
主路由设备根据与子路由设备或者终端设备的DHCP交互报文,获取子路由设备或者终端的设备IP地址、设备MAC地址和设备名称中的一项或者多项;The main routing device obtains one or more of the device IP address, device MAC address and device name of the sub-routing device or terminal according to the DHCP exchange message with the sub-routing device or terminal device;
主路由设备将子路由设备或者终端设备的设备MAC地址作为搜索关键字在组网拓扑信息数据库中搜索是否存在相应子路由设备或者终端设备;若有搜索到,则匹对各个信息,完成相应信息的更新;若没有搜到,则在组网拓扑信息数据库中增加一条记录,用于记录相应信息。The main routing device uses the device MAC address of the sub-routing device or terminal device as a search key to search for the corresponding sub-routing device or terminal device in the networking topology information database; If it is not found, a record will be added to the network topology information database to record the corresponding information.
优选的,每个子路由设备在获取到IP地址后,通过WAN侧接口发送链路层发现协议报文给邻居设备,当子路由设备的上行设备收到链路层发现协议报文后,从链路层发现协议报文中获取信息包括:设备MAC地址和设备类型;在上行设备为子路由设备时,所述上行设备根据链路层发现协议报文消息中的设备MAC地址在存储MAC地址的地址学习表中查找出相应子路由设备接入接口名称,并把设备MAC地址、设备类型和查找出的所述接入接口名称写入到本地下挂设备数据库中;在上行设备为主路由设备时,所述上行设备根据链路层发现协议报文消息中的设备MAC地址在存储MAC地址的地址学习表中查找出相应子路由设备接入接口名称,并把设备MAC地址、设备类型和查找出的所述接入接口名称写入到组网拓扑信息数据库中;Preferably, after obtaining the IP address, each sub-routing device sends a link layer discovery protocol packet to the neighboring device through the WAN side interface. The information obtained in the link layer discovery protocol message includes: device MAC address and device type; when the uplink device is a sub-routing device, the uplink device stores the MAC address according to the device MAC address in the link layer discovery protocol message. Find the access interface name of the corresponding sub-routing device in the address learning table, and write the device MAC address, device type and the found access interface name into the local device database; the upstream device is the main routing device When the uplink device searches for the access interface name of the corresponding sub-routing device in the address learning table storing the MAC address according to the device MAC address in the link layer discovery protocol message, and stores the device MAC address, device type and search The outgoing access interface name is written into the networking topology information database;
各子路由设备维护的本地下挂设备数据库,用于子路由设备通过私有协议消息上报下挂的终端设备的信息和/或与之构成接入关系的下行子路由设备的 信息时使用。The local attached device database maintained by each sub-routing device is used when the sub-routing device reports the information of the attached terminal device and/or the information of the downstream sub-routing device that forms an access relationship with it through private protocol messages.
优选的,在终端设备是通过有线方式进行接入,并且相应终端设备不支持链路层发现协议报文时,每个主路由设备或者子路由设备还根据MAC地址接入消息来获取接入主路由设备或者子路由设备的下挂终端设备息,具体包括:Preferably, when the terminal device accesses in a wired manner and the corresponding terminal device does not support the link layer discovery protocol message, each main routing device or sub-routing device also obtains the access master according to the MAC address access message. Information about the terminal devices attached to the routing device or sub-routing device, including:
若子路由设备在收到MAC地址接入消息后,从本地下挂设备数据库中查找相应MAC地址接入消息中携带的接口是否接入过子路由设备;若主路由设备在收到MAC地址接入消息后,从组网拓扑信息数据库中查找相应MAC地址接入消息中携带的接口是否接入过子路由设备;If the sub-routing device receives the MAC address access message, it searches the local attached device database to see whether the interface carried in the corresponding MAC address access message has been connected to the sub-routing device; if the main routing device receives the MAC address access After the message, find out whether the interface carried in the corresponding MAC address access message has accessed the sub-routing device from the networking topology information database;
如果接入过,不处理所述MAC地址接入消息,所述设备MAC地址对应的设备不是直接下挂设备;If it has been accessed, the MAC address access message is not processed, and the device corresponding to the device MAC address is not a directly connected device;
如果没有接入过,则表示所述MAC地址接入消息中携带的设备信息,所对应的设备为直接下挂终端设备,把所述MAC地址接入消息中携带的设备信息存入本地下挂设备数据库或者组网拓扑信息数据库中。If it has not been accessed, it indicates that the device information carried in the MAC address access message corresponds to a directly connected terminal device, and the device information carried in the MAC address access message is stored in the local connected device. In the device database or the networking topology information database.
优选的,每个子路由设备在收到WiFi上下线消息后,根据WiFi上下线消息中带有设备MAC地址和接入的WiFi接口名称,直接把相应设备信息保存到本地下挂设备数据库中;Preferably, each sub-routing device directly saves the corresponding device information in the local connected device database according to the device MAC address and the name of the WiFi interface connected in the WiFi online and offline message after receiving the WiFi online and offline message;
主路由设备在收到WiFi上下线消息后,根据WiFi上下线消息中带有设备MAC地址和接入的WiFi接口名称,直接把相应设备信息保存到组网拓扑信息数据库中。After receiving the WiFi online and offline message, the main routing device directly saves the corresponding device information in the networking topology information database according to the device MAC address and the name of the connected WiFi interface in the WiFi online and offline message.
优选的,终端设备通过有线或无线的方式接入子路由设备时,系统还包括:Preferably, when the terminal device accesses the sub-routing device in a wired or wireless manner, the system further includes:
子路由设备获取到终端设备的设备MAC地址和设备接入方式,子路由设备将与其直连的终端设备MAC地址、设备接入方式以及子路由设备自身的设备MAC地址,通过所述专属管理通道发送给主路由设备;The sub-routing device obtains the device MAC address and device access mode of the terminal device, and the sub-routing device sends the directly connected terminal device MAC address, device access mode and the sub-routing device's own device MAC address through the dedicated management channel. Send to the main routing device;
主路由设备收到子路由设备发送的信息后,以信息内容中携带的终端设备的设备MAC地址为搜索关键字,在组网拓扑信息数据库中进行搜索,确定是否有对应的设备信息;若没有搜索到,则在组网拓扑信息数据库中加入一条记录并把相应终端设备的设备MAC地址、设备接入方式和子路由设备自身的设备MAC地址添加到组网拓扑信息数据库中;若有搜索到,则完成设备接入方式和子路由设备自身的设备MAC地址的确认。After receiving the information sent by the sub-routing device, the main routing device uses the device MAC address of the terminal device carried in the information content as a search key to search in the networking topology information database to determine whether there is corresponding device information; If found, add a record in the networking topology information database and add the device MAC address of the corresponding terminal device, the device access mode, and the device MAC address of the sub-routing device itself into the networking topology information database; Then the confirmation of the device access mode and the device MAC address of the sub-routing device itself is completed.
优选的,子路由设备或主路由设备上有设备下线时,收到设备下线的事件通知,其中,设备包括终端设备和/或子路由设备,系统还包括:Preferably, when a device on the sub-routing device or the main routing device goes offline, an event notification that the device goes offline is received, wherein the device includes a terminal device and/or a sub-routing device, and the system further includes:
若为子路由设备收到设备下线的事件通知,则判断所述收到设备下线的事件通知的子路由设备是否获取到主路由分配的IP地址;如果获取到了IP地址,则把下线设备的设备MAC地址发给主路由设备;在子路由设备的本地下挂设备数据库中删除相应下线设备信息;If the sub-routing device receives the event notification that the device goes offline, it determines whether the sub-routing device that receives the event notification that the device goes offline has obtained the IP address assigned by the main route; if it has obtained the IP address, it will go offline The device MAC address of the device is sent to the main routing device; the corresponding offline device information is deleted in the local device database of the sub-routing device;
若为主路由设备收到设备下线的事件通知,则把设备的设备MAC地址作为 搜索关键字在组网拓扑信息数据库中进行查找并删除该设备信息,如果所述下线设备的设备类型为子路由设备,主路由设备遍历组网拓扑信息数据库,把上行设备MAC地址为该设备的下挂设备信息都删掉;其中,下挂设备信息包括子路由设备和/或终端设备。If the main routing device receives the event notification that the device goes offline, the device MAC address of the device is used as a search key to search in the networking topology information database and delete the device information, if the device type of the offline device is For sub-routing devices, the main routing device traverses the networking topology information database, and deletes the information of the sub-routing devices whose MAC address is the device; wherein, the sub-routing device information includes sub-routing devices and/or terminal devices.
第二方面,本发明还提供了一种家庭组网网络拓扑管理的方法,应用于第一方面所述的家庭组网网络拓扑管理的系统中,方法包括:In a second aspect, the present invention also provides a method for home networking network topology management, which is applied to the system for home networking network topology management described in the first aspect, and the method includes:
对于家庭组网网络中的每一台子路由设备和终端设备,主路由设备通过与子路由设备之间建立的专属管理通道获取各子路由设备下行子路由设备信息和/或下挂的终端设备信息,还从DHCP交互报文中获取子路由设备或终端设备的设备IP地址、设备MAC地址和设备名称中的一项或者多项;For each sub-routing device and terminal device in the home networking network, the main routing device obtains the downstream sub-routing device information and/or the attached terminal device information of each sub-routing device through the dedicated management channel established with the sub-routing device , and also obtain one or more of the device IP address, device MAC address, and device name of the sub-routing device or terminal device from the DHCP exchange message;
根据设备MAC地址,合并专属管理通道获取的内容和DHCP交互报文中获取的内容,生成完整的家庭网络组网拓扑。According to the MAC address of the device, the content obtained from the dedicated management channel and the content obtained in the DHCP exchange message are combined to generate a complete home network topology.
第三方面,本发明还提供了一种家庭组网网络拓扑管理的装置,用于实现第二方面所述的家庭组网网络拓扑管理方法,所述装置包括:In a third aspect, the present invention further provides an apparatus for managing a network topology in a home networking, which is used to implement the method for managing a network topology in a home networking described in the second aspect, and the apparatus includes:
至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述处理器执行,用于执行第二方面所述的家庭组网网络拓扑管理方法。at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the processor for The home networking network topology management method described in the second aspect is executed.
第四方面,本发明还提供了一种非易失性计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个处理器执行,用于完成第二方面所述的家庭组网网络拓扑管理方法。In a fourth aspect, the present invention also provides a non-volatile computer storage medium storing computer-executable instructions, the computer-executable instructions being executed by one or more processors for completing the second The home networking network topology management method described in the aspect.
本发明提供了一种家庭组网网络拓扑管理的系统和方法,可以给用户呈现出完整的、直观的家庭网络拓扑结构;便于用户通过完整的拓扑信息实现对网络拓扑中设备进行操作和管理。The invention provides a system and method for home networking network topology management, which can present a complete and intuitive home network topology structure to users, and is convenient for users to operate and manage devices in the network topology through complete topology information.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍。显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to describe the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings that need to be used in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative efforts.
图1是本发明实施例提供的一种家庭组网网络拓扑管理的家庭组网拓扑图;1 is a home networking topology diagram of a home networking network topology management provided by an embodiment of the present invention;
图2是本发明实施例提供的一种家庭组网网络拓扑管理的组网拓扑信息数据库字段示意图;2 is a schematic diagram of fields of a networking topology information database for home networking network topology management provided by an embodiment of the present invention;
图3是是本发明实施例提供的一种家庭组网网络拓扑管理的相关抓包内容;FIG. 3 is a related packet capture content of a home networking network topology management provided by an embodiment of the present invention;
图4是是本发明实施例提供的一种家庭组网网络拓扑管理的相关抓包内容;FIG. 4 is a related packet capture content of a home networking network topology management provided by an embodiment of the present invention;
图5是本发明实施例提供的一种家庭组网网络拓扑管理的方法流程示意图;5 is a schematic flowchart of a method for managing network topology in a home networking according to an embodiment of the present invention;
图6是本发明实施例提供的一种家庭组网网络拓扑管理的方法流程示意图;6 is a schematic flowchart of a method for managing network topology in a home networking according to an embodiment of the present invention;
图7是本发明实施例提供的一种家庭组网网络拓扑管理的系统框图;7 is a system block diagram of a home networking network topology management provided by an embodiment of the present invention;
图8是本发明实施例提供的一种家庭组网网络拓扑管理的方法中设备加入家庭网络管理流程;FIG. 8 is a management process of adding a device to a home network in a method for managing a network topology of a home networking according to an embodiment of the present invention;
图9是本发明实施例提供的一种家庭组网网络拓扑管理的方法中设备获取IP地址管理流程;FIG. 9 is a management flow of device acquisition of IP addresses in a method for home networking network topology management provided by an embodiment of the present invention;
图10是本发明实施例提供的一种家庭组网网络拓扑管理的方法中设备离开家庭网络管理流程;10 is a management flow of a device leaving a home network in a method for managing network topology in a home networking provided by an embodiment of the present invention;
图11是本发明实施例提供的一种家庭组网网络拓扑管理的方法中子路由设备注册及心跳维护管理流程;11 is a flow chart of sub-routing device registration and heartbeat maintenance management in a method for home networking network topology management provided by an embodiment of the present invention;
图12是本发明实施例提供的一种家庭组网网络拓扑管理的装置结构示意图。FIG. 12 is a schematic structural diagram of an apparatus for network topology management of a home networking according to an embodiment of the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
在本发明的描述中,术语“内”、“外”、“纵向”、“横向”、“上”、“下”、“顶”、“底”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明而不是要求本发明必须以特定的方位构造和操作,因此不应当理解为对本发明的限制。In the description of the present invention, the orientation or positional relationship indicated by the terms "inner", "outer", "longitudinal", "lateral", "upper", "lower", "top", "bottom", etc. are based on the drawings The orientation or positional relationship shown is only for the convenience of describing the present invention rather than requiring the present invention to be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention.
此外,下面所描述的本发明各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
实施例1:Embodiment 1:
本发明实施例1提供了一种家庭组网网络拓扑管理的系统和方法。如图1所示,是一种家庭组网网络拓扑管理的系统的组网图。系统中包括一个主路由设备、一个或者多个子路由设备、一个或者多个终端设备组成,子路由设备通过有线或无线的方式,接入主路由设备或者接入位于其上行的其他子路由设备,终端设备通过有线或无线的方式接入主路由设备或者子路由设备,具体的:Embodiment 1 of the present invention provides a system and method for home networking network topology management. As shown in FIG. 1 , it is a networking diagram of a system for network topology management of a home networking. The system includes a main routing device, one or more sub-routing devices, and one or more terminal devices. The sub-routing device is connected to the main routing device or other sub-routing devices located on its upstream through wired or wireless means. The terminal device is connected to the main routing device or sub-routing device through wired or wireless means, specifically:
主路由设备工作在路由模式,主路由设备提供有线和/或无线链路通道供家庭网络内部的各个终端设备和子路由设备接入家庭网络;其中,主路由设备给子路由设备和终端设备分配IP地址;The main routing device works in routing mode, and the main routing device provides wired and/or wireless link channels for each terminal device and sub-routing device inside the home network to access the home network; wherein, the main routing device assigns IP to the sub-routing device and the terminal device. address;
子路由设备工作的桥接模式,为对应完成接入的下行子路由设备和/或下挂的终端设备,通过有线和/或无线方式与主路由设备建立链路通道;子路由设备与主路由设备之间还建立有一条专属管理通道(基于前述主路由设备给子路由设备分配的IP地址),用于子路由设备上报下挂的终端设备的信息和/或与之构成接入关系的下行子路由设备的信息。The bridge mode in which the sub-routing device works, establishes a link channel with the main routing device through wired and/or wireless means for the downlink sub-routing device and/or the connected terminal device that has completed the access; the sub-routing device and the main routing device There is also an exclusive management channel (based on the IP address assigned by the main routing device to the sub-routing device), which is used for the sub-routing device to report the information of the connected terminal device and/or the downlink sub-routing device that forms an access relationship with it. Information about the routing device.
本发明实施例提供了一种家庭组网网络拓扑管理的系统,可以给用户呈现出完整的、直观的家庭网络拓扑结构;用户可以通过完整的拓扑信息实现对网络拓扑中设备进行操作和管理。克服了现有技术中,主路由设备可以通过下挂设备 获取地址的动态主机配置协议DHCP请求报文中获取所有下挂终端的设备IP地址、设备MAC地址等信息,但并不能获取完整的网络拓扑信息,如下挂终端设备是通过哪个子路由设备接入的并不知道,请求分配地址的是下挂的终端设备还是子路由设备也不知道的问题。其中,动态主机配置协议(Dynamic Host Configuration Protocol,简写为:DHCP)是一个局域网的网络协议,指的是由服务器控制一段IP地址范围,客户机登录服务器时就可以自动获得服务器分配的IP地址和子网掩码。The embodiments of the present invention provide a system for home networking network topology management, which can present a complete and intuitive home network topology structure to users; users can operate and manage devices in the network topology through complete topology information. It overcomes the problem in the prior art that the main routing device can obtain the device IP address, device MAC address and other information of all the attached terminals from the dynamic host configuration protocol DHCP request message for obtaining the address of the attached device, but cannot obtain the complete network. Topology information, such as the following sub-routing device through which the terminal device is connected is unknown, and whether it is the sub-routing device or the sub-routing device that requests address allocation. Among them, the Dynamic Host Configuration Protocol (Dynamic Host Configuration Protocol, abbreviated as: DHCP) is a network protocol of a local area network, which refers to a range of IP addresses controlled by the server, and the client can automatically obtain the IP address and sub-address assigned by the server when logging in to the server. netmask.
在本发明实施例的系统中,还会涉及终端设备通过有线或无线的方式接入子路由设备时,系统还包括:In the system of the embodiment of the present invention, when the terminal device accesses the sub-routing device in a wired or wireless manner, the system further includes:
子路由设备获取到终端设备的设备MAC地址和设备接入方式(包括无线方式和有线方式),子路由设备将与其直连的终端设备的设备MAC地址、设备接入方式以及子路由设备自身的设备MAC地址,通过所述专属管理通道发送给主路由设备;具体实现可以参考已有的相关协议消息,并以子路由设备和主路由设备相互知悉相应传输协议基础上,以自定义消息字段的方式,完成所述终端设备的设备MAC地址、设备接入方式以及子路由设备自身的设备MAC地址信息的传输。The sub-routing device obtains the device MAC address and device access mode (including wireless and wired mode) of the terminal device. The MAC address of the device is sent to the main routing device through the dedicated management channel; the specific implementation can refer to the existing related protocol messages, and based on the sub-routing device and the main routing device knowing the corresponding transmission protocol, the message field is customized. mode, completes the transmission of the device MAC address of the terminal device, the device access mode, and the device MAC address information of the sub-routing device itself.
主路由设备收到子路由设备发送的信息后,以信息内容中携带的终端设备的设备MAC地址为搜索关键字,在组网拓扑信息数据库中进行搜索(例如,直接在组网拓扑信息数据库中的设备MAC地址字段进行搜索),确定是否有对应的设备信息;若没有搜索到,则在组网拓扑信息数据库中加入一条记录并把相应终端设备的设备MAC地址、设备接入方式和子路由设备自身的设备MAC地址(例如,包括所述子路由自身的MAC地址)添加到组网拓扑信息数据库中;若有搜索到,则完成设备接入方式和子路由设备自身的设备MAC地址的确认。所述终端设备的设备MAC地址、设备接入方式和子路由设备自身的设备MAC地址,是作为一条记录的关键信息内容组成,在进行组网拓扑信息显示时候,可以依据组网拓扑信息数据库中记录的多条相应记录完成组网的生成。而上述的确认的目的是在于,若部分信息发生了改变,则需要进行安全性判定(此处非本发明的改进点,因此,不做赘述),并判断是否更新组网拓扑信息数据库中记载内容。After receiving the information sent by the sub-routing device, the main routing device uses the device MAC address of the terminal device carried in the information as a search key to search in the networking topology information database (for example, directly in the networking topology information database). If there is no corresponding device information, add a record to the network topology information database and add the device MAC address, device access mode and sub-routing device of the corresponding terminal device. Its own device MAC address (for example, including the sub-router's own MAC address) is added to the networking topology information database; if it is found, the device access mode and the sub-router's own device MAC address are confirmed. The device MAC address of the terminal device, the device access mode, and the device MAC address of the sub-routing device are composed of key information content as a record. When displaying the networking topology information, it can be recorded according to the networking topology information database. A number of corresponding records are generated to complete the network generation. The purpose of the above confirmation is that if part of the information has changed, it is necessary to make a security judgment (this is not an improvement point of the present invention, so it will not be repeated), and to determine whether to update the records in the networking topology information database. content.
在本发明实施例的系统中,还会涉及终端设备或子路由设备向主路由设备获取IP地址时,系统还包括:In the system of the embodiment of the present invention, when the terminal device or the sub-routing device obtains the IP address from the main routing device, the system further includes:
主路由设备根据与子路由设备或者终端设备的DHCP交互报文,获取子路由设备或者终端设备的设备IP地址、设备MAC地址和设备名称中的一项或者多项;The main routing device obtains one or more of the device IP address, device MAC address and device name of the sub-routing device or terminal device according to the DHCP exchange message with the sub-routing device or terminal device;
主路由设备将子路由设备或者终端设备的设备MAC地址作为搜索关键字在组网拓扑信息数据库中搜索是否存在相应子路由设备或者终端设备;若有搜索到,则匹对各个信息,完成相应信息的更新;若没有搜到,则在组网拓扑信息数据库中增加一条记录,用于记录相应信息。The main routing device uses the device MAC address of the sub-routing device or terminal device as a search key to search for the corresponding sub-routing device or terminal device in the networking topology information database; If it is not found, a record will be added to the network topology information database to record the corresponding information.
在本发明实施例中,所述组网拓扑信息数据库通常是在主路由设备的本地 进行维护;但是作为可选方案,也不排除通过独立的存储设备进行所述组网拓扑信息数据库的存储和维护。如图2所示,组网拓扑信息数据库中一条拓扑信息内容结构示意图,所述组网拓扑信息数据库中的每一个条目为家庭组网设备中的一个设备的信息,设备信息包括设备MAC地址、设备类型、设备名称、设备IP地址、设备接入方式、接入接口名称、设备接入状态(包括设备上线状态和设备下线状态)、上行设备MAC地址和下行设备MAC地址中的一项或者多项;需要说明的是,相应的信息在具体实现时,是为要显示的拓扑网络和明确设备主体而服务的,因此,类似的上行设备MAC地址和下行设备MAC地址两者取其一,便可完成子路由之间的建网需求,而具体选择哪一个根据网络要求和使用习惯来;而所述接入接口名称则是在设备(尤其指代主路由设备和子路由设备)有多个接入接口情况下(其表现形式可以是字符串,也可以是一串数字,具体在本发明其它实施例中还表现为WiFi接口名称、ARP消息中的接口号等等),适合于将复杂的网络梳理清楚。在上述诸多选项中,设备接入方式属于可选项,其并不会对组网关系造成实质影响。In this embodiment of the present invention, the networking topology information database is usually maintained locally on the main routing device; however, as an optional solution, it is not excluded to store and store the networking topology information database through an independent storage device. maintain. As shown in Figure 2, a schematic diagram of the content structure of a piece of topology information in the networking topology information database, each entry in the networking topology information database is the information of a device in the home networking device, and the device information includes the device MAC address, One of device type, device name, device IP address, device access method, access interface name, device access status (including device online status and device offline status), uplink device MAC address and downlink device MAC address, or It should be noted that when the corresponding information is specifically implemented, it serves for the topology network to be displayed and the device subject. The network construction requirements between the sub-routers can be completed, and which one to choose depends on the network requirements and usage habits; and the access interface name is a device (especially referring to the main routing device and the sub-routing device) There are multiple In the case of an access interface (its expression form can be a string or a series of numbers, specifically in other embodiments of the present invention, it can also be expressed as the name of the WiFi interface, the interface number in the ARP message, etc.), it is suitable for complex The network is sorted out clearly. Among the above options, the device access method is optional and does not substantially affect the networking relationship.
其中,设备类型、设备接入方式、接入接口名称、设备接入状态、以及上行设备MAC地址/下行设备MAC地址,通过专属管理通道传递私有协议消息的方式,发送给主路由设备,其它信息包括终端设备的设备MAC地址、设备IP地址、设备名称等则从DHCP交互报文中获取。DHCP交互报文如下图3所示,终端设备或子路由设备向主路由发送的DHCP Request报文如下,报文中有终端设备或子路由设备的设备MAC地址(Client MAC address)和设备名称(Host Name)。如图4所示,主路由回复给子路由或终端设备的DHCP ACK报文如下,报文中携带了端设备或子路由设备的设备MAC地址(Client MAC address)、设备IP地址(Your Client IP address)和设备类型(Option 60vendor class identifier)。Among them, the device type, device access method, access interface name, device access status, and uplink device MAC address/downlink device MAC address are sent to the main routing device by means of private protocol messages transmitted through the dedicated management channel, and other information The device MAC address, device IP address, and device name of the terminal device are obtained from the DHCP exchange message. The DHCP exchange message is shown in Figure 3 below. The DHCP Request message sent by the terminal device or sub-routing device to the main route is as follows. The message contains the device MAC address (Client MAC address) and device name ( Host Name). As shown in Figure 4, the DHCP ACK message returned by the main route to the sub-router or terminal device is as follows. The message carries the device MAC address (Client MAC address) and device IP address (Your Client IP address) of the end device or sub-route device address) and device type (Option 60vendor class identifier).
在本发明实施例以及其它实施例中,相关设备信息获取方式归总后,呈现如下:In the embodiments of the present invention and other embodiments, after summarizing the acquisition methods of the related device information, they are presented as follows:
设备MAC地址:可以通过链路层发现协议(Link Layer Discovery Protocol,简写为:LLDP)报文中获取、WiFi上下线消息或者ARP报文中获取。Device MAC address: It can be obtained through Link Layer Discovery Protocol (LLDP) packets, WiFi online and offline messages, or ARP packets.
设备类型:子路由的设备类型可以从LLDP消息中获取,也可以通过子路由向主路由发送的注册消息中分析判断得到。Device type: The device type of the sub-route can be obtained from the LLDP message, or it can be analyzed and judged from the registration message sent by the sub-route to the main route.
设备名称:可以从DHCP报文中获取。Device name: It can be obtained from the DHCP message.
设备IP地址:可以从ARP消息中获取,也可以从DHCP消息中获取。Device IP address: It can be obtained from ARP message or from DHCP message.
设备接入方式和接入接口名称:可以通过查找MAC地址学习表中MAC地址对应的网络接口即可判断设备接入方式和接入接口名称。Device access mode and access interface name: You can determine the device access mode and access interface name by looking up the network interface corresponding to the MAC address in the MAC address learning table.
上行MAC地址:为子路由通过私有协议上报直接下挂设备时,将自己的MAC地址填入消息中,主路由可以根据该消息获得下挂设备对应的上行设备MAC。Upstream MAC address: When reporting the directly attached device for the sub-router through a private protocol, fill in its own MAC address in the message, and the main route can obtain the upstream device MAC corresponding to the attached device according to the message.
在本发明实施例中,LLDP消息是向邻居通告设备自己的信息,是一个二层 消息,DHCP消息是子路由设备和终端设备向DHCP服务器拿地址的一个消息,只有拿到地址了才能与主路由设备通信。In the embodiment of the present invention, the LLDP message is a layer-2 message that advertises the device's own information to neighbors, and the DHCP message is a message for the sub-routing device and the terminal device to obtain an address from the DHCP server. Route device communication.
实施例2:Example 2:
本发明实施例提供了一种家庭组网网络拓扑管理的方法,所述方法是基于实施例1中所提出的家庭组网网络拓扑管理的系统来进行的,如图5所示,方法包括:An embodiment of the present invention provides a method for home networking network topology management. The method is performed based on the system for home networking network topology management proposed in Embodiment 1. As shown in FIG. 5 , the method includes:
在步骤201中,对于家庭组网网络中的每一台子路由设备和终端设备,主路由设备通过与子路由设备之间建立的专属管理通道获取各子路由设备下行子路由设备信息和/或下挂的终端设备信息,还从DHCP交互报文中获取子路由设备或者终端设备的设备IP地址、设备MAC地址和设备名称中的一项或者多项。In step 201, for each sub-routing device and terminal device in the home networking network, the main routing device obtains downlink sub-routing device information and/or downlink sub-routing device information of each sub-routing device through a dedicated management channel established with the sub-routing device information of the connected terminal device, and also obtain one or more of the device IP address, device MAC address, and device name of the sub-routing device or the terminal device from the DHCP exchange message.
在步骤202中,根据设备MAC地址,合并专属管理通道获取的内容和DHCP交互报文中获取的内容,生成完整的家庭网络组网拓扑。In step 202, according to the device MAC address, the content obtained by the dedicated management channel and the content obtained in the DHCP exchange message are combined to generate a complete home network networking topology.
本发明实施例提供了一种家庭组网网络拓扑管理的系统,可以给用户呈现出完整的、直观的家庭网络拓扑结构;用户可以通过完整的拓扑信息实现对网络拓扑中设备进行操作和管理。The embodiments of the present invention provide a system for home networking network topology management, which can present a complete and intuitive home network topology structure to users; users can operate and manage devices in the network topology through complete topology information.
主路由设备收到子路由或下挂终端设备的DHCP请求时,只知道子路由设备或下挂终端设备是组网内部的设备,并不知道这台设备是直接下挂在主路由设备上还是其他的子路由设备上,因此主路由设备就不能知道主路由设备、子路由设备、终端设备之间的拓扑关系。When the main routing device receives a DHCP request from a sub-router or an attached terminal device, it only knows that the sub-routing device or attached terminal device is an internal device in the network, but does not know whether the device is directly attached to the main routing device or not. On other sub-routing devices, the main routing device cannot know the topology relationship among the main routing device, sub-routing devices, and terminal devices.
每个主/子路由设备可以通过几种方式判断它们的直接下挂设备:Each main/sub-routing device can determine its directly attached device in several ways:
第一方式:每个子路由设备在获取到IP地址后,设备接入管理模块会通过WAN侧接口发送LLDP报文给邻居设备,当子路由设备的上行设备(上行设备可能是子路由也可能是主路由)中的设备接入管理模块收到LLDP报文后,可以从LLDP报文中获取如下信息:设备MAC地址(chassis ID)、设备类型(System Description),这里的设备类型可以自定义类型为“Agent”,表示该设备为子路由设备。其他支持LLDP协议的终端设备(并不是所有的终端设备支持LLDP)也会发送LLDP报文,设备类型由设备厂商自行定义,设备接入管理模块不关心非“Agent”类型设备LLDP报文中的的设备类型,非“Agent”设备的设备类型从DHCP报文中获取。上行设备可根据LLDP消息中的设备MAC地址在MAC地址学习表中查出该子路由设备从哪个接口接入,设备接入管理模块把设备MAC地址、设备类型、接入接口名称写入到本地对应数据库中(即主路由设备的组网拓扑信息数据库和子路由设备的本地下挂设备数据库)。上行设备收到子路由或终端设备发送的LLDP消息表示这个子路由设备是该上行设备的直接下挂设备,由于不是所有的终端设备都支持发送LLDP报文,因此LLDP只用来判断子路由和部分终端设备及其上行设备的拓扑关系。由此,进一步有了下面提出的第二和第三点,用于弥补所述LLDP报文在建立完整的本地下挂设备数据库的不足和可能的遗漏 点。The first method: After each sub-routing device obtains an IP address, the device access management module will send LLDP packets to the neighbor device through the WAN side interface. When the upstream device of the sub-routing device (the upstream device may be a sub-routing or After the device access management module in the main route) receives the LLDP message, it can obtain the following information from the LLDP message: device MAC address (chassis ID), device type (System Description), where the device type can be customized. If it is "Agent", it indicates that the device is a sub-routing device. Other terminal devices that support the LLDP protocol (not all terminal devices support LLDP) will also send LLDP packets. The device type is defined by the device manufacturer. The device type of the non-Agent device is obtained from the DHCP message. The uplink device can find out which interface the sub-routing device accesses from in the MAC address learning table according to the device MAC address in the LLDP message, and the device access management module writes the device MAC address, device type, and access interface name into the local In the corresponding database (that is, the networking topology information database of the main routing device and the local attached device database of the sub-routing device). When an upstream device receives an LLDP message sent by a sub-route or terminal device, it indicates that the sub-route device is the device directly attached to the upstream device. Topological relationships of some terminal devices and their upstream devices. Therefore, there are further the second and third points proposed below, which are used to make up for the deficiencies and possible omissions of the LLDP message in establishing a complete local attached device database.
第二方式:WiFi接入的直接下挂的终端设备会通过WiFi上下线消息通知设备接入管理模块,在收到WiFi上下线消息后,该消息中带有设备MAC地址、状态(上线/下线)、接入的WiFi接口名称(即接入接口名称的一种具体表现形式),子路由或主路由设备在收到消息后,不用过滤,直接把设备信息保存到本地对应数据库中。The second method: the terminal device directly connected to WiFi access will notify the device access management module through the WiFi log-off and log-off message. line), the name of the connected WiFi interface (that is, a specific form of the name of the access interface), after receiving the message, the sub-route or main route device directly saves the device information in the local corresponding database without filtering.
第三方式:在终端设备是通过有线方式进行接入,并且相应终端设备不支持链路层发现协议报文时,每个主路由设备/子路由设备的设备接入管理模块还会根据MAC地址接入消息(例如可以采用在ARP消息,ARP消息中不带接口号(即接入接口名称的具体表现形式),但主路由设备/子路由设备可以根据哪个接口收到ARP消息推断MAC对应的接口号)来获取接入本设备的终端设备的信息,包括设备的MAC地址和接入接口名称,但从设备的MAC地址接入消息中获取的设备信息并不都是主/子路由设备的直接下挂设备,有些设备是通过下一级子路由接入的,因此就需要做一个过滤,收到MAC地址接入消息后,从本地对应数据库中查找相应接口(即接入接口名称)是否接入过子路由设备,如果接入过不处理所述MAC地址接入消息,所述设备MAC地址对应的设备不是直接下挂设备。如果没有接入过,则表示所述MAC地址接入消息中携带的设备信息,所对应的设备为直接下挂终端设备,把所述MAC地址接入消息中携带的设备信息存入本地下挂设备数据库中。The third way: when the terminal device is connected by wire, and the corresponding terminal device does not support link layer discovery protocol packets, the device access management module of each main routing device/sub-routing device will also use the MAC address. The access message (for example, it can be used in the ARP message, and the ARP message does not carry the interface number (that is, the specific representation of the access interface name), but the main routing device/sub-routing device can infer the corresponding MAC address based on which interface receives the ARP message. interface number) to obtain the information of the terminal device accessing the device, including the MAC address of the device and the name of the access interface, but the device information obtained from the MAC address access message of the device is not all that of the main/sub-routing device. The device is directly connected to the device. Some devices are accessed through the next-level sub-route. Therefore, a filter needs to be performed. After receiving the MAC address access message, check whether the corresponding interface (that is, the access interface name) is from the local corresponding database. If the sub-routing device has been accessed and the MAC address access message has not been processed, the device corresponding to the device MAC address is not a directly connected device. If it has not been accessed, it indicates that the device information carried in the MAC address access message corresponds to a directly connected terminal device, and the device information carried in the MAC address access message is stored in the local connected device. in the device database.
其中,第一方式、第二方式和第三方式在具体实现过程中可以进行适当的组合,而组合之后的方案其通常还需要对获取到的数据进行去重;其中,第二方式弥补了通过无线方式接入的下挂设备在不支持LLDP报文情况,而第三方式则是进一步弥补了第一方式可能存在的遗漏情况,并利用了第一方式的分析结果作为过滤依据,提高了处理效率。而就本发明实施例而言,不排除特定场景下,可以通过上述第一方式或者第二方式中任意一种可直接适用完成直接下挂设备的判断,相应解决方案同样属于本发明的保护范围内。Among them, the first mode, the second mode and the third mode can be appropriately combined in the specific implementation process, and the solution after the combination usually needs to deduplicate the acquired data; wherein, the second mode makes up for the When the connected device connected wirelessly does not support LLDP packets, the third method further makes up for the possible omissions of the first method, and uses the analysis result of the first method as the filtering basis, which improves the processing efficiency. effectiveness. As far as the embodiment of the present invention is concerned, it is not excluded that in certain scenarios, any one of the above-mentioned first method or the second method can be directly applied to complete the judgment of the directly connected device, and the corresponding solution also belongs to the protection scope of the present invention. Inside.
在本发明实施例中,涉及子路由设备或者主路由设备中有终端设备接入时,子路由设备或者主路由设备收到所述终端设备的上线消息,方法具体包括:In the embodiment of the present invention, when a terminal device is connected to the sub-routing device or the main routing device, the sub-routing device or the main routing device receives the online message of the terminal device, and the method specifically includes:
若为子路由设备有终端设备接入时,所述子路由设备获取终端设备MAC地址、设备接入方式以及子路由设备自身的MAC地址,所述子路由设备判断自身是否分配有IP地址,若还没有被主路由设备分配IP地址,则更新本地下挂设备数据库;若已经分配有IP地址,则将获取到的终端设备信息和自身的MAC地址通过专属管理通道发给主路由设备。这里需要说明的是,在具体实现过程中,所述子路由设备判断自身是否分配有IP地址,若还没有被主路由设备分配IP地址,则更新本地下挂设备数据库,进一步的,在所述子路由设备确定获取到主路由设备为其分配的IP地址后,会第一时间将更新后的本地下挂设备数据库上 报给主路由设备。其中,在实现过程中可以是全部本地下挂设备数据库上报,也可以上报在获取到主路由设备分配IP地址之前更新的设备信息。在本发明实施例中,所述子路由设备中的本地下挂设备数据库,通常也会按照预设的策略向主路由设备进行上报的,相应的策略包括周期性的上报,或者,根据本地更新次数达到预设次数后上报,或者,以上两种方式的结合等等。If the sub-routing device is accessed by a terminal device, the sub-routing device obtains the MAC address of the terminal device, the device access method, and the MAC address of the sub-routing device itself, and the sub-routing device determines whether it has an IP address assigned to it. If an IP address has not been assigned by the main routing device, the local device database will be updated; if an IP address has been assigned, the acquired terminal device information and its own MAC address will be sent to the main routing device through a dedicated management channel. It should be noted here that in the specific implementation process, the sub-routing device determines whether it is assigned an IP address, and if it has not been assigned an IP address by the main routing device, it updates the local device database. After the sub-routing device determines to obtain the IP address assigned by the main routing device, it will report the updated local device database to the main routing device as soon as possible. Wherein, in the implementation process, the database of all locally attached devices may be reported, or the device information updated before the IP address assigned by the main routing device is obtained. In this embodiment of the present invention, the locally attached device database in the sub-routing device is usually also reported to the main routing device according to a preset policy, and the corresponding policy includes periodic reporting, or, according to local updates Report after the number of times reaches the preset number, or a combination of the above two methods, and so on.
主路由设备收到子路由设备发送的信息后,把终端设备的设备MAC地址作为搜索关键字在组网拓扑信息数据库中进行查找;若查找到所述终端设备,则更新设备接入方式及上行接入设备MAC(即所述子路由的MAC地址);若未查找到所述终端设备,则在组网拓扑信息数据库中新增一条记录,写入终端设备MAC、设备接入方式及上行接入设备MAC。After receiving the information sent by the sub-routing device, the main routing device uses the device MAC address of the terminal device as a search key to search in the networking topology information database; if the terminal device is found, it updates the device access mode and uplink. Access device MAC (that is, the MAC address of the sub-route); if the terminal device is not found, add a new record in the networking topology information database, and write the terminal device MAC, device access mode and uplink connection. Enter the device MAC.
在本发明实施例中,还涉及终端设备或者子路由设备,获取IP地址的方法流程,如图6所示,包括:In the embodiment of the present invention, a terminal device or a sub-routing device is also involved, and the method process for obtaining an IP address, as shown in FIG. 6 , includes:
在步骤301中,终端设备或子路由设备向主路由设备发送获取终端设备的设备IP地址的请求消息。In step 301, the terminal device or the sub-routing device sends a request message for acquiring the device IP address of the terminal device to the main routing device.
在步骤302中,主路由设备从DHCP交互报文中解析出设备IP地址、设备MAC地址和设备名称相关信息,并根据设备MAC地址在组网拓扑信息数据库中进行查找;其中,所述设备IP地址、设备MAC地址和设备名称参数包括属于子路由设备的和/或属于终端设备的。In step 302, the main routing device parses the device IP address, device MAC address and device name related information from the DHCP exchange message, and searches in the networking topology information database according to the device MAC address; wherein, the device IP address The address, device MAC address and device name parameters include those belonging to sub-routing devices and/or those belonging to terminal devices.
在步骤303中,若查找到,则把终端设备的设备IP地址和设备名称补充到组网拓扑信息数据库中;若未查找到,则新增一条记录,写入设备IP地址、MAC地址和设备名称中的一项或者多项。In step 303, if found, add the device IP address and device name of the terminal device to the networking topology information database; if not found, then add a new record, write the device IP address, MAC address and device name One or more of the names.
在本发明实施例中,还涉及子路由设备或主路由设备上有设备下线时,收到设备下线的事件通知,其中,设备包括终端设备和/或子路由设备,方法还包括:In the embodiment of the present invention, it also relates to receiving an event notification that the device goes offline when a device on the sub-routing device or the main routing device goes offline, wherein the device includes a terminal device and/or a sub-routing device, and the method further includes:
子路由设备或主路由设备收到设备下线的事件通知后,把下线设备的设备MAC地址进行本地对应数据库更新;所述更新可以表现为将将相应下线的子路由设备或主路由设备在本地对应数据库中删除。也可以为所述本地对应数据库中增加一栏离线状态参数属性,并且,在定期维护所述本地对应数据库时,若相应离线实现超过预设阈值则进行删除处理。这样的优势在于,若相应下线设备是因为故障重启或者断电原因下线,则在重新上线时候,能够更快的到所述本地对应数据库中匹配到相应下线设备目标信息。After the sub-routing device or the main routing device receives the event notification that the device goes offline, it updates the local corresponding database of the device MAC address of the offline device. Delete in the local corresponding database. A column of offline state parameter attributes may also be added to the local corresponding database, and when the local corresponding database is regularly maintained, if the corresponding offline implementation exceeds a preset threshold, deletion processing is performed. The advantage of this is that, if the corresponding offline device is offline due to fault restart or power failure, when the device is brought back online, the target information of the corresponding offline device can be matched to the local corresponding database more quickly.
若为子路由设备收到设备下线的事件通知,则判断所述收到设备下线的事件通知的子路由设备是否获取到主路由分配的IP地址;如果获取到了IP地址,则把下线设备的设备MAC地址发给主路由设备;在子路由设备的本地下挂设备数据库中删除相应下线设备信息;If the sub-routing device receives the event notification that the device goes offline, it determines whether the sub-routing device that receives the event notification that the device goes offline has obtained the IP address assigned by the main route; if it has obtained the IP address, it will go offline The device MAC address of the device is sent to the main routing device; the corresponding offline device information is deleted in the local device database of the sub-routing device;
若为主路由设备收到设备下线的事件通知,则把设备的设备MAC地址作为搜索关键字在组网拓扑信息数据库中进行查找并删除该设备信息,如果所述下 线设备的设备类型为子路由设备,主路由设备遍历组网拓扑信息数据库,把上行设备MAC地址为该设备的下挂设备信息都删掉;其中,下挂设备信息包括子路由设备和/或终端设备。If the main routing device receives the event notification that the device goes offline, the device MAC address of the device is used as a search key to search in the networking topology information database and delete the device information, if the device type of the offline device is For sub-routing devices, the main routing device traverses the networking topology information database, and deletes the information of the sub-routing devices whose MAC address is the device; wherein, the sub-routing device information includes sub-routing devices and/or terminal devices.
在本发明实施例中,还涉及方法包括子路由设备心跳维护管理流程,具体的:In the embodiment of the present invention, the method also includes a heartbeat maintenance and management process of a sub-routing device, specifically:
第一子路由设备向主路由设备注册成功后,定期向主路由设备发送心跳消息。After successfully registering with the main routing device, the first sub-routing device periodically sends a heartbeat message to the main routing device.
主路由设备在预设的时间内没有收到第一子路由设备的心跳消息,则将组网拓扑信息数据库中,对应第一子路由设备及第一子路由设备下挂的各个设备的相关信息删除。即上行设备MAC地址与第一子路由设备的设备MAC地址一样的记录全部删掉。其中,描述中的“第一子路由设备”仅仅是为了后面内容展开过程中引述的方便而增加的“第一”标签,其在具体实现认定过程中没有特殊的限定意义。If the main routing device does not receive the heartbeat message of the first sub-routing device within the preset time, it will store the relevant information of the first sub-routing device and each device connected to the first sub-routing device in the networking topology information database. delete. That is, all records in which the MAC address of the upstream device is the same as the MAC address of the device of the first sub-routing device are deleted. Among them, the "first sub-routing device" in the description is only a "first" label added for the convenience of quoting in the process of content expansion, and has no special limiting meaning in the specific implementation identification process.
实施例3:Example 3:
如图7所示,是可以适用于本发明实施例的一种家庭组网网络拓扑管理的系统框图。为了表述上的方便,也为了与实际程序实现更契合,本发明中引入了诸多功能模块来进行主路由设备和子路由设备的功能阐述。As shown in FIG. 7 , it is a system block diagram of a home networking network topology management applicable to an embodiment of the present invention. For the convenience of expression and in order to be more compatible with the actual program implementation, many functional modules are introduced into the present invention to describe the functions of the main routing device and the sub-routing device.
主路由设备的设备接入管理模块、DHCP Server模块、组网管理Server模块和组网拓扑信息数据库四个部分组成,子路由设备的设备接入管理模块、DHCP Client模块、组网管理Client模块和本地下挂设备数据库四个部分组成。其中主路由设备的DHCP Server模块是给家庭网络的子路由设备和终端设备分配IP地址的;主路由设备的设备接入管理模块管理通过有线和无线直接接入本设备的有线和无线设备;主路由设备的组网管理Server模块用来与子路由设备的组网管理Client模块进行通信,管理非直接接入本设备的子路由设备和终端设备;子路由设备的DHCP Client模块从主路由设备的DHCP Server模块获取管理连接的地址,子路由设备使用该地址与主路由设备建立socket通信;子路由设备的设备接入管理模块,管理通过有线和/或无线方式直接接入本设备的子路由设备和/或终端设备,并把设备信息告诉子路由设备的组网管理Client模块;子路由设备的组网管理Client模块将直接接入本设备的设备信息通过专属管理通道发送给主路由设备的组网管理Server模块。接下来将通过实施例4-实施例7,并基于本发明实施例3所提出的功能模块架构,阐述在本发明实施例1和实施例2中所涉及的核心管理方法过程。The device access management module, DHCP Server module, networking management Server module and networking topology information database of the main routing device are composed of four parts. The device access management module, DHCP Client module, networking management Client module and The local device database is composed of four parts. The DHCP Server module of the main routing device assigns IP addresses to the sub-routing devices and terminal devices of the home network; the device access management module of the main routing device manages wired and wireless devices that directly access the device through wired and wireless; The networking management Server module of the routing device is used to communicate with the networking management Client module of the sub-routing device to manage sub-routing devices and terminal devices that are not directly connected to the device; the DHCP Client module of the sub-routing device The DHCP Server module obtains the address of the management connection, and the sub-routing device uses this address to establish socket communication with the main routing device; the device of the sub-routing device is connected to the management module to manage the sub-routing devices that directly access the device through wired and/or wireless means and/or terminal device, and tell the device information to the networking management client module of the sub-routing device; the networking management client module of the sub-routing device sends the device information directly connected to the device to the group of the main routing device through the dedicated management channel. Network management server module. Next, the core management method process involved in Embodiment 1 and Embodiment 2 of the present invention will be described based on the functional module architecture proposed in Embodiment 3 of the present invention through Embodiment 4-Embodiment 7.
实施例4:Example 4:
如图8所示,该图是一种家庭组网网络拓扑管理的方法中涉及的设备加入管理流程。As shown in FIG. 8 , the figure is a device joining management process involved in a method for managing a network topology of a home networking.
在步骤401中,子路由设备/主路由设备中有设备通过有线或无线方式接入时,子路由设备/主路由设备的设备接入管理模块会收到相应设备上线消息。In step 401, when a device in the sub-routing device/main routing device is connected in a wired or wireless manner, the device access management module of the sub-routing device/main routing device will receive a corresponding device online message.
在步骤402中,根据是子路由设备还是主路由设备收到设备上线消息,分别做不同的处理流程。若收到上线消息的主体为子路由设备则执行步骤403;若收到上线消息的主体并非子路由设备,即收到上线消息的主体为主路由设备时,执行步骤406。In step 402, different processing flows are performed respectively according to whether the sub-routing device or the main routing device receives the device online message. If the subject of the online message is the sub-routing device, step 403 is executed; if the subject of the online message is not the sub-routing device, that is, if the subject of the online message is the main routing device, step 406 is executed.
在步骤403中,子路由设备的设备接入管理模块获取接入设备MAC地址、设备接入方式以及本设备的设备MAC地址,通过内部消通信的方式发给本设备的组网管理Client模块。In step 403, the device access management module of the sub-routing device obtains the MAC address of the access device, the device access mode, and the device MAC address of the device, and sends them to the network management client module of the device by means of internal communication.
在步骤404中,为子路由设备判断本设备是否获取到了主路由分配的IP地址,如果没有获取到主路由分配的IP则进入步骤408更新本地下挂设备数据库,这时流程结束;否则,进入步骤405。In step 404, it is judged for the sub-routing device whether the device has obtained the IP address allocated by the main route. If the IP address allocated by the main route has not been obtained, go to step 408 to update the local device database. At this time, the process ends; otherwise, go to step 408. Step 405.
在步骤405中,组网管理Client模块把信息发给主路由的组网管理Server模块,然后进入步骤407。In step 405 , the networking management Client module sends the information to the networking management Server module of the main router, and then proceeds to step 407 .
在步骤406中,主路由设备的设备接入管理模块获取接入设备的设备MAC地址、设备接入方式以及本设备的设备MAC地址作为上行设备MAC地址,发给主路由设备的组网管理Server模块,然后进入步骤407。In step 406, the device access management module of the main routing device obtains the device MAC address of the access device, the device access mode, and the device MAC address of the device as the uplink device MAC address, and sends it to the network management server of the main routing device. module, and then go to step 407.
在步骤407中,为主路由的组网管理Server模块收到消息后把设备MAC地址作为搜索关键字在组网拓扑信息数据库中进行查找。如果查找到该设备,更新设备接入方式及上行设备MAC地址;如果没找到,则在组网拓扑信息数据库中新增一条记录,写入相应设备MAC、设备接入方式及上行接入设备MAC后,结束流程。In step 407, after receiving the message, the network management server module of the main route uses the device MAC address as a search key to search in the network topology information database. If the device is found, update the device access mode and the MAC address of the upstream device; if not, add a new record in the networking topology information database and write the corresponding device MAC, device access mode and uplink access device MAC address After that, end the process.
在步骤408中,更新子路由设备的本地下挂设备数据库,结束流程。In step 408, the local attached device database of the sub-routing device is updated, and the process ends.
实施例5:Example 5:
如图9所示,该图是一种家庭组网网络拓扑管理的方法中,设备获取IP地址管理流程示意图,包括:As shown in Figure 9, the figure is a schematic diagram of the management process flow of the device acquiring an IP address in a method for network topology management of a home network, including:
在步骤501中,终端设备或子路由设备的DHCP Client模块向主路设备由获取设备IP地址。In step 501, the DHCP Client module of the terminal device or the sub-routing device obtains the device IP address from the main-routing device.
在步骤502中,主路由设备的DHCP Server模块从DHCP交互报文中解析出设备MAC地址、设备IP地址、设备名称等信息,并通过内部消息通信方式把信息发送给主路由设备的组网管理Server模块。In step 502, the DHCP Server module of the main routing device parses the device MAC address, device IP address, device name and other information from the DHCP exchange message, and sends the information to the network management of the main routing device through internal message communication Server module.
在步骤503中,主路由设备的组网管理Server模块收到消息后把设备MAC地址作为搜索关键字在组网拓扑信息数据库中进行查找,如果查找到了,把设备IP地址和设备名称补充到组网拓扑信息数据库中;如果没找到则新增一条记录,写入设备MAC地址、设备IP地址和设备名称等等相关信息。In step 503, after receiving the message, the network management server module of the main routing device uses the device MAC address as a search key to search in the network topology information database, and if found, adds the device IP address and device name to the group In the network topology information database; if not found, a new record will be added, and related information such as device MAC address, device IP address and device name will be written.
实施例6:Example 6:
如图10所示,该图是一种家庭组网网络拓扑管理的方法中涉及到设备离开管理流程,包括:As shown in Figure 10, the figure shows the management process of device leaving in a method for network topology management in a home network, including:
在步骤601中,子路由设备/主路由设备上有设备下线时,子路由设备/主路由设备的设备接入管理模块会收到设备的下线消息。In step 601, when a device on the sub-routing device/main routing device goes offline, the device access management module of the sub-routing device/main routing device will receive an offline message of the device.
在步骤602中,判断是主路由设备还是子路由设备收到设备的下线消息。若判断结果为子路由设备,则执行步骤603,否则,执行步骤606。In step 602, it is determined whether the main routing device or the sub-routing device receives the offline message of the device. If the judgment result is a sub-routing device, step 603 is performed; otherwise, step 606 is performed.
在步骤603中,子路由设备的设备接入管理模块把下线设备的设备MAC地址通过内部消息通信的方式,发送给组网管理Client模块。In step 603, the device access management module of the sub-routing device sends the device MAC address of the offline device to the networking management Client module by means of internal message communication.
在步骤604中,判断子路由在收到相应下挂设备下线消息之前,是否获取到主路由设备分配给自己的IP地址。如果获取到了主路由设备分配给自己的IP地址,执行S605;否则执行步骤608。In step 604, it is determined whether the sub-router has obtained the IP address assigned to itself by the main routing device before receiving the offline message of the corresponding attached device. If the IP address assigned to the self by the main routing device is obtained, step S605 is performed; otherwise, step 608 is performed.
在步骤605中,组网管理Client模块把对应下线设备的设备MAC地址发给主路由的组网管理Server模块,进入步骤607。此时,具体是发送携带设备MAC地址,以及相应设备的接入状态信息(即下线状态)。In step 605 , the networking management client module sends the device MAC address of the corresponding offline device to the networking management server module of the main router, and the process proceeds to step 607 . In this case, the MAC address of the carrying device and the access state information (ie the offline state) of the corresponding device are sent specifically.
在步骤606中,主路由设备的设备接入管理模块获取下线设备MAC地址、设备接入方式以及本设备的设备MAC地址,发给本设备的组网管理Server模块。In step 606, the device access management module of the main routing device obtains the MAC address of the offline device, the device access mode, and the device MAC address of the device, and sends them to the network management server module of the device.
在步骤607中,主路由的组网管理Server模块收到消息后把相应消息中携带的设备MAC地址作为搜索关键字在组网拓扑信息数据库中进行查找并删除该设备信息,如果该下线设备的设备类型为子路由,主路由设备遍历组网拓扑信息数据库,把上行设备MAC地址为该设备的设备信息都删掉,结束流程。其中,下挂设备信息包括子路由设备和/或终端设备。In step 607, after receiving the message, the network management server module of the main route uses the device MAC address carried in the corresponding message as a search key to search in the networking topology information database and delete the device information, if the offline device The device type of the device is a sub-router, the main routing device traverses the networking topology information database, deletes the device information whose MAC address of the upstream device is this device, and ends the process. Wherein, the attached device information includes sub-routing devices and/or terminal devices.
在步骤608中,更新子路由设备的本地下挂设备数据库,结束流程。In step 608, the local attached device database of the sub-routing device is updated, and the process ends.
实施例7:Example 7:
如图11所示,该图是一种家庭组网网络拓扑管理的方法中子路由设备注册及心跳维护管理流程。子路由设备获取到IP地址后,方法包括:As shown in FIG. 11 , the figure is a flow of sub-routing device registration and heartbeat maintenance management in a method for home networking network topology management. After the sub-routing device obtains the IP address, the methods include:
在步骤701中,子路由设备的组网管理Client模块向主路由的组网管理Server模块发送注册消息。In step 701, the networking management Client module of the sub-routing device sends a registration message to the networking management Server module of the main routing.
在步骤702中,主路由设备收到子路由设备的注册消息后,将子路由设备的MAC地址作为关键字在组网组网拓扑信息数据库中查找,如果没查到则在组网组网拓扑信息数据库中增加该子路由设备的相关信息,包括写入子路由设备的IP地址、子路由设备的MAC地址、设备类型为“子路由”的信息;如果查找到,把子路由设备的设备类型改为“子路由”。In step 702, after receiving the registration message of the sub-routing device, the main routing device uses the MAC address of the sub-routing device as a key to search in the networking topology information database. The relevant information of the sub-routing device is added to the information database, including the IP address of the sub-routing device, the MAC address of the sub-routing device, and the information that the device type is "sub-routing"; if found, the device type of the sub-routing device Change it to "subroute".
在步骤703中,为主路由设备回复给子路由设备注册成功的消息。In step 703, the main routing device replies to the sub-routing device a successful registration message.
在步骤704中,子路由设备注册成功后,查找子路由设备的本地下挂设备数据库是否已经有设备接入,如果有执行步骤705把下挂设备的设备MAC地址、设备接入方式信息发送给主路由设备,主路由设备更新组网拓扑信息数据库,更新流程参考图8设备接入流程,更新后执行步骤706回复子路由更新成功。In step 704, after the sub-routing device is successfully registered, it is searched whether the local device database of the sub-routing device has access to the device. The main routing device, the main routing device updates the network topology information database, the update process refers to the device access process in FIG. 8, and after the update, step 706 is executed to reply that the sub-route is updated successfully.
在步骤707和步骤708中,是子路由和主路由之间的心跳消息,子路由向 主路由注册成功后定期向主路由发送心跳消息。In step 707 and step 708, it is a heartbeat message between the sub-router and the main route, and the sub-router regularly sends a heartbeat message to the main route after successfully registering with the main route.
在步骤709中,主路由在规定的时间内没有收到子路由的心跳消息,将组网拓扑信息数据库中将子路由及子路由下挂设备的相关信息删除掉。In step 709, if the main route does not receive the heartbeat message of the sub-route within the specified time, the relevant information of the sub-route and the devices attached to the sub-route is deleted from the networking topology information database.
实施例8:Example 8:
如图12所示,是本发明实施例的家庭组网网络拓扑管理装置的架构示意图。本实施例的家庭组网网络拓扑管理装置包括一个或多个处理器21以及存储器22。其中,图12中以一个处理器21为例。As shown in FIG. 12 , it is a schematic structural diagram of a home networking network topology management apparatus according to an embodiment of the present invention. The home networking network topology management apparatus in this embodiment includes one or more processors 21 and a memory 22 . Among them, one processor 21 is taken as an example in FIG. 12 .
处理器21和存储器22可以通过总线或者其他方式连接,图12中以通过总线连接为例。The processor 21 and the memory 22 may be connected by a bus or in other ways, and the connection by a bus is taken as an example in FIG. 12 .
存储器22作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序和非易失性计算机可执行程序,如实施例1中的家庭组网网络拓扑管理方法。处理器21通过运行存储在存储器22中的非易失性软件程序和指令,从而执行家庭组网网络拓扑管理方法。As a non-volatile computer-readable storage medium, the memory 22 can be used to store non-volatile software programs and non-volatile computer-executable programs, such as the home networking network topology management method in Embodiment 1. The processor 21 executes the home networking network topology management method by running the non-volatile software programs and instructions stored in the memory 22 .
存储器22可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器22可选包括相对于处理器21远程设置的存储器,这些远程存储器可以通过网络连接至处理器21。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。 Memory 22 may include high speed random access memory, and may also include nonvolatile memory, such as at least one magnetic disk storage device, flash memory device, or other nonvolatile solid state storage device. In some embodiments, the memory 22 may optionally include memory located remotely from the processor 21, and these remote memories may be connected to the processor 21 through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
所述程序指令/模块存储在所述存储器22中,当被所述一个或者多个处理器21执行时,执行上述实施例1中的家庭组网网络拓扑管理方法,例如,执行以上描述的图5、图6、图8-图11所示的各个步骤。The program instructions/modules are stored in the memory 22, and when executed by the one or more processors 21, execute the home networking network topology management method in the above Embodiment 1, for example, execute the above-described diagram. 5. Each step shown in Figure 6, Figure 8-Figure 11.
值得说明的是,上述装置和系统内的模块、单元之间的信息交互、执行过程等内容,由于与本发明的处理方法实施例基于同一构思,具体内容可参见本发明方法实施例中的叙述,此处不再赘述。It is worth noting that the information exchange, execution process and other contents between the modules and units in the above-mentioned device and the system are based on the same concept as the processing method embodiments of the present invention. For details, please refer to the descriptions in the method embodiments of the present invention. , and will not be repeated here.
本领域普通技术人员可以理解实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: Read memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or CD, etc.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.

Claims (15)

  1. 一种家庭组网网络拓扑管理的系统,其特征在于,系统中包括一个主路由设备、一个或者多个子路由设备、一个或者多个终端设备组成,子路由设备通过有线或无线的方式,接入主路由设备或者接入位于其上行的其他子路由设备,终端设备通过有线或无线的方式接入主路由设备或者子路由设备,具体的:A system for home networking network topology management, characterized in that the system includes a main routing device, one or more sub-routing devices, and one or more terminal devices, and the sub-routing devices are connected to The main routing device or access to other sub-routing devices located in its upstream, and the terminal device is connected to the main routing device or sub-routing device through wired or wireless means, specifically:
    主路由设备工作在路由模式,主路由设备提供有线和/或无线链路通道供家庭网络内部的各个终端设备和子路由设备接入家庭网络;其中,主路由设备给子路由设备和终端设备分配IP地址;The main routing device works in routing mode, and the main routing device provides wired and/or wireless link channels for each terminal device and sub-routing device inside the home network to access the home network; wherein, the main routing device assigns IP to the sub-routing device and the terminal device. address;
    子路由设备工作的桥接模式,为对应完成接入的下行子路由设备和/或下挂的终端设备,通过有线和/或无线方式与主路由设备建立链路通道;子路由设备与主路由设备之间还建立有一条专属管理通道,用于子路由设备上报下挂的终端设备的信息和/或与之构成接入关系的下行子路由设备的信息。The bridge mode in which the sub-routing device works, establishes a link channel with the main routing device through wired and/or wireless means for the downlink sub-routing device and/or the connected terminal device that has completed the access; the sub-routing device and the main routing device A dedicated management channel is also established therebetween for the sub-routing device to report the information of the connected terminal device and/or the information of the downlink sub-routing device that forms an access relationship with it.
  2. 根据权利要求1所述的家庭组网网络拓扑管理的系统,其特征在于,组网拓扑信息数据库中的每一个条目为家庭组网设备中的一个设备的信息,设备信息包括设备MAC地址、设备类型、设备名称、设备IP地址、设备接入方式、接入接口名称、设备接入状态、上行设备MAC地址和下行设备MAC地址中的一项或者多项;所述设备包括子路由设备和终端设备;The system for home networking network topology management according to claim 1, wherein each entry in the networking topology information database is information of a device in the home networking device, and the device information includes a device MAC address, a device One or more of the type, device name, device IP address, device access method, access interface name, device access status, uplink device MAC address and downlink device MAC address; the devices include sub-routing devices and terminals equipment;
    其中,设备类型、设备接入方式、接入接口名称、设备接入状态、以及上行设备MAC地址/下行设备MAC地址,由子路由设备通过专属管理通道传递私有协议消息的方式,发送给主路由设备,其它信息则是主路由设备从DHCP交互报文中获取。Among them, the device type, device access method, access interface name, device access status, and uplink device MAC address/downlink device MAC address are sent to the main routing device by the sub-routing device by transmitting private protocol messages through the dedicated management channel , and other information is obtained by the main routing device from the DHCP exchange message.
  3. 根据权利要求2所述的家庭组网网络拓扑管理的系统,其特征在于,子路由设备获取到主路由设备分配的设备IP地址后,方法还包括:The system for home networking network topology management according to claim 2, wherein after the sub-routing device obtains the device IP address allocated by the main routing device, the method further comprises:
    子路由设备通过专属管理通道向主路由设备发送私有协议消息;The sub-routing device sends private protocol messages to the main routing device through the dedicated management channel;
    主路由设备收到子路由设备的私有协议消息后,将子路由设备的设备MAC地址作为搜索关键字在组网拓扑信息数据库中查找;若未查到,则在组网拓扑信息数据库中增加所述子路由设备的信息;若查到,则把所述子路由设备在组网拓扑信息数据库中对应记录的设备类型更新为子路由类型;After receiving the private protocol message of the sub-routing device, the main routing device uses the device MAC address of the sub-routing device as a search key to search in the networking topology information database; Describe the information of the sub-routing device; if found, update the device type corresponding to the record of the sub-routing device in the networking topology information database to the sub-routing type;
    子路由设备注册成功后,查找子路由设备的本地下挂设备数据库是否已经有设备接入,如果有则把下挂设备的设备MAC地址和设备接入方式通过所述专属管理通道发送给主路由设备,主路由设备更新组网拓扑信息数据库;其中,下挂设备包括子路由设备和/或终端设备。After the sub-routing device is successfully registered, check whether the local device database of the sub-routing device has access to the device, and if so, send the device MAC address and device access mode of the sub-routing device to the main router through the dedicated management channel. The device, the main routing device updates the networking topology information database; wherein, the attached devices include sub-routing devices and/or terminal devices.
  4. 根据权利要求1所述的家庭组网网络拓扑管理的系统,其特征在于,终端设备或子路由设备向主路由设备获取IP地址时,系统还包括:The system for home networking network topology management according to claim 1, wherein when the terminal device or the sub-routing device obtains the IP address from the main routing device, the system further comprises:
    主路由设备根据与子路由设备或者终端设备的DHCP交互报文,获取子路由设备或者终端的设备IP地址、设备MAC地址和设备名称中的一项或者多项;The main routing device obtains one or more of the device IP address, device MAC address and device name of the sub-routing device or terminal according to the DHCP exchange message with the sub-routing device or terminal device;
    主路由设备将子路由设备或者终端设备的设备MAC地址作为搜索关键字在组网拓扑信息数据库中搜索是否存在相应子路由设备或者终端设备;若有搜索到,则匹对各个信息,完成相应信息的更新;若没有搜到,则在组网拓扑信息数据库中增加一条记录,用于记录相应信息。The main routing device uses the device MAC address of the sub-routing device or terminal device as a search key to search for the corresponding sub-routing device or terminal device in the networking topology information database; if it is found, it will match each information and complete the corresponding information If it is not found, a record will be added to the network topology information database to record the corresponding information.
  5. 根据权利要求1所述的家庭组网网络拓扑管理的系统,其特征在于,每个子路由设备在获取到IP地址后,通过WAN侧接口发送链路层发现协议报文给邻居设备,当子路由设备的上行设备收到链路层发现协议报文后,从链路层发现协议报文中获取信息包括:设备MAC地址和设备类型;在上行设备为子路由设备时,所述上行设备根据链路层发现协议报文消息中的设备MAC地址在存储MAC地址的地址学习表中查找出相应子路由设备接入接口名称,并把设备MAC地址、设备类型和查找出的所述接入接口名称写入到本地下挂设备数据库中;在上行设备为主路由设备时,所述上行设备根据链路层发现协议报文消息中的设备MAC地址在存储MAC地址的地址学习表中查找出相应子路由设备接入接口名称,并把设备MAC地址、设备类型和查找出的所述接入接口名称写入到组网拓扑信息数据库中;The system for home networking network topology management according to claim 1, wherein after obtaining the IP address, each sub-routing device sends a link layer discovery protocol packet to the neighbor device through the WAN side interface, and when the sub-routing device obtains the IP address, it sends a link layer discovery protocol packet to the neighbor device. After the uplink device of the device receives the link layer discovery protocol message, the information obtained from the link layer discovery protocol message includes: device MAC address and device type; when the uplink device is a sub-routing device, the uplink device The device MAC address in the road layer discovery protocol message message finds out the access interface name of the corresponding sub-routing device in the address learning table that stores the MAC address, and uses the device MAC address, device type and the found access interface name. Write into the local device database; when the upstream device is the main routing device, the upstream device searches out the corresponding sub-link in the address learning table storing the MAC address according to the device MAC address in the link layer discovery protocol message. routing device access interface name, and write the device MAC address, device type and the found access interface name into the networking topology information database;
    各子路由设备维护的本地下挂设备数据库,用于子路由设备通过私有协议消息上报下挂的终端设备的信息和/或与之构成接入关系的下行子路由设备的信息时使用。The local attached device database maintained by each sub-routing device is used when the sub-routing device reports the information of the attached terminal device and/or the information of the downstream sub-routing device that forms an access relationship with it through private protocol messages.
  6. 根据权利要求5所述的家庭组网网络拓扑管理的系统,其特征在于,在终端设备是通过有线方式进行接入,并且相应终端设备不支持链路层发现协议报文时,每个主路由设备或者子路由设备还根据MAC地址接入消息来获取接入主路由设备或者子路由设备的下挂终端设备息,具体包括:The system for home networking network topology management according to claim 5, characterized in that, when the terminal device is accessed through a wired mode and the corresponding terminal device does not support link layer discovery protocol packets, each main route The device or the sub-routing device also obtains the information of the connected terminal device connected to the main routing device or the sub-routing device according to the MAC address access message, which specifically includes:
    若子路由设备在收到MAC地址接入消息后,从本地下挂设备数据库中查找相应MAC地址接入消息中携带的接口是否接入过子路由设备;若主路由设备在收到MAC地址接入消息后,从组网拓扑信息数据库中查找相应MAC地址接入消息中携带的接口是否接入过子路由设备;If the sub-routing device receives the MAC address access message, it searches the local attached device database to see whether the interface carried in the corresponding MAC address access message has been connected to the sub-routing device; if the main routing device receives the MAC address access After the message, find out whether the interface carried in the corresponding MAC address access message has accessed the sub-routing device from the networking topology information database;
    如果接入过,不处理所述MAC地址接入消息,所述设备MAC地址对应的设备不是直接下挂设备;If it has been accessed, the MAC address access message is not processed, and the device corresponding to the device MAC address is not a directly connected device;
    如果没有接入过,则表示所述MAC地址接入消息中携带的设备信息,所对应的设备为直接下挂终端设备,把所述MAC地址接入消息中携带的设备信息存入本地下挂设备数据库或者组网拓扑信息数据库中。If it has not been accessed, it indicates that the device information carried in the MAC address access message corresponds to a directly connected terminal device, and the device information carried in the MAC address access message is stored in the local connected device. In the device database or the networking topology information database.
  7. 根据权利要求1所述的家庭组网网络拓扑管理的系统,其特征在于,每个子路由设备在收到WiFi上下线消息后,根据WiFi上下线消息中带有设备MAC地址和接入的WiFi接口名称,直接把相应设备信息保存到本地下挂设备数据库中;The system for home networking network topology management according to claim 1, wherein after receiving the WiFi online and offline message, each sub-routing device carries the device MAC address and the accessed WiFi interface according to the WiFi online and offline message. name, directly save the corresponding device information to the local device database;
    主路由设备在收到WiFi上下线消息后,根据WiFi上下线消息中带有设备MAC地址和接入的WiFi接口名称,直接把相应设备信息保存到组网拓扑信息数据库中。After receiving the WiFi online and offline message, the main routing device directly saves the corresponding device information in the networking topology information database according to the device's MAC address and the name of the connected WiFi interface in the WiFi online and offline message.
  8. 根据权利要求1所述的家庭组网网络拓扑管理的系统,其特征在于,终端设备通过有线或无线的方式接入子路由设备时,系统还包括:The system for home networking network topology management according to claim 1, wherein when the terminal device accesses the sub-routing device in a wired or wireless manner, the system further comprises:
    子路由设备获取到终端设备的设备MAC地址和设备接入方式,子路由设备将与其直连的终端设备MAC地址、设备接入方式以及子路由设备自身的设备MAC地址,通过所述专属管理通道发送给主路由设备;The sub-routing device obtains the device MAC address and device access mode of the terminal device, and the sub-routing device sends the directly connected terminal device MAC address, device access mode and the sub-routing device's own device MAC address through the dedicated management channel. Send to the main routing device;
    主路由设备收到子路由设备发送的信息后,以信息内容中携带的终端设备的设备MAC地址为搜索关键字,在组网拓扑信息数据库中进行搜索,确定是否有对应的设备信息;若没有搜索到,则在组网拓扑信息数据库中加入一条记录并把相应终端设备的设备MAC地址、设备接入方式和子路由设备自身的设备MAC地址添加到组网拓扑信息数据库中;若有搜索到,则完成设备接入方式和子路由设备自身的设备MAC地址的确认。After receiving the information sent by the sub-routing device, the main routing device uses the device MAC address of the terminal device carried in the information content as a search key to search in the networking topology information database to determine whether there is corresponding device information; If found, add a record in the networking topology information database and add the device MAC address of the corresponding terminal device, the device access mode, and the device MAC address of the sub-routing device itself into the networking topology information database; Then the confirmation of the device access mode and the device MAC address of the sub-routing device itself is completed.
  9. 根据权利要求1所述的家庭组网网络拓扑管理的系统,其特征在于,子路由设备或主路由设备上有设备下线时,收到设备下线的事件通知,其中,设备包括终端设备和/或子路由设备,系统还包括:The system for home networking network topology management according to claim 1, wherein when a device on the sub-routing device or the main routing device goes offline, an event notification that the device goes offline is received, wherein the devices include terminal devices and / or sub-routing device, the system also includes:
    若为子路由设备收到设备下线的事件通知,则判断所述收到设备下线的事件通知的子路由设备是否获取到主路由分配的IP地址;如果获取到了IP地址,则把下线设备的设备MAC地址发给主路由设备;在子路由设备的本地下挂设备数据库中删除相应下线设备信息;If the sub-routing device receives the event notification that the device goes offline, it determines whether the sub-routing device that receives the event notification that the device goes offline has obtained the IP address assigned by the main route; if it has obtained the IP address, it will go offline The device MAC address of the device is sent to the main routing device; the corresponding offline device information is deleted in the local device database of the sub-routing device;
    若为主路由设备收到设备下线的事件通知,则把设备的设备MAC地址作为搜索关键字在组网拓扑信息数据库中进行查找并删除该设备信息,如果所述下线设备的设备类型为子路由设备,主路由设备遍历组网拓扑信息数据库,把上行设备MAC地址为该设备的下挂设备信息都删掉;其中,下挂设备信息包括子路由设备和/或终端设备。If the main routing device receives the event notification that the device goes offline, the device MAC address of the device is used as a search key to search in the networking topology information database and delete the device information, if the device type of the offline device is For sub-routing devices, the main routing device traverses the networking topology information database, and deletes the information of the sub-routing devices whose MAC address is the device; wherein, the sub-routing device information includes sub-routing devices and/or terminal devices.
  10. 一种家庭组网网络拓扑管理的方法,其特征在于,应用于权利要求1-9任一所述的家庭组网网络拓扑管理的系统中,方法包括:A method for home networking network topology management, characterized in that it is applied to the system for home networking network topology management described in any one of claims 1-9, the method comprising:
    对于家庭组网网络中的每一台子路由设备和终端设备,主路由设备通过与 子路由设备之间建立的专属管理通道获取各子路由设备下行子路由设备信息和/或下挂的终端设备信息,还从DHCP交互报文中获取子路由设备或终端设备的设备IP地址、设备MAC地址和设备名称中的一项或者多项;For each sub-routing device and terminal device in the home networking network, the main routing device obtains the downstream sub-routing device information and/or the attached terminal device information of each sub-routing device through the dedicated management channel established with the sub-routing device , and also obtain one or more of the device IP address, device MAC address, and device name of the sub-routing device or terminal device from the DHCP exchange message;
    根据设备MAC地址,合并专属管理通道获取的内容和DHCP交互报文中获取的内容,生成完整的家庭网络组网拓扑。According to the MAC address of the device, the content obtained from the dedicated management channel and the content obtained in the DHCP exchange message are combined to generate a complete home network topology.
  11. 根据权利要求10所述的家庭组网网络拓扑管理的方法,其特征在于,子路由设备或者主路由设备中有终端设备接入时,子路由设备或者主路由设备收到所述终端设备的上线消息,方法具体包括:The method for home networking network topology management according to claim 10, wherein when a terminal device accesses the sub-routing device or the main routing device, the sub-routing device or the main routing device receives the online access of the terminal device. message, the method specifically includes:
    若为子路由设备有终端设备接入时,所述子路由设备获取终端设备MAC地址、接入方式以及子路由设备自身的MAC地址,所述子路由设备判断是否分配有IP地址,若还没有被主路由设备分配IP地址,则更新本地下挂设备数据库;若已经分配有IP地址,则将获取到的终端设备信息和自身的MAC地址通过专属管理通道发给主路由设备;If the sub-routing device is accessed by a terminal device, the sub-routing device obtains the terminal device's MAC address, access mode, and the sub-routing device's own MAC address, and the sub-routing device determines whether an IP address is allocated, and if not If an IP address is assigned by the main routing device, the local device database will be updated; if an IP address has been assigned, the acquired terminal device information and its own MAC address will be sent to the main routing device through a dedicated management channel;
    主路由设备收到子路由设备发送的信息后,把终端设备的MAC地址作为关键字在组网拓扑信息数据库中进行查找;若查找到所述终端设备,则更新接入方式及上行接入设备MAC;若未查找到所述终端设备,则在拓扑数据库中新增一条记录,写入终端设备MAC、接入方式及上行接入设备MAC。After receiving the information sent by the sub-routing device, the main routing device uses the MAC address of the terminal device as a key to search in the networking topology information database; if the terminal device is found, it updates the access mode and uplink access device. MAC; if the terminal device is not found, a new record is added in the topology database, and the terminal device MAC, access mode and uplink access device MAC are written.
  12. 根据权利要求10所述的家庭组网网络拓扑管理的方法,其特征在于,终端设备或者子路由设备,获取IP地址的方法流程包括:The method for home networking network topology management according to claim 10, wherein the method process for obtaining an IP address by a terminal device or a sub-routing device comprises:
    终端设备或子路由设备向主路由设备发送获取IP地址的请求消息;The terminal device or sub-routing device sends a request message for obtaining an IP address to the main routing device;
    主路由设备从DHCP交互报文中解析出设备的MAC地址、终端设备的IP地址和设备名称相关信息,并根据MAC地址在组网拓扑信息数据库中进行查找;其中,其设备的MAC地址、设备的名称和设备类型参数包括属于子路由设备的和/或属于下挂的终端设备的;The main routing device parses the MAC address of the device, the IP address of the terminal device, and the related information of the device name from the DHCP exchange message, and searches the network topology information database according to the MAC address; The name and device type parameters include those belonging to the sub-routing device and/or belonging to the connected terminal device;
    若查找到,则把终端设备的IP地址、设备名称、设备类型补充到组网拓扑信息数据库中;若未查找到,则新增一条记录,写入设备的MAC地址、设备名称和设备类型中的一项或者多项。If found, add the IP address, device name and device type of the terminal device to the networking topology information database; if not found, add a new record and write it into the MAC address, device name and device type of the device one or more of the.
  13. 根据权利要求10所述的家庭组网网络拓扑管理的方法,其特征在于,子路由设备或主路由设备上有设备下线时,收到设备下线的事件通知,其中,设备包括终端设备和/或子路由设备,方法还包括:The method for home networking network topology management according to claim 10, wherein when a device on the sub-routing device or the main routing device goes offline, an event notification that the device goes offline is received, wherein the devices include terminal devices and / or a sub-routing device, the method further includes:
    子路由设备或主路由设备收到设备下线的事件通知后,把下线设备的MAC地址进行本地下挂设备数据库更新;After the sub-routing device or the main routing device receives the event notification that the device goes offline, it updates the local device database with the MAC address of the offline device;
    若为子路由设备收到设备下线的事件通知,则判断所述收到设备下线的事 件通知的子路由设备是否获取到主路由分配的IP地址;如果获取到了IP地址,则把下线设备的MAC地址发给主路由设备;If the sub-routing device receives the event notification that the device goes offline, it determines whether the sub-routing device that receives the event notification that the device goes offline has obtained the IP address assigned by the main route; if it has obtained the IP address, it will go offline The MAC address of the device is sent to the main routing device;
    若为主路由设备收到设备下线的事件通知,则把设备的MAC地址作为关键字在组网拓扑信息数据库中进行查找并删除该设备信息,如果所述下线设备的设备类型为子路由设备,主路由设备遍历拓扑数据库,把上行设备的MAC地址为该设备的下挂设备信息都删掉;其中,下挂设备信息包括子路由设备和/或终端设备。If the main routing device receives the event notification that the device goes offline, the device's MAC address is used as a keyword to search in the networking topology information database and delete the device information, if the device type of the offline device is a sub-router The device, the main routing device traverses the topology database, and deletes the information of the downstream devices whose MAC addresses of the upstream device are the device; wherein, the information of the downstream devices includes sub-routing devices and/or terminal devices.
  14. 根据权利要求10所述的家庭组网网络拓扑管理的方法,其特征在于,方法包括子路由设备注册流程,具体的:The method for home networking network topology management according to claim 10, wherein the method comprises a sub-routing device registration process, specifically:
    子路由设备获取到IP地址后,通过专属管理通道向主路由设备发送私有协议的注册消息;After the sub-routing device obtains the IP address, it sends the registration message of the private protocol to the main routing device through the dedicated management channel;
    主路由设备收到子路由设备的注册消息后,将子路由设备的MAC地址作为关键字在组网拓扑信息数据库中查找;若未查到,则在组网拓扑信息数据库中增加所述子路由设备的信息;若查到,则把所述子路由设备对应记录在主路由设备侧的设备类型更新为子路由类型;After receiving the registration message of the sub-routing device, the main routing device uses the MAC address of the sub-routing device as a key to search in the networking topology information database; if not found, then adds the sub-routing to the networking topology information database Device information; if found, update the device type corresponding to the sub-routing device recorded on the main routing device side to the sub-routing type;
    子路由设备注册成功后,查找子路由设备的本地下挂设备数据库是否已经有设备接入,如果有把下挂设备的MAC地址和接入方式通过所述专属管理通道发送给主路由设备,主路由设备更新组网拓扑信息数据库;其中,下挂设备包括子路由设备和/或终端设备。After the sub-routing device is successfully registered, check whether the local device database of the sub-routing device has access to the device. If so, send the MAC address and access method of the sub-routing device to the main routing device through the dedicated management channel. The routing device updates the networking topology information database; wherein, the attached devices include sub-routing devices and/or terminal devices.
  15. 根据权利要求14所述的家庭组网网络拓扑管理的方法,其特征在于,方法包括子路由设备心跳维护管理流程,具体的:The method for home networking network topology management according to claim 14, wherein the method comprises a heartbeat maintenance and management process of a sub-routing device, specifically:
    子路由设备向主路由设备注册成功后,定期向主路由设备发送心跳消息;After the sub-routing device is successfully registered with the main routing device, it periodically sends a heartbeat message to the main routing device;
    主路由设备在预设的时间内没有收到第一子路由设备的心跳消息,则将组网拓扑信息数据库中,对应第一子路由设备及第一子路由设备下挂的各个设备的相关信息删除。If the main routing device does not receive the heartbeat message of the first sub-routing device within the preset time, it will store the relevant information of the first sub-routing device and each device connected to the first sub-routing device in the networking topology information database. delete.
PCT/CN2021/106059 2020-08-17 2021-07-13 Network topology management system and method for home networking WO2022037322A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
MX2022008972A MX2022008972A (en) 2020-08-17 2021-07-13 Network topology management system and method for home networking.

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010826111.3A CN112039693B (en) 2020-08-17 2020-08-17 System and method for managing home networking network topology
CN202010826111.3 2020-08-17

Publications (1)

Publication Number Publication Date
WO2022037322A1 true WO2022037322A1 (en) 2022-02-24

Family

ID=73577435

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/106059 WO2022037322A1 (en) 2020-08-17 2021-07-13 Network topology management system and method for home networking

Country Status (3)

Country Link
CN (1) CN112039693B (en)
MX (1) MX2022008972A (en)
WO (1) WO2022037322A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117440469A (en) * 2023-12-07 2024-01-23 西安优光谱信息科技有限公司 Identity recognition method and system of host and slave in easy mesh networking

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112039693B (en) * 2020-08-17 2021-06-29 烽火通信科技股份有限公司 System and method for managing home networking network topology
CN112532529B (en) * 2021-02-09 2021-05-11 深圳市乙辰科技股份有限公司 Mesh routing topology networking method and system
CN112994936B (en) * 2021-02-09 2022-08-30 博为科技有限公司 Networking information display method, device and system and routing equipment
EP4311180A4 (en) * 2021-03-29 2024-04-24 Huawei Tech Co Ltd Connection configuration method and apparatus
CN113162824B (en) * 2021-04-13 2022-11-04 深圳市奇虎智能科技有限公司 Method, system, storage medium and computer equipment for identifying equipment under sub-routing by router
CN113872864B (en) * 2021-09-26 2023-02-03 烽火通信科技股份有限公司 Method and device for realizing sub-route web management under mesh networking mode
CN114363237A (en) * 2021-12-22 2022-04-15 苏州迈科网络安全技术股份有限公司 Home networking equipment network topology identification method, device, terminal and storage medium
CN114268940A (en) * 2021-12-22 2022-04-01 深圳市共进电子股份有限公司 Mesh network topological graph display method, system, equipment and storage medium
CN114363238A (en) * 2021-12-23 2022-04-15 苏州迈科网络安全技术股份有限公司 Method, device, terminal and storage medium for showing information of drop-off device
CN116366455A (en) * 2021-12-28 2023-06-30 华为技术有限公司 Network system, network message processing method, device and storage medium
CN114554523A (en) * 2022-02-17 2022-05-27 儒安物联科技集团有限公司 Method for routing and synchronizing parameters of 4G network in MESH link
CN115242619A (en) * 2022-06-22 2022-10-25 中国电信股份有限公司 Method and device for establishing connection relation of equipment ports, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100188971A1 (en) * 2009-01-23 2010-07-29 Mung Chiang Wireless Home Network Routing Protocol
CN103532741A (en) * 2013-09-27 2014-01-22 瑞斯康达科技发展股份有限公司 Access level network topology management method and system
CN104009925A (en) * 2014-05-19 2014-08-27 百度在线网络技术(北京)有限公司 Method and device for establishing bridge connection with router and router
CN105187281A (en) * 2014-06-23 2015-12-23 中兴通讯股份有限公司 Topological graph drawing method and device
CN105827488A (en) * 2015-01-04 2016-08-03 济宁智城中科信息技术有限公司 MESH network system applicable to smart home, networking method and communication method
CN106998279A (en) * 2017-05-15 2017-08-01 成都铅笔科技有限公司 A kind of primary and secondary route group network system
CN112039693A (en) * 2020-08-17 2020-12-04 烽火通信科技股份有限公司 System and method for managing home networking network topology

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101414963B (en) * 2007-10-18 2012-10-03 华为技术有限公司 Method and apparatus for automatic topological discover and resource management in PBB TE network
CN101621414B (en) * 2009-08-21 2012-01-04 杭州华三通信技术有限公司 Method and apparatus for discovering network resource and topology
CN102137007B (en) * 2011-01-17 2014-05-21 华为技术有限公司 Method and system for generating network topology as well as coordinator
CN102291283A (en) * 2011-08-03 2011-12-21 中山大学深圳研究院 Digital home network system
CN104144091A (en) * 2013-05-10 2014-11-12 中国电信股份有限公司 Home gateway service carrying implementation method and home gateway
CN103368856A (en) * 2013-07-10 2013-10-23 杭州华三通信技术有限公司 Topology management method and device
CN104468219B (en) * 2014-12-11 2019-01-08 新华三技术有限公司 Virtual networking method for discovering network topology and equipment
CN209328488U (en) * 2018-10-16 2019-08-30 深圳市奥拓电子股份有限公司 Topological structure circuit

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100188971A1 (en) * 2009-01-23 2010-07-29 Mung Chiang Wireless Home Network Routing Protocol
CN103532741A (en) * 2013-09-27 2014-01-22 瑞斯康达科技发展股份有限公司 Access level network topology management method and system
CN104009925A (en) * 2014-05-19 2014-08-27 百度在线网络技术(北京)有限公司 Method and device for establishing bridge connection with router and router
CN105187281A (en) * 2014-06-23 2015-12-23 中兴通讯股份有限公司 Topological graph drawing method and device
CN105827488A (en) * 2015-01-04 2016-08-03 济宁智城中科信息技术有限公司 MESH network system applicable to smart home, networking method and communication method
CN106998279A (en) * 2017-05-15 2017-08-01 成都铅笔科技有限公司 A kind of primary and secondary route group network system
CN112039693A (en) * 2020-08-17 2020-12-04 烽火通信科技股份有限公司 System and method for managing home networking network topology

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117440469A (en) * 2023-12-07 2024-01-23 西安优光谱信息科技有限公司 Identity recognition method and system of host and slave in easy mesh networking
CN117440469B (en) * 2023-12-07 2024-03-12 西安优光谱信息科技有限公司 Identity recognition method and system of host and slave in easy mesh networking

Also Published As

Publication number Publication date
MX2022008972A (en) 2022-08-11
CN112039693A (en) 2020-12-04
CN112039693B (en) 2021-06-29

Similar Documents

Publication Publication Date Title
WO2022037322A1 (en) Network topology management system and method for home networking
CN106797409B (en) Server for device location registration in internet of things (IOT)
US10057130B2 (en) D2HCP protocol in ad hoc networks: merging of sub-networks and address conflict resolution
EP2951953B1 (en) Method of managing zigbee network in the internet of things
CN108432191B (en) Communication between network controllers
CN108834198B (en) MP node network access method, MP node, MPP node and medium product
CN112073920B (en) Networking method of wireless grid network node and network node equipment
CN113170005B (en) Method and device for supporting selective forwarding of messages in a network of communicatively coupled communication devices
WO2012079474A1 (en) Address allocation processing method, apparatus, and system
CN101577722A (en) Method for realizing MAC forced forwarding function and device
JP2005519531A (en) Method for providing topology awareness information in an IP network
CN101753458B (en) Method and device for processing ND neighbor table entry
US20160212679A1 (en) Terminal and Wireless Networking Method
CN102594885B (en) Sensor network resolves interoperation A platform, sensor network interoperability methods and system
US20090198806A1 (en) Data structure for managing sensor network using id of sensor node and method using the same
CN103813372B (en) A kind of wireless sensor network management method based on IPv6
CN104038427A (en) Router renewing method and device
CN111757462B (en) Automatic node discovery method and related device
CN111565117A (en) Topology discovery method and system based on SNMP
KR101227001B1 (en) Method and system for managing node identification
CN116827801B (en) Network topology construction method, device, computer equipment and readable storage medium
CN102546419B (en) Routing method, routing device, packet forwarding method and packet forwarding system
CN112333014B (en) Device management method and communication apparatus
CN113055297B (en) Network topology discovery method and device
WO2017215383A1 (en) Network element configuration method and device, and network element management method and device

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21857417

Country of ref document: EP

Kind code of ref document: A1