CN110995496A - Method and device for synchronizing time of white box switch in batches - Google Patents

Method and device for synchronizing time of white box switch in batches Download PDF

Info

Publication number
CN110995496A
CN110995496A CN201911287826.XA CN201911287826A CN110995496A CN 110995496 A CN110995496 A CN 110995496A CN 201911287826 A CN201911287826 A CN 201911287826A CN 110995496 A CN110995496 A CN 110995496A
Authority
CN
China
Prior art keywords
time
switch system
mapping table
mode
switch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911287826.XA
Other languages
Chinese (zh)
Other versions
CN110995496B (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.)
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 CN201911287826.XA priority Critical patent/CN110995496B/en
Publication of CN110995496A publication Critical patent/CN110995496A/en
Application granted granted Critical
Publication of CN110995496B publication Critical patent/CN110995496B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • 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/0843Configuration by using pre-existing information, e.g. using templates or copying from other elements based on generic templates
    • 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/26Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using dedicated tools for LAN [Local Area Network] management

Landscapes

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

Abstract

The invention provides a method and a device for synchronizing time of white box switches in batches, which comprises the following steps: each switch system in the same local area network sends a broadcast message to the local area network, and transmits the IP address and the time mode of the switch system back to the sent switch system in response to receiving the broadcast messages of other switches; the sent exchanger system analyzes the received information and locally maintains a mapping table of the IP address and the time mode thereof; in response to receiving a configuration instruction containing a time mode, any switch system updates a local maintained mapping table according to the time mode so as to modify the time modes corresponding to all IP addresses in the mapping table into the time mode; the switch system traverses the updated mapping table to send a synchronization time instruction to each IP address recorded by the switch system, and the switch system corresponding to each IP address modifies the time mode of the switch system into the corresponding time mode in the mapping table. The invention automatically updates the time synchronization configuration, thereby saving the operation and maintenance cost.

Description

