CN106452860B - Equipment deployment method and device - Google Patents

Equipment deployment method and device Download PDF

Info

Publication number
CN106452860B
CN106452860B CN201610866068.7A CN201610866068A CN106452860B CN 106452860 B CN106452860 B CN 106452860B CN 201610866068 A CN201610866068 A CN 201610866068A CN 106452860 B CN106452860 B CN 106452860B
Authority
CN
China
Prior art keywords
address
port
undeployed
automatic deployment
equipment
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.)
Active
Application number
CN201610866068.7A
Other languages
Chinese (zh)
Other versions
CN106452860A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201610866068.7A priority Critical patent/CN106452860B/en
Publication of CN106452860A publication Critical patent/CN106452860A/en
Application granted granted Critical
Publication of CN106452860B publication Critical patent/CN106452860B/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/0889Techniques to speed-up the configuration process
    • 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/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks

Abstract

The embodiment of the invention discloses a device deployment method and a device, which are applied to an automatic deployment agent in an automatic deployment system, and the method comprises the following steps: obtaining a bridge MAC address of equipment connected with an undeployed port according to a link layer discovery protocol; then, according to the IP address in the use state and a simple network management protocol, obtaining a bridge MAC of the equipment; when the bridge MAC obtained twice is the same, setting an IP address in a baseline starting configuration file corresponding to the undeployed port; reading automatic deployment tuple information corresponding to the undeployed port; and deploying the equipment connected with the undeployed port according to the automatic deployment tuple information and the baseline startup configuration file after the IP address is set. By applying the embodiment of the invention, the bridge MAC address of the equipment does not need to be known in advance manually and the automatic deployment file is not needed to be created manually, so that the error caused by human is avoided, and the equipment deployment efficiency is improved.

Description

