CN116405379A - Network management method, device and equipment - Google Patents

Network management method, device and equipment Download PDF

Info

Publication number
CN116405379A
CN116405379A CN202310257444.2A CN202310257444A CN116405379A CN 116405379 A CN116405379 A CN 116405379A CN 202310257444 A CN202310257444 A CN 202310257444A CN 116405379 A CN116405379 A CN 116405379A
Authority
CN
China
Prior art keywords
network
network card
target
equipment
routing 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.)
Pending
Application number
CN202310257444.2A
Other languages
Chinese (zh)
Inventor
方月建
袁文君
陈梁
薛光峰
李芳芳
陈琳耀
曾华安
周郃
宋丹雪
何俊涛
曾景亮
周博涵
王佳斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202310257444.2A priority Critical patent/CN116405379A/en
Publication of CN116405379A publication Critical patent/CN116405379A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The application provides a network management method, a device and equipment, and relates to the technical field of network information management, wherein the method comprises the following steps: the method comprises the steps of monitoring that a configuration file of target equipment is modified, and obtaining a modified target configuration file of the target equipment; acquiring the current network card state of each network card of the target equipment, wherein the network card state comprises an online state and an abnormal state; if a plurality of network cards exist in the target equipment and are in an on-line state, the network segment routing information of each network card and the equipment routing information of the target equipment are adjusted according to the network address configuration information and the priority configuration information corresponding to the network cards in the target configuration file, so that the automatic management of the network information is realized, and the use of users is facilitated.

Description

