Automatic configuration method and device of equipment
By implementing the automatic configuration method in the network management equipment, automatically determining the connection status of the network equipment port and sending configuration information, the problem of inefficient equipment configuration in the existing technology is solved, and automated configuration is realized, saving human resources and reducing time consumption.
Patent Information
- Application Number
- CN202411918043.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-13
- Publication Date
- 2025-04-11
AI Technical Summary
The configuration method of equipment in the prior art requires the intervention of network administrators, resulting in waste of human resources, time-consuming and inefficient configuration.
It provides an automatic configuration method for equipment, through the communication connection between the network management device and the network device, determine whether the port of the network device is connected to the two devices, and automatically sends the device configuration information to the successor equipment to realize the configuration process without manual participation.
This method can greatly save human resources, reduce configuration time, improve configuration efficiency, and realize automated operation and maintenance management.
Smart Images

Figure CN119814548A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202210037957.8, the original application date is January 13, 2022, and the name of the original application is “Automatic Configuration Method and Device for Equipment”. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present invention relates to the field of communication technology, and in particular to an automatic configuration method and device for equipment. Background Art
[0003] With the rapid development and increasing complexity of network technology, especially the rise of mobile Internet, the automated operation and maintenance of network equipment has become the focus of network construction.
[0004] In a certain network, network devices and terminals are connected through ports. If a network device or terminal fails and needs to be replaced or migrated, the connection relationship will change. At this time, the newly connected terminal or network device needs to be configured, and the connected port also needs to be configured to ensure that the entire network can communicate normally.
[0005] Under the above-mentioned device configuration method, a network administrator is usually required to intervene to configure the newly connected terminal or network device and the access port. This device configuration method greatly wastes human resources, is time-consuming, and has low configuration efficiency. Summary of the invention
[0006] The embodiment of the present invention provides a method and apparatus for automatically configuring a device, so as to solve the problems existing in the related art of greatly wasting human resources, taking a long time and having low configuration efficiency.
[0007] According to an embodiment of the present invention, there is provided a method for automatic configuration of a device, which is applied to a network management device, wherein the network management device is communicatively connected with a network device, and the method comprises:
[0008] Determine whether a port of the network device is connected to two devices, wherein the network device includes a first network device, and a first port is provided on the first network device;
[0009] If it is determined that two devices are connected to the first port of the first network device, the device configuration information of the first device that is first connected to the first network device among the two devices connected to the first port is sent to the second device that is later connected to the first network device; wherein the two devices include the first device and the second device, the first device is connected to the first network device through the first port, the second device is a device that replaces the first device, and the device configuration information is used to configure the second device.
[0010] Optionally, if the first device is connected to at least one terminal, the method further includes:
[0011] Determine whether the port connected to the at least one terminal and the first device is connected to ports of two devices, wherein the at least one terminal includes a first terminal, and the first terminal is provided with a second port;
[0012] If it is determined that the second port is connected to the third port of the first device and the fourth port of the second device, the port configuration information of the third port is sent to the second device, wherein the two devices include the first device and the second device, and the port configuration information is used by the second device to configure the fourth port.
[0013] Optionally, also include:
[0014] Deleting the interconnection information between the first port of the first network device and the first device; and / or
[0015] The interconnection information between the second port of the first terminal and the third port of the first device is deleted.
[0016] Optionally, before determining whether the port of the network device is connected to ports of two devices, the method further includes:
[0017] Acquire selected device interconnection information, wherein the selected device connection information includes interconnection information of ports of at least two devices, and the at least two devices include the network device;
[0018] The obtained selected device interconnection information is updated into the network topology map.
[0019] Optionally, the network device further includes at least one of the following: a second network device, a third network device, and a fourth network device, and the acquiring the interconnection information of the selected device includes:
[0020] After receiving the wide area network management protocol CWMP keep-alive message sent by the second network device, obtaining the device interconnection information of each uplink port of the second network device carried by the CWMP keep-alive message to obtain the selected device interconnection information; or,
[0021] After receiving a Simple Network Management Protocol (SNMP) Trap message sent by the third network device, obtaining device interconnection information of each downlink port of the third network device carried in the SNMP Trap message to obtain selected device interconnection information; or,
[0022] Obtain a neighbor table of the fourth network device to obtain interconnection information of the selected device.
[0023] According to an embodiment of the present invention, there is also provided an automatic configuration device for a device, which is applied to a network management device, wherein the network management device is communicatively connected with a network device, and the device comprises:
[0024] A first determination module, configured to determine whether a port of the network device is connected to two devices, wherein the network device comprises a first network device, and a first port is provided on the first network device;
[0025] A first sending module is used for sending device configuration information of a first device that is first connected to the first network device among the two devices connected to the first port to a second device that is later connected to the first network device if it is determined that the first port of the first network device is connected to two devices; wherein the two devices include the first device and the second device, the first device is connected to the first network device through the first port, the second device is a device that replaces the first device, and the device configuration information is used for configuring the second device.
[0026] Optionally, if the first device is connected to at least one terminal, the apparatus further includes:
[0027] A second determining module, configured to determine whether a port connected to the at least one terminal and the first device is connected to ports of two devices, wherein the at least one terminal includes a first terminal, and the first terminal is provided with a second port;
[0028] A second sending module is used to send port configuration information of the third port to the second device if it is determined that the second port is connected to the third port of the first device and the fourth port of the second device, wherein the two devices include the first device and the second device, and the port configuration information is used by the second device to configure the fourth port.
[0029] Optionally, also include:
[0030] The deletion module is used to delete the interconnection information between the first port of the first network device and the first device; and / or delete the interconnection information between the second port of the first terminal and the third port of the first device.
[0031] According to an embodiment of the present invention, there is also provided a method for automatic configuration of a device, which is applied to a network management device included in a selected network, wherein the network management device is communicatively connected with each network device included in the selected network, and the method comprises:
[0032] Updating the obtained selected device interconnection information into the network topology map of the selected network, wherein the selected device connection information includes interconnection information of ports of at least two devices;
[0033] Determine whether each port of each network device in the network topology diagram is connected to ports of two devices;
[0034] If it is determined that the first port of the first network device among the network devices is connected to the ports of two devices, the device configuration information of the first device of the two devices connected to the first port that is first updated to the network topology map is sent to the second device that is later updated to the network topology map, so that the second device is configured according to the device configuration information of the first device.
[0035] Optionally, if each access device in each network device is connected to at least one terminal, the method further includes:
[0036] Determine whether the first device in the network topology diagram is connected to at least one terminal;
[0037] If it is determined that the first device in the network topology diagram is connected to at least one terminal, determining whether each port in the network topology diagram where the at least one terminal is connected to the first device is connected to ports of two devices;
[0038] If it is determined that the second port connected to the first device by the first terminal among the at least one terminal in the network topology diagram is simultaneously connected to the third port of the first device and the fourth port of the second device, the port configuration information of the third port is sent to the second device so that the second device configures the fourth port according to the port configuration information.
[0039] Optionally, also include:
[0040] Deleting the interconnection information between the first port of the first network device and the first device in the network topology diagram;
[0041] And delete the interconnection information between the second port of the first terminal and the third port of the first device in the network topology diagram.
[0042] Optionally, also include:
[0043] After receiving a wide area network management protocol CWMP keep-alive message sent by a second network device in each network device, obtaining device interconnection information of each uplink port of the second network device carried in the CWMP keep-alive message to obtain the selected device interconnection information; or,
[0044] After receiving a Simple Network Management Protocol (SNMP) Trap message sent by a third network device among the network devices, obtaining device interconnection information of each downlink port of the third network device carried in the SNMP Trap message to obtain interconnection information of the selected device; or,
[0045] A neighbor table of a fourth network device among the network devices is obtained to obtain interconnection information of the selected device.
[0046] According to an embodiment of the present invention, there is also provided an automatic configuration device for a device, which is applied to a network management device included in a selected network, wherein the network management device is communicatively connected with each network device included in the selected network, and the device comprises:
[0047] An updating module, configured to update the acquired interconnection information of the selected devices into the network topology map of the selected network, wherein the selected device connection information includes interconnection information of ports of at least two devices;
[0048] A first determination module is used to determine whether each port of each network device in the network topology diagram is connected to ports of two devices;
[0049] The first sending module is used to send the device configuration information of the first device first updated to the network topology map to the second device later updated to the network topology map if it is determined that the first port of the first network device among the network devices is connected to the ports of two devices, so that the second device is configured according to the device configuration information of the first device.
[0050] Optionally, if each access device in each network device is connected to at least one terminal, the apparatus further includes:
[0051] A second determination module is used to determine whether the first device in the network topology diagram is connected to at least one terminal; if it is determined that the first device in the network topology diagram is connected to at least one terminal, determine whether each port connecting the at least one terminal in the network topology diagram to the first device is connected to ports of two devices;
[0052] A second sending module is used to send the port configuration information of the third port to the second device if it is determined that the second port connected to the first device by the first terminal among the at least one terminal in the network topology diagram is simultaneously connected to the third port of the first device and the fourth port of the second device, so that the second device configures the fourth port according to the port configuration information.
[0053] Optionally, also include:
[0054] The deletion module is used to delete the interconnection information between the first port of the first network device and the first device in the network topology diagram; and to delete the interconnection information between the second port of the first terminal and the third port of the first device in the network topology diagram.
[0055] Optionally, an acquisition module is also included, which is used to:
[0056] After receiving a wide area network management protocol CWMP keep-alive message sent by a second network device in each network device, obtaining device interconnection information of each uplink port of the second network device carried in the CWMP keep-alive message to obtain the selected device interconnection information; or,
[0057] After receiving a Simple Network Management Protocol (SNMP) Trap message sent by a third network device among the network devices, obtaining device interconnection information of each downlink port of the third network device carried in the SNMP Trap message to obtain interconnection information of the selected device; or,
[0058] A neighbor table of a fourth network device among the network devices is obtained to obtain interconnection information of the selected device.
[0059] According to an embodiment of the present invention, there is also provided an electronic device, the electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0060] Memory, used to store computer programs;
[0061] The processor is used to implement the above method steps when executing the program stored in the memory.
[0062] According to an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method steps when executed by a processor.
[0063] The beneficial effects of the present invention are as follows:
[0064] The embodiment of the present invention provides an automatic configuration method and device for a device, which determines whether the port of the network device is connected to two devices; wherein the network device includes a first network device, and a first port is set on the first network device; if it is determined that the first port of the first network device is connected to two devices, the device configuration information of the first device connected to the first network device first among the two devices connected to the first port is sent to the second device connected to the first network device later, so that the second device is configured according to the device configuration information of the first device; wherein the two devices include the first device and the second device, the first device is connected to the first network device through the first port, and the second device is a device that replaces the first device. In this scheme, when it is determined that the first port of the first network device is connected to two devices, the device configuration information of the first device connected to the first network device first among the two devices connected to the first port is sent to the second device connected to the first network device later, so that the second device can be directly configured according to the device configuration information of the first device, and the first device with a fault is replaced. The whole process can be completed without human participation, which can greatly save human resources, reduce time consumption, and improve configuration efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A flowchart of an automatic configuration method for a device in an embodiment of the present invention;
[0066] Figure 2 A schematic diagram of the structure of an automatic configuration device of a device in an embodiment of the present invention;
[0067] Figure 3 This is a schematic diagram of the structure of an electronic device shown in this application. DETAILED DESCRIPTION
[0068] In view of the problems existing in the related technology of great waste of human resources, long time consumption and low configuration efficiency, an embodiment of the present invention provides an automatic configuration method for a device, which is applied to a network management device included in a selected network, and the network management device is communicatively connected with each network device included in the selected network.
[0069] The selected network can be, but is not limited to, a minimalist optical network. As the focus of the network center shifts to business, the management and maintenance of a large number of access / aggregation switches has become a burden for network administrators. Therefore, we began to learn from operators and proposed a flat network construction plan, namely a minimalist optical network, as the market changes. From the network implementation level, the biggest change brought by minimalist optical is that the original [weak-current box access switch pulls the network cable to the indoor] has changed to [pulling the optical fiber from the machine room (building / floor switch) to the indoor switch, and then leading out the indoor network cable], referred to as light into the room. After light enters the room, the number of indoor switches will increase significantly, usually 3 to 6 times the number of traditional weak-current room access switches. Taking 1,000 indoor information points as an example, if a 24-port switch is installed in the weak-current room, 40 units are required; if an 8-port Aurora switch is installed indoors, 125 units are required, a significant increase in number. As the number of indoor Aurora switches continues to increase, the probability of equipment failure increases. When a device fails, the administrator needs to replace the old device with a new one and then configure the new device, which greatly wastes human resources, takes a long time, and has low configuration efficiency.
[0070] Based on the above problems, a device automatic configuration method is proposed. The process of this method is as follows: Figure 1 As shown, the execution steps are as follows:
[0071] S11: Obtaining interconnection information of selected devices, and updating the obtained interconnection information of selected devices into the network topology map.
[0072] The selected device connection information includes interconnection information of ports of at least two devices, and the at least two devices include a network device. The network device may include at least one of the following: a second network device, a third network device, and a fourth network device.
[0073] Based on the communication connection between the network device (which may refer to the network device in the selected network) and the network management device, the manner of obtaining the interconnection information of the selected device may include the following three methods:
[0074] In the first way, after receiving a CPE WAN Management Protocol (CWMP) keep-alive message sent by the second network device, the device interconnection information of each uplink port of the second network device carried in the CWMP keep-alive message is obtained to obtain the selected device interconnection information.
[0075] The network device will periodically send CWMP keep-alive messages to the network management device. The keep-alive messages contain device interconnection information of the uplink port of the network device, which may specifically be the media access control (Simple Network Management Protocol, MAC) address and port of the connected device.
[0076] The second method is to receive a Simple Network Management Protocol (SNMP) Trap message sent by a third network device, obtain the device interconnection information of each downlink port of the third network device carried in the SNMP Trap message, and obtain the selected device interconnection information.
[0077] SNMP is a standard protocol designed specifically for managing network devices such as servers, workstations, routers, switches, etc. on Internet Protocol (IP) networks. It is an application layer protocol. After a network device learns a MAC address from a downlink port, it will send an SNMP Trap message to the network management device. The SNMP Trap message carries the learned MAC address, which may include the terminal's MAC address and port.
[0078] The third method is to obtain a neighbor table of the fourth network device to obtain interconnection information of the selected device.
[0079] Network devices can, but are not limited to, broadcast their own MAC addresses and ports through the Link Layer Discovery Protocol (LLDP) to facilitate the discovery of their neighbors and establish a neighbor table. Network management devices can periodically obtain the neighbor table of network devices to update their own network topology.
[0080] The network device may further include a first network device. It should be noted that the second network device, the third network device, and the fourth network device may be the same as or different from the first network device.
[0081] S12: Determine whether a port of a network device is connected to ports of two devices, the network device comprising a first network device having a first port disposed thereon.
[0082] Since the network topology diagram is updated in S11, there may be a situation where one port of a network device is connected to two devices. This may be caused by replacing a device due to a failure. Therefore, it needs to be checked.
[0083] S13: If it is determined that two devices are connected to the first port of the first network device, the device configuration information of the first device that is first updated to the network topology map among the two devices connected to the first port is sent to the second device that is later updated to the network topology map, so that the second device is configured according to the device configuration information of the first device, wherein the two devices include a first device and a second device, the first device is connected to the first network device through the first port, and the second device is a device that replaces the first device.
[0084] If it is determined that the first port of the first network device is connected to the ports of two devices, it can be determined that the first device that was updated first to the network topology map among the two devices connected to the first port is replaced by the second device that was updated later to the network topology map. Since the network management device will save the device configuration information of each device in the network topology map, the device configuration information of the first device can be sent to the second device at this time, and the second device is configured according to the device configuration information of the first device, thereby realizing automatic configuration of the replaced device.
[0085] It should be noted that the first device is connected to the first network device through the first port, and the first device is replaced by the second device in the network topology diagram, and the replaced second device is also connected to the first network device through the first port, that is, the first device first connected to the first network device is replaced by the second device connected to the first network device later.
[0086] In this solution, after obtaining the interconnection information of the selected device, the network topology map can be updated first, and then the device can be configured based on the network topology map. The entire process can be completed without human participation, which can greatly save human resources, reduce time consumption, and improve configuration efficiency.
[0087] Optionally, if the first device is connected to at least one terminal, the method further includes:
[0088] Determine whether a port connected to the first device of at least one terminal is connected to ports of two devices, wherein the at least one terminal includes a first terminal, and the second port is provided on the first terminal;
[0089] If it is determined that the second port is connected to the third port of the first device and the fourth port of the second device, the port configuration information of the third port is sent to the second device, wherein the two devices include the first device and the second device, and the port configuration information is used by the second device to configure the fourth port.
[0090] The second device can be an access device in the selected network. The access device is generally connected to multiple terminals, such as printers, projectors, cameras, etc. After the second device replaces the first device, the network cable of the second device may be blindly plugged. For example, before the replacement, the first terminal is connected to the Gi 0 / 1 port of the first device, and after the replacement, the first terminal is connected to the Gi 0 / 2 port of the second device, resulting in the first terminal not matching the port service after connecting to the second device, which ultimately affects the normal use of the first terminal.
[0091] At this time, it is necessary to further determine whether each port connected to the first device by at least one terminal is connected to the ports of the two devices. If it is determined that the second port set on the first terminal has been connected to the third port of the first device and the fourth port of the second device, it means that the first terminal has migrated from the third port to the fourth port. At this time, the port configuration information of the third port can be sent to the second device, so that the second device configures the fourth port according to the port configuration information. In this way, the port where the connected terminal has migrated can be automatically configured.
[0092] Optionally, the above method includes:
[0093] Deleting the interconnection information between the first port of the first network device and the first device;
[0094] The interconnection information between the second port of the first terminal and the third port of the first device is deleted.
[0095] After completing the configuration of the above-mentioned replaced device and the configuration of the port where the terminal migrates, the interconnection information between the first port of the first network device and the first device, and the interconnection information between the second port of the first terminal and the third port of the first device, which are first updated to the network topology diagram, are useless information and can be directly deleted to ensure the accuracy of the network topology diagram.
[0096] The following example illustrates the automatic configuration method of the above device. Assume that before replacement, two terminals are connected to the network device SF-A, where terminal 1 is connected to the Gi0 / 1 port and terminal 2 is connected to the Gi0 / 3 port.
[0097] The configuration of port 1 of SF-A is as follows:
[0098]
[0099] Port 3 of SF-A is configured as follows:
[0100]
[0101] SF-A notifies the MAC addresses and ports of Terminal 1 and Terminal 2 to the network management device through SNMP Trap messages:
[0102] Announcement event 1:
[0103] 1. Terminal MAC address: 00:0e:c6:dd:de:ba
[0104] 2. Port: Gi0 / 1
[0105] 3. Action: Learning
[0106] Announcement event 2:
[0107] 1. Terminal MAC address: 00:0e:c6:dd:de:b6
[0108] 2. Port: Gi0 / 3
[0109] 3. Action: Learning
[0110] The network management device will update the port interconnection relationship between SF-A and terminal 1 and terminal 2 into the network topology diagram.
[0111] If SF-A fails and is replaced by SF-B, terminal 1 is connected to the Gi0 / 4 port of SF-B, and terminal 2 is connected to the Gi0 / 6 port of SF-B. SF-B notifies the MAC addresses and ports of terminal 1 and terminal 2 to the network management device through SNMP Trap messages:
[0112] Announcement event 1:
[0113] 1. Terminal MAC address: 00:0e:c6:dd:de:ba
[0114] 2. Port: Gi0 / 4
[0115] 3. Action: Learning
[0116] Announcement event 2:
[0117] 1. Terminal MAC address: 00:0e:c6:dd:de:b6
[0118] 2. Port: Gi0 / 6
[0119] 3. Action: Learning
[0120] The network management device will update the port interconnection relationship between SF-B and terminal 1 and terminal 2 into the network topology diagram.
[0121] After troubleshooting, it was found that terminal 1 migrated from Gi0 / 1 to Gi0 / 4, and terminal 2 migrated from Gi0 / 3 to Gi0 / 6. Therefore, it was necessary to send the configuration information of Gi0 / 1 to Gi0 / 4, and the configuration information of Gi0 / 3 to Gi0 / 6. After SF-B adjusted the port configuration, it was as follows:
[0122]
[0123] The configuration of Gi0 / 1 and Gi0 / 3 of SF-B remains unchanged. When there are terminals connected later, if they are old terminals, the configuration migration is performed according to the above rules; if they are new terminals, the configuration remains unchanged and the original port configuration is retained.
[0124] Based on the same inventive concept, an embodiment of the present invention provides an automatic configuration device for a device, which is applied to a network management device included in a selected network, and the network management device is communicatively connected with a network device in the selected network. The structure of the device is as follows Figure 2 As shown, including:
[0125] A first determination module 22, configured to determine whether a port of a network device is connected to two devices, wherein the network device comprises a first network device, and a first port is provided on the first network device;
[0126] The first sending module 23 is used for sending the device configuration information of the first device that is first connected to the first network device among the two devices connected to the first port to the second device that is later connected to the first network device if it is determined that the first port of the first network device is connected to two devices; wherein the two devices include a first device and a second device, the first device is connected to the first network device through the first port, the second device is a device that replaces the first device, and the device configuration information is used to configure the second device.
[0127] In this solution, when it is determined that the first port of the first network device is connected to two devices, the device configuration information of the first device that is first connected to the first network device among the two devices connected to the first port is sent to the second device that is later connected to the first network device, so that the second device can be directly configured according to the device configuration information of the first device to replace the faulty first device. The entire process can be completed without human intervention, which can greatly save human resources, reduce time consumption, and improve configuration efficiency.
[0128] Optionally, if the first device is connected to at least one terminal, the apparatus further includes:
[0129] A second determination module is used to determine whether a port connected to the first device by at least one terminal is connected to ports of two devices; wherein the at least one terminal includes a first terminal, and the first terminal is provided with a second port;
[0130] The second sending module is used to send port configuration information of the third port to the second device if it is determined that the second port is connected to the third port of the first device and the fourth port of the second device, wherein the two devices include the first device and the second device, and the port configuration information is used by the second device to configure the fourth port.
[0131] Optionally, also include:
[0132] The deletion module is used to delete the interconnection information between the first port of the first network device and the first device; and / or delete the interconnection information between the second port of the first terminal and the third port of the first device.
[0133] Optionally, the automatic configuration device also includes an update module 21, which is used to obtain interconnection information of the selected device, wherein the selected device connection information includes interconnection information of ports of at least two devices, and the at least two devices include the network device; and update the obtained interconnection information of the selected device into the network topology map.
[0134] Optionally, the network device further includes at least one of the following: a second network device, a third network device, and a fourth network device, and the automatic configuration apparatus further includes an acquisition module for:
[0135] After receiving the CWMP keep-alive message sent by the second network device, obtaining the device interconnection information of each uplink port of the second network device carried in the CWMP keep-alive message, and obtaining the selected device interconnection information; or,
[0136] After receiving the SNMP Trap message sent by the third network device, the device interconnection information of each downlink port of the third network device carried in the SNMP Trap message is obtained to obtain the selected device interconnection information; or,
[0137] A neighbor table of the fourth network device is obtained to obtain interconnection information of the selected device.
[0138] The present application also provides an electronic device. Figure 3 As shown, it includes a processor 310 , a communication interface 320 , a memory 330 and a communication bus 340 , wherein the processor 310 , the communication interface 320 , and the memory 330 communicate with each other via the communication bus 340 .
[0139] Memory 330, for storing computer programs;
[0140] The processor 310 is used to implement the automatic configuration method of the device described in any of the above embodiments when executing the program stored in the memory 330.
[0141] The communication interface 320 is used for communication between the electronic device and other devices.
[0142] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0143] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0144] In this solution, the entire process can be completed without human intervention, which can greatly save human resources, reduce time consumption and improve configuration efficiency.
[0145] Accordingly, an embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes the automatic configuration method of the device described in any of the above embodiments.
[0146] In this solution, after obtaining the interconnection information of the selected device, the network topology of the selected network can be updated first, and then the device can be configured based on the network topology of the selected network. The entire process can be completed without human participation. Compared with the existing method, it can greatly save human resources, reduce time consumption, and improve configuration efficiency.
[0147] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0148] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.
[0149] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0150] Although the optional embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the optional embodiments and all changes and modifications that fall within the scope of the present invention.
[0151] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if these modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for automatic configuration of a device, applied to a network management device, wherein the network management device is communicatively connected with a network device, characterized in that: The method comprises: Determine whether a port of the network device is connected to two devices, wherein the network device includes a first network device, and a first port is provided on the first network device; If it is determined that two devices are connected to the first port of the first network device, the device configuration information of the first device that is first connected to the first network device among the two devices connected to the first port is sent to the second device that is later connected to the first network device; wherein the two devices include the first device and the second device, the first device is connected to the first network device through the first port, the second device is a device that replaces the first device, and the device configuration information is used to configure the second device.
2. The method according to claim 1, characterized in that If the first device is connected to at least one terminal, the method further includes: Determine whether the port connected to the at least one terminal and the first device is connected to ports of two devices, wherein the at least one terminal includes a first terminal, and the first terminal is provided with a second port; If it is determined that the second port is connected to the third port of the first device and the fourth port of the second device, the port configuration information of the third port is sent to the second device, wherein the two devices include the first device and the second device, and the port configuration information is used by the second device to configure the fourth port.
3. The method according to claim 2, characterized in that Also includes: Deleting the interconnection information between the first port of the first network device and the first device; and / or The interconnection information between the second port of the first terminal and the third port of the first device is deleted.
4. The method according to any one of claims 1 to 3, characterized in that: Before determining whether the port of the network device is connected to two devices, the method further includes: Acquire selected device interconnection information, wherein the selected device connection information includes interconnection information of ports of at least two devices, and the at least two devices include the network device; The obtained selected device interconnection information is updated into the network topology map.
5. The method according to claim 4, characterized in that The network device further comprises at least one of the following: a second network device, a third network device, and a fourth network device, and obtaining the interconnection information of the selected device comprises: After receiving the wide area network management protocol CWMP keep-alive message sent by the second network device, obtaining the device interconnection information of each uplink port of the second network device carried by the CWMP keep-alive message to obtain the selected device interconnection information; or, After receiving a Simple Network Management Protocol (SNMP) Trap message sent by the third network device, obtaining device interconnection information of each downlink port of the third network device carried in the SNMP Trap message to obtain selected device interconnection information; or, Obtain a neighbor table of the fourth network device to obtain interconnection information of the selected device.
6. An automatic configuration device for a device, applied to a network management device, wherein the network management device is communicatively connected with a network device, characterized in that: The device comprises: A first determination module, configured to determine whether a port of the network device is connected to two devices, wherein the network device comprises a first network device, and a first port is provided on the first network device; A first sending module is used for sending device configuration information of a first device that is first connected to the first network device among the two devices connected to the first port to a second device that is later connected to the first network device if it is determined that the first port of the first network device is connected to two devices; wherein the two devices include the first device and the second device, the first device is connected to the first network device through the first port, the second device is a device that replaces the first device, and the device configuration information is used for configuring the second device.
7. The device according to claim 6, characterized in that If the first device is connected to at least one terminal, the apparatus further includes: A second determining module, configured to determine whether a port connected to the at least one terminal and the first device is connected to ports of two devices, wherein the at least one terminal includes a first terminal, and the first terminal is provided with a second port; A second sending module is used to send port configuration information of the third port to the second device if it is determined that the second port is connected to the third port of the first device and the fourth port of the second device, wherein the two devices include the first device and the second device, and the port configuration information is used by the second device to configure the fourth port.
8. The device according to claim 7, characterized in that Also includes: a deleting module, configured to delete the interconnection information between the first port of the first network device and the first device; and / or delete the interconnection information between the second port of the first terminal and the third port of the first device.
9. An electronic device, characterized in that: The electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 5 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.