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

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

Info

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

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/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 white list information of a switch, which relate to the technical field of computers and comprise the following steps: recording IP addresses and current white list information of all switches in the machine room through a switch management machine; when the switch management machine receives a command that the current white list information needs to be modified, determining a switch to be modified and acquiring modified information, and then sending a target information message generated based on the modified information to the switch to be modified; and analyzing the target information message through the switch to be modified, modifying the current white list information by calling a white list service, and storing the modified white list information. According to the method and the system, all the switches in the machine room can be managed through one switch management machine, modification information can be sent to the switches needing to be modified, the white lists are configured in batches by calling the white list service, and unified maintenance and management of the white lists are achieved.

Description

Method, device, equipment and medium for managing white list information of switch
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 has a telnet function when in use, which is a function of remotely accessing the switch and by which various operations can be performed by logging in to the switch. However, for the security of the switch, a function is required to limit the unidentified machine to log in to the switch using the 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 limit the unidentified machines from being connected to the switch, when other terminal machines try to connect to the switch, the IP (Internet Protocol Address) of the terminal machine is matched with the white list information of the switch, and if the IP is not set as the white list, the connection to the switch is prohibited.
However, in a large computer room, many switches are deployed. If each switch is configured purely by manpower, then a lot of human resources are wasted by daily maintenance work. Therefore, there is a need for a more efficient way to maintain the white list functionality.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, a device, and a storage medium for managing white list information of a switch, which can manage all switches in a machine room through one switch management machine, send modification information to a switch that needs to be modified, and perform batch configuration on a white list by invoking a white list service, thereby implementing unified maintenance and management of 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 IP addresses and current white list information of all switches in the machine room through a switch management machine;
when the switch management machine receives a command that the current white list information of the switch needs to be modified, 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;
after the switch to be modified acquires the target information message, analyzing the target information message, modifying the current white list information of the switch to be modified correspondingly by calling a white list service to obtain modified white list information, and storing the modified white list information.
Optionally, the method for managing white list information of a switch 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 each switch.
Optionally, the recording, by the switch management machine, the IP addresses and the current white list 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 the switches in the machine room into the relational database of the switch management machine includes:
the method comprises the steps that an inquiry information message formed by an exchanger management machine based on an IP address and an inquiry mark of the exchanger management machine is sequentially broadcasted to all exchangers in the same local area network and machine room;
after the switch acquires the query information message, analyzing the query information message, querying the IP address of the switch and the pre-created white list information on the communication port to obtain the IP addresses and the current white list information of all the switches, and sending a new information message generated based on the IP address of the switch and the current white list information to the switch management machine through the communication port so as to store the IP address of the switch and the current white list information through a relational database in the switch management machine.
Optionally, 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-established d-bus interface.
Optionally, the method for managing white list information of a switch further includes:
when other terminal machines try to connect any switch in the machine room, acquiring the IP addresses of the other terminal machines, and matching the IP addresses of the other terminal machines with the white list information on the communication port to obtain a matching result;
if the matching result shows that the IP addresses of the other terminal machines are not set as the white list, the other terminal machines are 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 a white list, connecting the other terminal machines with any switch.
Optionally, the determining, according to the IP address, a switch to be modified, obtaining modification information corresponding to the switch to be modified, and sending a target information packet 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 switches to be modified;
sequencing the plurality of switches to be modified according to the IP addresses to obtain a target queue;
and sequentially sending the target information messages generated based on the modification information and the modification marks to the corresponding switch to be modified according to the sequence of the target queue.
In a second aspect, the present application discloses a white list information management apparatus for a switch, including:
the information recording module is used for recording the IP addresses of all the switches in the machine room and the current white list information through the switch management machine;
the switch determining module is used for determining a switch to be modified according to the IP address when the switch management machine receives a command that the current white list information of the switch needs to be modified;
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 a 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 of the switch to be modified 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 present application discloses an electronic device comprising a processor and a memory; the processor implements the 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; wherein the computer program when executed by a processor implements the switch white list information management method described above.
Therefore, the IP addresses and the current white list information of all the switches in the machine room are recorded through the switch management machine; when the switch management machine receives a command that the current white list information of the switch needs to be modified, 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; after the switch to be modified acquires the target information message, analyzing the target information message, modifying the current white list information of the switch to be modified correspondingly by calling a white list service to obtain modified white list information, and storing the modified white list information. According to the method and the system, all the switches in the machine room can be managed through one switch management machine, modification information can be sent to the switches needing to be modified, the white lists are configured in batches by calling the white list service, and unified maintenance and management of the white lists are achieved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a white list information management method for a switch according to the present disclosure;
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 structural diagram of a white list information management apparatus of a switch according to the present disclosure;
fig. 4 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The embodiment of the application discloses a white list information management method for a switch, which is shown in figure 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 white list information of all switches in the machine room may be obtained and stored by the switch management machine.
Specifically, the recording of the IP addresses and the current white list information of all switches in the machine room by the switch management machine 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 white list information of all switches in the machine room can be stored through the relational database of the switch management machine.
It can be understood that, before the recording of the IP addresses and the current white list information of all switches in the computer room by the switch management machine, the method may further include: and combining 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 each switch. That is, the switch management machine and all the switches in the machine room are in the same lan, and a communication port, such as a d-bus interface, between the switch management machine and the switch needs to be created in advance.
Step S12: when the switch management machine receives a command that the current white list information of the switch needs to be modified, the switch to be modified is determined according to the IP address, modification information corresponding to the switch to be modified is obtained, and then a target information message generated based on the modification information is sent to the corresponding switch to be modified.
In this embodiment, after the switch management machine records the IP addresses and the current white list information of all switches in the machine room, when it is monitored that a configuration operation is required to modify the current white list information of the switch, the switch to be modified may be determined according to the IP address, then the modification information corresponding to the switch to be modified is obtained, then a corresponding target information packet is generated based on the modification information, and then the target information packet is sent to the corresponding switch to be modified.
In a specific implementation manner, the determining, according to the IP address, a switch to be modified, obtaining modification information corresponding to the switch to be modified, and sending a target information packet 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 switches to be modified; sequencing the plurality of switches to be modified according to the IP addresses to obtain a target queue; and sequentially sending the target information messages generated based on the modification information and the modification marks 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 an IP address, then modification information corresponding to the multiple switches to be modified is obtained, the multiple switches to be modified are sorted according to the IP address, a sorted target queue is obtained, and then target information packets generated based on the modification information and the modification flag are sequentially sent to the corresponding switches to be modified according to the order of the target queue.
Step S13: after the switch to be modified acquires the target information message, analyzing the target information message, modifying the current white list information of the switch to be modified correspondingly by calling a white list service to obtain modified white list information, and storing the modified white list information.
In this embodiment, after the switch to be modified acquires the target information packet, the switch to be modified analyzes the target information packet, then invokes a white list service of the switch to be modified to modify the current white list information of the switch to be modified correspondingly, so as to obtain modified white list information, and then stores and records the modified white list information through the switch to be modified, thereby implementing white list management.
Therefore, the IP addresses and the current white list information of all the switches in the machine room are recorded through the switch management machine; when the switch management machine receives a command that the current white list information of the switch needs to be modified, 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; after the switch to be modified acquires the target information message, analyzing the target information message, and correspondingly modifying the current white list information of the switch to be modified by calling a white list service to obtain modified white list information, and then storing the modified white list information. According to the embodiment of the application, all the switches in the machine room can be managed through one switch management machine, the modification information can be sent to the switches needing to be modified, the white lists are configured in batches by calling the white list service, and unified maintenance and management of the white lists are achieved.
The embodiment of the application discloses a specific method for managing white list information of a switch, which is shown in fig. 2 and comprises the following steps:
step S21: the method comprises the steps of enabling a switch management machine and all switches in a machine room to be formed in the same local area network, and creating a communication port between the switch management machine and each switch.
In this embodiment, a switch management machine and a switch in a machine room are first combined in the same lan, and then a d-bus interface between the switch management machine and the switch is created.
Step S22: and broadcasting an inquiry information message formed by the switch management machine based on the IP address and the inquiry mark of the switch management machine to each switch in the same local area network and machine room in sequence.
In this embodiment, after the switch management machine and all switches in the machine room are combined in the same lan, and a communication port between the switch management machine and the switch is created, the switch management machine may further form a corresponding information packet based on its own IP address and an inquiry flag, and then broadcast the generated information packet to each switch in the same lan and machine room in sequence.
Step S23: after the switch acquires the query information message, analyzing the query information message, querying the IP address of the switch and pre-created white list information on the communication port to obtain the IP addresses and current white list information of all the switches, and sending a new information message generated based on the IP address of the switch and the current white list information to the switch management machine through the communication port so as to store the IP address of the switch and the current white list information through a relational database in the switch management machine.
In this embodiment, after broadcasting query information packets formed by a switch management machine based on its own IP address and a query flag to each switch in the same local area network and machine room in sequence, the switch acquires the query information packets, then parses the query information packets to obtain the query flag, then starts to query its own IP address and white list information on a d-bus interface, further generates a new information packet based on the IP address of the switch and the current white list information, sends the new information packet 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 that the current white list information of the switch needs to be modified, 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.
In this embodiment, after the IP addresses of the switches and the current white list information are stored in the relational database in the switch management machine, when the IP addresses of the switches in the room change or the switches are replaced and the switches are increased or decreased, that is, when a white list configuration operation of the switches needs to be modified, an operator may store modification information of the switches to be modified in the database of the switch management machine, and at this time, the switch management machine receives a command that the current white list information of the switches needs to be modified, determines a plurality of switches to be modified according to the IP addresses, and then obtains the modification information corresponding to the plurality of 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 the modification information corresponding to the plurality of switches to be modified is obtained, further, the plurality of determined switches to be modified may be sorted according to the IP address, so as to obtain a sorted target queue.
Step S26: and sequentially sending the target information messages generated based on the modification information and the modification marks 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 sorted according to the IP address to obtain the target queue, the target information packet may be generated based on the modification information and the modification flag, and then the target information packet is 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 modified data in the database to the switches to be modified.
Step S27: after the switch to be modified acquires the target information message, analyzing the target information message, and correspondingly modifying the current white list information of the switch to be modified by calling a white list service to obtain modified white list information.
In this embodiment, after the target information packets generated based on the modification information and the modification flag are sequentially sent to the corresponding switch to be modified according to the sequence of the target queue, the switch to be modified obtains the target information packets, then analyzes the target information packets to obtain the modification flag and the modification information, and then 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 to obtain the 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-established d-bus interface.
In this embodiment, after the modified white list information is obtained by invoking a white list service to correspondingly modify the current white list information of the switch to be modified, the modified white list information may be stored in a system file used for reading and storing the white list information in the switch to be modified, and then the modified white list information is synchronized to the relational database and a pre-established d-bus interface, so as to implement management of the white list information.
Further, after synchronizing the modified white list information to the relational database and the pre-created d-bus interface, the method specifically includes: when other terminal machines try to connect any switch in the machine room, acquiring the IP addresses of the other terminal machines, and matching the IP addresses of the other terminal machines with the white list information on the communication port to obtain a matching result; if the matching result shows that the IP addresses of the other terminal machines are not set as the white list, the other terminal machines are forbidden to be connected with any switch; and if the matching result shows that the IP addresses of the other terminal machines are set as the white list, connecting the other terminal machines with any switch. For example, when another computer tries to connect to any switch in the computer 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 to any switch in the computer room, and if the matching result indicates that the IP address is set as the white list, the computer can be connected to any specified switch.
It can be seen that the white list information management scheme of the switch provided in the embodiment of the present application can communicate with the switch in the machine room in the form of a message through one switch management machine, and record various information of the switch into the database of the switch management machine, when a white list configuration operation of the switch needs to be modified, the switch management machine can sequentially send modified data in the database to the switch needing to be modified, and the switch stores and records the modified white list information through a white list service, so that a white list function of the switch in the machine room is maintained through one management machine, batch configuration is realized, and further, uniform maintenance and management of the switch in the machine room is realized.
Correspondingly, an embodiment of the present application further discloses a device for managing white list information of a switch, as shown in fig. 3, the device includes:
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;
the switch determining module 12 is configured to determine, when the switch management machine receives a command that the current white list information of the switch needs to be modified, 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 analysis and modification module 15 is configured to, after the switch to be modified acquires the target information packet, analyze the target information packet, and modify the current white list information of the switch by calling a white list service to obtain modified white list information;
and a white list information storage module 16, configured to store the modified white list information.
For the specific work flow of each module, reference may be made to corresponding content disclosed in the foregoing embodiments, and details are not repeated here.
Therefore, in the embodiment of the application, the IP addresses and the current white list information of all the switches in the machine room are recorded through the switch management machine; when the switch management machine receives a command that the current white list information of the switch needs to be modified, 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; after the switch to be modified acquires the target information message, analyzing the target information message, and correspondingly modifying the current white list information of the switch to be modified by calling a white list service to obtain modified white list information, and then storing the modified white list information. According to the embodiment of the application, all the switches in the machine room can be managed through one switch management machine, the modification information can be sent to the switches needing to be modified, the white list service is called to carry out batch configuration on the white list, and unified maintenance and management of the white list are achieved.
In some specific embodiments, the apparatus for managing white list information of a switch may further include:
a combination unit, configured to combine the switch management machine and all the switches in the machine room into a same local area network;
a communication port creating unit 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 of all the switches in the machine room and the current white list information into a 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 the query information message formed by the switch management machine based on the IP address and the query mark of the switch management machine to each switch in the same local area network and the same 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 white list information on the communication port which is created in advance to obtain the IP addresses of all the switches and the current white list information;
a first message sending unit, configured to send, to the switch management machine through the communication port, a new information message generated based on the IP address of the switch and the current white list information;
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 white list information saving module 16 may specifically include:
the second information storage unit is used for storing the modified white list information into a system file which is 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-established d-bus interface.
In some specific embodiments, the apparatus for managing white list information of a switch may further include:
an IP address obtaining unit, configured to obtain IP addresses of other terminal machines when the other terminal machines attempt to connect to any one of the switches 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 the other terminal machine from being connected to any one of the switches if the matching result indicates that the IP address of the other terminal machine is not set to the white list;
a connection unit, configured to connect the other terminal machine with any one of the switches if the matching result indicates that the IP address of the other terminal machine is set as a white list.
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 the modification information corresponding to the plurality of switches to be modified.
In some specific embodiments, the information packet sending module 14 may specifically include:
the sequencing unit is used for sequencing 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 marks to the corresponding switch to be modified according to the sequence of the target queue.
Further, an electronic device is disclosed in the embodiments of the present application, and fig. 4 is a block diagram of an electronic device 20 according to an exemplary embodiment, which should not be construed as limiting the scope of the application.
Fig. 4 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. 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, and 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 this 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 a communication protocol followed by the communication interface is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to acquire external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage manner may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, and may be Windows Server, netware, unix, linux, or the like. 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 white list information management method performed by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the switch white list information management method disclosed above. For the specific steps of the method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed in the embodiment corresponds to the method disclosed in the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
Those of skill would further appreciate that the various illustrative components 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 components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this 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 technical 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. A software module may reside 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 should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The method, the apparatus, the device and the medium for managing the white list information of the switch provided by the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understanding the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, the specific implementation manner and the application scope may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for managing white list information of a switch is characterized by comprising the following steps:
recording IP addresses and current white list information of all switches in the machine room through a switch management machine;
when the switch management machine receives a command that the current white list information of the switch needs to be modified, 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;
after the switch to be modified acquires the target information message, analyzing the target information message, modifying the current white list information of the switch to be modified correspondingly by calling a white list service to obtain modified white list information, and storing the modified white list information.
2. The switch white list information management method of claim 1, further comprising:
and combining 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 each switch.
3. The method for managing white list information of switches according to claim 2, wherein the recording the IP addresses and the current white list information of all switches in the machine room by the switch management machine 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.
4. The method for managing white list information of switches according to claim 3, wherein the recording the IP addresses of all switches in the machine room and the current white list information into a relational database of a switch management machine comprises:
the method comprises the steps that an inquiry information message formed by an exchanger management machine based on an IP address and an inquiry mark of the exchanger management machine is sequentially broadcasted to all exchangers in the same local area network and machine room;
after the switch acquires the query information message, analyzing the query information message, querying the IP address of the switch and the pre-created white list information on the communication port to obtain the IP addresses and the current white list information of all the switches, and sending a new information message generated based on the IP address of the switch and the current white list information to the switch management machine through the communication port so as to store the IP address of the switch and the current white list information through a relational database in the switch management machine.
5. The method for managing white list information of a switch according to claim 3, wherein said storing the modified white list information comprises:
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-established d-bus interface.
6. The switch white list information management method of claim 5, further comprising:
when other terminal machines try to connect any switch in the machine room, acquiring the IP addresses of the other terminal machines, and matching the IP addresses of the other terminal machines with the white list information on the communication port to obtain a matching result;
if the matching result shows that the IP addresses of the other terminal machines are not set as the white list, the other terminal machines are 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 a white list, connecting the other terminal machines with any switch.
7. The method for managing the white list information of the switches according to any one of claims 1 to 6, wherein the determining a 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 includes:
determining a plurality of switches to be modified according to the IP addresses, and acquiring modification information corresponding to the switches to be modified;
sequencing the plurality of switches to be modified according to the IP addresses to obtain a target queue;
and sequentially sending the target information messages generated based on the modification information and the modification marks to the corresponding switch to be modified according to the sequence of the target queue.
8. 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 a switch to be modified according to the IP address when the switch management machine receives a command that the current white list information of the switch needs to be modified;
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 a 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 of the switch to be modified 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.
9. An electronic device comprising a processor and a memory; wherein the processor, when executing the computer program stored in the memory, implements the switch white list information management method of any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the switch white list information management method of any of claims 1 to 7.
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 true CN115442231A (en) 2022-12-06
CN115442231B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116192626A (en) * 2023-02-10 2023-05-30 苏州浪潮智能科技有限公司 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