Equipment deployment method and device
Technical Field
The present invention relates to the field of device management technologies, and in particular, to a device deployment method and apparatus.
Background
Bare metal equipment (factory equipment) refers to equipment without any deployment, and production network equipment refers to equipment after bare metal equipment is deployed, and the equipment can bear network data services. That is, bare metal devices need to be deployed before they can evolve into production network devices.
At present, the main process of deploying bare metal equipment is as follows: connecting bare machine equipment (equipment to be deployed) x into the automatic deployment system, wherein x obtains a temporary IP address, an IP address (or a domain name) of a TFTP server and a basic configuration file name from a DHCP server. The base configuration file is obtained from the TFTP server based on the IP address (or domain name) and base configuration file name of the TFTP server. Restart x validates the configuration in the base configuration file, at which time x can be accessed via SNMP or TELNET or SSH. In this process, the autonomic deployment system obtains the IP address of x from the TFTP server. And after the restart of the x is completed, starting an independent automatic deployment agent to access the x through SNMP or TELNET or SSH according to the IP address of the x, and reading the bridge MAC address of the x. Reading corresponding automatic deployment tuple information in the automatic deployment file according to the bridge MAC address; and deploying x according to the automatic deployment tuple information. The automatic deployment tuple information includes a bridge MAC address of x, a target IP address and mask deployed for x, a software version, a baseline activation configuration file name, an SNMP parameter, a TELNET parameter, an SSH parameter, and the like.
However, when the above method is used to deploy the device, the deployment personnel needs to know the bridge MAC address of the device in advance and manually create the automatic deployment file. However, since the device has a plurality of motherboards, and different motherboards correspond to different MAC addresses, it is very likely that a deployment person may find a wrong bridge MAC address, resulting in a failure in device deployment. In addition, manually configuring the automatic deployment file is prone to errors, and device deployment failure can also be caused. When the equipment deployment fails, the deployment personnel needs to know the bridge MAC address of the equipment again and manually modify the automatic deployment file until the equipment deployment is successful. Therefore, the deployment efficiency of the equipment is low.
Disclosure of Invention
The embodiment of the invention aims to provide a device deployment method and a device so as to improve the device deployment efficiency.
In order to achieve the above object, an embodiment of the present invention discloses an apparatus deployment method, which is applied to an automatic deployment agent in an automatic deployment system, and the method includes:
detecting the state of an undeployed port in a switch in the automatic deployment system;
when detecting that the state of the undeployed port is the up state, acquiring a bridge MAC address of equipment connected with the undeployed port according to a link layer discovery protocol;
sequentially detecting whether each IP address in the IP address field allocated to the switch by the DHCP server is in a use state;
acquiring a bridge MAC of the equipment according to the IP address in the use state and a simple network management protocol;
when the bridge MAC obtained twice is the same, setting an IP address in a baseline starting configuration file corresponding to the undeployed port;
reading automatic deployment tuple information corresponding to the undeployed port, wherein the automatic deployment tuple information at least comprises parameter information for deploying equipment;
and deploying the equipment connected with the undeployed port according to the automatic deployment tuple information and the baseline startup configuration file after the IP address is set.
Optionally, the detecting a state of an undeployed port in a switch in the automatic deployment system includes:
and detecting the state of the undeployed port in the switch in the automatic deployment system every preset time.
Optionally, the setting an IP address in the baseline activation configuration file corresponding to the undeployed port includes:
setting an IP address in a baseline starting configuration file corresponding to the undeployed port as an IP address allocated to equipment connected with the undeployed port by the DHCP;
or setting the IP address in the baseline startup configuration file corresponding to the undeployed port to acquire the IP address in the use state corresponding to the same bridge MAC.
Optionally, the method further includes:
marking the undeployed port as a deployed port.
Optionally, the ports of the switch are divided into N groups in advance, where each of the N groups corresponds to one segment of IP address and the same baseline startup configuration file; different groups correspond to different baseline startup profiles.
In order to achieve the above object, an embodiment of the present invention discloses an apparatus deployment device, which is applied to an automatic deployment agent in an automatic deployment system, and the apparatus includes: a first detection module, an acquisition module, a second detection module, an acquisition module, a setting module, a reading module and a deployment module, wherein,
the first detection module is used for detecting the state of a port which is not deployed in a switch in the automatic deployment system;
the obtaining module is configured to, when it is detected that the state in which the port is not deployed is the up state, obtain, according to a link layer discovery protocol, a bridge MAC address of a device connected to the port that is not deployed;
the second detection module is used for sequentially detecting whether each IP address in the IP address section allocated to the switch by the DHCP server is in a use state;
the acquisition module is used for acquiring the bridge MAC of the equipment according to the IP address in the use state and the simple network management protocol;
the setting module is used for setting the IP address in the baseline startup configuration file corresponding to the undeployed port when the bridge MAC obtained twice is the same;
the reading module is configured to read automatic deployment tuple information corresponding to the undeployed port, where the automatic deployment tuple information at least includes parameter information for deploying equipment;
and the deployment module is used for deploying the equipment connected with the undeployed port according to the automatic deployment tuple information and the baseline startup configuration file after the IP address is set.
Optionally, the first detection module is specifically configured to:
and detecting the state of the undeployed port in the switch in the automatic deployment system every preset time.
Optionally, the setting module is specifically configured to:
when the bridge MAC obtained twice is the same, setting the IP address in the baseline starting configuration file corresponding to the port which is not deployed as the IP address allocated by the DHCP to the equipment connected with the port which is not deployed;
or setting the IP address in the baseline startup configuration file corresponding to the undeployed port to acquire the IP address in the use state corresponding to the same bridge MAC.
Optionally, the apparatus further comprises:
a marking module for marking the un-deployed port as a deployed port.
Optionally, the ports of the switch are divided into N groups in advance, where each of the N groups corresponds to one segment of IP address and the same baseline startup configuration file; different groups correspond to different baseline startup profiles.
As can be seen from the foregoing technical solutions, an embodiment of the present invention provides an apparatus deployment method and an apparatus, which are applied to an automatic deployment agent in an automatic deployment system, and the method includes: detecting the state of an undeployed port in a switch in the automatic deployment system; when detecting that the state of the undeployed port is the up state, acquiring a bridge MAC address of equipment connected with the undeployed port according to a link layer discovery protocol; sequentially detecting whether each IP address in the IP address field allocated to the switch by the DHCP server is in a use state; acquiring a bridge MAC of the equipment according to the IP address in the use state and a simple network management protocol; when the bridge MAC obtained twice is the same, setting an IP address in a baseline starting configuration file corresponding to the undeployed port; reading automatic deployment tuple information corresponding to the undeployed port, wherein the automatic deployment tuple information at least comprises parameter information for deploying equipment; and deploying the equipment connected with the undeployed port according to the automatic deployment tuple information and the baseline startup configuration file after the IP address is set.
By applying the technical scheme provided by the embodiment of the invention, the bridge MAC address of the equipment does not need to be known in advance manually and the automatic deployment file is not needed to be created manually, so that the occurrence of errors caused by human is avoided, and the equipment deployment efficiency is further improved.
Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a device deployment method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus deployment device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problem of the prior art, the embodiment of the invention provides a device deployment method and device. First, a device deployment method provided by an embodiment of the present invention is described below.
It should be noted that the embodiment of the present invention is preferably applied to an automatic deployment agent in an automatic deployment system. The automatic deployment system is a system capable of automatically deploying bare metal equipment actively. Generally comprising: a DHCP server, a TFTP server, and an auto-deploy agent. The DHCP server is used for allocating a temporary IP address for the bare metal equipment, storing the IP address or domain name of the TFTP server and recording the name of a basic configuration file; the TFTP server is used to store a base configuration file, wherein the base configuration file contains the basic configuration, the configuration that makes the device accessible and controllable via protocols such as SNMP or TELNET or SSH. The memory of the TFTP server records the name of the basic configuration file. The automatic deployment agent refers to an entity in the automatic deployment system, which can automatically deploy bare metal equipment according to a baseline startup configuration file, wherein the entity refers to hardware or software which can send, receive and process information in the field of computers. That is, the automatic deployment agent may be a server having a function of automatically deploying bare metal equipment in the automatic deployment system, or may be software installed in the automatic deployment system having a function of automatically deploying bare metal equipment.
In the case where the DHCP server stores the TFTP server domain name, the automated deployment system further includes a DNS server for resolving the TFTP server domain name to an IP address.
The DHCP (Dynamic Host Configuration Protocol) is a network Protocol of a local area network, works using the UDP Protocol, and has two main uses: an IP address is automatically assigned to an internal network or network service provider as a means of central management of all computers to a user or internal network administrator. TFTP (simple File Transfer Protocol) is a Protocol in the TCP/IP suite for simple File Transfer between a client and a server, and provides an uncomplicated and low-cost File Transfer service. SNMP (Simple Network Management Protocol) is composed of a set of standards for Network Management, including an application layer Protocol (application layer Protocol), a database model (database schema), and a set of resource objects. The protocol can support a network management system to monitor devices connected to the network for any regulatory concerns. The TELNET protocol (remote terminal protocol) is a member of the TCP/IP protocol suite, and is the standard protocol and main means for Internet TELNET services. It provides the user with the ability to do remote host work on the local computer. The telnet program is used on the end user's computer and is used to connect to the server. The end user can enter commands in the telnet program that will run on the server as if entered directly on the server's console. The server can be controlled locally. SSH (Secure Shell protocol) is a security protocol built on an application layer basis, specifically a protocol that provides security for telnet sessions and other network services. The SSH protocol can effectively prevent the problem of information leakage in the remote management process.
Fig. 1 is a schematic flow chart of a device deployment method according to an embodiment of the present invention, which may include:
s101: detecting the state of an undeployed port in a switch in the automatic deployment system;
specifically, in practical applications, ports connected to deployed devices may be marked as deployed ports, and then ports that are not marked as deployed ports are all undeployed ports.
For example, it is assumed that a switch in the automatic deployment system has three ports, and the three ports are respectively corresponding to port 1, port 2, and port 3 and are all in a down state, that is, no device is currently deployed in any of the three ports, that is, all of the three ports are currently undeployed.
When the device a to be deployed is connected with the port 1 of the switch and the device B to be deployed is connected with the port 2 of the switch, the device a to be deployed and the device B to be deployed actively broadcast a DHCP request message, and an IP address, a TFTP server IP address (or domain name), and a basic configuration file name are obtained from a DHCP server through a DHCP protocol, assuming that the IP address obtained by the device a to be deployed is 192.168.1.20 and the IP address obtained by the device B to be deployed is 192.168.1.25. The device to be deployed a and the device to be deployed B obtain the basic configuration file from the TFTP server according to the IP address (or domain name) and the basic configuration file name of the TFTP server. And then restarting the device A to be deployed and the device B to be deployed to enable the configuration in the basic configuration file, wherein the device A to be deployed and the device B to be deployed can be accessed through SNMP, TELNET or SSH, and the global LLDP function of the device A to be deployed and the device B to be deployed is started.
At this time, it can be detected that the states of port 1 and port 2 change from the down state to the up state.
It should be noted that the basic configuration file may be stored in the root directory of the TFTP server, and the basic configuration file includes the basic configuration of the device and the configuration that enables the device to be accessed and controlled through the protocol such as SNMP, TELNET, SSH, or the like. Specifically, when the domain name of the TFTP server is configured in the DHCP server, a DNS server needs to be configured to resolve the domain name of the TFTP server and resolve the domain name of the TFTP server into an IP address.
In practical application, the states of ports which are not deployed in the switch in the automatic deployment system can be detected every preset time, such as 2 minutes, 3 minutes and the like, so as to reduce the pressure of the round-robin detection and avoid affecting the normal operation of the switch.
S102: when detecting that the state of the undeployed port is the up state, acquiring a bridge MAC address of equipment connected with the undeployed port according to a link layer discovery protocol;
and when detecting that the states of the port 1 and the port 2 are changed from a down state to an up state, acquiring bridge MAC addresses of the equipment A to be deployed and the equipment B to be deployed according to a link layer discovery protocol LLDP.
Briefly, the Link Layer Discovery Protocol LLDP is a proximity Discovery Protocol, and provides a standard Link Layer Discovery manner, which can organize Information such as a main capability, a Management address, a device identifier, and an interface identifier of a local device into different TLVs (Type/Length/Value), encapsulate the TLVs into LLDPDU (Link Layer Discovery Protocol Data Unit), and distribute the TLVs to neighbors directly connected to the neighbor, and store the Information in a standard MIB (Management Information Base) form after the neighbor receives the Information, so as to allow a network Management system to search and determine a communication status of a Link. Thus, the bridge MAC address of the device can be obtained through the link layer discovery protocol.
The obtaining of the bridge MAC address of the device through the link layer discovery protocol is prior art, and is not described herein in detail in the embodiments of the present invention.
Suppose the obtained bridge MAC address of the device a to be deployed is 74-27-EA-3B-85-77 and the bridge MAC address of the device B to be deployed is 00-00-0C-75-41-20.
S103: sequentially detecting whether each IP address in the IP address field allocated to the switch by the DHCP server is in a use state;
specifically, whether each IP address in the IP address field allocated to the switch by the DHCP server is in the use state is sequentially detected, a ping command may be invoked, whether each IP address in the IP address field allocated to the switch by the DHCP server can be ping-through is sequentially tested, and if ping-through, it indicates that the IP address is in the use state.
Illustratively, assume that the DHCP server assigns the switch an IP address segment of 192.168.1.15-192.168.1.50.
A ping command is invoked to ping 192.168.1.15-192.168.1.50 in turn. And testing whether the address in the address field can ping, and if so, indicating that the IP address is in a use state. Assume 192.168.1.30 and 192.168.1.35 can be ping-through. I.e., 192.168.1.30 and 192.168.1.35, are in use.
S104: acquiring a bridge MAC of the equipment according to the IP address in the use state and a simple network management protocol;
illustratively, the bridge MAC of the device corresponding to 192.168.1.30 is obtained.
Can invoke commands
router_192.168.1.30#show running
<snip>
...
interface FastEthernet2/0
ip address 192.168.1.30 255.255.255.0
ip accounting mac-address input
ip accounting Mac-address output
...
<snip>
...
snmp-server community public RO
SNMP-server community private RW
...
<snip>
router_192.168.1.30#show interfaces mac
Assume that the bridge MAC for the device corresponding to 192.168.1.30 is obtained as 00-00-0C-75-41-20. A similarly obtained bridge MAC for 192.168.1.35 corresponds to device 74-27-EA-3B-85-77.
The SNMP is a simple network management protocol, and is composed of a set of network management standards, including an application layer protocol (application layer protocol), a database model (database schema), and a set of resource objects. The protocol can support a network management system to monitor devices connected to the network for any regulatory concerns.
S105: when the bridge MAC obtained twice is the same, setting an IP address in a baseline starting configuration file corresponding to the undeployed port;
when the bridge MACs obtained twice are the same, the IP address in the baseline startup configuration file corresponding to the undeployed port is set, specifically, the IP address in the baseline startup configuration file set in advance is represented in a parameter form, and an actual IP address, such as @ IP, is not set. At this time, the IP address in the baseline startup configuration file corresponding to the undeployed port may be set as the IP address allocated by the DHCP to the device connected to the undeployed port; or setting the IP address in the baseline startup configuration file corresponding to the undeployed port to acquire the IP address in the use state corresponding to the same bridge MAC.
For example, assuming that the baseline startup configuration file corresponding to port 1 is a baseline startup configuration file x, and the baseline startup configuration file corresponding to port 2 is a baseline startup configuration file y, the IP address in the baseline startup configuration file x corresponding to port 1 is set to 192.168.1.20 or 192.168.1.35, that is, the value of @ IP in x is 192.168.1.20 or 192.168.1.35; the IP address in the baseline startup profile y corresponding to port 2 is set to 192.168.1.25 or 192.168.1.30, i.e. the value of @ IP in y is 192.168.1.25 or 192.168.1.30.
For clarity, the IP address in the above-described setup baseline startup profile is briefly described below.
The device A to be deployed is connected with the port 1, the port 1 corresponds to the baseline starting configuration file x, the bridge MAC address of the device A to be deployed is 74-27-EA-3B-85-77, the IP address obtained by the device A to be deployed is 192.168.1.20, and the device A is in a use state: 192.168.1.35 bridge MAC is 74-27-EA-3B-85-77: the IP address in x is set to 192.168.1.20 or 192.168.1.35.
The device B to be deployed is connected with the port 2, the port 2 corresponds to the baseline starting configuration file y, the bridge MAC address of the device B to be deployed is 00-00-0C-75-41-20, the IP address obtained by the device B to be deployed is 192.168.1.25, and the device B to be deployed is in a use state: 192.168.1.30 the corresponding bridge MAC is 00-00-0C-75-41-20; the IP address in x is set to 192.168.1.25 or 192.168.1.30.
That is, in practical application, there may be a plurality of undeployed ports of the switch, and each undeployed port corresponds to one baseline startup configuration file; there may be a plurality of devices to be deployed, and there are a plurality of bridges MAC corresponding to the devices to be deployed; the number of the IP addresses in the use state is multiple, and the number of the bridge MAC corresponding to the IP addresses in the use state is multiple; according to the same bridge MAC, the corresponding relation and the connection relation, a baseline startup configuration file required by configuring each device to be deployed can be determined.
Specifically, in practical applications, the ports of the switch may correspond to the same segment of IP address and the same baseline startup configuration file. The ports of the switch can be divided into N groups in advance, wherein each group in the N groups corresponds to one section of IP address and the same baseline starting configuration file; different groups correspond to different baseline startup profiles.
S106: reading automatic deployment tuple information corresponding to the undeployed port, wherein the automatic deployment tuple information at least comprises parameter information for deploying equipment;
the parameters for deploying the equipment at least comprise SNMP parameters, and also comprise one or a combination of a TELNET parameter, an SSH parameter and a NETCONF parameter;
s107: and deploying the equipment connected with the undeployed port according to the automatic deployment tuple information and the baseline startup configuration file after the IP address is set.
Specifically, reading automatic deployment tuple information corresponding to a non-deployment port, and deploying equipment connected to the non-deployment port according to the automatic deployment tuple information and a baseline startup configuration file after an IP address is set is prior art, and details are not repeated here in the embodiment of the present invention.
When the automatic deployment tuple information further comprises software identification information, if software corresponding to the software identification information exists in the equipment to be deployed, upgrading the software, and if software corresponding to the software identification information does not exist in the equipment to be deployed, installing the software corresponding to the software identification information.
And after the equipment A to be deployed and the equipment B to be deployed are restarted, the IP addresses, the SNMP parameters, the TELNET parameters, the SSH parameters, the NETCONF parameters and the like of the equipment A to be deployed and the equipment B to be deployed are updated to be the IP addresses and the access parameters in the baseline starting configuration file. And completing the deployment of the equipment A to be deployed and the equipment B to be deployed.
Specifically, in the process of deploying the device to be deployed, the deployment state, the process, the result, the failure reason, and the like may be recorded so as to view the change.
In another embodiment of the present invention, after the device to be deployed is deployed, the port connected to the device (i.e. the previous undeployed port) may be marked as a deployed port. When equipment deployment is carried out, detection round training is not needed to be carried out on the port, and equipment deployment efficiency is further improved.
It should be noted that, the above description takes the switch having three ports, the device to be deployed a, and the device to be deployed B as an example, which is only a specific example of the present invention and does not limit the present invention.
By applying the embodiment shown in FIG. 1 of the invention, the bridge MAC address of the equipment does not need to be known in advance manually and the automatic deployment file is not needed to be created manually, thereby avoiding the occurrence of errors caused by human factors and further improving the deployment efficiency of the equipment.
Corresponding to the above method embodiment, the embodiment of the present invention further provides an apparatus for deploying equipment.
Fig. 2 is a schematic structural diagram of an apparatus deployment device according to an embodiment of the present invention, which may include: a first detection module 201, an obtaining module 202, a second detection module 203, an obtaining module 204, a setting module 205, a reading module 206, and a deployment module 207, wherein,
a first detection module 201, configured to detect a state of an undeployed port in a switch in the automatic deployment system;
specifically, the first detection module 201 shown in the embodiment of the present invention may specifically be configured to:
and detecting the state of the undeployed port in the switch in the automatic deployment system every preset time.
An obtaining module 202, configured to, when it is detected that a state where an undeployed port exists is an up state, obtain, according to a link layer discovery protocol, a bridge MAC address of a device connected to the undeployed port;
the second detection module 203 is configured to detect whether each IP address in the IP address segment allocated to the switch by the DHCP server is in a use state in sequence;
specifically, the second detection module 203 shown in the embodiment of the present invention may be specifically configured to:
and calling a ping command, sequentially testing whether each IP address in the IP address field allocated to the switch by the DHCP server can be ping-passed, and if the IP address is ping-passed, indicating that the IP address is in a use state.
An obtaining module 204, configured to obtain a bridge MAC of the device according to the IP address in the use state and the simple network management protocol;
a setting module 205, configured to set an IP address in a baseline startup configuration file corresponding to the undeployed port when the bridge MACs obtained twice are the same;
specifically, the setting module 205 shown in the embodiment of the present invention may be specifically configured to:
when the bridge MAC obtained twice is the same, setting the IP address in the baseline starting configuration file corresponding to the port which is not deployed as the IP address allocated by the DHCP to the equipment connected with the port which is not deployed;
or setting the IP address in the baseline startup configuration file corresponding to the undeployed port to acquire the IP address in the use state corresponding to the same bridge MAC.
Specifically, the ports of the switch may be divided into N groups in advance, where each of the N groups corresponds to one segment of IP address and the same baseline startup configuration file; different groups correspond to different baseline startup profiles.
A reading module 206, configured to read automatic deployment tuple information corresponding to the undeployed port, where the automatic deployment tuple information at least includes parameter information for deploying equipment;
and the deployment module 207 is configured to deploy the device connected to the undeployed port according to the automatic deployment tuple information and the baseline startup configuration file after the IP address is set.
In another embodiment of the present invention, the device deployment apparatus may further include: a marking module for marking the un-deployed port as a deployed port.
By applying the embodiment shown in FIG. 2 of the invention, the bridge MAC address of the equipment does not need to be known in advance manually and the automatic deployment file is not needed to be created manually, thereby avoiding the occurrence of errors caused by human beings and further improving the deployment efficiency of the equipment.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, which is referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A bare metal equipment deployment method is applied to an automatic deployment agent in an automatic deployment system, and comprises the following steps:
detecting the state of an undeployed port in a switch in the automatic deployment system;
when detecting that the state of the undeployed port is the up state, acquiring a bridge MAC address of equipment connected with the undeployed port according to a link layer discovery protocol;
sequentially detecting whether each IP address in the IP address field allocated to the switch by the DHCP server is in a use state;
acquiring a bridge MAC of the equipment according to the IP address in the use state and a simple network management protocol;
when the bridge MAC obtained twice is the same, setting an IP address in a baseline starting configuration file corresponding to the undeployed port;
reading automatic deployment tuple information corresponding to the undeployed port, wherein the automatic deployment tuple information at least comprises parameter information for deploying equipment;
and deploying the equipment connected with the undeployed port according to the automatic deployment tuple information and the baseline startup configuration file after the IP address is set.
2. The method of claim 1, wherein the detecting the status of undeployed ports in switches in the autonomic deployment system comprises:
and detecting the state of the undeployed port in the switch in the automatic deployment system every preset time.
3. The method of claim 1, wherein the setting the IP address in the baseline activation configuration file corresponding to the undeployed port comprises:
setting an IP address in a baseline starting configuration file corresponding to the undeployed port as an IP address allocated to equipment connected with the undeployed port by the DHCP;
or setting the IP address in the baseline startup configuration file corresponding to the undeployed port to acquire the IP address in the use state corresponding to the same bridge MAC.
4. The method of claim 1, further comprising:
marking the undeployed port as a deployed port.
5. The method of claim 1, wherein the ports of the switch are pre-divided into N groups, wherein each of the N groups corresponds to an IP address and a same baseline startup profile; different groups correspond to different baseline startup profiles.
6. A bare metal equipment deployment device, which is applied to an automatic deployment agent in an automatic deployment system, and comprises: a first detection module, an acquisition module, a second detection module, an acquisition module, a setting module, a reading module and a deployment module, wherein,
the first detection module is used for detecting the state of a port which is not deployed in a switch in the automatic deployment system;
the obtaining module is configured to, when it is detected that the state in which the port is not deployed is the up state, obtain, according to a link layer discovery protocol, a bridge MAC address of a device connected to the port that is not deployed;
the second detection module is used for sequentially detecting whether each IP address in the IP address section allocated to the switch by the DHCP server is in a use state;
the acquisition module is used for acquiring the bridge MAC of the equipment according to the IP address in the use state and the simple network management protocol;
the setting module is used for setting the IP address in the baseline startup configuration file corresponding to the undeployed port when the bridge MAC obtained twice is the same;
the reading module is configured to read automatic deployment tuple information corresponding to the undeployed port, where the automatic deployment tuple information at least includes parameter information for deploying equipment;
and the deployment module is used for deploying the equipment connected with the undeployed port according to the automatic deployment tuple information and the baseline startup configuration file after the IP address is set.
7. The apparatus of claim 6, wherein the first detection module is specifically configured to:
and detecting the state of the undeployed port in the switch in the automatic deployment system every preset time.
8. The apparatus according to claim 6, wherein the setting module is specifically configured to:
when the bridge MAC obtained twice is the same, setting the IP address in the baseline starting configuration file corresponding to the port which is not deployed as the IP address allocated by the DHCP to the equipment connected with the port which is not deployed;
or setting the IP address in the baseline startup configuration file corresponding to the undeployed port to acquire the IP address in the use state corresponding to the same bridge MAC.
9. The apparatus of claim 6, further comprising:
a marking module for marking the un-deployed port as a deployed port.
10. The apparatus of claim 6, wherein the ports of the switch are pre-divided into N groups, wherein each of the N groups corresponds to an IP address and a same baseline startup profile; different groups correspond to different baseline startup profiles.
CN201610866068.7A 2016-09-29 2016-09-29 Equipment deployment method and device Active CN106452860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610866068.7A CN106452860B (en) 2016-09-29 2016-09-29 Equipment deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610866068.7A CN106452860B (en) 2016-09-29 2016-09-29 Equipment deployment method and device

Publications (2)

Publication Number Publication Date
CN106452860A CN106452860A (en) 2017-02-22
CN106452860B true CN106452860B (en) 2021-01-08

Family

ID=58171191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610866068.7A Active CN106452860B (en) 2016-09-29 2016-09-29 Equipment deployment method and device

Country Status (1)

Country Link
CN (1) CN106452860B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109474443B (en) * 2017-09-07 2022-10-18 中移(杭州)信息技术有限公司 Configuration method, device and system of newly added server and communication equipment
CN111405004B (en) * 2020-03-06 2023-07-18 深圳市信锐网科技术有限公司 Switch management method and device, equipment and storage medium
CN113872783B (en) * 2020-06-30 2023-08-22 华为技术有限公司 Method, apparatus and computer readable storage medium for network configuration
CN113794588A (en) * 2021-08-30 2021-12-14 携程旅游信息技术(上海)有限公司 Method, system, electronic device and medium for synchronizing port information of network device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478434A (en) * 2009-01-19 2009-07-08 杭州华三通信技术有限公司 Method for configuring stacking port and exchange equipment
CN101651680A (en) * 2009-09-14 2010-02-17 杭州华三通信技术有限公司 Network safety allocating method and network safety device
CN103166811A (en) * 2013-03-06 2013-06-19 杭州华三通信技术有限公司 Multi-active detection (MAD) detection method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7379429B1 (en) * 2002-12-20 2008-05-27 Foundry Networks, Inc. Optimizations and enhancements to the IEEE RSTP 802.1w implementation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478434A (en) * 2009-01-19 2009-07-08 杭州华三通信技术有限公司 Method for configuring stacking port and exchange equipment
CN101651680A (en) * 2009-09-14 2010-02-17 杭州华三通信技术有限公司 Network safety allocating method and network safety device
CN103166811A (en) * 2013-03-06 2013-06-19 杭州华三通信技术有限公司 Multi-active detection (MAD) detection method and device

