CN111901143A - Method and system for diagnosing abnormal problems in PXE environment - Google Patents

Method and system for diagnosing abnormal problems in PXE environment Download PDF

Info

Publication number
CN111901143A
CN111901143A CN202010566593.3A CN202010566593A CN111901143A CN 111901143 A CN111901143 A CN 111901143A CN 202010566593 A CN202010566593 A CN 202010566593A CN 111901143 A CN111901143 A CN 111901143A
Authority
CN
China
Prior art keywords
pxe
network packet
network
address
installation
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
CN202010566593.3A
Other languages
Chinese (zh)
Other versions
CN111901143B (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 CN202010566593.3A priority Critical patent/CN111901143B/en
Publication of CN111901143A publication Critical patent/CN111901143A/en
Application granted granted Critical
Publication of CN111901143B publication Critical patent/CN111901143B/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/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • 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/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • 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/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Abstract

The application discloses a method and a system for diagnosing abnormal problems in a PXE environment, wherein the method comprises the following steps: constructing a network topology of the current PXE environment according to the DHCP network packet and the ARP network packet; identifying and tracking the installation progress of all PXE clients in the current PXE environment; judging whether a network packet in the current PXE environment is in an abnormal state or not in the installation progress of any PXE Client; if the installation of any PXE Client is abnormal, judging that the installation of any PXE Client fails; alarming the fault; and saves the installation information and outputs the installation information to the log. The system comprises: the system comprises a network topology construction module, an installation progress tracking module, a network packet abnormity judgment module, an alarm module and an installation information processing module. Through the PXE installation problem processing method and device, the processing efficiency of the PXE installation problem can be effectively improved.

Description

Method and system for diagnosing abnormal problems in PXE environment
Technical Field
The present application relates to the technical field of processing faults of a pre-boot execution environment, and in particular, to a method and a system for diagnosing abnormal problems in a PXE environment.
Background
PXE (Preboot eXecution Environment) provides a mechanism for booting a computer using a network interface that allows booting of the computer independent of a local data storage device or a local installed operating system. The PXE is divided into a Server (service) end and a Client (Client) end, and generally, the PXE Server end provides an automatic installation file and configuration of dozens or even hundreds of operating systems with different versions, which makes the configuration of the PXE Server very complicated. In a complex configuration, when various configuration files and starting paths have problems, how to analyze the abnormal problem is an important technical problem.
At present, in a PXE environment, an abnormal problem is usually handled by a method that only a PXE Client is subjected to error reporting during installation, and then an installer performs troubleshooting to finally confirm which operating system PXE is installed with a problem. Specifically, when the installation of the PXE Client is wrong, firstly, a PXE Server administrator is informed, a PXE configuration file corresponding to an operating system is checked, installation files and path storage of the operating system are checked, network and http service states are checked, then, a tcpdump command is used for manual packet grabbing and storing, a pcap file is copied to a Windows machine, a wireshark tool is used for opening and analyzing, and finally, the error reason is located and repaired in a targeted mode.
However, the conventional method for processing the abnormal problem in the PXE environment is started only after the fault occurs, and a long time is required from the error report of the installation to the troubleshooting result acquisition, so that the processing efficiency of the abnormal problem is low. Moreover, since one PXE Server needs to support the automatic installation of dozens of operating systems with different versions, configuration files and paths are very complex, and each operating system correspondingly contains the basic configuration of different services such as dhcp, http, ftp, tftp, boot menu, boot file and the like. When a problem occurs, troubleshooting is very complicated, resulting in low troubleshooting efficiency. And moreover, when the configuration file has no obvious error, only the tcpdump can be configured to carry out network card packet capturing, all captured network card flow network packets are saved as the pcap file, the pcap file is copied to a windows host, the wireshark is downloaded to open the file, and the network flow packets are filtered and analyzed. Since the PXE Server is mostly in a very complex network environment, the circulation of a large number of underlying network packets may interfere and increase the difficulty of analysis, which makes the PXE network problem location process time and labor consuming and may also result in lower efficiency of processing the abnormal problem.
Disclosure of Invention
The application provides a method and a system for diagnosing abnormal problems in a PXE environment, and aims to solve the problems that a fault processing method in the prior art is time-consuming and low in processing efficiency.
In order to solve the technical problem, the embodiment of the application discloses the following technical scheme:
a method of diagnosing abnormal problems in a PXE environment, the method comprising:
constructing a network topology of the current PXE environment according to the DHCP network packet and the ARP network packet;
identifying and tracking the installation progress of all PXE clients in the current PXE environment;
in the installation progress of any PXE Client, judging whether a network packet in the current PXE environment is in an abnormal state, wherein the network packet comprises: DHCP network packet, ARP network packet, TFTP network packet and HTTP network packet;
if the installation of any PXE Client is abnormal, judging that the installation of any PXE Client fails;
alarming the fault;
saving installation information and outputting the installation information to a log, wherein the installation information comprises: the IP address of any PXEClient, the requested operating system version, the network packet error code, and the downloaded file name field.
Optionally, the constructing a network topology of the current PXE environment according to the DHCP network packet and the ARP network packet includes:
acquiring a currently used network card by utilizing a pcap _ lookup dev () function;
capturing a DHCP network packet and an ARP network packet at the network card by using an got _ packet function;
acquiring IP addresses of all PXE clients in the current PXE environment according to the DHCP network packet and the ARP network packet, and defining the IP addresses as first IP addresses;
according to the first IP address, a network address allocation table is formed through analysis;
and constructing the network topology of the current PXE environment according to the network address allocation table.
Optionally, the identifying and tracking the installation progress of all PXE clients in the current PXE environment includes:
judging whether a function library of the libpcap has a new ARP addressing request;
if yes, judging that a new PXE Client is accessed in the current PXE environment;
according to the new ARP addressing request, a DHCP server allocates an IP address to the new PXE Client, and the allocated IP address is defined as a second IP address;
monitoring the network packet of the second IP address in real time;
and tracking the downloading and installing progress of the new PXE Client by filtering the Info information of the TFTP network packet and the HTTP network packet in the second IP address.
Optionally, the tracking the download and installation progress of the new PXE Client by filtering the Info information of the TFTP network packet and the HTTP network packet in the second IP address includes:
acquiring a download target of a TFTP network packet in a second IP address network packet;
determining an installation progress of the new PXE Client according to the download target, wherein the installation progress comprises the following steps: a bootx64.efi downloading stage, a default downloading stage, a vmlinux downloading stage, an initrd downloading stage, a kickstart downloading stage and an image source software package downloading stage.
Optionally, the network packet being in an abnormal state includes:
error codes appear in the network packet of the new PXE Client; and/or the presence of a gas in the gas,
there is no new TFTP protocol download request for a set period of time.
A system for diagnosing abnormal problems in a PXE environment, wherein the system is arranged in a PXE Server and comprises:
the network topology building module is used for building the network topology of the current PXE environment according to the DHCP network packet and the ARP network packet;
the installation progress tracking module is used for identifying and tracking the installation progress of all PXE clients in the current PXE environment;
the network packet exception judging module is used for judging whether a network packet in the current PXE environment is in an exception state in the installation progress of any PXE Client, and the network packet comprises: if the installation of any PXE Client is abnormal, judging that the installation of the PXE Client fails;
the alarm module is used for alarming the fault;
an installation information processing module, configured to save installation information and output the installation information to a log, where the installation information includes: the IP address of any PXE Client, the requested operating system version, the network packet error code, and the downloaded file name field.
Optionally, the network topology building module includes:
the network card acquisition unit is used for acquiring the currently used network card by utilizing a pcap _ lookup dev () function;
the network packet capturing unit is used for capturing a DHCP network packet and an ARP network packet at the network card by utilizing an got _ packet function;
the IP address acquisition unit is used for acquiring IP addresses of all PXE clients in the current PXE environment according to the DHCP network packet and the ARP network packet and defining the IP addresses as first IP addresses;
the analysis unit is used for analyzing and forming a network address distribution table according to the first IP address;
and the constructing unit is used for constructing the network topology of the current PXE environment according to the network address allocation table.
Optionally, the installation progress tracking module includes:
the judging unit is used for judging whether a new ARP addressing request exists in the libpcap function library or not, and if so, judging that a new PXE Client is accessed in the current PXE environment;
the IP address allocation unit is used for allocating an IP address to the new PXE Client according to the new ARP addressing request and defining the allocated IP address as a second IP address;
the network packet monitoring unit is used for monitoring the network packet of the second IP address in real time;
and the tracking unit is used for tracking the downloading and installing progress of the new PXE Client by filtering the Info information of the TFTP network packet and the HTTP network packet in the second IP address.
Optionally, the tracking unit comprises:
a download target acquiring subunit, configured to acquire a download target of the TFTP network packet in the second IP address network packet;
an installation progress determining subunit, configured to determine an installation progress of the new PXE Client according to the download target, where the installation progress includes: a bootx64.efi downloading stage, a default downloading stage, a vmlinux downloading stage, an initrd downloading stage, a kickstart downloading stage and an image source software package downloading stage.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
the application provides a PXE environment abnormal problem diagnosis method, which comprises the steps of firstly, constructing a network topology of the current PXE environment according to a DHCP network packet and an ARP network packet; secondly, identifying and tracking the installation progress of all PXE clients in the current PXE environment; then judging whether the state of the network packet in the current PXE environment is abnormal or not in the installation progress of any PXE Client, and if so, judging that the installation of any PXE Client fails; and finally, alarming the fault, storing the installation information and outputting the installation information to a log. According to the method, the network topology of the current PXE environment is built, the access condition of the PXE Client is monitored in real time, the installation progress of the PXE Client is tracked, when the installation of the PXE Client fails, the network packet at the bottom layer of the PXE Client is captured in time, the installation information is stored and output, the return state of the network packet and the reason of the installation failure of the PXE Client are conveniently analyzed, the problem of installation abnormity of the PXE is directly located from the bottom layer of the network, the large-batch configuration files are prevented from being checked, and the processing efficiency of the abnormity problem in the PXE environment can be greatly improved. Moreover, in the embodiment, when the problem of abnormal installation occurs, the fault reason can be located at the first time, instead of troubleshooting one by one after the client fails, so that the fault processing time is saved, and the fault processing efficiency is improved.
The present application further provides a system for diagnosing abnormal problems in a PXE environment, including: the system comprises a network topology construction module, an installation progress tracking module, a network packet abnormity judgment module, an alarm module and an installation information processing module. The system is arranged in a PXE Server, can monitor the access of new PXE clients in real time and automatically track the installation progress of all the PXE clients through the installation progress tracking module, starts the alarm module and the installation information processing module when the network packet abnormity judgment module monitors that the installation is abnormal, automatically alarms the abnormal state and keeps key request error information and IP in an underlying network packet, and therefore the abnormal problem in the PXE installation process can be directly located from the underlying layer. The structural design can avoid the investigation of different configuration files in the operating system, and a PXE Server TCPdump packet grabbing tool and a windows network protocol analysis environment do not need to be configured, so that the processing efficiency of the PXE installation problem can be effectively improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating a method for diagnosing an abnormal problem in a PXE environment according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a system for diagnosing an abnormal problem in a PXE environment according to an embodiment of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, 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, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
For a better understanding of the present application, embodiments of the present application are explained in detail below with reference to the accompanying drawings.
Example one
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a method for diagnosing an abnormal problem in a PXE environment according to an embodiment of the present disclosure. As shown in fig. 1, the method for diagnosing an abnormal problem in a PXE environment in the embodiment mainly includes the following steps:
s1: and constructing the network topology of the current PXE environment according to the DHCP network packet and the ARP network packet.
Specifically, step S1 includes:
s11: and acquiring the network card currently used by utilizing the pcap _ lookup dev () function.
The PXE Server is used as a DHCP Server and is responsible for distributing IP addresses to all PXE clients, namely the PXE Client. In this embodiment, the current network card in use is acquired by using the pcap _ lookup () function.
S12: and capturing the DHCP network packet and the ARP network packet at the network card by using an got _ packet function.
Under a PXE deployed Server environment, compiling and running are carried out, a libpcap is automatically called to capture a network packet, and a current network card is obtained and the Protocol in the network flow packet is monitored to be the flow packet of ARP and DHCP.
S13: and acquiring IP addresses of all PXE clients in the current PXE environment according to the DHCP network packet and the ARP network packet, and defining the IP addresses as first IP addresses.
S14: and resolving to form a network address allocation table according to the first IP address.
S15: and constructing the network topology of the current PXE environment according to the network address allocation table.
As can be seen from the above steps S11-S15, in this embodiment, the currently used network card is obtained through the pcap _ lookup dev () function, and the network card automatically captures DHCP and ARP network packets through the got _ packet function, and determines the number of clients currently distributing and applying for IP addresses and the IP corresponding to the clients according to the DHCP and ARP network packets, and analyzes to form a network address allocation table, and finally constructs a network topology of the current PXE environment according to the network address allocation table.
With continued reference to fig. 1, after the network topology is constructed, step S2 is executed: the installation progress of all PXE clients in the current PXE environment is identified and tracked.
Specifically, step S2 includes the following processes:
s21: and judging whether a new ARP addressing request exists in the libpcap function library.
If there is a new ARP addressing request in the libpcap function library, go to step S22: and judging that the current PXE environment has access of the new PXE Client.
Otherwise, judging that no new PXE Client is accessed in the current PXE environment.
S23: and according to the new ARP addressing request, the DHCP server allocates an IP address to the new PXE Client, and defines the allocated IP address as a second IP address.
In this embodiment, the second IP address is matched with the new PXE Client.
S24: and monitoring the network packet of the second IP address in real time.
Here all network packets of the second IP address need to be monitored.
S25: and tracking the downloading and installing progress of the new PXEClient by filtering the Info information of the TFTP network packet and the HTTP network packet in the second IP address.
Specifically, step S25 includes the following process:
s251: and acquiring a download target of the TFTP network packet in the second IP address network packet.
S252: and judging the installation progress of the new PXE Client according to the downloading target.
The installation schedule in this embodiment includes: a bootx64.efi downloading stage, a default downloading stage, a vmlinux downloading stage, an initrd downloading stage, a kickstart downloading stage and an image source software package downloading stage.
Through the steps S21-S25, monitoring of the PXE Client can be achieved, namely the PXE service state can be monitored in real time. Namely: and searching an ARP network packet of the new Client based on a libpcap function library, when a new DHCP request is detected, tracking the new PXEClient according to a second IP address serving as an IP address of the new PXE Client, and determining that the current installation step is in the stage of downloading bootx64. efi/default/vmlinux/initrd/kittstart/mirror source software packets and the like according to a downloading target of a TFTP protocol packet in the network packet.
With continued reference to fig. 1, after identifying and tracking the installation schedules of all PXE clients in the current PXE environment, step S3 is executed: and judging whether the state of the network packet in the current PXE environment is abnormal or not in the installation progress of any PXE Client.
The network packet in this embodiment includes: DHCP network packets, ARP network packets, TFTP network packets, and HTTP network packets.
The network packet in the abnormal state comprises the following steps:
in the first case: an error code occurs in the network packet of the new PXE Client, or,
in the second case: there is no new TFTP protocol download request for a set period of time, or,
in the third case: error codes appear in the network packets of the new PXE Client, and no new TFTP protocol downloading request exists in a set time period.
And when the abnormal state of the network packet is in the first condition or the second condition, the abnormal state of the network packet is judged to be the abnormal state of the network packet. For the case of multiple clients, the network packet exception state may further include a third case, namely: when one Client side has error codes in the network packet of the new PXE Client, and the other Client side has no new TFTP protocol downloading request in a set time period, the situations are judged that the network packet is in an abnormal state.
If the status of the network packet in the current PXE environment is abnormal, execute step S4: and judging that the installation of any PXE Client fails. If the state of the network packet in the current PXE environment is normal, the installation of any PXE Client is judged not to have a fault.
When it is determined that the installation of any PXE Client fails, steps S5 and S6 are performed. Wherein step S5: and alarming the fault.
S6: and saving the installation information and outputting the installation information to a log.
Wherein the installation information includes: the IP address of any PXE Client, the requested operating system version, the network packet error code, and the downloaded file name field.
As can be seen from the above steps S3-S6, in the monitoring process of the PXE Client, whether an error code or a data packet with an abnormal state, that is, an ErrorCode, occurs in the network packet marked as the new PXE Client based on the libpcap function library, or whether there is no new TFTP protocol download request within a set time period is detected, if so, the PXE Client matched with the IP with the abnormal state is determined as the PXE Client with the abnormal state, at this time, the IP address and the currently requested file name are automatically saved, the current download progress is located, the current download progress is saved in the abnormal log, and the mail prompt information is automatically sent to the root user, thereby implementing the fault alarm and providing a basis for troubleshooting.
Example two
Referring to fig. 2 based on the embodiment shown in fig. 1, fig. 2 is a schematic structural diagram of a system for diagnosing an abnormal problem in a PXE environment according to the embodiment of the present disclosure. As shown in fig. 2, the system for diagnosing abnormal problems in the PXE environment in the embodiment mainly includes: the system comprises a network topology construction module, an installation progress tracking module, a network packet abnormity judgment module, an alarm module and an installation information processing module.
The network topology building module is used for building the network topology of the current PXE environment according to the DHCP network packet and the ARP network packet. And the installation progress tracking module is used for identifying and tracking the installation progress of all PXE clients in the current PXE environment. The network packet exception judging module is used for judging whether the network packet in the current PXE environment is in an exception state in the installation progress of any PXE Client, and the network packet comprises: and if the DHCP network packet, the ARP network packet, the TFTP network packet and the HTTP network packet are abnormal, judging that the installation of any PXE Client has a fault. And the alarm module is used for alarming faults. The installation information processing module is used for saving installation information and outputting the installation information to a log, and the installation information comprises: the IP address of any PXE Client, the requested operating system version, the network packet error code, and the downloaded file name field.
The network topology construction module comprises: the device comprises a network card acquisition unit, a network packet capture unit, an IP address acquisition unit, an analysis unit and a construction unit. The network card acquisition unit is used for acquiring the currently used network card by utilizing a pcap _ lookup dev () function; the network packet capturing unit is used for capturing a DHCP network packet and an ARP network packet at the network card by utilizing an got _ packet function; the IP address acquisition unit is used for acquiring IP addresses of all PXEClients in the current PXE environment according to the DHCP network packet and the ARP network packet and defining the IP addresses as first IP addresses; the analysis unit is used for analyzing and forming a network address distribution table according to the first IP address; and the constructing unit is used for constructing the network topology of the current PXE environment according to the network address allocation table.
The installation progress tracking module includes: the device comprises a judging unit, an IP address distributing unit, a network packet monitoring unit and a tracking unit. The judging unit is used for judging whether a new ARP addressing request exists in the libpcap function library or not, and if so, judging that a new PXE Client is accessed in the current PXE environment; the IP address allocation unit is used for allocating an IP address to the new PXEClient according to the new ARP addressing request and defining the allocated IP address as a second IP address; the network packet monitoring unit is used for monitoring the network packet of the second IP address in real time; and the tracking unit is used for tracking the downloading and installing progress of the new PXE Client by filtering the Info information of the TFTP network packet and the HTTP network packet in the second IP address.
Further, the tracking unit includes: a download target acquisition subunit and an installation progress determination subunit. The download target acquiring subunit is configured to acquire a download target of the TFTP network packet in the second IP address network packet; and the installation progress determining subunit is used for determining the installation progress of the new PXE Client according to the downloading target, and the installation progress comprises the following steps: a bootx64.efi downloading stage, a default downloading stage, a vmlinux downloading stage, an initrd downloading stage, a kickstart downloading stage and an image source software package downloading stage.
The working principle and the working method of the system for diagnosing the abnormal problem in the PXE environment in this embodiment have been described in detail in the embodiment shown in fig. 1, and are not described herein again.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A method for diagnosing abnormal problems in a PXE environment is characterized by comprising the following steps:
constructing a network topology of the current PXE environment according to the DHCP network packet and the ARP network packet;
identifying and tracking the installation progress of all PXE clients in the current PXE environment;
in the installation progress of any PXE Cl agent, judging whether a network packet in the current PXE environment is in an abnormal state, wherein the network packet comprises: DHCP network packet, ARP network packet, TFTP network packet and HTTP network packet;
if yes, judging that the installation of any PXE Cl agent has a fault;
alarming the fault;
saving installation information and outputting the installation information to a log, wherein the installation information comprises: the IP address of any PXEClient, the requested operating system version, the network packet error code, and the downloaded file name field.
2. The method as claimed in claim 1, wherein the constructing a network topology of a current PXE environment according to a DHCP network packet and an ARP network packet includes:
acquiring a currently used network card by utilizing a pcap _ lookup dev () function;
capturing a DHCP network packet and an ARP network packet at the network card by using an got _ packet function;
acquiring IP addresses of all PXE clients in the current PXE environment according to the DHCP network packet and the ARP network packet, and defining the IP addresses as first IP addresses;
according to the first IP address, a network address allocation table is formed through analysis;
and constructing the network topology of the current PXE environment according to the network address allocation table.
3. The method as claimed in claim 1, wherein the identifying and tracking the installation progress of all PXE clients in the current PXE environment includes:
judging whether a function library of the libpcap has a new ARP addressing request;
if yes, judging that a new PXE Client is accessed in the current PXE environment;
according to the new ARP addressing request, a DHCP server allocates an IP address to the new PXE Client, and the allocated IP address is defined as a second IP address;
monitoring the network packet of the second IP address in real time;
and tracking the downloading and installing progress of the new PXE Client by filtering the Info information of the TFTP network packet and the HTTP network packet in the second IP address.
4. The method as claimed in claim 3, wherein the tracking the downloading and installing progress of the new PXE Client by filtering the Info information of the TFTP network packet and the HTTP network packet in the second IP address includes:
acquiring a download target of a TFTP network packet in a second IP address network packet;
determining an installation progress of the new PXE Client according to the download target, wherein the installation progress comprises the following steps: a bootx64.efi downloading stage, a default downloading stage, a vmlinux downloading stage, an initrd downloading stage, a kickstart downloading stage and an image source software package downloading stage.
5. The method for diagnosing abnormal problems in the PXE environment as recited in claim 3, wherein the network packet being in the abnormal state includes:
error codes appear in the network packet of the new PXE Client; and/or the presence of a gas in the gas,
there is no new TFTP protocol download request for a set period of time.
6. A system for diagnosing abnormal problems in a PXE environment is characterized in that the system is arranged in a PXE Server and comprises:
the network topology building module is used for building the network topology of the current PXE environment according to the DHCP network packet and the ARP network packet;
the installation progress tracking module is used for identifying and tracking the installation progress of all PXE Cl objects in the current PXE environment;
the network packet exception judging module is used for judging whether a network packet in the current PXE environment is in an exception state in the installation progress of any PXE Client, and the network packet comprises: if the installation of any PXE Client is abnormal, judging that the installation of the PXE Client fails;
the alarm module is used for alarming the fault;
an installation information processing module, configured to save installation information and output the installation information to a log, where the installation information includes: the IP address of any PXE Client, the requested operating system version, the network packet error code, and the downloaded file name field.
7. The system for diagnosing abnormal problems in a PXE environment according to claim 6, wherein said network topology building module includes:
the network card acquisition unit is used for acquiring the currently used network card by utilizing a pcap _ lookup dev () function;
the network packet capturing unit is used for capturing a DHCP network packet and an ARP network packet at the network card by utilizing an got _ packet function;
the IP address acquisition unit is used for acquiring IP addresses of all PXECl agents in the current PXE environment according to the DHCP network packet and the ARP network packet and defining the IP addresses as first IP addresses;
the analysis unit is used for analyzing and forming a network address distribution table according to the first IP address;
and the constructing unit is used for constructing the network topology of the current PXE environment according to the network address allocation table.
8. The system for diagnosing abnormal problems in a PXE environment according to claim 6, wherein said installation progress tracking module includes:
the judging unit is used for judging whether a new ARP addressing request exists in the l ibpcap function library or not, and if so, judging that a new PXE Cl element is accessed in the current PXE environment;
the IP address allocation unit is used for allocating an IP address to the new PXE Client according to the new ARP addressing request and defining the allocated IP address as a second IP address;
the network packet monitoring unit is used for monitoring the network packet of the second IP address in real time;
and the tracking unit is used for tracking the downloading and installing progress of the new PXE Client by filtering the Info information of the TFTP network packet and the HTTP network packet in the second IP address.
9. The system for diagnosing abnormal problems in a PXE environment according to claim 8, wherein said tracking unit includes:
a download target acquiring subunit, configured to acquire a download target of the TFTP network packet in the second IP address network packet;
an installation progress determining subunit, configured to determine an installation progress of the new PXE Client according to the download target, where the installation progress includes: a bootx64.efi downloading stage, a default downloading stage, a vmlinux downloading stage, an initrd downloading stage, a kickstart downloading stage and an image source software package downloading stage.
CN202010566593.3A 2020-06-19 2020-06-19 Method and system for diagnosing abnormal problems in PXE environment Active CN111901143B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010566593.3A CN111901143B (en) 2020-06-19 2020-06-19 Method and system for diagnosing abnormal problems in PXE environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010566593.3A CN111901143B (en) 2020-06-19 2020-06-19 Method and system for diagnosing abnormal problems in PXE environment

Publications (2)

Publication Number Publication Date
CN111901143A true CN111901143A (en) 2020-11-06
CN111901143B CN111901143B (en) 2022-05-31

Family

ID=73206853

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010566593.3A Active CN111901143B (en) 2020-06-19 2020-06-19 Method and system for diagnosing abnormal problems in PXE environment

Country Status (1)

Country Link
CN (1) CN111901143B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104935451A (en) * 2014-03-19 2015-09-23 中国移动通信集团公司 Fault detection method and device
CN106126303A (en) * 2016-07-01 2016-11-16 合信息技术(北京)有限公司 The installation method of (SuSE) Linux OS, Apparatus and system
CN110457073A (en) * 2019-08-13 2019-11-15 北京工业大学 A kind of credible starting method of the Pre-boot Execution Environment PXE of Shen prestige server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104935451A (en) * 2014-03-19 2015-09-23 中国移动通信集团公司 Fault detection method and device
CN106126303A (en) * 2016-07-01 2016-11-16 合信息技术(北京)有限公司 The installation method of (SuSE) Linux OS, Apparatus and system
CN110457073A (en) * 2019-08-13 2019-11-15 北京工业大学 A kind of credible starting method of the Pre-boot Execution Environment PXE of Shen prestige server

Also Published As

Publication number Publication date
CN111901143B (en) 2022-05-31

Similar Documents

Publication Publication Date Title
US7890613B2 (en) Program deployment apparatus and method
US8370466B2 (en) Method and system for providing operator guidance in network and systems management
US7213179B2 (en) Automated and embedded software reliability measurement and classification in network elements
US8208381B2 (en) Root-cause approach to problem diagnosis in data networks
US7016955B2 (en) Network management apparatus and method for processing events associated with device reboot
US20080082661A1 (en) Method and Apparatus for Network Monitoring of Communications Networks
RU2501073C2 (en) System health and performance care of computing devices
CN106161109B (en) Network abnormity self-recovery method
US20110283138A1 (en) Change Tracking and Management in Distributed Applications
CN114884838B (en) Monitoring method and server of Kubernetes component
WO2018214928A1 (en) Method and apparatus for locating resolution fault, computer readable storage medium thereof, and computer device
CN109684155B (en) Monitoring configuration method, device, equipment and readable storage medium
CN112311576A (en) OTA upgrade diagnosis method and device, wireless routing equipment and terminal equipment
CN110971689B (en) System installation method, device, system, equipment and storage medium
CN106452860B (en) Equipment deployment method and device
CN112995042B (en) Method, device and equipment for generating service topological graph and storage medium
CN111901143B (en) Method and system for diagnosing abnormal problems in PXE environment
CN109218050B (en) Domain name system fault processing method and system
US20070198993A1 (en) Communication system event handling systems and techniques
CN113162815A (en) Flow switching method, system, equipment and medium
US20080216057A1 (en) Recording medium storing monitoring program, monitoring method, and monitoring system
CN111813627A (en) Application auditing method, device, terminal, system and readable storage medium
CN107046479B (en) Method and device for verifying state of network equipment
CN110784364A (en) Data monitoring method and device, storage medium and terminal
JP2000047912A (en) Method and device for monitorning network service and storage medium having recorded network service monitor program thereon

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