Cited By (1)

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

Also Published As

Publication number Publication date
CN115442231B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
CN107733670B (en) Forwarding strategy configuration method and device
US8595339B2 (en) Network management apparatus and method
US20210218778A1 (en) Method for providing wireless application privilege management
CN100433645C (en) Network device management method and network management system
WO2017206576A1 (en) Gateway service processing method and apparatus
CN111277481B (en) Method, device, equipment and storage medium for establishing VPN tunnel
CN113014681A (en) Network card binding method and device of multi-network card server, electronic equipment and storage medium
CN115442231B (en) Method, device, equipment and medium for managing switch white list information
JP2000101640A (en) Client/server system
CN105049546A (en) Client terminal IP address allocation method through DHCP server and device thereof
EP3503484B1 (en) Message transmission methods and devices
EP3018883B1 (en) Login method and system for client unit
CN113067844B (en) Service discovery method and device and HNRF
US8516094B2 (en) Method and network management apparatus for implementing information service level inheritance in network management system
CN110278558B (en) Message interaction method and WLAN system
CN116719868A (en) Network asset identification method, device and equipment
CN111726367A (en) User equipment CPE access binding method, device, system and equipment
EP3119043B1 (en) Flow table entry management method and device
CN114430390B (en) Method and device for acquiring cross-domain link
CN114244703B (en) Bare metal server checking and deploying method, device, equipment and medium
US7860099B2 (en) Method for managing and setting many network devices
Cisco Auto Discovery
CN103441876A (en) Network device management method and system based on DHCP and SNMP
CN113612811A (en) Method, system, equipment and medium for client mounting in multiple channels
CN111385371B (en) MAC address acquisition method, device and equipment

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