CN112583639A - Configuration method and device of network equipment - Google Patents

Configuration method and device of network equipment Download PDF

Info

Publication number
CN112583639A
CN112583639A CN202011370542.XA CN202011370542A CN112583639A CN 112583639 A CN112583639 A CN 112583639A CN 202011370542 A CN202011370542 A CN 202011370542A CN 112583639 A CN112583639 A CN 112583639A
Authority
CN
China
Prior art keywords
configuration
cloud platform
configuration file
address
information
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202011370542.XA
Other languages
Chinese (zh)
Other versions
CN112583639B (en
Inventor
王祝勋
周明
蔡友华
尹行
梁利锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Big Data Technologies Co Ltd
Original Assignee
New H3C Big Data Technologies Co Ltd
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 New H3C Big Data Technologies Co Ltd filed Critical New H3C Big Data Technologies Co Ltd
Priority to CN202011370542.XA priority Critical patent/CN112583639B/en
Publication of CN112583639A publication Critical patent/CN112583639A/en
Application granted granted Critical
Publication of CN112583639B publication Critical patent/CN112583639B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/303Terminal profiles

Landscapes

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

Abstract

The specification provides a configuration method and a configuration device of network equipment, and relates to the technical field of communication. The method comprises the following steps: starting initialization, reading a first configuration file from a storage device of the network equipment, wherein a plurality of configuration items are arranged in the first configuration file, and status identifications of the plurality of configuration items are preset to be not effective; after initialization is completed, connection is established with the cloud platform; sending an Internet Protocol (IP) address and equipment information of the network equipment to a cloud platform, so that the cloud platform determines the position information and the operator type of the network equipment according to the IP address and the equipment information, and sending a configuration character string corresponding to the position information and the operator type to the network equipment; and modifying the state identifier of the configuration item in the first configuration file according to the configuration character string, and initializing again according to the modified first configuration file. By the method, the configuration efficiency of the network equipment can be improved.

Description

Configuration method and device of network equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for configuring a network device.
Background
With the popularization of networks, the demands of individuals on the networks gradually increase. In the intelligent home network, an intelligent gateway, such as a network device such as a router, provides access services to terminals in a home through the gateway, and the intelligent gateway serves as a main controller of the home network.
In the network accessed by the network device, network services are provided by operators, such as china mobile, china telecom, china unicom and the like. Different operators or different regions of an operator may have different configurations for network devices, for example, different configurations between china mobile and china unicom. Alternatively, there may be different configurations for network devices in different regions of the operator, such as between Zhejiang telecommunications and Hubei telecommunications.
Therefore, network device manufacturers need to pre-store different configuration files for network devices leaving factories respectively for different operators and different regions of the operators, and thus, the network device manufacturers need to invest a lot of time to develop and maintain different software versions to meet configuration requirements of the network devices, thereby reducing configuration efficiency of the network devices.
Disclosure of Invention
In order to overcome the problems in the related art, the present specification provides a method and an apparatus for configuring a network device.
According to a first aspect of embodiments of the present specification, there is provided a method for configuring a network device, which is applied to the network device, the method including:
starting initialization, reading a first configuration file from a storage device of the network equipment, wherein a plurality of configuration items are arranged in the first configuration file, and status identifications of the plurality of configuration items are preset to be not effective;
after initialization is completed, connection is established with the cloud platform;
sending an Internet Protocol (IP) address and equipment information of the network equipment to a cloud platform, so that the cloud platform determines the position information and the operator type of the network equipment according to the IP address and the equipment information, and sending a configuration character string corresponding to the position information and the operator type to the network equipment;
and modifying the state identifier of the configuration item in the first configuration file according to the configuration character string, and initializing again according to the modified first configuration file.
Optionally, a number of times identifier is set in the first configuration file;
sending the IP address and the equipment information of the network equipment to the cloud platform, wherein the IP address and the equipment information comprise:
if the number of times identification is an initial value, sending the IP address and the equipment information of the network equipment to the cloud platform;
after the IP address and the device information of the network device are sent to the cloud platform, the method further includes:
if the configuration character string sent by the cloud platform is not received within the preset time and the frequency identification is not a threshold value, the IP address and the equipment information of the network equipment are sent to the cloud platform again;
if the configuration character string sent by the cloud platform is not received within the preset time and the frequency identification is a threshold value, the network equipment is configured according to the default character string, or the input position information and the operator type are obtained, and the input position information and the operator type are sent to the cloud platform.
Optionally, a second configuration file is further stored in the storage device of the network device, where the second configuration file is a backup file of the initial first configuration file;
sending the IP address and the equipment information of the network equipment to the cloud platform, wherein the IP address and the equipment information comprise:
comparing the first configuration file with the second configuration file;
if the first configuration file is the same as the second configuration file, the IP address and the equipment information of the network equipment are sent to the cloud platform;
and if the first configuration file is the same as the second configuration file, re-initializing according to the first configuration file.
Further, establishing a connection with the cloud platform includes:
establishing a Transmission Control Protocol (TCP) connection with a cloud platform;
negotiating with a cloud platform to encrypt a transmission tunnel;
and sending the IP address and the equipment information of the network equipment to the cloud platform, specifically sending a TCP data message carrying the IP address and the equipment information of the network equipment to the cloud platform through an encrypted transmission tunnel.
Optionally, the storage device further stores a program file, and the program file includes a plurality of program items;
the first configuration file includes: the program item comprises header information, a configuration item corresponding to the program item and a status identifier for indicating whether the configuration item is effective or not.
According to a second aspect of embodiments of the present specification, there is provided a method for configuring a network device, which is applied to a server in a cloud platform, the method including:
establishing connection with a network device;
receiving an IP address and equipment information sent by network equipment;
acquiring the position information and the operator type of the network equipment according to the IP address and the equipment information;
generating a configuration character string according to the position information and the type of the operator;
and issuing the configuration character string to the network equipment so that the network equipment modifies the first configuration file stored in the network equipment according to the configuration character string and initializes the network equipment through the modified first configuration file.
According to a third aspect of embodiments of the present specification, there is provided a configuration apparatus of a network device, applied to the network device, including:
the initialization unit is used for starting initialization and reading a first configuration file from a storage device of the network equipment, wherein a plurality of configuration items are arranged in the first configuration file, and the status identifications of the plurality of configuration items are preset to be not effective;
the connection unit is used for establishing connection with the cloud platform after initialization is completed;
the cloud platform comprises a sending unit, a receiving unit and a sending unit, wherein the sending unit is used for sending the IP address and the equipment information of the network equipment to the cloud platform so that the cloud platform can determine the position information and the operator type of the network equipment according to the IP address and the equipment information, and sending a configuration character string corresponding to the position information and the operator type to the network equipment;
and the configuration unit is used for modifying the state identifier of the configuration item in the first configuration file according to the configuration character string and carrying out initialization again according to the modified first configuration file.
Optionally, a number of times identifier is set in the first configuration file;
a transmitting unit comprising:
if the number of times identification is an initial value, sending the IP address and the equipment information of the network equipment to the cloud platform;
the device also comprises a judging unit;
if the judging unit determines that the configuration character string sent by the cloud platform is not received within the preset time and the frequency identification is not a threshold value, calling the sending unit to send the IP address and the equipment information of the network equipment to the cloud platform again;
if the judging unit determines that the configuration character string sent by the cloud platform is not received within the preset time and the frequency identification is the threshold value, the configuration unit is called to configure the network equipment according to the default character string, or the sending unit is called to obtain the input position information and the operator type and send the input position information and the operator type to the cloud platform.
Optionally, a second configuration file is further stored in the storage device of the network device, where the second configuration file is a backup file of the initial first configuration file;
the sending unit further comprises:
the comparison module is used for comparing the first configuration file with the second configuration file;
if the comparison module determines that the first configuration file is the same as the second configuration file, the sending unit is called to send the IP address and the equipment information of the network equipment to the cloud platform;
and if the comparison module determines that the first configuration file is different from the second configuration file, calling the configuration unit to initialize again according to the first configuration file.
Further, the connection unit is specifically configured to establish a transmission control protocol TCP connection with the cloud platform; negotiating with a cloud platform to encrypt a transmission tunnel;
and the sending unit is specifically configured to send a TCP data packet carrying the IP address of the network device and the device information to the cloud platform through the encrypted transmission tunnel.
Optionally, the storage device further stores a program file, and the program file includes a plurality of program items;
the first configuration file includes: the program item comprises header information, a configuration item corresponding to the program item and a status identifier for indicating whether the configuration item is effective or not.
According to a fourth aspect of embodiments of the present specification, there is provided a configuration apparatus of a network device, which is applied to a server in a cloud platform, and includes:
a connection unit for establishing connection with a network device;
the receiving unit is used for receiving the IP address and the equipment information sent by the network equipment;
the acquiring unit is used for acquiring the position information and the operator type of the network equipment according to the IP address and the equipment information;
the generating unit is used for generating a configuration character string according to the position information and the operator type;
and the sending unit is used for sending the configuration character string to the network equipment so that the network equipment modifies the first configuration file stored in the network equipment according to the configuration character string and initializes the network equipment through the modified first configuration file.
The technical scheme provided by the implementation mode of the specification can have the following beneficial effects:
in the embodiment of the description, the network device sends the IP address and the device information to the cloud platform, so that the cloud platform can determine the location information and the operator type of the network device, and sends a short configuration string to the network device according to the location information and the operator type, so that the network device modifies the stored configuration file according to the configuration string, and determines an effective configuration item in the network device according to the modified configuration file, thereby avoiding the inefficiency caused by the need of manually storing different program files to complete configuration for network devices in different regions of different operators and operators, and improving the efficiency of network device configuration.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
Fig. 1 is an interaction flowchart of a configuration method of a network device according to an embodiment of the present application, and relates to a network device and a server in a cloud platform;
fig. 2 is a schematic diagram of a network to which a configuration method of a network device according to an embodiment of the present application is applied;
fig. 3 is a schematic structural diagram of a configuration apparatus of a network device according to an embodiment of the present application, applied to a network device;
fig. 4 is a schematic structural diagram of a configuration apparatus of a network device according to an embodiment of the present invention, which is applied to a server in a cloud platform.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification.
The following provides a description of a network device configuration method in a specific time-sharing manner. As shown in fig. 1, includes:
s100, starting initialization of the network equipment, and reading a first configuration file from a storage device of the network equipment.
In the networking shown in fig. 2, a network device and a cloud platform are included. The local area network formed by the network equipment comprises a terminal, and the terminal is connected to the network equipment so as to be connected to the network. An optical fiber modem and a gateway for realizing optical signal access can be arranged between the network equipment and the cloud platform, the network equipment can also realize the function of the gateway, and the selection is carried out according to different specific networking without limitation.
The terminal may be a handheld terminal, a personal computer, or the like, connected to the network device by wire or wirelessly. The network devices may be routers and switches, etc. The cloud platform may include one or more servers, receive the protocol packet or the data packet sent by the network device through the server, and process the protocol packet or the data packet to implement a corresponding function, or certainly, may include other devices that implement network connection, which is not limited to this.
In a storage device (generally, a flash memory, or other nonvolatile storage medium, which is not limited to this), a boot file (may be referred to as a Bootloader program), a boot configuration file (Bootloader configuration file), a program file (may be referred to as an App program), and a first configuration file (CFG configuration file) of the network device are stored.
In the starting process of the network equipment, a boot file is loaded from a storage device through a fixed pointer of a memory to initialize hardware, for example, a processor and the storage device are initialized; then, loading a program file from a specific area of the storage device through the loaded boot file, thereby starting the network management system; and finally, the first configuration file in the storage device is loaded through the loaded boot file to set the network management system, and the initialization process is completed.
The program file may include a basic program and different programs required by a plurality of operators, and these programs may be stored in one program file. The basic program refers to a program common to various types of network devices, and the distinction program refers to a program applied separately according to a difference of operators or a difference of areas of operators, and each distinction program may be referred to as a program item. The mutual exclusion between the program items may be stored, for example, the validation program item 1 may not be the validation program item 2.
A plurality of configuration items are set in the first configuration file, each configuration item can be specific to one program item in the program file, a status mark indicating the effective status of the configuration item is set in the first configuration file for each configuration item, and the effective status of a plurality of configuration items is preset as not effective. That is, in the first initialization process, the contents in the program file are all loaded, but the program items in the program file are all set to be in an invalid state through the first configuration file.
S101, after initialization is completed, connection between the network equipment and the cloud platform is established.
After the initialization is completed, the network equipment has a basic network connection function and can establish connection with the cloud platform and perform message interaction. The WAN (Wide Area Network) interface of the Network device needs to acquire an IP (Internet Protocol) address to implement interaction of the messages, and certainly, the IP address of the WAN interface may also be manually set by an operator or automatically acquired from a DHCP server by using a DHCP (Dynamic Host Configuration Protocol), which is not limited to this.
At this time, in order to ensure the connection state between the network device and the cloud platform, optionally, after the network device acquires the IP address, the network device may also periodically send a detection message to the cloud platform to implement confirmation of the connection state. For example, the network device may periodically send a ping Message in an ICMP (Internet Message Control Protocol) Protocol to the cloud platform to detect whether the network device is reachable with a server of the cloud platform. Of course, the connection detection method between the network device and the cloud platform is not limited to this, and is not described again.
In the process of establishing the connection, a TCP (Transmission Control Protocol) mode may be used, and the connection between the network device and the cloud platform is realized through three-way handshake of the TCP Protocol. Certainly, a connection may also be established with the cloud platform in a User Datagram Protocol (UDP) or other manners, and a packet may also be transmitted.
In addition, in the process of establishing the connection through the TCP protocol, the cloud platform may negotiate with the encrypted transmission tunnel, for example, obtain a public key of the encrypted transmission tunnel, negotiate a private key of the encrypted transmission tunnel, and the like. The encryption transmission tunnel may use SSL (Secure Sockets Layer) protocol or TSL (Transport Layer Security) protocol, and the like, which is not limited herein.
S102, the network equipment sends the IP address and the equipment information of the network equipment to the cloud platform.
After the network device completes initialization, the IP address and device information of the network device may be obtained, where the device information may include information such as a device model, a MAC (Media Access Control) address, a product serial number, and a current software version.
When the IP address and the equipment information are transmitted between the network equipment and the cloud platform through the TCP data message, the equipment information can be carried through an Option field in the TCP data message, and the IP address is carried in a message header of the TCP data message. The TCP Option type in the Option field may be agreed between the network device and the cloud platform, for example, 100 represents the device model, 101 represents the MAC address, 102 represents the product serial number, and 103 represents the software version, and when the TCP Option type is the corresponding character string, the data field corresponding to the TCP Option type may carry the device model, the MAC address, the product serial number, and the software version acquired by the network device.
At this time, if an encrypted transmission tunnel is negotiated between the network device and the cloud platform, further, the network device may send a TCP data packet carrying an IP address and device information of the network device to the cloud platform through the encrypted transmission tunnel. Therefore, the security of network transmission can be improved, and the device information of the network device is prevented from being intercepted by other people.
In addition, if the network device itself is a gateway, the acquired IP address may be an IP address of an external network, and if the network device is an internal network device and is connected to the gateway, the IP address transmitted by the network device is an IP address of an internal network.
At this time, the network device still sends its own IP address and device information to the cloud platform, and only when passing through the gateway, the IP address is converted into an IP address of an external network by the gateway. The process is the existing process and does not affect the process of sending the IP address of the network device to the cloud platform.
S103, the server in the cloud platform receives the IP address and the equipment information sent by the network equipment.
And S104, the server in the cloud platform acquires the position information and the operator type of the network equipment according to the IP address and the equipment information.
After receiving the IP address and the device information of the network device, the server in the cloud platform authenticates the network device through the device information, and determines whether the network device is a legitimate network device.
After the network device passes the authentication of the cloud platform, the server in the cloud platform can acquire the location of the network device and the operator to which the IP address belongs according to the IP address of the network device, and the acquisition process can be acquired by the operator or a third-party platform, which is not limited to this, and only needs the server to determine the location information and the operator type of the network device. For example, the network device can be determined to be a network device in china unicom-hangzhou, zhejiang according to the acquired IP address.
The cloud platform determines which model of the network device is specific, which software is loaded by the network device of the model, and whether the software version of the software is the latest version according to information such as the device model and the product serial number in the device information. That is, the cloud platform may maintain a correspondence between the device model of the network device and the program file. In this way, the server in the cloud platform can determine which configuration file is needed for the program file loaded by the network device to configure.
Furthermore, when the non-latest version of the software version is determined according to the software version carried in the TCP data message, the latest version of the software may be obtained from the server of the cloud platform.
And S105, the server in the cloud platform generates a configuration character string according to the position information and the operator type.
After determining the location information and the operator type of the network device, the server may search a pre-stored configuration table according to the device model to generate a configuration file. For example, the server may maintain the contents as shown in table 1 below:
Figure BDA0002806528040000091
Figure BDA0002806528040000101
TABLE 1
It can be seen that the device of device model H3C ABC1101 contains 5 special configurations and one default configuration. Wherein, the first three bits in the configuration string can be appointed to represent the position, and the last three bits represent the code of the required program. For the first three, Zhejiang Hangzhou is represented by 001, Jiangsu Nanjing is represented by 002, Hubei Wuhan is represented by 003; for the last three digits, china telecom can be represented by 100, china unicom by 010, and china mobile by 001. Of course, the above description is only an example, and the configuration string may also be agreed in other manners, or in a different manner, which is not limited herein.
That is, the network device may cause the cloud platform to determine location information and an operator type of the network device according to the IP address and the device information by transmitting the IP address and the device information to the cloud platform, and transmit a configuration string corresponding to the location information and the operator type to the network device.
S106, the server in the cloud platform issues the configuration character string to the network equipment.
Based on the IP address sent by the network device, a server in the cloud platform may send the configuration string to the network device. For example, the server of the cloud platform may carry the configuration string to an Option field of the TCP feedback packet, and send the configuration string to the network device.
S107, the network equipment modifies the effective state of the configuration items in the first configuration file according to the configuration character string, and re-initializes according to the modified first configuration file.
After receiving the TCP feedback packet, the network device may analyze the TCP feedback packet to obtain the configuration string carried in the Option field.
According to the configuration character string, the operator of the network equipment belongs to China Unicom and is located in Hangzhou Zhejiang. In this way, the network device can determine which configuration items in the first configuration file need to be validated and modified according to the configuration character string.
Specifically, the first configuration file may include: header information, configuration items corresponding to the program items in the program file, and a status flag indicating the effective status of the configuration items. Upon receiving the matching string, the content contained in the first configuration file may be looked up to determine the status flag that the current network device needs to take effect and switch it from the non-effective state to the effective state.
After the network device completes the modification of the first configuration file, the network device is restarted, and the initialization process is executed, so that the network device can switch the corresponding program item in the program file to be effective based on the modified first configuration file, and complete the special configuration aiming at different operators and different regions. For example, the format of the initial first configuration file may be as shown in table 2 below:
Figure BDA0002806528040000111
TABLE 2
The content in the header information and the configuration item is not specifically described, and only the status identifier part is referred to, where 0 in the status identifier indicates not valid, 1 indicates valid, and a specific pointer may exist in the configuration item, and when the network device receives the configuration string, the network device may search for the configuration item and find the status identifier corresponding to the configuration item through the pointer of the configuration item to modify the status identifier. As can be seen from table 2, in the initial case, the state identifications are all defaulted to not valid.
In the modified first configuration file, as shown in table 3 below:
Figure BDA0002806528040000112
TABLE 3
The content in the header information and the configuration item is not changed, but in the status identifier, the status identifier of the corresponding configuration item can be modified according to the location information and the type of the operator, i.e., china unicom-zhejiang hangzhou, and set to 1, so that the program item in the program file corresponding to the configuration item takes effect.
After that, the network device restarts and performs the initialization process again, at this time, the relevant content in the first configuration file has been modified, so that the configuration for the operator and the network device at different location can be completed.
That is to say, the server in the cloud platform may send the configuration string to the network device, so that the network device modifies the first configuration file stored in the network device according to the configuration string, and initializes the network device according to the modified first configuration file.
In the embodiment of the description, the network device sends the IP address and the device information to the cloud platform, so that the cloud platform can determine the location information and the operator type of the network device, and sends a short configuration string to the network device according to the location information and the operator type, so that the network device modifies the stored configuration file according to the configuration string, and determines an effective configuration item in the network device according to the modified configuration file, thereby avoiding the inefficiency caused by the need of manually storing different program files to complete configuration for network devices in different regions of different operators and operators, and improving the efficiency of network device configuration.
In addition, the method can also be used in the process of upgrading the network equipment, namely, the network equipment can obtain the upgrading file and the configuration file of the software of the network equipment together, so that the upgrading efficiency of the network equipment is improved.
In addition, the cloud platform may not be able to determine configuration strings corresponding to some network devices, for example, in a case of "unknown areas" shown in table 1, where the configuration strings may not be determined due to the fact that device information such as device models of the network devices cannot be updated in the cloud platform in time, or an IP address provided by the network devices may have a problem, and the cloud platform may not obtain location information and operator types through itself or a third party. In this case, the cloud platform may not return the corresponding configuration string to the network device, and correspondingly, the network device may repeatedly send the IP address and the device information to the cloud platform, thereby causing a waste of network resources and even forming an attack on the cloud platform.
In order to avoid the above problem, a number of times identifier may be further set in the first configuration file, and the number of times identifier is identified as an initial value when the network device is initially started, for example, the initial value is set to 3, and the number of times identifier is set to be decremented each time the network device sends the IP address and the device information to the cloud platform. Correspondingly, step S102 may further include:
and S102A, if the number of times is an initial value, the network device sends the IP address and the device information of the network device to the cloud platform.
When the network equipment is started for the first time, if the value of the number of times identifier is an initial value 3, the network equipment directly sends the IP address and the equipment information to the cloud platform.
At this time, the method further includes:
and S108, if the configuration character string sent by the cloud platform is not received within the preset time and the frequency identification is not a threshold value, the IP address and the equipment information of the network equipment are sent to the cloud platform again.
When the network device sends the IP address and the device information to the cloud platform, the cloud platform may not return the configuration string to the network device due to various reasons, for example, transmission abnormality or the server of the cloud platform cannot determine. At this time, when the preset time is reached, the network device may determine whether the number of times identifier is already a threshold value, and if so, start a retransmission process. If not, step S109A or S109B is performed.
In step S109A, a default string may be set in the network device, and the configuration item in the first configuration file of the network device is modified by the default string, and the configuration of the network device is restarted. Of course, the initial effective state of the configuration item in the first configuration file can also be directly set as the default configuration.
In step S109B, an operation interface may be preset on the network device, and when the configuration string sent by the cloud platform is not received many times, the operation interface is popped up for the user or the staff to select. After the selection is completed, the network device sends the selected position information and the operator type to the cloud platform, so that a server in the cloud platform can directly obtain the configuration character string according to the position information and the operator type and send the configuration character string to the network device.
Through the setting of the frequency identification, the network equipment can be prevented from repeatedly sending the IP address and the equipment information to the cloud platform, so that network resources can be saved, and the process of acquiring the configuration character string can not be utilized to form attack on the cloud platform. The number identifier may be set in the header information of the first configuration file, or may be set in another location of the first configuration file.
In addition, in the storage device of the network device, a second configuration file may be further stored, the second configuration file serving as a backup file of the initial first configuration file. In order to avoid network resource waste or attack, step S102 may include:
S102B, comparing the first configuration file with the second configuration file.
S102C, if the first configuration file is the same as the second configuration file, sending the IP address and the equipment information of the network equipment to the cloud platform.
S102D, if the first configuration file and the second configuration file are the same, re-initializing according to the first configuration file.
In the initialization process, the network device may obtain the first configuration file and the second configuration file respectively, and compare the first configuration file and the second configuration file.
The compared object is all contents in the first configuration file and the second configuration file, and comprises configuration items and corresponding state identifications.
When the two are consistent, the network device may be considered as not being specially configured and being in an initial state, and at this time, the network device needs to send the IP address and the device information to the cloud platform according to the above process to obtain the special configuration of the operator and the location, that is, obtain the configuration character string from the cloud platform.
When the two are different, the network device may be considered to have obtained the configuration character string from the cloud platform, and complete the special configuration for itself according to the configuration character string, and then the network device may directly execute the initialization process according to the current first configuration file, and complete the configuration for the network device.
Of course, for the cases of the number identifier and the duplicate configuration file, the number identifier and the duplicate configuration file may be selected or respectively applied to the same network device, and the setting needs to be performed according to actual requirements, which is not limited to this.
Correspondingly, the present application provides a configuration apparatus of a network device, which is applied to the network device, as shown in fig. 3, and includes:
the initialization unit is used for starting initialization and reading a first configuration file from a storage device of the network equipment, wherein a plurality of configuration items are arranged in the first configuration file, and the status identifications of the plurality of configuration items are preset to be not effective;
the connection unit is used for establishing connection with the cloud platform after initialization is completed;
the cloud platform comprises a sending unit, a receiving unit and a sending unit, wherein the sending unit is used for sending the IP address and the equipment information of the network equipment to the cloud platform so that the cloud platform can determine the position information and the operator type of the network equipment according to the IP address and the equipment information, and sending a configuration character string corresponding to the position information and the operator type to the network equipment;
and the configuration unit is used for modifying the state identifier of the configuration item in the first configuration file according to the configuration character string and carrying out initialization again according to the modified first configuration file.
Optionally, a number of times identifier is set in the first configuration file;
a transmitting unit comprising:
if the number of times identification is an initial value, sending the IP address and the equipment information of the network equipment to the cloud platform;
the device also comprises a judging unit;
if the judging unit determines that the configuration character string sent by the cloud platform is not received within the preset time and the frequency identification is not a threshold value, calling the sending unit to send the IP address and the equipment information of the network equipment to the cloud platform again;
if the judging unit determines that the configuration character string sent by the cloud platform is not received within the preset time and the frequency identification is the threshold value, the configuration unit is called to configure the network equipment according to the default character string, or the sending unit is called to obtain the input position information and the operator type and send the input position information and the operator type to the cloud platform.
Optionally, a second configuration file is further stored in the storage device of the network device, where the second configuration file is a backup file of the initial first configuration file;
the sending unit further comprises:
the comparison module is used for comparing the first configuration file with the second configuration file;
if the comparison module determines that the first configuration file is the same as the second configuration file, the sending unit is called to send the IP address and the equipment information of the network equipment to the cloud platform;
and if the comparison module determines that the first configuration file is different from the second configuration file, calling the configuration unit to initialize again according to the first configuration file.
Further, the connection unit is specifically configured to establish a transmission control protocol TCP connection with the cloud platform; negotiating with a cloud platform to encrypt a transmission tunnel;
and the sending unit is specifically configured to send a TCP data packet carrying the IP address of the network device and the device information to the cloud platform through the encrypted transmission tunnel.
Optionally, the storage device further stores a program file, and the program file includes a plurality of program items;
the first configuration file includes: the program item comprises header information, a configuration item corresponding to the program item and a status identifier for indicating whether the configuration item is effective or not.
Correspondingly, the present application also provides a configuration apparatus of a network device, which is applied to a server in a cloud platform, as shown in fig. 4, and includes:
a connection unit for establishing connection with a network device;
the receiving unit is used for receiving the IP address and the equipment information sent by the network equipment;
the acquiring unit is used for acquiring the position information and the operator type of the network equipment according to the IP address and the equipment information;
the generating unit is used for generating a configuration character string according to the position information and the operator type;
and the sending unit is used for sending the configuration character string to the network equipment so that the network equipment modifies the first configuration file stored in the network equipment according to the configuration character string and initializes the network equipment through the modified first configuration file.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
The above description is only for the purpose of illustrating the preferred embodiments of the present disclosure and is not to be construed as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (12)

1. A configuration method of a network device is applied to the network device and comprises the following steps:
starting initialization, and reading a first configuration file from a storage device of the network equipment, wherein a plurality of configuration items are arranged in the first configuration file, and status identifications of the plurality of configuration items are preset to be not effective;
after initialization is completed, connection is established with the cloud platform;
sending an Internet Protocol (IP) address and equipment information of the network equipment to the cloud platform, so that the cloud platform determines the position information and the operator type of the network equipment according to the IP address and the equipment information, and sending a configuration character string corresponding to the position information and the operator type to the network equipment;
and modifying the state identifier of the configuration item in the first configuration file according to the configuration character string, and initializing again according to the modified first configuration file.
2. The method according to claim 1, wherein a number of times identifier is set in the first configuration file;
the sending the IP address and the device information of the network device to the cloud platform includes:
if the number of times identification is an initial value, sending the IP address and the equipment information of the network equipment to the cloud platform;
after the IP address and the device information of the network device are sent to the cloud platform, the method further includes:
if the configuration character string sent by the cloud platform is not received within the preset time and the frequency identification is not a threshold value, the IP address and the equipment information of the network equipment are sent to the cloud platform again;
if the configuration character string sent by the cloud platform is not received within the preset time and the frequency identification is a threshold value, configuring the network equipment according to a default character string, or acquiring input position information and an operator type and sending the input position information and the operator type to the cloud platform.
3. The method of claim 1, wherein a second configuration file is further stored in the storage device of the network device, wherein the second configuration file is a backup file of the initial first configuration file;
the sending the IP address and the device information of the network device to the cloud platform includes:
comparing the first configuration file with the second configuration file;
if the first configuration file is the same as the second configuration file, sending the IP address and the equipment information of the network equipment to the cloud platform;
and if the first configuration file is the same as the second configuration file, re-initializing according to the first configuration file.
4. The method of claim 1, wherein establishing the connection with the cloud platform comprises:
establishing a Transmission Control Protocol (TCP) connection with the cloud platform;
negotiating with the cloud platform for an encrypted transmission tunnel;
the sending of the IP address and the device information of the network device to the cloud platform is specifically sending a TCP data packet carrying the IP address and the device information of the network device to the cloud platform through the encrypted transmission tunnel.
5. The method according to any one of claims 1-4, wherein the storage device further stores a program file, the program file comprising a plurality of program items;
the first configuration file includes: the program item comprises header information, a configuration item corresponding to the program item and a state identifier for indicating whether the configuration item is effective or not.
6. A configuration method of network equipment is applied to a server in a cloud platform, and comprises the following steps:
establishing connection with a network device;
receiving the IP address and the equipment information sent by the network equipment;
acquiring the position information and the operator type of the network equipment according to the IP address and the equipment information;
generating a configuration character string according to the position information and the operator type;
and issuing a configuration character string to the network equipment so that the network equipment modifies a first configuration file stored in the network equipment according to the configuration character string and initializes the network equipment through the modified first configuration file.
7. A configuration device of a network device, applied to the network device, includes:
the initialization unit is used for starting initialization and reading a first configuration file from a storage device of the network equipment, wherein a plurality of configuration items are arranged in the first configuration file, and status identifications of the configuration items are preset to be not effective;
the connection unit is used for establishing connection with the cloud platform after initialization is completed;
a sending unit, configured to send an IP address and device information of the network device to the cloud platform, so that the cloud platform determines location information and an operator type of the network device according to the IP address and the device information, and sends a configuration string corresponding to the location information and the operator type to the network device;
and the configuration unit is used for modifying the state identifier of the configuration item in the first configuration file according to the configuration character string and carrying out initialization again according to the modified first configuration file.
8. The apparatus according to claim 7, wherein a number of times identifier is set in the first configuration file;
the transmitting unit includes:
if the number of times identification is an initial value, sending the IP address and the equipment information of the network equipment to the cloud platform;
the device also comprises a judging unit;
if the judging unit determines that the configuration character string sent by the cloud platform is not received within the preset time and the frequency identification is not a threshold value, calling the sending unit to send the IP address and the equipment information of the network equipment to the cloud platform again;
if the judging unit determines that the configuration character string sent by the cloud platform is not received within the preset time and the frequency identification is a threshold value, the configuration unit is called to configure the network equipment according to a default character string, or the sending unit is called to acquire the input position information and the operator type and send the input position information and the operator type to the cloud platform.
9. The apparatus of claim 7, further comprising a second configuration file stored in the storage device of the network device, wherein the second configuration file is a backup file of the initial first configuration file;
the sending unit further includes:
the comparison module is used for comparing the first configuration file with the second configuration file;
if the comparison module determines that the first configuration file is the same as the second configuration file, the sending unit is called to send the IP address and the equipment information of the network equipment to the cloud platform;
and if the comparison module determines that the first configuration file is different from the second configuration file, calling the configuration unit to initialize again according to the first configuration file.
10. The apparatus according to claim 7, wherein the connection unit is specifically configured to establish a TCP connection with the cloud platform; negotiating with the cloud platform for an encrypted transmission tunnel;
the sending unit is specifically configured to send, to the cloud platform through the encrypted transmission tunnel, a TCP data packet carrying the IP address of the network device and the device information.
11. The apparatus according to any one of claims 7-10, wherein the storage device further stores a program file, the program file comprising a plurality of program items;
the first configuration file includes: the program item comprises header information, a configuration item corresponding to the program item and a state identifier for indicating whether the configuration item is effective or not.
12. A configuration device of a network device, which is applied to a server in a cloud platform, includes:
a connection unit for establishing connection with a network device;
a receiving unit, configured to receive the IP address and the device information sent by the network device;
an obtaining unit, configured to obtain location information and an operator type of the network device according to the IP address and the device information;
a generating unit, configured to generate a configuration string according to the location information and the operator type;
and the sending unit is used for sending the configuration character string to the network equipment so that the network equipment modifies the first configuration file stored in the network equipment according to the configuration character string and initializes the first configuration file by the modified first configuration file.
CN202011370542.XA 2020-11-30 2020-11-30 Configuration method and device of network equipment Active CN112583639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011370542.XA CN112583639B (en) 2020-11-30 2020-11-30 Configuration method and device of network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011370542.XA CN112583639B (en) 2020-11-30 2020-11-30 Configuration method and device of network equipment

Publications (2)

Publication Number Publication Date
CN112583639A true CN112583639A (en) 2021-03-30
CN112583639B CN112583639B (en) 2022-05-27

Family

ID=75126533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011370542.XA Active CN112583639B (en) 2020-11-30 2020-11-30 Configuration method and device of network equipment

Country Status (1)

Country Link
CN (1) CN112583639B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113259468A (en) * 2021-06-02 2021-08-13 新华三智能终端有限公司 Network equipment configuration method and device
CN113472866A (en) * 2021-06-23 2021-10-01 北京理工大学珠海学院 Cloud neural network data interface method based on TCP (Transmission control protocol)
CN116248635A (en) * 2023-03-23 2023-06-09 广东保伦电子股份有限公司 Method, equipment and medium for modifying local area network conflict protocol addresses in batches

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070011301A1 (en) * 2005-07-11 2007-01-11 Ong Pin P Provisioning relay and re-direction server for service implementation on generic customer premises equipment
CN104519418A (en) * 2013-09-30 2015-04-15 华为技术有限公司 Switch docking method, switch docking device and user-level switch
CN104852813A (en) * 2015-04-08 2015-08-19 烽火通信科技股份有限公司 Method and system for on-demand loading of TR069 parameter node in home gateway equipment
CN108270615A (en) * 2017-12-25 2018-07-10 深圳市泰信通信息技术有限公司 Network equipment beginning method, apparatus and equipment based on SDN network controller
US20180287874A1 (en) * 2017-03-28 2018-10-04 Intraway R&D S.A. Method and system for self-provisioning of cable modems and multimedia terminal adapters
CN111756585A (en) * 2020-07-15 2020-10-09 迈普通信技术股份有限公司 Network node equipment configuration method, router and server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070011301A1 (en) * 2005-07-11 2007-01-11 Ong Pin P Provisioning relay and re-direction server for service implementation on generic customer premises equipment
CN104519418A (en) * 2013-09-30 2015-04-15 华为技术有限公司 Switch docking method, switch docking device and user-level switch
CN104852813A (en) * 2015-04-08 2015-08-19 烽火通信科技股份有限公司 Method and system for on-demand loading of TR069 parameter node in home gateway equipment
US20180287874A1 (en) * 2017-03-28 2018-10-04 Intraway R&D S.A. Method and system for self-provisioning of cable modems and multimedia terminal adapters
CN108270615A (en) * 2017-12-25 2018-07-10 深圳市泰信通信息技术有限公司 Network equipment beginning method, apparatus and equipment based on SDN network controller
CN111756585A (en) * 2020-07-15 2020-10-09 迈普通信技术股份有限公司 Network node equipment configuration method, router and server

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113259468A (en) * 2021-06-02 2021-08-13 新华三智能终端有限公司 Network equipment configuration method and device
CN113259468B (en) * 2021-06-02 2021-09-21 新华三智能终端有限公司 Network equipment configuration method and device
CN113472866A (en) * 2021-06-23 2021-10-01 北京理工大学珠海学院 Cloud neural network data interface method based on TCP (Transmission control protocol)
CN116248635A (en) * 2023-03-23 2023-06-09 广东保伦电子股份有限公司 Method, equipment and medium for modifying local area network conflict protocol addresses in batches

Also Published As

Publication number Publication date
CN112583639B (en) 2022-05-27

Similar Documents

Publication Publication Date Title
CN112583639B (en) Configuration method and device of network equipment
US10491583B2 (en) Provisioning remote access points
CN108429740B (en) Method and device for obtaining equipment identifier
US8650311B2 (en) Client device configured to connect with a home network
KR101213870B1 (en) Wireless device discovery and configuration
CN107113319B (en) Method, device and system for responding in virtual network computing authentication and proxy server
CN112019503B (en) Method for obtaining equipment identifier, communication entity, communication system and storage medium
CN104363213A (en) Register and login control method for network household appliance
WO2008095375A1 (en) System and method for configuring terminal device
CN105100021B (en) Triggering method, device and system for device management session
CN111385180B (en) Communication tunnel construction method, device, equipment and medium
KR20100126494A (en) Touchless plug and play base transceiver station
CN107113299A (en) To the distribution of the rental of equipment
KR20120002587A (en) Use of snmp for management of small footprint devices
US20200274707A1 (en) Server for and method of secure device registration
CN111066014B (en) Apparatus, method, and program for remotely managing devices
CN112688898B (en) Configuration method and related equipment
CN110808847B (en) Method and device for managing DAS (data-based system), electronic device and storage medium
CN113613227A (en) Data transmission method and device of Bluetooth equipment, storage medium and electronic device
US11411797B2 (en) Device management method and related device
CN113259468B (en) Network equipment configuration method and device
CN117375859A (en) Information transmission method and device, storage medium and electronic device
CN113824789A (en) Configuration method, device, equipment and storage medium of path descriptor
CN113055254A (en) Address configuration method, device, access server and storage medium
CN105471594B (en) The method and apparatus for managing resource

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant