CN115442231B - Method, device, equipment and medium for managing switch white list information - Google Patents

Method, device, equipment and medium for managing switch white list information Download PDF

Info

Publication number
CN115442231B
CN115442231B CN202211052253.4A CN202211052253A CN115442231B CN 115442231 B CN115442231 B CN 115442231B CN 202211052253 A CN202211052253 A CN 202211052253A CN 115442231 B CN115442231 B CN 115442231B
Authority
CN
China
Prior art keywords
switch
information
white list
modified
switches
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211052253.4A
Other languages
Chinese (zh)
Other versions
CN115442231A (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 CN202211052253.4A priority Critical patent/CN115442231B/en
Publication of CN115442231A publication Critical patent/CN115442231A/en
Application granted granted Critical
Publication of CN115442231B publication Critical patent/CN115442231B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • 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/02Standardisation; Integration
    • H04L41/024Standardisation; Integration using relational databases for representation of network management data, e.g. managing via structured query language [SQL]
    • 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/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/101Access control lists [ACL]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for managing switch white list information, which relate to the technical field of computers and comprise the following steps: recording the IP addresses and the current white list information of all switches in the machine room through a switch management machine; when the switch management machine receives a command for modifying the current white list information, determining a switch to be modified, acquiring modification information, and sending a target information message generated based on the modification information to the switch to be modified; analyzing the target information message through the switch to be modified, modifying the current white list information by calling the white list service, and storing the modified white list information. The application can manage all the switches in the machine room through one switch management machine, can send the modification information to the switches needing modification, and can realize unified maintenance and management of the whitelist by calling the whitelist service to carry out batch configuration on the whitelist.

Description

Method, device, equipment and medium for managing switch white list information
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for managing white list information of a switch.
Background
The switch may have a telnet function when in use, which is a function of remotely accessing the switch, through which various operations can be logged onto the switch. However, for the security of the switch, a function is required to limit the unidentified machine from logging into the switch using telnet function, so as to prevent the unidentified machine from damaging the switch or stealing internal information. Therefore, the switch needs a white list function to restrict unidentified machine connection switches, and when other end machines attempt to connect to the switch, the end machine IP (Internet Protocol Address ) will be matched to the switch white list information, and if the IP is not set to white list, connection to the switch is prohibited.
However, within a large machine room, many switches are deployed. If each switch is configured solely by human power, the routine maintenance work wastes a lot of human resources. Thus, there is a need for a more efficient way to maintain white list functionality.
Disclosure of Invention
Accordingly, the present application is directed to a method, apparatus, device and storage medium for managing white list information of a switch, which can manage all switches in a machine room by a single switch management machine, send modification information to the switches to be modified, and implement unified maintenance and management of white lists by calling white list service to perform batch configuration on the white list. The specific scheme is as follows:
in a first aspect, the present application discloses a method for managing white list information of a switch, including:
recording the IP addresses and the current white list information of all switches in the machine room through a switch management machine;
when the switch management machine receives a command for modifying the current white list information of the switch, determining a switch to be modified according to the IP address, acquiring modification information corresponding to the switch to be modified, and sending a target information message generated based on the modification information to the corresponding switch to be modified;
after the switch to be modified acquires the target information message, the target information message is analyzed, the current white list information of the switch to be modified is correspondingly modified by calling white list service, modified white list information is obtained, and the modified white list information is stored.
Optionally, the switch white list information management method further includes:
and forming the switch management machine and all the switches in the machine room into the same local area network, and creating a communication port between the switch management machine and the switches.
Optionally, the recording, by the switch management machine, the IP addresses and the current whitelist information of all switches in the machine room includes:
and recording the IP addresses and the current white list information of all the switches in the machine room into a relational database of the switch management machine.
Optionally, the recording the IP addresses and the current white list information of all switches in the machine room to a relational database of the switch management machine includes:
broadcasting inquiry information messages formed by the switch management machine based on the IP address and the inquiry mark of the switch management machine to all switches in the same local area network and machine room in sequence;
after the switch acquires the inquiry information message, the inquiry information message is analyzed, the IP address of the switch and the pre-established white list information on the communication port are inquired to obtain the IP address and the current white list information of all the switches, and then a new information message generated based on the IP address and the current white list information of the switches is sent to the switch management machine through the communication port so as to store the IP address and the current white list information of the switches through a relational database in the switch management machine.
Optionally, the storing the modified whitelist information includes:
and storing the modified white list information into a system file used for reading and storing the white list information in the switch to be modified, and synchronizing the modified white list information into the relational database and a pre-created d-bus interface.
Optionally, the switch white list information management method further includes:
when other terminal machines try to connect any switch in the machine room, the IP addresses of the other terminal machines are obtained, and the IP addresses of the other terminal machines are matched with the white list information on the communication port to obtain a matching result;
if the matching result shows that the IP address of the other terminal machine is not set to be a white list, the other terminal machine is forbidden to be connected with any switch;
and if the matching result shows that the IP addresses of the other terminal machines are set to be white lists, connecting the other terminal machines with any switch.
Optionally, the determining the switch to be modified according to the IP address, obtaining modification information corresponding to the switch to be modified, and sending a target information message generated based on the modification information to the corresponding switch to be modified, where the determining includes:
determining a plurality of switches to be modified according to the IP addresses, and acquiring modification information corresponding to the plurality of switches to be modified;
sorting the plurality of switches to be modified according to the IP address to obtain a target queue;
and sequentially sending the target information messages generated based on the modification information and the modification mark to the corresponding switch to be modified according to the sequence of the target queue.
In a second aspect, the present application discloses a switch white list information management apparatus, including:
the information recording module is used for recording the IP addresses and the current white list information of all the switches in the machine room through the switch management machine;
the switch determining module is used for determining the switch to be modified according to the IP address when the switch management machine receives a command for modifying the current white list information of the switch;
the modification information acquisition module is used for acquiring modification information corresponding to the switch to be modified;
the information message sending module is used for sending the target information message generated based on the modification information to the corresponding switch to be modified;
the analysis and modification module is used for analyzing the target information message after the switch to be modified acquires the target information message, and correspondingly modifying the current white list information by calling a white list service to obtain modified white list information;
and the white list information storage module is used for storing the modified white list information.
In a third aspect, the application discloses an electronic device comprising a processor and a memory; the processor implements the aforementioned switch white list information management method when executing the computer program stored in the memory.
In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; the computer program, when executed by the processor, implements the switch white list information management method.
Therefore, the application records the IP addresses and the current white list information of all switches in the machine room through the switch management machine; when the switch management machine receives a command for modifying the current white list information of the switch, determining a switch to be modified according to the IP address, acquiring modification information corresponding to the switch to be modified, and sending a target information message generated based on the modification information to the corresponding switch to be modified; after the switch to be modified acquires the target information message, the target information message is analyzed, the current white list information of the switch to be modified is correspondingly modified by calling white list service, modified white list information is obtained, and the modified white list information is stored. The application can manage all the switches in the machine room through one switch management machine, can send the modification information to the switches needing modification, and can realize unified maintenance and management of the whitelist by calling the whitelist service to carry out batch configuration on the whitelist.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for managing switch white list information according to the present application;
fig. 2 is a flowchart of a specific method for managing white list information of a switch according to the present disclosure;
fig. 3 is a schematic diagram of a structure of a switch whitelist information management device according to the present application;
fig. 4 is a block diagram of an electronic device according to the present disclosure.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The embodiment of the application discloses a method for managing switch white list information, which is shown in fig. 1 and comprises the following steps:
step S11: and recording the IP addresses and the current white list information of all the switches in the machine room through the switch management machine.
In this embodiment, all switches in the machine room are managed by one switch management machine, and in a specific implementation process, the IP addresses and the current whitelist information of all switches in the machine room may be acquired and stored by the switch management machine.
Specifically, the recording, by the switch management machine, the IP addresses and the current whitelist information of all switches in the machine room includes: and recording the IP addresses and the current white list information of all the switches in the machine room into a relational database of the switch management machine. That is, the IP addresses and the current whitelist information of all switches in the machine room may be saved by a relational database of the switch management machine.
It will be appreciated that before the IP addresses and the current whitelist information of all switches in the machine room are recorded by the switch management machine, it may further include: and forming the switch management machine and all the switches in the machine room into the same local area network, and creating a communication port between the switch management machine and the switches. That is, the switch management machine and all switches in the machine room are in the same local area network, and communication ports, such as a d-bus interface, between the switch management machine and the switches need to be created in advance.
Step S12: when the switch management machine receives a command for modifying the current white list information of the switch, determining the switch to be modified according to the IP address, acquiring modification information corresponding to the switch to be modified, and sending a target information message generated based on the modification information to the corresponding switch to be modified.
In this embodiment, after the IP addresses and the current whitelist information of all switches in the machine room are recorded by the switch management machine, when a configuration operation that needs to modify the current whitelist information of the switch is monitored, the switch to be modified may be determined according to the IP address, then modification information corresponding to the switch to be modified is acquired, then a corresponding target information message is generated based on the modification information, and then the target information message is sent to the corresponding switch to be modified.
In a specific embodiment, the determining the switch to be modified according to the IP address, obtaining modification information corresponding to the switch to be modified, and sending a target information message generated based on the modification information to the corresponding switch to be modified may specifically include: determining a plurality of switches to be modified according to the IP addresses, and acquiring modification information corresponding to the plurality of switches to be modified; sorting the plurality of switches to be modified according to the IP address to obtain a target queue; and sequentially sending the target information messages generated based on the modification information and the modification mark to the corresponding switch to be modified according to the sequence of the target queue. In this embodiment, when there are multiple switches to be modified, the multiple switches to be modified may be determined according to the IP address, then modification information corresponding to the multiple switches to be modified may be obtained respectively, then the multiple switches to be modified are ordered according to the IP address, a target queue after the ordering is obtained, and then a target information packet generated based on the modification information and the modification flag is sent to the corresponding switches to be modified in sequence according to the order of the target queue.
Step S13: after the switch to be modified acquires the target information message, the target information message is analyzed, the current white list information of the switch to be modified is correspondingly modified by calling white list service, modified white list information is obtained, and the modified white list information is stored.
In this embodiment, after the switch to be modified obtains the target information packet, the target information packet is parsed, and then the white list service of the switch to be modified is called to correspondingly modify the current white list information of the switch to be modified, so as to obtain modified white list information, and then the switch to be modified stores and records the modified white list information, thereby realizing white list management.
Therefore, in the embodiment of the application, the IP addresses and the current white list information of all switches in the machine room are recorded through the switch management machine; when the switch management machine receives a command for modifying the current white list information of the switch, determining a switch to be modified according to the IP address, acquiring modification information corresponding to the switch to be modified, and sending a target information message generated based on the modification information to the corresponding switch to be modified; after the switch to be modified acquires the target information message, the target information message is analyzed, the current white list information of the switch to be modified is correspondingly modified by calling white list service, modified white list information is obtained, and the modified white list information is stored. According to the embodiment of the application, all the switches in the machine room can be managed by one switch management machine, the modification information can be sent to the switches needing modification, and the white list is configured in batches by calling the white list service, so that unified maintenance and management of the white list are realized.
The embodiment of the application discloses a specific switch white list information management method, which is shown in fig. 2 and comprises the following steps:
step S21: and combining the switch management machine and all switches in the machine room into the same local area network, and creating a communication port between the switch management machine and the switches.
In this embodiment, the switch management machine and the switch in the machine room are first formed in the same lan, and then the d-bus interface between the switch management machine and the switch is created.
Step S22: and broadcasting query information messages formed by the switch management machine based on the IP address and the query mark of the switch management machine to all switches in the same local area network and the machine room in sequence.
In this embodiment, after all the switches in the switch management machine and the machine room are formed in the same local area network and the communication ports between the switch management machine and the switches are created, further, the switch management machine may form a corresponding information message based on its own IP address and query flag, and then broadcast the generated information message to each switch in the same local area network and machine room in sequence.
Step S23: after the switch acquires the inquiry information message, the inquiry information message is analyzed, the IP address of the switch and the pre-established white list information on the communication port are inquired to obtain the IP address and the current white list information of all the switches, and then a new information message generated based on the IP address and the current white list information of the switches is sent to the switch management machine through the communication port so as to store the IP address and the current white list information of the switches through a relational database in the switch management machine.
In this embodiment, after broadcasting query information messages formed by a switch management machine based on an IP address of the switch management machine and a query flag to each switch located in the same local area network and machine room in sequence, the switch acquires the query information messages, then analyzes the query information messages to obtain the query flag, then starts to query the IP address of the switch and white list information on a d-bus interface, further, sends new information messages generated based on the IP address of the switch and the current white list information to the switch management machine through the d-bus interface, and finally stores the IP address of the switch and the current white list information in a relational database of the switch management machine.
Step S24: when the switch management machine receives a command for modifying the current white list information of the switch, determining a plurality of switches to be modified according to the IP address, and acquiring modification information corresponding to the switches to be modified.
In this embodiment, after the IP addresses of the switches and the current whitelist information are stored by the relational database in the switch management machine, when the IP addresses of the switches in the machine room change or the switches are changed or the switches are increased or decreased, that is, when the whitelist configuration operation of the switches needs to be modified, an operator may store modification information of the switches to be modified into the database of the switch management machine, at this time, the switch management machine receives a command that the current whitelist information of the switches needs to be modified, so as to determine a plurality of switches to be modified according to the IP addresses, and then obtain modification information corresponding to the switches to be modified.
Step S25: and sequencing the plurality of switches to be modified according to the IP addresses to obtain a target queue.
In this embodiment, after obtaining the modification information corresponding to the plurality of switches to be modified, further, the determined plurality of switches to be modified may be ordered according to the IP address, so as to obtain an ordered target queue.
Step S26: and sequentially sending the target information messages generated based on the modification information and the modification mark to the corresponding switch to be modified according to the sequence of the target queue.
In this embodiment, after the plurality of switches to be modified are ordered according to the IP address to obtain the target queue, the target information packet generated based on the modification information and the modification flag may be sequentially sent to the corresponding switches to be modified according to the sequence of the target queue, that is, the switch management machine may sequentially send the modification data in the database to the switches to be modified.
Step S27: after the switch to be modified acquires the target information message, the target information message is analyzed, and the current white list information of the switch to be modified is correspondingly modified by calling white list service, so that modified white list information is obtained.
In this embodiment, after sequentially sending, according to the order of the target queue, a target information packet generated based on the modification information and the modification flag to the corresponding switch to be modified, the switch to be modified obtains the target information packet, then parses the target information packet to obtain the modification flag and the modification information, and invokes the white list service of the switch to be modified to correspondingly modify the current white list information of the switch to be modified, thereby obtaining modified white list information.
Step S28: and storing the modified white list information into a system file used for reading and storing the white list information in the switch to be modified, and synchronizing the modified white list information into the relational database and a pre-created d-bus interface.
In this embodiment, after the current whitelist information of the user is modified correspondingly by invoking a whitelist service to obtain modified whitelist information, the modified whitelist information may be saved in a system file for reading and storing whitelist information in the switch to be modified, and then the modified whitelist information is synchronized to the relational database and a d-bus interface created in advance, so as to implement management of the whitelist information.
Further, after synchronizing the modified white list information to the relational database and the d-bus interface created in advance, the method specifically further includes: when other terminal machines try to connect any switch in the machine room, the IP addresses of the other terminal machines are obtained, and the IP addresses of the other terminal machines are matched with the white list information on the communication port to obtain a matching result; if the matching result shows that the IP address of the other terminal machine is not set to be a white list, the other terminal machine is forbidden to be connected with any switch; and if the matching result shows that the IP addresses of the other terminal machines are set to be white lists, connecting the other terminal machines with any switch. For example, when another computer tries to connect with any switch in the machine room, the IP address of the computer is obtained first, then the IP address is matched with the white list information on the d-bus interface to obtain a corresponding matching result, if the matching result indicates that the IP address is not set as the white list, that is, is not in the white list information, the computer is prohibited from connecting with any switch in the machine room, and if the matching result indicates that the IP address is set as the white list, the computer can be connected with any designated switch.
Therefore, according to the switch white list information management scheme provided by the embodiment of the application, the switch management machine can communicate with the switches in the machine room in a message mode, various information of the switches is recorded in the database of the switch management machine, when the white list configuration operation of the switches needs to be modified, the switch management machine can sequentially send the modification data in the database to the switches needing to be modified, and the switches store and record the modified white list information through white list service, so that the function of maintaining the white list of the switches in the machine room through one management machine is realized, batch configuration is realized, and unified maintenance management of the switches in the machine room is further realized.
Correspondingly, the embodiment of the application also discloses a device for managing the white list information of the switch, which is shown in fig. 3, and comprises the following steps:
the information recording module 11 is used for recording the IP addresses and the current white list information of all the switches in the machine room through the switch management machine;
a switch determining module 12, configured to determine, when the switch management machine receives a command that needs to modify the current whitelist information of the switch, a switch to be modified according to the IP address;
a modification information obtaining module 13, configured to obtain modification information corresponding to the switch to be modified;
an information message sending module 14, configured to send a target information message generated based on the modification information to the corresponding switch to be modified;
the parsing and modifying module 15 is configured to parse the target information packet after the switch to be modified obtains the target information packet, and correspondingly modify the current whitelist information by calling a whitelist service to obtain modified whitelist information;
and the white list information storage module 16 is configured to store the modified white list information.
The specific workflow of each module may refer to the corresponding content disclosed in the foregoing embodiment, and will not be described herein.
In the embodiment of the application, the IP addresses and the current white list information of all switches in the machine room are recorded by the switch management machine; when the switch management machine receives a command for modifying the current white list information of the switch, determining a switch to be modified according to the IP address, acquiring modification information corresponding to the switch to be modified, and sending a target information message generated based on the modification information to the corresponding switch to be modified; after the switch to be modified acquires the target information message, the target information message is analyzed, the current white list information of the switch to be modified is correspondingly modified by calling white list service, modified white list information is obtained, and the modified white list information is stored. According to the embodiment of the application, all the switches in the machine room can be managed by one switch management machine, the modification information can be sent to the switches needing modification, and the white list is configured in batches by calling the white list service, so that unified maintenance and management of the white list are realized.
In some specific embodiments, the switch whitelist information management apparatus may further include:
the combination unit is used for combining the switch management machine and all the switches in the machine room into the same local area network;
and the communication port creation unit is used for creating a communication port between the switch management machine and the switch.
In some specific embodiments, the information recording module 11 may specifically include:
and the information recording unit is used for recording the IP addresses and the current white list information of all the switches in the machine room into the relational database of the switch management machine.
In some specific embodiments, the first information recording unit may specifically include:
the message broadcasting unit is used for broadcasting query information messages formed by the switch management machine based on the IP address and the query mark of the switch management machine to all switches in the same local area network and machine room in sequence;
the analysis and query unit is used for analyzing the query information message after the switch acquires the query information message, and querying the IP address of the switch and the pre-established white list information on the communication port to obtain the IP address and the current white list information of all the switches;
a first message sending unit, configured to send, through the communication port, a new information message generated based on the IP address of the switch and the current whitelist information to the switch management machine;
and the first information storage unit is used for storing the IP address of the switch and the current white list information through a relational database in the switch management machine.
In some specific embodiments, the whitelist information storing module 16 may specifically include:
the second information storage unit is used for storing the modified white list information into a system file used for reading and storing the white list information in the switch to be modified;
and the information synchronization unit is used for synchronizing the modified white list information to the relational database and a pre-created d-bus interface.
In some specific embodiments, the switch whitelist information management apparatus may further include:
the IP address acquisition unit is used for acquiring the IP addresses of other terminal machines when the other terminal machines attempt to connect any switch in the machine room;
the information matching unit is used for matching the IP addresses of the other terminal machines with the white list information on the communication port to obtain a matching result;
a connection prohibition unit configured to prohibit connection of the other terminal machine with any of the switches if the matching result indicates that the IP address of the other terminal machine is not set to the white list;
and the connection unit is used for connecting the other terminal machines with any switch if the matching result shows that the IP addresses of the other terminal machines are set to be white lists.
In some specific embodiments, the switch determining module 12 may specifically include:
and the switch determining unit is used for determining a plurality of switches to be modified according to the IP addresses.
In some specific embodiments, the modification information obtaining module 13 may specifically include:
and the modification information acquisition unit is used for acquiring modification information corresponding to the plurality of switches to be modified.
In some specific embodiments, the information message sending module 14 may specifically include:
the sorting unit is used for sorting the plurality of switches to be modified according to the IP addresses to obtain a target queue;
and the second message sending unit is used for sequentially sending the target information messages generated based on the modification information and the modification mark to the corresponding switch to be modified according to the sequence of the target queue.
Further, the embodiment of the present application further discloses an electronic device, and fig. 4 is a block diagram of an electronic device 20 according to an exemplary embodiment, where the content of the diagram is not to be considered as any limitation on the scope of use of the present application.
Fig. 4 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, where the computer program is loaded and executed by the processor 21 to implement relevant steps in the switch white list information management method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and computer programs 222, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the switch whitelist information management method performed by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, the application also discloses a computer readable storage medium for storing a computer program; wherein the computer program when executed by the processor implements the switch whitelist information management method disclosed previously. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. 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 present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing describes in detail a method, apparatus, device and medium for managing white list information of a switch, and specific examples are applied to illustrate the principles and embodiments of the present application, where the foregoing examples are only used to help understand the method and core idea of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (6)

1. A method for managing white list information of a switch, comprising:
recording the IP addresses and the current white list information of all switches in the machine room through a switch management machine;
when the switch management machine receives a command for modifying the current white list information of the switch, determining a switch to be modified according to the IP address, acquiring modification information corresponding to the switch to be modified, and sending a target information message generated based on the modification information to the corresponding switch to be modified;
after the switch to be modified acquires the target information message, analyzing the target information message, correspondingly modifying the current white list information by calling a white list service to obtain modified white list information, and storing the modified white list information;
before the IP addresses and the current white list information of all switches in the machine room are recorded by the switch management machine, the method further comprises: the switch management machine and all the switches in the machine room are formed in the same local area network, and a communication port between the switch management machine and the switches is created;
the recording, by the switch management machine, the IP addresses and the current whitelist information of all switches in the machine room includes: broadcasting inquiry information messages formed by the switch management machine based on the IP address and the inquiry mark of the switch management machine to all switches in the same local area network and machine room in sequence; after the switch acquires the inquiry information message, analyzing the inquiry information message, inquiring the IP address of the switch and the pre-established white list information on the communication port to obtain the IP address and the current white list information of all the switches, and sending a new information message generated based on the IP address and the current white list information of the switches to the switch management machine through the communication port so as to store the IP address and the current white list information of the switches through a relational database in the switch management machine;
the storing the modified white list information includes: and storing the modified white list information into a system file used for reading and storing the white list information in the switch to be modified, and synchronizing the modified white list information into the relational database and a pre-created d-bus interface.
2. The switch whitelist information management method of claim 1, further comprising:
when other terminal machines try to connect any switch in the machine room, the IP addresses of the other terminal machines are obtained, and the IP addresses of the other terminal machines are matched with the white list information on the communication port to obtain a matching result;
if the matching result shows that the IP address of the other terminal machine is not set to be a white list, the other terminal machine is forbidden to be connected with any switch;
and if the matching result shows that the IP addresses of the other terminal machines are set to be white lists, connecting the other terminal machines with any switch.
3. The method for managing switch whitelist information according to any one of claims 1 to 2, wherein determining a switch to be modified according to the IP address, acquiring modification information corresponding to the switch to be modified, and sending a target information message generated based on the modification information to the corresponding switch to be modified, includes:
determining a plurality of switches to be modified according to the IP addresses, and acquiring modification information corresponding to the plurality of switches to be modified;
sorting the plurality of switches to be modified according to the IP address to obtain a target queue;
and sequentially sending the target information messages generated based on the modification information and the modification mark to the corresponding switch to be modified according to the sequence of the target queue.
4. A switch white list information management apparatus, comprising:
the information recording module is used for recording the IP addresses and the current white list information of all the switches in the machine room through the switch management machine;
the switch determining module is used for determining the switch to be modified according to the IP address when the switch management machine receives a command for modifying the current white list information of the switch;
the modification information acquisition module is used for acquiring modification information corresponding to the switch to be modified;
the information message sending module is used for sending the target information message generated based on the modification information to the corresponding switch to be modified;
the analysis and modification module is used for analyzing the target information message after the switch to be modified acquires the target information message, and correspondingly modifying the current white list information by calling a white list service to obtain modified white list information;
the white list information storage module is used for storing the modified white list information;
wherein before the information recording module, the method further comprises: the switch management machine and all the switches in the machine room are formed in the same local area network, and a communication port between the switch management machine and the switches is created;
the information recording module is specifically used for broadcasting query information messages formed by the switch management machine based on the IP address and the query mark of the switch management machine to all switches in the same local area network and machine room in sequence; after the switch acquires the inquiry information message, analyzing the inquiry information message, inquiring the IP address of the switch and the pre-established white list information on the communication port to obtain the IP address and the current white list information of all the switches, and sending a new information message generated based on the IP address and the current white list information of the switches to the switch management machine through the communication port so as to store the IP address and the current white list information of the switches through a relational database in the switch management machine;
the white list information storage module is specifically configured to store the modified white list information into a system file used for reading and storing white list information in the switch to be modified, and synchronize the modified white list information into the relational database and a d-bus interface created in advance.
5. An electronic device comprising a processor and a memory; wherein the processor, when executing the computer program stored in the memory, implements the switch whitelist information management method of any one of claims 1 to 3.
6. A computer-readable storage medium storing a computer program; wherein the computer program, when executed by a processor, implements the switch whitelist information management method of any one of claims 1 to 3.
CN202211052253.4A 2022-08-31 2022-08-31 Method, device, equipment and medium for managing switch white list information Active CN115442231B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211052253.4A CN115442231B (en) 2022-08-31 2022-08-31 Method, device, equipment and medium for managing switch white list information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211052253.4A CN115442231B (en) 2022-08-31 2022-08-31 Method, device, equipment and medium for managing switch white list information

Publications (2)

Publication Number Publication Date
CN115442231A CN115442231A (en) 2022-12-06
CN115442231B true CN115442231B (en) 2023-08-25

Family

ID=84244533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211052253.4A Active CN115442231B (en) 2022-08-31 2022-08-31 Method, device, equipment and medium for managing switch white list information

Country Status (1)

Country Link
CN (1) CN115442231B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116192626B (en) * 2023-02-10 2024-06-14 苏州浪潮智能科技有限公司 Device access method and device, computer readable storage medium and electronic device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995496A (en) * 2019-12-15 2020-04-10 苏州浪潮智能科技有限公司 Method and device for synchronizing time of white box switch in batches

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995496A (en) * 2019-12-15 2020-04-10 苏州浪潮智能科技有限公司 Method and device for synchronizing time of white box switch in batches

Also Published As

Publication number Publication date
CN115442231A (en) 2022-12-06

Similar Documents

Publication Publication Date Title
US8595339B2 (en) Network management apparatus and method
US11956280B2 (en) Method for providing wireless application privilege management
EP3432517A1 (en) Device configuration method and apparatus based on network configuration protocol
US8180876B2 (en) Device manager and device management program
CN100433645C (en) Network device management method and network management system
WO2005069544A1 (en) Automatic update system and method for using a meta mib
CN115442231B (en) Method, device, equipment and medium for managing switch white list information
CN111277481B (en) Method, device, equipment and storage medium for establishing VPN tunnel
CN102763373A (en) Method and apparatus for using service of home network device based on remote access
CN113709250B (en) Cross-domain user data synchronization method based on subscription transmission mode
CN113014681A (en) Network card binding method and device of multi-network card server, electronic equipment and storage medium
CN107634975A (en) A kind of method of data synchronization, equipment and system
CN105049546A (en) Client terminal IP address allocation method through DHCP server and device thereof
CN111726367A (en) User equipment CPE access binding method, device, system and equipment
CN110505075B (en) Device management method and related device
CN114244703B (en) Bare metal server checking and deploying method, device, equipment and medium
Cisco Auto Discovery
Cisco Interconnecting IPv6 Domains Using Tunnels
WO2004090790A2 (en) Collaboration bus apparatus and method
KR100909115B1 (en) Network automatic login system
CN103441876A (en) Network device management method and system based on DHCP and SNMP
CN110943968B (en) Equipment access control method and equipment access assembly
CN114490071A (en) Resource scheduling method, device, equipment and medium based on cloud game
Cisco Auto Discovery
US20050076343A1 (en) Persistent storage of network management data using object references

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