Also Published As

Publication number Publication date
CN106452860A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN106452860B (en) Equipment deployment method and device
CN107592209B (en) Method and system for automatically configuring IP address information by multi-network card server
CN102594944B (en) A kind of method of automatic configuration and the network equipment
US20150074246A1 (en) Method and system for auto-provisioning network devices in a data center using network device location in network topology
CN106549789B (en) Method and system for realizing server installation
US20120124242A1 (en) Server and method for testing pxe function of network interface card
CN109474443B (en) Configuration method, device and system of newly added server and communication equipment
CN103957117A (en) System and method for achieving intelligent installation of network equipment
US9241007B1 (en) System, method, and computer program for providing a vulnerability assessment of a network of industrial automation devices
CN106657434B (en) method and device for checking IP address
CN107566518B (en) Method and device for managing equipment information in file installation process
CN110391940A (en) Response method, device, system, equipment and the storage medium of address of service
KR100714681B1 (en) Network managing device and method thereof
US10282346B1 (en) Scalable network device self-configuration in large networks
CN106301847B (en) Access point interface configuration recovery method and device and home gateway
CN107968725B (en) Method and device for returning and configuring configuration information of home gateway unit type terminal device
US7590141B1 (en) Method and apparatus for an automatic network boot procedure for a resource in a utility computing environment
CN108694116B (en) Network stability testing method, device and system of VPC cluster
CN110247778B (en) Operating system installation method and device, electronic equipment and storage medium
CN111756870A (en) IPv6 address configuration method, device, equipment and readable storage medium
CN109218055B (en) Method and device for rapidly configuring network element equipment for plug and play
CN107070725B (en) A kind of method that server two-level management intermodule communication is shaken hands
US11750560B2 (en) Zero Touch Provisioning for a network element over IPv6 unnumbered interfaces in OSPFv3 networks
CN114866515A (en) IP address configuration method, device, electronic equipment and storage medium
CN111277463B (en) Method, system, terminal and storage medium for testing accuracy of gateway address acquisition by BMC

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou science and Technology Industrial Park, high tech Industrial Development Zone, Zhejiang Province, No. six and road, No. 310

Applicant before: Huasan Communication Technology Co., Ltd.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant