CN114422360A - Switch data updating method and device, electronic equipment and medium - Google Patents

Switch data updating method and device, electronic equipment and medium Download PDF

Info

Publication number
CN114422360A
CN114422360A CN202210321564.XA CN202210321564A CN114422360A CN 114422360 A CN114422360 A CN 114422360A CN 202210321564 A CN202210321564 A CN 202210321564A CN 114422360 A CN114422360 A CN 114422360A
Authority
CN
China
Prior art keywords
switch
data
server
request
data request
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.)
Pending
Application number
CN202210321564.XA
Other languages
Chinese (zh)
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210321564.XA priority Critical patent/CN114422360A/en
Publication of CN114422360A publication Critical patent/CN114422360A/en
Pending legal-status Critical Current

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
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • 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
    • 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
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0846Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/20Support for services
    • H04L49/208Port mirroring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/354Switches specially adapted for specific applications for supporting virtual local area networks [VLAN]

Abstract

The invention provides a method and a device for updating switch data, electronic equipment and a medium. The switch data updating method is applied to a first switch and comprises the following steps: a first data request is sent to a first server. And if the first server does not respond within the specified time threshold, sending a second data request to the second switch, wherein the second data request is used for requesting switch data from the second switch, and the second switch is bridged with the first switch. And receiving the switch data sent by the second switch. According to the invention, when the first server can not provide the switch data for the first switch, the first switch can acquire the switch data from the second switch bridged with the first switch, so that the manner of acquiring the switch data by the first switch is more flexible, the acquisition requirement of acquiring the switch data by the first switch can be met, and the use experience of a user is facilitated to be improved.

Description

Switch data updating method and device, electronic equipment and medium
Technical Field
The invention relates to the technical field of switches, in particular to a method and a device for updating switch data, electronic equipment and a medium.
Background
ZTP (Zero Touch Provisioning, Zero contact Provisioning) is a management function in the field of switches, and allows a switch to automatically perform Configuration or mirror image upgrading after being powered on, without intervention of a manager, which is particularly important when equipment is deployed in a large scale.
In the related art, the current architecture of ZTP includes a DHCP server installed in a ZTP environment, a ZTP server, and a plurality of ZTP switches with ZTP clients installed. After the ZTP switch is started, the required switch data of the switch can be obtained from the ZTP server through the DHCP server.
However, when the switch data is acquired in this manner, it is necessary to ensure that the network communication between the ZTP switch and the ZTP server is in a healthy state, and if there is an abnormality in the network communication between the ZTP switch and the ZTP server, the ZTP switch may not acquire the required switch data.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the defect that the ZTP switch cannot acquire required switch data due to the abnormality of network communication between the ZTP switch and the ZTP server in the prior art, thereby providing a switch data updating method, apparatus, electronic device, and medium.
According to a first aspect, the present invention provides a switch data updating method, applied to a first switch, the method including:
sending a first data request to a first server, wherein the first data request is used for requesting switch data from the first server, and the switch data comprises a configuration file and/or an image file;
if the first server does not respond within a specified time threshold, sending a second data request to a second switch, wherein the second data request is used for requesting the switch data from the second switch, and the second switch is bridged with the first switch;
and receiving the switch data sent by the second switch.
In this mode, when first server can't provide the switch data for first switch, first switch can be through acquireing the switch data in the second switch rather than bridging, and then make the mode that first switch acquireed the switch data more nimble, can satisfy the acquireing demand that first switch acquireed the switch data to help promoting user's use experience.
With reference to the first aspect, in a first embodiment of the first aspect, the sending the second data request to the second switch includes:
determining a second switch in which the switch data is embedded from a plurality of switches bridged with the first switch, wherein the plurality of switches are all switches which are in communication interaction with the first server;
and sending a second data request to a second switch with the built-in switch data.
With reference to the first embodiment of the first aspect, in a second embodiment of the first aspect, before sending the second data request to the second switch, the method further includes:
establishing a bridge between the first switch and the plurality of switches based on a border gateway protocol under a designated virtual private network.
With reference to the first embodiment of the first aspect, in a third embodiment of the first aspect, the bridging with the plurality of switches based on a border gateway protocol under the designated virtual private network includes:
sending a third data request to a second server, wherein the third data request is used for requesting the communication information of the first switch from the second server;
receiving the communication information sent by the second server, and determining a switch group where the first switch is located, wherein the switch group comprises the first switch and the switches;
bridging with the plurality of switches based on a border gateway protocol under the designated virtual private network.
With reference to the first aspect, in a fourth embodiment of the first aspect, a data structure of the switch data sent by the second switch is a triple structure.
With reference to the fourth embodiment of the first aspect, in a fifth embodiment of the first aspect, a specified routing type is adopted as a data type of the triple structure.
With reference to the first aspect, in a sixth embodiment of the first aspect, the method further comprises:
and if the first server responds within the specified time threshold, receiving the switch data sent by the first server.
In this way, the first switch device can determine the source of the switch data according to whether the first server responds within the specified time threshold, so that the switch data acquisition mode is more flexible, the first switch can be favorably ensured to be smoothly updated according to the acquired switch data, and the user experience can be favorably improved.
According to a second aspect, the present invention provides a switch data updating apparatus, applied to a first switch, the apparatus including:
the device comprises a first sending unit, a second sending unit and a first processing unit, wherein the first sending unit is used for sending a first data request to a first server, the first data request is used for requesting switch data from the first server, and the switch data comprises a configuration file and/or an image file;
a second sending unit, configured to send a second data request to a second switch if the first server does not respond within a specified time threshold, where the second data request is used to request the switch data from the second switch, and the second switch is bridged with the first switch;
and the receiving unit is used for receiving the switch data sent by the second switch.
With reference to the second aspect, in a first embodiment of the second aspect, the second sending unit includes:
a first determination unit configured to determine a second switch in which the switch data is embedded from among a plurality of switches bridged with the first switch, the plurality of switches each being a switch that performs communication interaction with the first server;
and the second sending subunit is used for sending a second data request to a second switch in which the switch data is built.
With reference to the first embodiment of the second aspect, in a second embodiment of the second aspect, the apparatus further comprises:
and the interaction unit is used for establishing the bridging between the first switch and the switches based on a border gateway protocol under the appointed virtual private network.
With reference to the first embodiment of the second aspect, in a third embodiment of the second aspect, the interaction unit includes:
a third sending unit, configured to send a third data request to a second server, where the third data request is used to request the second server for communication information of the first switch;
an information receiving unit, configured to receive the communication information sent by the second server, and determine a switch group where the first switch is located, where the switch group includes the first switch and the multiple switches;
and the bridging unit is used for bridging with the switches based on the border gateway protocol under the appointed virtual private network.
With reference to the second aspect, in a fourth embodiment of the second aspect, the apparatus further comprises:
a data receiving unit, configured to receive the switch data sent by the first server if the first server responds within the specified time threshold.
According to a third aspect, the present invention further provides an electronic device, which includes a memory and a processor, where the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the switch data updating method according to any one of the first aspect and the optional embodiments thereof.
According to a fourth aspect, the embodiments of the present invention further provide a computer-readable storage medium, which stores computer instructions for causing the computer to execute the switch data updating method of any one of the first aspect and its optional embodiments.
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, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a ZTP architecture provided in accordance with an exemplary embodiment.
Fig. 2 is a flow chart of a proposed switch data update method according to an example embodiment.
Fig. 3 is a flow chart of another proposed switch data update method according to an example embodiment.
Fig. 4 is a flow chart of yet another switch data update method in accordance with an example embodiment.
Fig. 5 is a schematic diagram of another ZTP architecture provided in accordance with an example embodiment.
Fig. 6 is a timing diagram of interaction of switch data provided in accordance with an example embodiment.
Fig. 7 is a flow chart of yet another switch data update method in accordance with an exemplary embodiment.
Fig. 8 is a block diagram of a switch data update apparatus according to an example embodiment.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device according to an exemplary embodiment.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. 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 the related art, the current architecture of ZTP may be as shown in fig. 1, where fig. 1 is a schematic diagram of a ZTP architecture according to an exemplary embodiment. The ZTP architecture includes a DHCP server installed in a ZTP environment, a ZTP server, and a plurality of ZTP switches each having a ZTP client installed therein. When the ZTP switch is started, the ZTP switch can acquire the switch data required by the ZTP switch from the ZTP server through the DHCP server.
However, when there is an abnormality in network communication between the ZTP switch and the ZTP server, if the switch data is still acquired in this manner, the ZTP server may not respond accordingly, and the ZTP switch may not acquire the required switch data.
In order to solve the foregoing problems, an embodiment of the present invention provides a switch data updating method, which is used in an electronic device, and it should be noted that an execution main body of the method may be a switch data updating apparatus, and the apparatus may be implemented in a software, hardware, or a combination of software and hardware to become a part or all of the electronic device, where the electronic device may be a terminal, a client, or a server, and the server may be a server, or a server cluster composed of multiple servers, and the terminal in this embodiment of the present invention may be another intelligent hardware device such as a smart phone, a personal computer, a tablet computer, a wearable device, and an intelligent robot. In the following method embodiments, the execution subject is an electronic device as an example.
In the embodiment, the ZTP module is disposed in the electronic device, and thus, when the switch data is updated, the required switch data can be quickly acquired without contacting other electronic devices, and zero-contact configuration is realized. In the embodiment of the invention, when the switch sends the first data request to the first server to acquire the required switch data and the first server does not respond within the specified time threshold, the switch can acquire the required switch data from another switch based on the bridge connection with the other switch, so that the use requirement of a switch user can be met, and meanwhile, the acquisition mode of the switch data is more flexible, thereby being beneficial to improving the use experience of the user.
To facilitate distinguishing between the switch that issued the first acquisition request and the switch that sent the switch data, the following embodiments will employ the first switch in place of the switch that issued the first acquisition request and the second switch in place of the switch that sent the switch data.
Fig. 2 is a flow chart of a proposed switch data update method according to an example embodiment. The switch data updating method is applied to the first switch, and as shown in fig. 2, the switch data updating method includes the following steps S201 to S203.
In step S201, a first data request is sent to the first server, where the first data request is used to request switch data from the first server.
In the embodiment of the present invention, the first server is a server for providing data of the interactive machine, and may be deployed inside the server. The switch data may include configuration files and/or image files, among others. When the first switch needs to acquire the switch data, a first data request is sent to the first server to request the first server to transmit the switch data required by the first switch to the first switch.
In one implementation scenario, if the first switch is a ZTP switch, the first server may be a ZTP server.
In step S202, if the first server does not respond within the specified time threshold, a second data request is sent to the second switch.
In an embodiment of the present invention, the specified time threshold may be understood as the longest waiting time for waiting for the first server to respond. If the first server does not respond within the specified time threshold, the communication between the first server and the first switch is abnormal, and normal communication cannot be carried out between the first server and the first switch. Therefore, in order to meet the requirement of the first switch user, a second data request is sent to the second switch based on the bridging with the second switch, so as to obtain the required switch data from the second switch. The switch data in the second switch may be obtained by the first server in advance. That is, the switch data of the first switch and the second switch are both managed by the first server. In an example, the bridging between the first switch and the second switch may be a connection established based on Border Gateway Protocol (BGP).
In one embodiment, the first server has a communication connection with the plurality of switches in addition to being capable of having a communication connection with the first switch. Because the switch data of first switch and many switches are managed by first server, and all have deployed the ZTP module. Therefore, a bridging relationship can be established between the first switch and the plurality of switches based on BGP. The first switch can perform interactive access with the plurality of switches based on bridging between the first switch and the plurality of switches, and further determines the switch with the required switch data built in the plurality of switches, namely determines the second switch, so that after the second switch is determined, a second data request is sent to the second switch, and the required switch data can be obtained through the second switch.
In step S203, the switch data transmitted by the second switch is received.
In the embodiment of the present invention, the second switch responds according to the received second data request, and sends the switch data requested by the first switch to the first switch. The first switch receives the switch data sent by the second switch so as to execute relevant operations according to the received switch data. For example: and if the received switch data is a configuration file, performing configuration updating according to the configuration file. And if the received switch data is the image file, updating the system according to the image file.
In one example, the data structure of the switch data sent by the second switch is a triple structure. Wherein the triple structure is a data structure in a TLV (Type-Length-Value) encoding form. The TLV is adopted to transmit the switch data, so that the transmission mode of the switch data is more flexible and has higher expansibility, and the switch data can be smoothly transmitted to the first switch. In the switch data, a part T represents the data type of the route type, a part L represents the length of the route type, and a part V represents the value of the route type.
In another example, a specified route type is employed as the data type of the triple structure. In TLVs, part of the route types are customizable, and therefore, the customizable designated route type can be used as the route type for transmitting switch data. In an example, the Route type 201 can be selected as the specified Route type, where the Route type 201 is a Route type at a middle position later than the middle position among the plurality of customizable Route types, and the selection of the Route type is helpful for avoiding a conflict with a Route type of a new standard when a Route type of the new standard is subsequently specified, thereby helping to ensure stability of data transmission.
Through the embodiment, when the first server can not provide the switch data for the first switch, the first switch can acquire the switch data through the second switch which is bridged with the first switch, so that the mode that the first switch acquires the switch data is more flexible, the acquisition requirement that the first switch acquires the switch data can be met, and the user experience is facilitated to be improved.
Fig. 3 is a flow chart of another proposed switch data update method according to an example embodiment. As shown in fig. 3, the switch data updating method includes the following steps.
In step S301, a first data request is sent to the first server, where the first data request is used to request switch data from the first server.
In step S302, if the first server does not respond within the specified time threshold, bridging between the first switch and the plurality of switches is established based on the border gateway protocol in the specified virtual private network.
In the embodiment of the present invention, the designated Virtual Private Network may be an Ethernet Virtual Private Network (EVPN). EVPN is a VPN technology capable of implementing two-layer interworking of networks, and can provide virtual multipoint bridging connection between two different network layers through an Internet Protocol (IP) or IP/Multi-Protocol Label Switching (MPLS) backbone network. Therefore, in the specified virtual private Network, a plurality of BGP EVPN routing types may be newly added by extending Network Layer Reachability Information (NLRI) of the BGP protocol, thereby implementing bridging between the first switch and the plurality of switches.
In one embodiment, the plurality of servers that establish a bridge with the first switch may be determined by the second server. After the creation of the first switch is completed, a third data request may be sent to the second server to request the communication information of the first switch from the second server. The communication information comprises an IP address distributed for the first switch, a first server establishing communication connection with the first switch and a switch group where the first switch is located. The switch group comprises a first switch and a plurality of switches. The first switch can determine the switch group where the first switch is located according to the communication information sent by the second server, and then when the switch data cannot be obtained through the first server, the first switch is bridged with a plurality of switches in the same switch group on the basis of a border gateway protocol under a specified virtual private network so as to determine the second switch with built-in switch data through bridging.
In step S303, a second data request is sent to the second switch.
In step S304, the switch data transmitted by the second switch is received.
Through the embodiment, the switch group where the first switch is located is determined in advance through the second server, and then when the switch data cannot be obtained through the first switch, the required switch data can be obtained from other switches through bridging established between the first switch and other switches in the same switch group, so that the obtaining mode of the switch data is more convenient and flexible, and the first switch is not easily influenced by network communication between the first switch and the first server, thereby being beneficial to ensuring that the first switch can smoothly obtain the switch data.
Fig. 4 is a flow chart of yet another switch data update method in accordance with an example embodiment. As shown in fig. 4, the switch data updating method includes the following steps.
In step S401, a first data request is sent to the first server, where the first data request is used to request switch data from the first server.
In step S402, if the first server does not respond within the specified time threshold, a second data request is sent to the second switch.
In step S403, the switch data transmitted by the second switch is received.
In step S404, if the first server responds within the specified time threshold, the switch data sent by the first server is received.
In the implementation of the present invention, if the first server responds within the specified time threshold, it is characterized that the network communication state between the first server and the first switch is in a normal state, and the first server can respond according to the received first data request, so that the switch data sent by the first server is received, and the required switch data is obtained.
Through the embodiment, the first switch equipment can determine the source of the switch data according to whether the first server responds within the specified time threshold, so that the mode of obtaining the switch data is more flexible, the first switch can be favorably ensured to be smoothly updated according to the obtained switch data, and the user experience can be favorably improved.
In an implementation scenario, the architecture deployed in a ZTP environment may be as shown in fig. 5. Fig. 5 is a schematic diagram of another ZTP architecture provided in accordance with an example embodiment. Wherein, the first server may be a ZTP server in the ZTP server. The switch A, the switch B, the switch C and the switch D are all switches in the same switch group and are in network communication connection with the ZTP server. The switch groups corresponding to the switch a, the switch B, the switch C and the switch D are determined by a second server (DHCP server). The DHCP server can be deployed at the DHCP server side. In order to realize the ZTP service, a ZTP module is arranged in the switch A, the switch B, the switch C and the switch D. In order to facilitate bridging between switches in the same switch cluster, each switch supports the BGP protocol. When any switch sends a first acquisition request to the ZTP server, the switch is the first switch.
And the DHCP server is used for receiving the third data request sent by the first switch and sending the communication information of the first switch to the first switch in response to the third data request. The communication information comprises an IP address distributed for the first switch, a first server establishing communication connection with the first switch and a switch group where the first switch is located.
In the ZTP server, it is used to provide the first switch with the switch data it needs.
In another implementation scenario, referring to the ZTP architecture shown in fig. 5, the following takes switch a as a first switch, switch B as a second switch, a DHCP server as a second server, and a ZTP server as a first server, to describe an interaction process of switch data. Fig. 6 is a timing diagram of interaction of switch data provided in accordance with an example embodiment. As shown in fig. 6, after the creation of switch a is completed, a third data request (DHCP request packet) is sent to the DHCP server. And the DHCP server responds according to the received third data request to obtain the IP address distributed for the switch A, the ZTP server establishing communication connection with the switch A and the switch group where the switch A is located. Wherein the switch cluster includes switch B. When the switch A needs the switch data, a first data request is sent to the ZTP server. If the ZTP server does not respond within the specified time threshold, the second switch with built-in switch data is determined through bridging with a plurality of switches in the same switch group. When the second switch is determined to be switch B, a second acquisition request (EVPN custom packet) is sent to switch B. And the switch B responds according to the received second data request and transmits the switch data to the switch A. And the switch A updates according to the received switch data.
In yet another implementation scenario, the update process of the switch data may be as shown in fig. 7. Fig. 7 is a flow chart of yet another switch data update method in accordance with an exemplary embodiment.
In step S701, an IP address of the first switch, a first server establishing a communication connection with the first switch, and a switch group where the first switch is located are obtained through the DHCP server.
In step S702, a first data request is transmitted to the ZTP server.
In step S703, if the ZTP server does not respond within the specified time threshold, bridging is established with a plurality of switches in the same switch group based on the BGP protocol.
In step S704, a data acquisition request is transmitted to the plurality of switches, and it is determined whether or not there is a second switch having the switch data built therein.
In step S705, when it is determined that the second switch exists, a second data acquisition request is sent to the second switch to acquire switch data from the second switch.
In step S706, the switch data sent by the second switch is received, and the update is completed.
In step S707, if the ZTP server responds within the predetermined time threshold, the switch data transmitted by the ZTP server is received, and the update is completed.
Based on the same inventive concept, the invention also provides a data updating device of the switch.
Fig. 8 is a block diagram of a switch data update apparatus according to an example embodiment. As shown in fig. 8, the switch data updating apparatus includes: a first transmitting unit 801, a second transmitting unit 802 and a receiving unit 803.
A first sending unit 801, configured to send a first data request to a first server, where the first data request is used to request switch data from the first server, and the switch data includes a configuration file and/or an image file;
a second sending unit 802, configured to send a second data request to a second switch if the first server does not respond within a specified time threshold, where the second data request is used to request switch data from the second switch, and the second switch is bridged with the first switch;
a receiving unit 803, configured to receive the switch data sent by the second switch.
In an embodiment, the second sending unit 802 includes: the first determining unit is used for determining a second switch with built-in switch data from a plurality of switches bridged with the first switch, and the switches are all switches which are in communication interaction with the first server. And the second sending subunit is used for sending a second data request to a second switch with built-in switch data.
In another embodiment, the apparatus further comprises: and the interaction unit is used for establishing bridging between the first switch and the plurality of switches based on the border gateway protocol under the appointed virtual private network.
In yet another embodiment, the interaction unit includes: and the third sending unit is used for sending a third data request to the second server, and the third data request is used for requesting the communication information of the first switch from the second server. And the information receiving unit is used for receiving the communication information sent by the second server and determining the switch group where the first switch is located, wherein the switch group comprises the first switch and a plurality of switches. And the bridging unit is used for bridging with a plurality of switches based on the border gateway protocol under the appointed virtual private network.
In yet another embodiment, the apparatus further comprises: and the data receiving unit is used for receiving the switch data sent by the first server if the first server responds within the specified time threshold.
For the specific limitations and beneficial effects of the switch data updating apparatus, reference may be made to the limitations of the switch data updating method in the foregoing, and details are not described herein again. The various modules described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent of a processor in the electronic device, or can be stored in a memory in the electronic device in a software form, so that the processor can call and execute operations corresponding to the modules.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device according to an exemplary embodiment. As shown in fig. 9, the apparatus includes one or more processors 910 and a storage 920, where the storage 920 includes a persistent memory, a volatile memory, and a hard disk, and one processor 910 is taken as an example in fig. 9. The apparatus may further include: an input device 930 and an output device 940.
The processor 910, the memory 920, the input device 930, and the output device 940 may be connected by a bus or other means, and fig. 9 illustrates an example of a connection by a bus.
Processor 910 may be a Central Processing Unit (CPU). The Processor 910 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or any combination thereof. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 920 is a non-transitory computer readable storage medium, including a persistent memory, a volatile memory, and a hard disk, and can be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the service management method in this embodiment of the present application. The processor 910 executes various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 920, so as to implement any of the above switch data updating methods.
The memory 920 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data used as needed or desired, and the like. Further, the memory 920 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 920 may optionally include memory located remotely from the processor 910, which may be connected to a data processing device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 930 may receive input numeric or character information and generate key signal inputs related to user settings and function control. The output device 940 may include a display device such as a display screen.
One or more modules are stored in the memory 920 and, when executed by the one or more processors 910, perform the methods illustrated in fig. 2-7.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. Details of the technique not described in detail in the present embodiment may be specifically referred to the related descriptions in the embodiments shown in fig. 2 to fig. 7.
Embodiments of the present invention further provide a non-transitory computer storage medium, where a computer-executable instruction is stored in the computer storage medium, and the computer-executable instruction may execute the authentication method in any of the above method embodiments. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

Claims (10)

1. A switch data updating method is applied to a first switch, and comprises the following steps:
sending a first data request to a first server, wherein the first data request is used for requesting switch data from the first server, and the switch data comprises a configuration file and/or an image file;
if the first server does not respond within a specified time threshold, sending a second data request to a second switch, wherein the second data request is used for requesting the switch data from the second switch, and the second switch is bridged with the first switch;
and receiving the switch data sent by the second switch.
2. The method of claim 1, wherein sending the second data request to the second switch comprises:
determining a second switch in which the switch data is embedded from a plurality of switches bridged with the first switch, wherein the plurality of switches are all switches which are in communication interaction with the first server;
and sending a second data request to a second switch with the built-in switch data.
3. The method of claim 2, wherein prior to sending the second data request to the second switch, the method further comprises:
establishing a bridge between the first switch and the plurality of switches based on a border gateway protocol under a designated virtual private network.
4. The method of claim 2, wherein bridging the plurality of switches based on a border gateway protocol under the designated virtual private network comprises:
sending a third data request to a second server, wherein the third data request is used for requesting the communication information of the first switch from the second server;
receiving the communication information sent by the second server, and determining a switch group where the first switch is located, wherein the switch group comprises the first switch and the switches;
bridging with the plurality of switches based on a border gateway protocol under the designated virtual private network.
5. The method of claim 1, wherein the data structure of the switch data sent by the second switch is a triple structure.
6. The method of claim 5, wherein a specified routing type is employed as the data type of the triplet structure.
7. The method of claim 1, further comprising:
and if the first server responds within the specified time threshold, receiving the switch data sent by the first server.
8. A switch data update apparatus, applied to a first switch, the apparatus comprising:
the device comprises a first sending unit, a second sending unit and a first processing unit, wherein the first sending unit is used for sending a first data request to a first server, the first data request is used for requesting switch data from the first server, and the switch data comprises a configuration file and/or an image file;
a second sending unit, configured to send a second data request to a second switch if the first server does not respond within a specified time threshold, where the second data request is used to request the switch data from the second switch, and the second switch is bridged with the first switch;
and the receiving unit is used for receiving the switch data sent by the second switch.
9. An electronic device, comprising a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the switch data updating method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing computer instructions for causing a computer to perform the switch data update method of any one of claims 1-7.
CN202210321564.XA 2022-03-30 2022-03-30 Switch data updating method and device, electronic equipment and medium Pending CN114422360A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210321564.XA CN114422360A (en) 2022-03-30 2022-03-30 Switch data updating method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210321564.XA CN114422360A (en) 2022-03-30 2022-03-30 Switch data updating method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN114422360A true CN114422360A (en) 2022-04-29

Family

ID=81263655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210321564.XA Pending CN114422360A (en) 2022-03-30 2022-03-30 Switch data updating method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN114422360A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468168A (en) * 2013-09-18 2015-03-25 华为技术有限公司 Network recovery method, controller and switch
CN105933253A (en) * 2016-04-13 2016-09-07 浪潮集团有限公司 Switch configuration recovery method in SDN (Software Defined Networking)
CN112152942A (en) * 2020-09-04 2020-12-29 苏州浪潮智能科技有限公司 ZTP backup method and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468168A (en) * 2013-09-18 2015-03-25 华为技术有限公司 Network recovery method, controller and switch
CN105933253A (en) * 2016-04-13 2016-09-07 浪潮集团有限公司 Switch configuration recovery method in SDN (Software Defined Networking)
CN112152942A (en) * 2020-09-04 2020-12-29 苏州浪潮智能科技有限公司 ZTP backup method and equipment

Similar Documents

Publication Publication Date Title
EP3223472B1 (en) Service migration method, apparatus and system for data center
US11258667B2 (en) Network management method and related device
US9509728B2 (en) Software defined networking systems and methods via a path computation and control element
CN107809367B (en) Device online method of SDN (software defined network), SDN controller and network device
US10361992B2 (en) Method for synchronizing virtual machine location information between data center gateways, gateway, and system
CN110750393B (en) Method, device, medium and equipment for avoiding network service double-machine hot standby brain cracking
CN111262665B (en) Data communication method, device, controller and system
CN107113892A (en) A kind of method and device of gateway device automatic network-building
CN103916277A (en) Method and device for not interrupting forwarding service in rebooting process
CN110784549A (en) Network node selection method and device, first network node and storage medium
CN108900441B (en) Network switching method, first electronic device and readable storage medium
CN114124697A (en) Network switching method, network switching device and storage medium
CN102118422B (en) The peer node of RELOAD peer-to-peer network and the update method of configuration thereof and system
CN113254148A (en) Virtual machine migration method and cloud management platform
CN109302328B (en) Hot standby switching method and system for VXLAN (virtual extensible local area network)
CN114422360A (en) Switch data updating method and device, electronic equipment and medium
CN110830598A (en) Method and network equipment for establishing and transmitting interface address and alias in BGP (Border gateway protocol) session
CN117882340A (en) Coordinated reconnection for roll-unknown to clients of network nodes
CN105915455B (en) Method and device for realizing position identification separation protocol multi-homing
US9019964B2 (en) Methods and systems for routing application traffic
CN110417599B (en) Main/standby node switching method and node server
US20230198902A1 (en) Control plane driven summarization in a network
CN110430268B (en) Static resource routing method and device based on distributed service
CN110958182B (en) Communication method and related equipment
CN114079584A (en) Method and device for keeping user terminal alive

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220429