Method and device for synchronizing time of white box switch in batches
Technical Field
The present invention relates to the field of computers, and more particularly, to a method and apparatus for synchronizing white box switch time in batches.
Background
The white box switch is a new switch construction system with separated software and hardware. By purchasing bare switch hardware of ODM (original design manufacturer), and matching with some optional open source operating systems, a complete switch system can be formed and sold to customers. The BMC (baseboard management controller) is a control chip which can remotely operate a CPU on a white box switch mainboard, is a system independent of a switch CPU end, can remotely monitor some performance indexes on a switch system, and performs a series of operations such as startup and shutdown operations, firmware upgrading, equipment checking and the like on the switch.
The BMC small system and the CPU end can respectively run two independent Linux-based operating systems, the BMC system is responsible for monitoring some hardware indexes, and the CPU end system (such as SONIC) can execute operations related to exchange services. In a data center of considerable size, a considerable number of white box switches are deployed and interconnected with each other to form a huge local area network. Time synchronization between each switch device is a critical issue in order to ensure that some software services on the switch system are functioning properly.
The current common method is that when the Clock source of the system needs to be modified, no matter an RTC (Real Time Clock) hardware Clock on the motherboard or a remote NTP (Network Time Protocol) server is set, the RTC hardware Clock and the remote NTP hardware Clock need to enter the operating system of each machine for independent configuration. When the machine room machines are huge, a large amount of manpower and time are consumed for system synchronization time one by one, and the operation and maintenance cost is high.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method and an apparatus for synchronizing white box switch time in batches, so as to solve the problem of low time efficiency of a system of synchronizing white box switches in a large-scale data center, and save labor maintenance cost.
Based on the above object, an aspect of the embodiments of the present invention provides a method for synchronizing white box switch time in batches, including the following steps:
each switch system in the same local area network sends a broadcast message to the local area network, and transmits the IP address and the time mode of the switch system back to the sent switch system in response to receiving the broadcast messages of other switches;
the sent exchanger system analyzes the received information and locally maintains a mapping table of the IP address and the time mode thereof;
in response to receiving a configuration instruction containing a time mode, any switch system in the local area network updates a locally maintained mapping table according to the time mode so as to modify the time modes corresponding to all IP addresses in the mapping table into the time mode;
and traversing the updated mapping table by the switch system to send a synchronous time instruction to each IP address recorded by the switch system, wherein the switch system corresponding to each IP address modifies the time mode of the switch system into the corresponding time mode in the mapping table.
In some embodiments, the switch system includes a BMC system and a CPU system.
In some embodiments, the respective port numbers of the BMC system and the CPU system are different, and each system only monitors messages between the systems.
In some embodiments, the BMC system and the CPU system each maintain a mapping table of the IP address of their respective systems and their temporal mode locally.
In some embodiments, the time mode comprises a real time clock chip mode or a network time protocol mode.
In some embodiments, modifying the time pattern of the switch system corresponding to each IP address to the corresponding time pattern in the mapping table comprises:
in response to the time mode being a network time protocol mode, setting an address of the network time protocol server in the switch system and restarting its network time protocol service to synchronize time from the network time protocol server;
in response to the time mode being a real time clock chip mode, the switch system synchronizes time from system hardware.
Another aspect of the embodiments of the present invention provides an apparatus for synchronizing time of white box switches in batches, including:
at least one processor; and
a memory storing program code executable by the processor, the program code implementing the following steps when executed by the processor:
each switch system in the same local area network sends a broadcast message to the local area network, and transmits the IP address and the time mode of the switch system back to the sent switch system in response to receiving the broadcast messages of other switches;
the transmitted switch system parses the received information and maintains it locally
A mapping table of IP addresses and their time patterns;
in response to receiving a configuration instruction containing a time mode, any switch system in the local area network updates a locally maintained mapping table according to the time mode so as to modify the time modes corresponding to all IP addresses in the mapping table into the time mode;
and traversing the updated mapping table by the switch system to send a synchronous time instruction to each IP address recorded by the switch system, wherein the switch system corresponding to each IP address modifies the time mode of the switch system into the corresponding time mode in the mapping table.
In some embodiments, the switch system includes a BMC system and a CPU system.
In some embodiments, the respective port numbers of the BMC system and the CPU system are different, and each system only monitors messages between the systems.
In some embodiments, the BMC system and the CPU system each maintain a mapping table of the IP address of their respective systems and their temporal mode locally.
The invention has the following beneficial technical effects: according to the method and the device for synchronizing the time of the white box switches in batches, provided by the embodiment of the invention, the operation and maintenance personnel only need to know the IP of any switch system in the local area network, simply modify the automatic configuration script and operate, and the switch systems in the same local area network can automatically update the time synchronization configuration, so that the operation and maintenance cost is greatly saved, and the working efficiency is improved.
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 only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a flow chart of a method of bulk synchronizing white box switch time according to the present invention;
fig. 2 is a schematic diagram of a hardware structure of an apparatus for synchronizing the time of white box switches in batches according to the present invention.
Detailed Description
Embodiments of the present invention are described below. However, it is to be understood that the disclosed embodiments are merely examples and that other embodiments may take various and alternative forms. The figures are not necessarily to scale; certain features may be exaggerated or minimized to show details of particular components. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a representative basis for teaching one skilled in the art to variously employ the present invention. As one of ordinary skill in the art will appreciate, various features illustrated and described with reference to any one of the figures may be combined with features illustrated in one or more other figures to produce embodiments that are not explicitly illustrated or described. The combination of features shown provides a representative embodiment for a typical application. However, various combinations and modifications of the features consistent with the teachings of the present invention may be desired for certain specific applications or implementations.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
In view of the above object, an aspect of the embodiments of the present invention provides a method for synchronizing white box switch time in batches, as shown in fig. 1, including the following steps:
step S101: each switch system in the same local area network sends a broadcast message to the local area network, and transmits the IP address and the time mode of the switch system back to the sent switch system in response to receiving the broadcast messages of other switches;
step S102: the sent exchanger system analyzes the received information and locally maintains a mapping table of the IP address and the time mode thereof;
step S103: in response to receiving a configuration instruction containing a time mode, any switch system in the local area network updates a locally maintained mapping table according to the time mode so as to modify the time modes corresponding to all IP addresses in the mapping table into the time mode;
step S104: and traversing the updated mapping table by the switch system to send a synchronous time instruction to each IP address recorded by the switch system, wherein the switch system corresponding to each IP address modifies the time mode of the switch system into the corresponding time mode in the mapping table.
In some embodiments, the switch system includes a BMC system and a CPU system. Because the method for synchronizing time has universality no matter in a BMC system, a CPU system or other possible systems needing the synchronizing time.
In some embodiments, the respective port numbers of the messages of the BMC system and the CPU system are different, and each of the systems only monitors the messages between the systems and are independent of each other.
In some embodiments, the BMC system and the CPU system each maintain a mapping table of the IP address of their respective systems and their time patterns locally. The BMC system and the CPU system respectively maintain a mapping table of the system and do not influence each other.
In some embodiments, the time mode comprises a real time clock chip mode (RTC) or a network time protocol mode (NTP).
In some embodiments, modifying the time pattern of the switch system corresponding to each IP address to the corresponding time pattern in the mapping table comprises: in response to the time mode being a network time protocol mode, setting an address of the network time protocol server in the switch system and restarting its network time protocol service to synchronize time from the network time protocol server; in response to the time mode being a real time clock chip mode, the switch system synchronizes time from system hardware.
In an embodiment according to the present invention, after a switch system in the same lan is powered on, UDP (User Datagram Protocol) broadcast messages are sent to the local area network at regular time and in sequence, for example, sent every minute in sequence, and the period is determined according to the actual situation; meanwhile, each switch system also receives UDP broadcast messages sent by other systems in the local area network, and the messages are used for informing the receiving end to reply the IP address of the receiving end and the current time synchronization mode of the receiving end. The CPU system and the BMC system have different UDP message port numbers, only monitor messages between the systems and are independent of each other. When the on-line system receives the broadcast message, it will transmit its own IP address and its current time pattern (RTC or NTP) to the sending switch. The transmitted switch system receives the return information message, analyzes the IP address of the receiving end and its current time synchronization mode from the return information message, and maintains a mapping table locally, as shown in table 1. The BMC system and the CPU system maintain mapping tables of the system locally respectively and do not affect each other.
IP address Time synchronization mode
100.1.1.2 NTP
100.1.1.3 RTC
TABLE 1
As can be seen from the above description, each switch system is both a sending end and a receiving end, and after a period of time, the system of each switch maintains such a complete mapping table, from which the IP addresses and time synchronization patterns of all systems in the lan can be found.
The automated configuration script is designed to send a configuration instruction to any switch system in the lan, where the instruction is, for example, as follows:
start-time-sync.sh–t bmc–ip 100.1.1.2–m ntp–n ntp1.com
start-time-sync.sh–t cpu–ip 100.100.100.2–m rtc
wherein, the instruction parameter includes: -t: a target system type; -ip: a target system IP address; -m: a time synchronization mode; -n: if the mode is NTP, an NTP server address needs to be provided. After receiving the instruction, the target system analyzes the field content of the m mode in the instruction, updates a mapping table maintained locally, and modifies all time modes into modes required by the instruction; after updating the local mapping table, the system starts traversing the mapping table, and sends a synchronization time instruction to each IP address in the table, for example:
execute-time-sync–p 100.1.2.3–m ntp|rtc
after receiving the instruction, the target system corresponding to the IP address resolves the synchronization mode of the-m field, then updates the time synchronization configuration of the local system, and actually executes the synchronization time operation: if the mode is NTP, setting the NTP server address, and then restarting the NTP server to update the time; if the mode is RTC, the slave system hardware synchronizes the time.
Where technically feasible, the technical features listed above for the different embodiments may be combined with each other or changed, added, omitted, etc. to form further embodiments within the scope of the invention.
It can be seen from the foregoing embodiments that, with the method for synchronizing white box switch time in batches provided by the embodiments of the present invention, an operation and maintenance worker only needs to know the IP of any switch system in a local area network, simply modify an automatic configuration script and operate, and the switch systems in the same local area network will automatically update time synchronization configuration, thereby greatly saving operation and maintenance cost and improving work efficiency.
In another aspect, an apparatus for synchronizing white box switch time in batches is provided, including:
at least one processor; and
a memory storing program code executable by the processor, the program code implementing the following steps when executed by the processor:
each switch system in the same local area network sends a broadcast message to the local area network, and transmits the IP address and the time mode of the switch system back to the sent switch system in response to receiving the broadcast messages of other switches;
the transmitted switch system parses the received information and maintains it locally
A mapping table of IP addresses and their time patterns;
in response to receiving a configuration instruction containing a time mode, any switch system in the local area network updates a locally maintained mapping table according to the time mode so as to modify the time modes corresponding to all IP addresses in the mapping table into the time mode;
and traversing the updated mapping table by the switch system to send a synchronous time instruction to each IP address recorded by the switch system, wherein the switch system corresponding to each IP address modifies the time mode of the switch system into the corresponding time mode in the mapping table.
In some embodiments, the switch system includes a BMC system and a CPU system.
In some embodiments, the respective port numbers of the BMC system and the CPU system are different, and each system only monitors messages between the systems.
In some embodiments, the BMC system and the CPU system each maintain a mapping table of the IP address of their respective systems and their time patterns locally.
Fig. 2 is a schematic hardware structural diagram of an embodiment of the apparatus for bulk synchronizing a white box switch time according to the present invention.
Taking the computer device shown in fig. 2 as an example, the computer device includes a processor 201 and a memory 202, and may further include: an input device 203 and an output device 204.
The processor 201, the memory 202, the input device 203 and the output device 204 may be connected by a bus or other means, and fig. 2 illustrates the connection by a bus as an example.
The memory 202, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the method for batch synchronization of whitebox switch times in the embodiments of the present application. The processor 201 executes various functional applications of the server and data processing by running nonvolatile software programs, instructions and modules stored in the memory 202, i.e., the method for batch-synchronized white box switch time of the above-described method embodiment.
The memory 202 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 created according to a method of synchronizing the time of the white box switches in batches, and the like. Further, the memory 202 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 202 may optionally include memory located remotely from processor 201, which may be connected to local modules 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 203 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus of the method of batch synchronizing white box exchange time. The output device 204 may include a display device such as a display screen.
Program instructions/modules corresponding to the one or more methods of bulk synchronizing white box switch time are stored in the memory 202 and, when executed by the processor 201, perform the method of bulk synchronizing white box switch time in any of the above-described method embodiments.
Any embodiment of the computer device executing the method for batch synchronization of the white box switch time can achieve the same or similar effects as any corresponding method embodiment.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
In addition, the apparatuses, devices and the like disclosed in the embodiments of the present invention may be various electronic terminal devices, such as a mobile phone, a Personal Digital Assistant (PDA), a tablet computer (PAD), a smart television and the like, or may be a large terminal device, such as a server and the like, and therefore the scope of protection disclosed in the embodiments of the present invention should not be limited to a specific type of apparatus, device. The client disclosed in the embodiment of the present invention may be applied to any one of the above electronic terminal devices in the form of electronic hardware, computer software, or a combination of both.
Furthermore, the method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method disclosed in the embodiments of the present invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) described herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions described herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, or the like.
The above-described embodiments are possible examples of implementations and are presented merely for a clear understanding of the principles of the invention. Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of an embodiment of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A method for synchronizing white box switch time in batches, comprising the steps of:
each switch system in the same local area network sends a broadcast message to the local area network, and transmits the IP address and the time mode of the switch system back to the sent switch system in response to receiving the broadcast messages of other switches;
the sent exchanger system analyzes the received information and locally maintains a mapping table of the IP address and the time mode thereof;
in response to receiving a configuration instruction containing a time mode, any switch system in the local area network updates a locally maintained mapping table according to the time mode so as to modify the time modes corresponding to all IP addresses in the mapping table into the time mode;
and traversing the updated mapping table by the switch system to send a synchronous time instruction to each IP address recorded by the switch system, wherein the switch system corresponding to each IP address modifies the time mode of the switch system into the corresponding time mode in the mapping table.
2. The method of claim 1, wherein the switch system comprises a BMC system and a CPU system.
3. The method of claim 2, wherein the respective port numbers of the BMC system and the CPU system are different, and each system only listens for messages between the systems.
4. The method of claim 3, wherein the BMC system and the CPU system each maintain a mapping table locally of IP addresses of their respective systems to their temporal patterns.
5. The method of claim 1, wherein the time mode comprises a real time clock chip mode or a network time protocol mode.
6. The method of claim 5, wherein modifying the time pattern of the switch system corresponding to each IP address to the corresponding time pattern in the mapping table comprises:
in response to the time mode being a network time protocol mode, setting an address of the network time protocol server in the switch system and restarting its network time protocol service to synchronize time from the network time protocol server;
in response to the time mode being a real time clock chip mode, the switch system synchronizes time from system hardware.
7. An apparatus for synchronizing white box switch time in batches, comprising:
at least one processor; and
a memory storing program code executable by the processor, the program code implementing the following steps when executed by the processor:
each switch system in the same local area network sends a broadcast message to the local area network, and transmits the IP address and the time mode of the switch system back to the sent switch system in response to receiving the broadcast messages of other switches;
the sent exchanger system analyzes the received information and locally maintains a mapping table of the IP address and the time mode thereof;
in response to receiving a configuration instruction containing a time mode, any switch system in the local area network updates a locally maintained mapping table according to the time mode so as to modify the time modes corresponding to all IP addresses in the mapping table into the time mode;
and traversing the updated mapping table by the switch system to send a synchronous time instruction to each IP address recorded by the switch system, wherein the switch system corresponding to each IP address modifies the time mode of the switch system into the corresponding time mode in the mapping table.
8. The apparatus of claim 7, wherein the switch system comprises a BMC system and a CPU system.
9. The apparatus of claim 8, wherein the respective port numbers of the BMC system and the CPU system are different, and each system only listens for messages between the systems.
10. The apparatus of claim 9 wherein the BMC system and the CPU system each maintain a mapping table of IP addresses of their respective systems and their time modes locally.
CN201911287826.XA 2019-12-15 2019-12-15 Method and device for synchronizing time of white box switch in batches Active CN110995496B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911287826.XA CN110995496B (en) 2019-12-15 2019-12-15 Method and device for synchronizing time of white box switch in batches

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911287826.XA CN110995496B (en) 2019-12-15 2019-12-15 Method and device for synchronizing time of white box switch in batches

Publications (2)

Publication Number Publication Date
CN110995496A true CN110995496A (en) 2020-04-10
CN110995496B CN110995496B (en) 2022-05-13

Family

ID=70093708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911287826.XA Active CN110995496B (en) 2019-12-15 2019-12-15 Method and device for synchronizing time of white box switch in batches

Country Status (1)

Country Link
CN (1) CN110995496B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115150345A (en) * 2022-06-28 2022-10-04 苏州浪潮智能科技有限公司 Management method and device for BMC of white box switch and white box switch
CN115174374A (en) * 2022-06-30 2022-10-11 苏州浪潮智能科技有限公司 System, method, device and medium for configuring network time synchronization tool
CN115442231A (en) * 2022-08-31 2022-12-06 苏州浪潮智能科技有限公司 Method, device, equipment and medium for managing white list information of switch

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105634635A (en) * 2014-11-07 2016-06-01 杭州华为数字技术有限公司 Real-time clock (RTC) sharing method, device and system
CN106506107A (en) * 2016-11-25 2017-03-15 中国科学院武汉物理与数学研究所 A kind of ntp server time service implementation method based on hardware timestamping
CN110336636A (en) * 2019-07-26 2019-10-15 新华三技术有限公司成都分公司 Method for synchronizing time, device and baseboard management controller
CN110493061A (en) * 2019-08-30 2019-11-22 浪潮软件股份有限公司 A kind of management method and system of NTP cluster

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105634635A (en) * 2014-11-07 2016-06-01 杭州华为数字技术有限公司 Real-time clock (RTC) sharing method, device and system
CN106506107A (en) * 2016-11-25 2017-03-15 中国科学院武汉物理与数学研究所 A kind of ntp server time service implementation method based on hardware timestamping
CN110336636A (en) * 2019-07-26 2019-10-15 新华三技术有限公司成都分公司 Method for synchronizing time, device and baseboard management controller
CN110493061A (en) * 2019-08-30 2019-11-22 浪潮软件股份有限公司 A kind of management method and system of NTP cluster

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115150345A (en) * 2022-06-28 2022-10-04 苏州浪潮智能科技有限公司 Management method and device for BMC of white box switch and white box switch
CN115150345B (en) * 2022-06-28 2023-08-18 苏州浪潮智能科技有限公司 Management method and device of BMC of white-box switch and white-box switch
CN115174374A (en) * 2022-06-30 2022-10-11 苏州浪潮智能科技有限公司 System, method, device and medium for configuring network time synchronization tool
CN115174374B (en) * 2022-06-30 2023-08-22 苏州浪潮智能科技有限公司 System, method, equipment and medium for configuring network time synchronization tool
CN115442231A (en) * 2022-08-31 2022-12-06 苏州浪潮智能科技有限公司 Method, device, equipment and medium for managing white list information of switch
CN115442231B (en) * 2022-08-31 2023-08-25 苏州浪潮智能科技有限公司 Method, device, equipment and medium for managing switch white list information