Network management method, device and equipment
Technical Field
The present disclosure relates to the field of network information management technologies, and in particular, to a network management method, device, and equipment.
Background
For mass accessed internet of things equipment, because configuration information of the internet of things equipment is likely to change at the moment, when the configuration information of the internet of things equipment changes, network information of the internet of things equipment needs to be correspondingly modified. However, for the internet of things device, manually configuring the network information is too complex, and because the user does not generally know the configuration process of the network information, when the device network changes, the related routing information cannot be adjusted in time.
Currently, network routing policies defined in advance according to time periods are typically configured and onto individual devices, each device automatically configuring routes according to the defined network routing policies. However, this method requires the user to define the network routing policy of each time period in advance, and because the network routing policy is predefined by the user, if an emergency occurs in a certain time period, such as a certain network card of the device is dropped, the method cannot be flexibly adjusted, and the network routing policy needs to be redefined, so that the use of the user is inconvenient.
Disclosure of Invention
The application provides a network management method, device and equipment, which are used for solving the problem that network management in the related technology needs human participation and cannot realize automation.
In a first aspect, an embodiment of the present application provides a network management method, where the method includes:
the configuration file of the target equipment is monitored to be modified, and the modified target configuration file of the target equipment is obtained;
acquiring the current network card state of each network card of the target equipment, wherein the network card state comprises an online state and an abnormal state;
if the plurality of network cards exist in the target device in an on-line state, the network segment routing information of each network card and the device routing information of the target device are adjusted according to the network address configuration information and the priority configuration information corresponding to the plurality of network cards in the target configuration file.
As an alternative embodiment, it is monitored whether the configuration file of the target device is modified by at least one of:
if the network card of the target device is provided with the wired network card, monitoring whether the configuration file corresponding to the wired network card in the target device is modified or not through a network socket;
if the wireless network card exists in the network card of the target device, whether the configuration file corresponding to the wireless network card in the target device is modified is monitored by receiving a modification notification reported by the relevant interface.
As an optional implementation manner, the adjusting network segment routing information of each network card and device routing information of the target device according to network address configuration information and priority configuration information corresponding to the plurality of network cards in the target configuration file includes:
aiming at any network card in the plurality of network cards, according to the network address configuration information corresponding to the any network card, adjusting the network segment routing information of the any network card;
and determining network segment routing information of the network card with the highest priority in the plurality of network cards as equipment routing information of the target equipment according to the priority configuration information corresponding to the plurality of network cards.
As an optional implementation manner, after the obtaining the current network card state of each network card of the target device, the method further includes:
if one network card exists in the target equipment and is in an online state, according to the network address configuration information corresponding to the network card in the online state in the target configuration file, determining network segment routing information of the network card in the online state, and determining the network segment routing information as equipment routing information of the target equipment;
and if the network card in the abnormal state exists in the target equipment, deleting the network segment routing information of the network card in the pre-recorded abnormal state.
As an optional implementation manner, the network address configuration information includes a DHCP enabled state;
as an optional implementation manner, before adjusting the network segment routing information of each network card and the device routing information of the target device according to the network address configuration information and the priority configuration information corresponding to the plurality of network cards in the target configuration file, the method further includes:
and determining that the DHCP enablement state is not enabled.
As an optional implementation manner, if the DHCP enabled state is enabled, after acquiring the current network card state of each network card of the target device, before adjusting the network segment routing information of each network card and the device routing information of the target device, the method further includes:
Aiming at the network card with each network card state being in an on-line state, sending a network address acquisition request to a server through the DHCP;
and receiving the network address allocated to the network card by the server, and storing the network address into the network address configuration information of the network card.
In a second aspect, an embodiment of the present application provides a network management apparatus, including:
the first acquisition module is used for monitoring that the configuration file of the target equipment is modified and acquiring the modified target configuration file of the target equipment;
the second acquisition module is used for acquiring the network card state of each network card of the target equipment at present, wherein the network card state comprises an online state and an abnormal state;
and the adjusting module is used for adjusting network segment routing information of each network card and equipment routing information of the target equipment according to network address configuration information and priority configuration information corresponding to the network cards in the target configuration file if the network cards exist in the target equipment and are in an on-line state.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements any step of the network management method in the first aspect when the processor executes the computer program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement any of the steps of the network management method of the first aspect described above.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program stored in a computer readable storage medium; when the processor of the memory access device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the memory access device performs any of the steps of the network management method in the first aspect described above.
According to the method, when the configuration file in the equipment is monitored to be modified, the routing information is adjusted according to the network card state of the network card in the equipment and the modified configuration file, namely, the network equipment can automatically adjust the network when the configuration file is changed, the intervention of a user is not needed, and the use of the user is facilitated.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a network management method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a network card management process according to an embodiment of the present application;
fig. 3 is a flow chart of a network address management process according to an embodiment of the present application;
fig. 4 is a flow chart of a route management process according to an embodiment of the present application;
fig. 5 is a schematic diagram of a network management device according to an embodiment of the present application;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail with reference to the accompanying drawings.
The application scenario described in the embodiments of the present application is for more clearly describing the technical solution of the embodiments of the present application, and does not constitute a limitation on the technical solution provided in the embodiments of the present application, and as a person of ordinary skill in the art can know that, with the appearance of a new application scenario, the technical solution provided in the embodiments of the present application is also applicable to similar technical problems. In the description of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
For mass accessed internet of things equipment, because configuration information of the internet of things equipment is likely to change at the moment, when the configuration information of the internet of things equipment changes, network information of the internet of things equipment needs to be correspondingly modified. However, for the internet of things device, manually configuring the network information is too complex, and because the user does not know the configuration process of the network information, when the device network changes, the network information such as the related routing information or the IP address information cannot be adjusted in time. Thus, there is a need for automated management of network information.
The management of network information is generally performed in the related art in the following two ways:
firstly, network routing strategies defined according to time periods are configured on each device, and each device automatically configures routing according to actual conditions and corresponding network routing strategies. The method requires a user to define a routing strategy of each time period in advance, and if a certain network card of the equipment is disconnected, the routing cannot be automatically modified; the user is required to pre-configure on the device in advance, and remote control cannot be realized; and only the routing strategy of the device can be adjusted, and the full management of the network information cannot be realized.
And secondly, uploading necessary information on the equipment to a routing decision control center by utilizing an RPC (Remote Procedure Call ) protocol, and pushing the routing information to the equipment by the routing decision control center, wherein the routing decision control center adopts a centralized management mode. In the route management mode, the RPC is utilized to perform centralized management on the routes of all the devices, so that the cost is high; the registration center and the routing decision control center are needed, and in the Internet of things environment supporting mass access, the routing decision control center becomes a bottleneck of the whole system; and the route information is pushed to the equipment through the RPC and can be influenced by the network condition, the response speed is not fast enough, and the route of the equipment can not be timely adjusted.
Aiming at the problems, the embodiment of the application provides a network management method, a device and equipment, and when the network management is performed, a user only needs to configure the network card information of the network equipment in a local configuration file or remote RPC mode, and the network card information, IP (Internet Protocol ) address, routing and other information can be automatically configured according to the network card information of the network equipment and the state of a plurality of network cards on the current network equipment.
In this embodiment of the present application, the network management system on the target device may be refined to three modules, which are a network address management module, a network card management module, and a route management module, respectively, where:
the network address management module is used for: and determining IP address information of a certain network card of the network equipment according to the network address configuration information of the user, or starting a DHCP (Dynamic Host Configuration Protocol ) function of the certain network card, distributing the IP address information and continuously synchronizing the IP address information into the corresponding network address configuration information, and further performing bond management and bridging management on the network card of the equipment, wherein the upper layer only needs to inform the network card through the network address information.
The network card management module is used for: and determining the network card which is normal in state, normal in connection and needs to be managed on the equipment.
The route management module is used for: when the network card state of the network equipment is found to be abnormal, deleting the routing information of the corresponding network card, and setting a default route according to the priority of the network card provided by an upper layer when a plurality of network cards are on line on the network equipment at the same time.
According to the embodiment of the application, the results of the three modules are mutually coupled for use, so that the automatic management of the network information of the target network equipment is realized.
Fig. 1 is a flow chart of a network management method according to an embodiment of the present application; as shown in fig. 1, an embodiment of the present application provides a network management method, which is applied to the above network management system, and specifically includes the following steps:
step S101, monitoring that the configuration file of the target equipment is modified, and acquiring a modified target configuration file of the target equipment;
in some embodiments, when there are multiple network cards in the target device, the target configuration file includes network address configuration information and priority configuration information of each network card in the target device; the priority configuration information is used for identifying the priority of each network card in the target device.
In one possible implementation manner, in an embodiment of the present application, whether the configuration file of the target device is modified is monitored by at least one of the following manners:
If the network card of the target device has the wired network card, monitoring whether the configuration file corresponding to the wired network card in the target device is modified or not through a netlink socket; that is, subscribing to the change condition of the network card through the netlink socket;
if the wireless network card exists in the network card of the target device, monitoring whether the configuration file corresponding to the wireless network card in the target device is modified or not by receiving a modification notification reported by the relevant interface; when the configuration file corresponding to the wireless network card is modified, the wireless network card can report a modification notification through the bottom layer interface, and when the modification notification is received, the configuration information corresponding to the wireless network card can be determined to be modified.
It should be noted that, when only one of the wired network card or the wireless network card exists in the target device, only the step corresponding to the one network card is executed, and if both the wired network card and the wireless network card exist in the target device, the two modes are used to determine whether the configuration file corresponding to each network card is modified.
Step S102, acquiring the current network card state of each network card of the target equipment;
the network card state comprises an online state and an abnormal state, wherein the online state is used for identifying that the network card is in a state of normal connection and needs to be managed, and the abnormal state is used for identifying that the network card is in a state of abnormal connection (such as disconnection) and the like.
In some embodiments, before the routing management module adjusts the configuration of the routing information of the target device, the network card management module obtains the current network card state of each network card of the target device from the network card management module.
It should be noted that, in the present application, the above-mentioned step S101 is executed by the routing management module, and the execution order of the network card states of the network cards in the target device determined by the network card management module is not limited, if the network card states of the network cards are not determined by the network card management module when the routing management module executes the step S102, the routing management module waits until the network card states of the network cards are obtained from the network card management module, and then executes the step of adjusting the routing information (i.e. step S103 below).
Step S103, if a plurality of network cards exist in the target device in an on-line state, the network segment routing information of each network card and the device routing information of the target device are adjusted according to the network address configuration information and the priority configuration information corresponding to the plurality of network cards in the target configuration file.
In specific implementation, aiming at any network card in a plurality of network cards, according to the network address configuration information corresponding to the any network card, the network segment routing information of the any network card is adjusted;
according to the priority configuration information corresponding to the network cards, determining network segment routing information of the network card with the highest priority in the network cards as equipment routing information of target equipment; when the network cards are in an online state, setting the network card with the highest priority in the online state as a default network card of the target device, and determining network segment routing information of the default network card as device routing information of the target device.
In some embodiments, if one network card exists in the target device in an online state, according to network address configuration information corresponding to the network card in the online state in the target configuration file, determining network segment routing information of the network card in the online state, and determining the network segment routing information as device routing information of the target device;
in some embodiments, if the network card in the abnormal state exists in the target device, the network segment routing information of the network card in the abnormal state recorded in advance is deleted.
The following describes the above procedure in detail with a specific example, in which it is assumed that there are 4 network cards, namely network cards 1 to 4, in total in the target device.
In the implementation, if the network cards 1 to 3 are determined to be in the on-line state after the network card states of the network cards 1 to 4 are acquired, the network card 4 is in the abnormal state, and the network cards 1 to 4 are determined to be respectively the network card 2, the network card 4, the network card 1 and the network card 3 according to the priority arrangement information from high to low. At this time, the network segment routing information of the network card 4 recorded in advance is deleted, the corresponding network segment routing information is adjusted according to the network address configuration information of the network cards 1 to 3, the network card 2 is determined as a default network card according to the priority order (the priority is respectively the network card 2, the network card 1 and the network card 3 from high to low) between the network cards 1 to 3, and the network segment routing information of the network card 2 is determined as the device routing information of the target device.
If the network card 1 is in the on-line state after the network card states of the network cards 1 to 4 are acquired, the network cards 2 to 4 are in the abnormal state, and the network cards 1 to 4 are respectively the network card 2, the network card 4, the network card 1 and the network card 3 according to the priority from high to low according to the priority configuration information. At this time, the network segment routing information of the network cards 2 to 4 recorded in advance is deleted, the corresponding network segment routing information is adjusted according to the network address configuration information of the network card 1, the network card 1 is determined as a default network card, and the network segment routing information of the network card 1 is determined as the device routing information of the target device.
According to the method, when the configuration file in the equipment is monitored to be modified, the routing information is adjusted according to the network card state of the network card in the equipment and the modified configuration file, so that the network equipment can automatically adjust the network without intervention of a user when the configuration file is changed, the use of the user is facilitated, and the equipment is convenient to deploy in a mass.
It should be noted that, steps S101 to S103 are implementation processes of the network management method in the case that there is a plurality of network cards in the target device, and when there is only one network card in the target device, the flow of the network management method is as follows: the configuration file of the target equipment is monitored to be modified, and the modified target configuration file of the target equipment, namely the network configuration information of the network card, is obtained; acquiring the network card state of the network card, and deleting the route information of the target equipment if the network card state is abnormal; if the network card state is in the on-line state, the network segment routing information of the network card is determined according to the network address configuration information of the network card, and the network segment routing information of the network card is determined as the device routing information of the target device. The specific process is similar to the steps S101 to S103, and will not be repeated here.
Fig. 2 is a schematic flow chart of a network card management process provided in the embodiment of the present application, and a process of determining a network card status by a network card management module in the embodiment of the present application is described below with reference to fig. 2, where the process specifically includes the following steps:
step S201, when starting, acquiring the network card state of each network card in the target equipment;
step S202, monitoring whether the configuration file of the target device is modified; if not, executing step S203, if yes, executing step S204;
specifically, whether the configuration file corresponding to the wired network card in the target equipment is modified or not is monitored through a netlink socket; and monitoring whether the configuration file corresponding to the wireless network card in the target equipment is modified or not by receiving the modification notification reported by the relevant interface.
Step S203, outputting the network card state of each network card in the target equipment;
step S204, the network card state of each network card in the target equipment is obtained again and output.
In one possible implementation manner, the network address configuration information includes a DHCP enabled state;
in step S103, before adjusting the network segment routing information of each network card and the device routing information of the target device according to the network address configuration information and the priority configuration information corresponding to the plurality of network cards in the target configuration file, it is further required to determine that the DHCP enabling state is not enabled by using the network address management module, and at this time, the IP address, the subnet mask and the gateway information of each network card in the target device in the network address configuration information.
If the DHCP enabled status in the network address configuration information is enabled, and only the DHCP enabled status is configured in the network address configuration information, after the network card status of each network card of the target device is obtained in step S102, the following process needs to be executed by using the network address management module before the network segment routing information of each network card and the device routing information of the target device are adjusted in step S103:
aiming at the network card with each network card in an on-line state, a network address acquisition request is sent to a server through DHCP; receiving a network address allocated to the network card by a server, and storing the network address into network address configuration information of the network card; including but not limited to the IP address of the network card, the subnet mask, and gateway information.
Fig. 3 is a flowchart of a network address management process provided in the embodiment of the present application, and a process of determining a network address of a network card by a network address management module in the embodiment of the present application is described below with reference to fig. 3, where the process specifically includes the following steps:
step S301, network address configuration information of each network card in the current target equipment is obtained;
step S302, monitoring whether the network address configuration information is modified; if yes, go to step S303, otherwise go to step S308;
Specifically, whether the network address configuration information corresponding to the wired network card in the target equipment is modified or not is monitored through a netlink socket; and monitoring whether the network address configuration information corresponding to the wireless network card in the target equipment is modified or not by receiving the modification notification reported by the relevant interface.
Step S303, determining whether the DHCP enabled status in the network address configuration information is enabled; if yes, executing step S304, and if not, executing step S308;
step S304, obtaining the network card state of each network card in the target equipment;
step S305, determining whether a network card with an online state exists; if yes, executing step S306, otherwise executing step S308;
step S306, starting the DHCP function, sending a network address acquisition request to a server and receiving a DHCP feedback signal;
the DHCP feedback signal carries a DHCP success/failure indication, and when the DHCP feedback signal carries the DHCP success indication, the DHCP feedback signal carries a network address allocated by a server for the network card;
step S307, determining that the DHCP is successful, and synchronizing the network address to the network address configuration information of the network card;
step S308, the flow ends.
Fig. 4 is a flow chart of a route management process provided in an embodiment of the present application, and a process of determining route information of a target device by using the route management module in an embodiment of the present application is described below with reference to fig. 4, where the process specifically includes the following steps:
Step S401, monitoring that the configuration file of the target equipment is modified, and acquiring a modified target configuration file of the target equipment;
the target configuration file includes network address configuration information and priority configuration information of each multi-network card.
Step S402, acquiring the current network card state of each network card of the target equipment;
step S403, determining whether a plurality of network cards are in an on-line state, if so, executing step S404, and if not, executing step S406;
step S404, according to the network address configuration information of each network card, respectively adjusting the corresponding network segment routing information;
step S405, determining a default network card according to the priority configuration information, and determining network segment routing information of the default network card as device routing information of the target device.
Step 406, determining whether a network card is in an on-line state, if so, executing step S407, otherwise, executing step S408;
step S407, according to the network address configuration information of the network card, adjusting the corresponding network segment routing information, and determining the network segment routing information as the device routing information of the target device;
step S408, deleting the network segment route information of each network card in the target device.
In the embodiment of the application, the user invokes the related configuration information of RPC protocol synchronization to the local of the device through the local configuration or the remote procedure, wherein the configuration information is provided with information such as the IP address of the network card, whether the DHCP, the priority of the network card and the like, and the network management system on the device automatically adjusts the current IP address, the routing information, the network card bond state and the network card bridging state of the device in real time according to the actual condition of the network card and the configuration of the user. In the process, the network address management module, the network card management module and the routing management module perform centralized management, and the three modules are highly coupled and interdependent; for the user, only the network card address configuration on the current equipment of the network management system and the priority configuration of the network card under the condition of a plurality of network cards are required to be informed, and the network management system is used for centralized unified management.
The method has the following beneficial effects:
1. setting mass deployment of equipment, wherein an upper layer can pre-allocate network address conditions or start a DHCP function; the same series of products can be managed by using the same configuration, and network address information does not need to be paid attention to after later deployment.
2. The unified centralization of network management is realized, and the user layer can remotely control the IP address and the routing information of the equipment by the method.
Based on the same disclosure concept, the embodiments of the present application further provide a network management device, and since the device is the device in the method in the embodiments of the present application and the principle of the device for solving the problem is similar to that of the method, the implementation of the device may refer to the implementation of the method, and the repetition is omitted.
Fig. 5 is a schematic diagram of a network management device provided in an embodiment of the present application, and referring to fig. 5, an embodiment of the present application provides a network management device, which includes:
a first obtaining module 501, configured to monitor that a configuration file of a target device is modified, and obtain a modified target configuration file of the target device;
a second obtaining module 502, configured to obtain a network card state of each network card currently of the target device, where the network card state includes an online state and an abnormal state;
And an adjusting module 503, configured to adjust network segment routing information of each network card and device routing information of the target device according to network address configuration information and priority configuration information corresponding to the plurality of network cards in the target configuration file if the plurality of network cards exist in the target device in an online state.
Optionally, the first obtaining module 501 is specifically configured to monitor whether the configuration file of the target device is modified by at least one of the following ways:
if the network card of the target device is provided with the wired network card, monitoring whether the configuration file corresponding to the wired network card in the target device is modified or not through a network socket;
if the wireless network card exists in the network card of the target device, whether the configuration file corresponding to the wireless network card in the target device is modified is monitored by receiving a modification notification reported by the relevant interface.
Optionally, the adjusting module 503 is specifically configured to:
aiming at any network card in the plurality of network cards, according to the network address configuration information corresponding to the any network card, adjusting the network segment routing information of the any network card;
and determining network segment routing information of the network card with the highest priority in the plurality of network cards as equipment routing information of the target equipment according to the priority configuration information corresponding to the plurality of network cards.
Optionally, the adjusting module 503 is further configured to:
if one network card exists in the target equipment and is in an online state, according to the network address configuration information corresponding to the network card in the online state in the target configuration file, determining network segment routing information of the network card in the online state, and determining the network segment routing information as equipment routing information of the target equipment;
and if the network card in the abnormal state exists in the target equipment, deleting the network segment routing information of the network card in the pre-recorded abnormal state.
Optionally, the network address configuration information includes a DHCP enablement status;
optionally, the adjusting module 503 is further configured to:
and determining that the DHCP enablement state is not enabled.
Optionally, if the DHCP enabled status is enabled, the adjusting module 503 is further configured to:
aiming at the network card with each network card state being in an on-line state, sending a network address acquisition request to a server through the DHCP;
and receiving the network address allocated to the network card by the server, and storing the network address into the network address configuration information of the network card.
Based on the same disclosure concept, the embodiment of the present application further provides a network management device, and since the device is the device in the method in the embodiment of the present application and the principle of the device for solving the problem is similar to that of the method, the implementation of the device may refer to the implementation of the method, and the repetition is omitted.
Those skilled in the art will appreciate that the various aspects of the present application may be implemented as a system, method, or program product. Accordingly, aspects of the present application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
In some possible embodiments, an apparatus according to the present application may include at least one processor, and at least one memory. The memory stores therein program code that, when executed by the processor, causes the processor to perform the steps in the network management method according to various exemplary embodiments of the present application described above in this specification.
An apparatus 600 according to such an embodiment of the present application is described below with reference to fig. 6. The device 600 shown in fig. 6 is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments herein.
As shown in fig. 6, the device 600 is in the form of a general purpose device. The components of device 600 may include, but are not limited to: the at least one processor 601, the at least one memory 602, and a bus 603 connecting the different system components (including the memory 602 and the processor 601), wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps of:
The method comprises the steps of monitoring that a configuration file of target equipment is modified, and obtaining a modified target configuration file of the target equipment;
acquiring the current network card state of each network card of the target equipment, wherein the network card state comprises an online state and an abnormal state;
if the network cards exist in the target equipment and are in an on-line state, the network segment routing information of each network card and the equipment routing information of the target equipment are adjusted according to the network address configuration information and the priority configuration information corresponding to the network cards in the target configuration file.
Bus 603 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, and a local bus using any of a variety of bus architectures.
The memory 602 may include readable media in the form of volatile memory such as Random Access Memory (RAM) 6021 and/or cache memory 6022, and may further include Read Only Memory (ROM) 6023.
Memory 602 may also include a program/utility 6025 having a set (at least one) of program modules 6024, such program modules 6024 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The device 600 may also communicate with one or more external devices 604 (e.g., keyboard, pointing device, etc.), one or more devices that enable a user to interact with the device 600, and/or any devices (e.g., routers, modems, etc.) that enable the device 600 to communicate with one or more other devices. Such communication may occur through an input/output (I/O) interface 605. Also, device 600 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 606. As shown, network adapter 606 communicates with other modules for device 600 over bus 603. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with device 600, including, but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
Optionally, the processor monitors whether the configuration file of the target device is modified by at least one of:
if the network card of the target device is provided with the wired network card, monitoring whether the configuration file corresponding to the wired network card in the target device is modified or not through a network socket;
If the wireless network card exists in the network card of the target device, whether the configuration file corresponding to the wireless network card in the target device is modified is monitored by receiving a modification notification reported by the relevant interface.
Optionally, the above processor is specifically configured to:
aiming at any network card in the plurality of network cards, according to the network address configuration information corresponding to the any network card, adjusting the network segment routing information of the any network card;
and determining network segment routing information of the network card with the highest priority in the plurality of network cards as equipment routing information of the target equipment according to the priority configuration information corresponding to the plurality of network cards.
Optionally, after obtaining the current network card status of each network card of the target device, the processor is further configured to:
if one network card exists in the target equipment and is in an online state, according to the network address configuration information corresponding to the network card in the online state in the target configuration file, determining network segment routing information of the network card in the online state, and determining the network segment routing information as equipment routing information of the target equipment;
and if the network card in the abnormal state exists in the target equipment, deleting the network segment routing information of the network card in the pre-recorded abnormal state.
Optionally, the network address configuration information includes a DHCP enablement status;
optionally, before adjusting the network segment routing information of each network card and the device routing information of the target device according to the network address configuration information and the priority configuration information corresponding to the plurality of network cards in the target configuration file, the processor is further configured to:
and determining that the DHCP enablement state is not enabled.
Optionally, if the DHCP enabled state is enabled, the processor is further configured to, after acquiring a current network card state of each network card of the target device, adjust network segment routing information of each network card and device routing information of the target device:
aiming at the network card with each network card state being in an on-line state, sending a network address acquisition request to a server through the DHCP;
and receiving the network address allocated to the network card by the server, and storing the network address into the network address configuration information of the network card.
In some possible embodiments, aspects of a network management method provided herein may also be implemented in the form of a program product comprising program code for causing a computer device to carry out the steps of a network management method according to various exemplary embodiments of the present application as described herein above when the program product is run on the computer device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for monitoring of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code and may run on a device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device, partly on a remote device, or entirely on the remote device or server. In the case of remote devices, the remote device may be connected to the user device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external device (e.g., connected through the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the elements described above may be embodied in one element in accordance with embodiments of the present application. Conversely, the features and functions of one unit described above may be further divided into a plurality of units to be embodied.
Furthermore, although the operations of the methods of the present application are depicted in the drawings in a particular order, this is not required to or suggested that these operations must be performed in this particular order or that all of the illustrated operations must be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flowchart and/or block of the flowchart and block diagrams, and combinations of flowcharts and block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (10)

1. A method of network management, the method comprising:
The method comprises the steps of monitoring that a configuration file of target equipment is modified, and obtaining a modified target configuration file of the target equipment;
acquiring the current network card state of each network card of the target equipment, wherein the network card state comprises an online state and an abnormal state;
if the network cards exist in the target equipment in an on-line state, the network segment routing information of each network card and the equipment routing information of the target equipment are adjusted according to the network address configuration information and the priority configuration information corresponding to the network cards in the target configuration file.
2. The method of claim 1, wherein the target device's profile is monitored for modification by at least one of:
if the network card of the target equipment is provided with the wired network card, monitoring whether the configuration file corresponding to the wired network card in the target equipment is modified or not through a network socket;
if the wireless network card exists in the network card of the target device, whether the configuration file corresponding to the wireless network card in the target device is modified or not is monitored by receiving a modification notification reported by the relevant interface.
3. The method according to claim 1, wherein the adjusting network segment routing information of each network card and device routing information of the target device according to network address configuration information and priority configuration information corresponding to the plurality of network cards in the target configuration file includes:
Aiming at any network card in the plurality of network cards, according to the network address configuration information corresponding to the any network card, adjusting network segment routing information of the any network card;
and determining network segment routing information of the network card with the highest priority in the network cards as equipment routing information of the target equipment according to the priority configuration information corresponding to the network cards.
4. The method of claim 1, wherein after the obtaining the network card status of each network card currently of the target device, further comprises:
if one network card exists in the target equipment and is in an online state, according to the network address configuration information corresponding to the network card in the online state in the target configuration file, determining network segment routing information of the network card in the online state, and determining the network segment routing information as equipment routing information of the target equipment;
and if the network card in the abnormal state exists in the target equipment, deleting the network segment routing information of the network card in the pre-recorded abnormal state.
5. The method according to any one of claims 1 to 4, wherein the network address configuration information includes a DHCP enabled status;
Before the network segment routing information of each network card and the device routing information of the target device are adjusted according to the network address configuration information and the priority configuration information corresponding to the network cards in the target configuration file, the method further comprises:
and determining that the DHCP enablement status is not enabled.
6. The method of claim 5, wherein if the DHCP enabled status is enabled, after obtaining the current network card status of each network card of the target device, before adjusting the network segment routing information of each network card and the device routing information of the target device, the method further comprises:
aiming at the network card with each network card state being in an on-line state, sending a network address acquisition request to a server through the DHCP;
and receiving the network address allocated to the network card by the server, and storing the network address into the network address configuration information of the network card.
7. A network management device, the device comprising:
the first acquisition module is used for monitoring that the configuration file of the target equipment is modified and acquiring the modified target configuration file of the target equipment;
the second acquisition module is used for acquiring the current network card state of each network card of the target equipment, wherein the network card state comprises an online state and an abnormal state;
And the adjusting module is used for adjusting network segment routing information of each network card and equipment routing information of the target equipment according to network address configuration information and priority configuration information corresponding to the network cards in the target configuration file if the network cards exist in the target equipment and are in an on-line state.
8. The apparatus of claim 7, wherein the first acquisition module monitors whether a modification has occurred to the configuration file of the target device by at least one of:
if the network card of the target equipment is provided with the wired network card, monitoring whether the configuration file corresponding to the wired network card in the target equipment is modified or not through a network socket;
if the wireless network card exists in the network card of the target device, whether the configuration file corresponding to the wireless network card in the target device is modified or not is monitored by receiving a modification notification reported by the relevant interface.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1-6 when the computer program is executed by the processor.
10. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the steps of the method of any of claims 1 to 6.
CN202310257444.2A 2023-03-13 2023-03-13 Network management method, device and equipment Pending CN116405379A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310257444.2A CN116405379A (en) 2023-03-13 2023-03-13 Network management method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310257444.2A CN116405379A (en) 2023-03-13 2023-03-13 Network management method, device and equipment

Publications (1)

Publication Number Publication Date
CN116405379A true CN116405379A (en) 2023-07-07

Family

ID=87011524

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310257444.2A Pending CN116405379A (en) 2023-03-13 2023-03-13 Network management method, device and equipment

Country Status (1)

Country Link
CN (1) CN116405379A (en)

Similar Documents

Publication Publication Date Title
US10834015B2 (en) Dynamic resource allocation for sensor devices on a mixed-infrastructure network
US10868581B2 (en) Data center management using device identification over power-line
CN103546914A (en) HSS (home subscriber server) master-slave management method and HSS master-slave management device
CN110445697B (en) Video big data cloud platform equipment access service method
US20150264184A1 (en) Conference terminal control system, conference terminal control device, and conference terminal control method
JP2019503632A (en) Optical communication system with distributed wet plant manager
CN115357308B (en) Docker-based edge Internet of things agent device, system and application method
CN110557281B (en) Intelligent operation and maintenance method and device based on CMDB and alarm map
CN112035123A (en) Method for realizing no server based on kubernets platform
CN110706426A (en) Method and system for managing USB tax control disk
CN101795207A (en) Acquirer dynamic deployment method and system of multi-technology networks
CN113300865B (en) Management and control method, network system, equipment and storage medium
CN116405379A (en) Network management method, device and equipment
CN104378231A (en) Control system and control method for enterprise wireless router
CN116208486A (en) Gateway backup and replacement method and system
CN114363164A (en) Cloud network service arrangement control method and system, storage medium and electronic equipment
JP4820381B2 (en) Network configuration method, node device, management device, and network
JP2018106246A (en) Centralized monitor control system
CN109814904B (en) HMI configuration synchronization system and method
JP5418184B2 (en) Home device management system and home device management method
CN112311570A (en) Method and device for opening network equipment
CN116527486B (en) Device independent function self-adaptive management method, device and medium
CN114615139B (en) Automatic configuration management method and device for switch, electronic equipment and storage medium
JP2017038111A (en) Batch management system, batch management method, and program
JP6409805B2 (en) Power supply control device, power supply control system, power supply control method, and power supply control program

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