Also Published As

Publication number Publication date
CN110995496B (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN110995496B (en) Method and device for synchronizing time of white box switch in batches
CN107800565B (en) Inspection method, inspection device, inspection system, computer equipment and storage medium
CN110597918B (en) Account management method, account management device and computer readable storage medium
CN111177043B (en) Method, system, device and medium for accelerating reading of field replaceable unit information
CN105279210A (en) Automatic mode switching in a synchronous replication environment
JP2018536226A (en) Data transmission method and apparatus
CN103974380A (en) Terminal access position keep-alive method and device
JP2016164775A (en) Field device commissioning system and method
CN110825772A (en) Method and device for synchronizing memory data of multiple service instances and storage medium
WO2016026313A1 (en) Method, device and system for implementing information self-registration, and computer storage medium
CN101751265B (en) Updating system of basic input/output system of server and method thereof
CN111934969A (en) Maintenance method and device of MAC forwarding table
CN105812180A (en) Network device configuration system and method
CN107086937A (en) A kind of monitoring method and equipment
CN107633026B (en) data synchronization exception handling method and device and server
CN112099902A (en) Network adapter configuration method and device of virtual machine, electronic device and storage medium
CN104168145A (en) System and method for conducting wireless updating on wireless communication units
CN110071778B (en) Time synchronization method, device, equipment and medium
US11177977B2 (en) Method and system for GRE tunnel control based on client activity detection
CN111106957A (en) Method and device for upgrading firmware of switch in batches
CN111130861B (en) Method and device for stateless automatic management of whole cabinet equipment
CN110780905B (en) BMC software updating method and device based on USB interface
CN113711570B (en) Method and system for enabling a computing device to communicate with a cloud network
CN112636943B (en) Optical transport network cluster upgrading method, device, equipment and storage medium
CN105338398A (en) Set top box management method, device and system

Legal Events

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