CN115002067A - Client host name processing method, device, system, equipment and medium - Google Patents

Client host name processing method, device, system, equipment and medium Download PDF

Info

Publication number
CN115002067A
CN115002067A CN202210409514.7A CN202210409514A CN115002067A CN 115002067 A CN115002067 A CN 115002067A CN 202210409514 A CN202210409514 A CN 202210409514A CN 115002067 A CN115002067 A CN 115002067A
Authority
CN
China
Prior art keywords
client
target client
host name
dhcp
target
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
CN202210409514.7A
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.)
Shenzhen Gongjin Electronics Co Ltd
Original Assignee
Shenzhen Gongjin Electronics 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 Shenzhen Gongjin Electronics Co Ltd filed Critical Shenzhen Gongjin Electronics Co Ltd
Priority to CN202210409514.7A priority Critical patent/CN115002067A/en
Publication of CN115002067A publication Critical patent/CN115002067A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application relates to the technical field of communication, and discloses a client host name processing method, a client host name processing device, a client host name processing system, computer equipment and a computer storage medium, which are used for perfecting client information and improving use experience. The method comprises the following steps: judging whether the target client is online; when the target client is online, detecting whether the host name of the target client is missing; and when the host name of the target client is detected to be missing, actively acquiring the host name of the target client for use when a client management page is displayed.

Description

Client host name processing method, device, system, equipment and medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, a system, a device, and a medium for processing a client hostname.
Background
At present, the application of a Dynamic Host Configuration Protocol (DHCP) client is more and more extensive, the DHCP client includes a router device and the like, the operation and management of a management page of the DHCP client are more and more humanized, a user has higher requirements on the management page of the DHCP client, and checking client information through the client management page becomes an indispensable function for the user. However, in some special cases, a cache file in the DHCP server that caches the host name (hostname) of the DHCP client may be emptied or the host name of the DHCP client may be missing in other cases, and at this time, the management page may not normally display the host name of the DHCP client, resulting in missing of displayed DHCP client information, and the usage friendliness is low.
Disclosure of Invention
The embodiment of the application provides a client host name processing method, device, system, equipment and medium, so as to solve the problem of DHCP client information loss and achieve low use friendliness.
A first aspect of the present application provides a client host name processing method, configured to a dynamic host configuration protocol DHCP server, where the client host name processing method includes:
judging whether the target client is online;
when the target client is online, detecting whether the host name of the target client is missing;
and when detecting that the host name of the target client is missing, actively acquiring the host name of the target client for use when displaying a client management page.
In an embodiment, the determining whether the target client is online includes:
acquiring the IP address of the target client, and acquiring an Address Resolution Protocol (ARP) table, wherein the ARP table comprises the IP address of the online client;
judging whether the IP address of the target client is in the ARP table or not;
when the IP address of the target client is in the ARP table, the IP address of the client is taken out to carry out an arping operation, and if the ping is successful, the target client is judged to be online;
and when the IP address of the target client is not in the ARP table or the arping operation ping is not on, judging that the target client is not on-line.
In one embodiment, the detecting whether the host name of the target client is missing includes:
judging whether a DHCP cache table of the DHCP server is obtained or not;
when the DHCP cache table is not acquired, judging that the host name of the target client side is lost;
when the DHCP cache table is obtained, judging whether a host command of the target client exists in the DHCP cache table;
when the host name of the target client side is not in the DHCP cache table, judging that the host name of the target client side is lost;
and when the host name of the target client side is in the DHCP cache table, judging that the host name of the target client side is not missing.
In one embodiment, the actively obtaining the hostname of the target client includes:
acquiring an address record of a DHCP server corresponding to the target client, wherein the address record comprises a corresponding relation between an IP address of the client under the DHCP server and a host name;
and inquiring the host name corresponding to the target client from the address record of the DHCP server through the IP address of the target client.
In one embodiment, the actively obtaining the hostname of the target client includes:
sending a naming service (NBNS) state request to the target client so that the target client forwards the NBNS state request to a display client and receives a host name of the target client fed back by the display client;
and receiving the host name of the target client sent by the target client.
In one embodiment, the actively obtaining the hostname of the target client includes:
sending a negative response NAK message to the target client so that the target client responds to the NAK message to disconnect the current connection and reinitiate a DHCP request to the DHCP server;
responding the DHCP request to update a DHCP cache table of the DHCP server;
and acquiring the host name of the target client from the updated DHCP cache table.
A second aspect of the present application provides a client hostname processing apparatus, configured to be used in a DHCP server, where the management page processing apparatus of the client includes:
the judging module is used for judging whether the target client is on line or not;
the detection module is used for detecting whether the host name of the target client side is lost or not when the target client side is online;
and the acquisition module is used for actively acquiring the host name of the target client when detecting that the host name of the target client is missing so as to be used when displaying the client management page.
A third aspect of the present application provides a client-side hostname processing system, including a DHCP server and a display client, wherein:
the display client is used for sending a client management page query request to the DHCP server;
the DHCP server is used for responding to the management page query request and judging whether the target client side is on line or not; when the target client is online, detecting whether the host name of the target client is missing; when detecting that the host name of the target client is missing, actively acquiring the host name of the target client; feeding back the host name of the target client to the display client;
and the display client is also used for displaying a client management page according to the host name of the target client.
A fourth aspect of the present application provides a DHCP server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the client hostname processing method when executing the computer program.
A fifth aspect of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the client hostname processing method.
In one of the provided schemes, when the host name of the online target client is missing, the host name of the target client can be actively acquired so as to make up for the problem of the missing of the host name, and the client information is perfected, so that the subsequent display client can normally acquire the host name from the DHCP server, the use friendliness is improved, and the use experience of a user is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings may be obtained according to these drawings without inventive labor.
FIG. 1 is a system diagram of a client hostname processing system in one embodiment of the present application;
FIG. 2 is a flow chart illustrating a method for handling a client hostname according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a client hostname processing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. 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.
The client hostname processing method provided by the embodiment of the application can be applied to a client hostname processing system as shown in fig. 1, wherein a display client can communicate with a DHCP server through a network. The display client is used for sending a client management page query request to the DHCP server; the DHCP server is used for responding to the management page query request and judging whether the target client is on line or not; when the target client is online, detecting whether the host name of the target client is missing; when the host name of the target client is detected to be missing, actively acquiring the host name of the target client; feeding back the host name of the target client to the display client; and the display client is also used for displaying a client management page according to the host name of the target client. Therefore, when the host name of the DHCP client is determined to be missing, the host name of the DHCP client can be effectively improved, so that the information of the managed client management page comprises the host name, and the use friendliness is effectively improved.
It should be noted that the display client is configured to display a client management page, and the display client may be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The DHCP server may be implemented by an independent server or a server cluster composed of a plurality of servers, which is not specifically limited. The following describes, by way of specific embodiments, a client host name processing method and apparatus, a DHCP server, a client host name processing system, and a computer storage medium, respectively, provided by the embodiments of the present application.
In an embodiment, as shown in fig. 2, a client host name processing method is provided, which is described by taking the application of the method to the DHCP server in fig. 2 as an example, and includes the following steps:
s10: judging whether the target client is on line or not;
as an example, the target client refers to a DHCP client, and for a DHCP server, it may determine whether the target client is online, and if the target client is not online, no response action is performed, and it is continuously determined whether the target client is online. If the target client is online, then execution of step S20 is triggered.
It should be noted that, in some embodiments, the step S10 is triggered when a management page display request of the display client is received. It can be understood that, when a user needs to check a management page through a display client, the display request of the management page can be triggered through the display client, and for the DHCP server, because the display client management page needs to acquire the host name of the online target client, when the display request of the management page of the display client is received, it is determined whether the target client is online. S20: when the target client is online, detecting whether the host name of the target client is missing;
s30: and when detecting that the host name of the target client is missing, actively acquiring the host name of the target client for use when displaying a client management page.
In steps S20-230, when it is detected that the target client is online, the client information of the target client, including the host name of the target client, needs to be displayed in the client management page, and therefore, in order to complete the client information, it is necessary to detect whether the host name of the target client is missing. When the host name of the target client is not lost, the host name of the target client can be acquired from the DHCP server by the display client, and then the operation is finished; therefore, in this embodiment, when detecting that the host name of the target client is missing, the step S30 is triggered, that is, the host name of the target client is actively acquired, so as to be used when displaying the client management page.
According to the embodiment, the client host name processing method is provided, when the host name of the online target client is missing, the host name of the target client can be actively acquired, so that the problem of the missing of the host name is solved, the client information is perfected, the subsequent display client can normally acquire the host name from the DHCP server, the use friendliness is improved, and the use experience of a user is improved.
In an embodiment, as shown in fig. 2, the step S10, that is, the step of determining whether the target client is online specifically includes the following steps:
s11: acquiring the IP address of the target client, and acquiring an Address Resolution Protocol (ARP) table, wherein the ARP table comprises the IP address of the online client;
s12: judging whether the IP address of the target client is in the ARP table or not;
s13: when the IP address of the target client is in the ARP table, the IP address of the client is taken out to carry out an arping operation, and if the ping is successful, the target client is judged to be online;
s14: and when the IP address of the target client is not in the ARP table or the arping operation ping is not on, judging that the target client is not on-line.
In steps S13-S14, an Address Resolution Protocol (ARP) table corresponding to the DHCP server is obtained, and an IP Address of the target client is obtained, it is understood that, in a TCP/IP network environment, each networked DHCP client is assigned an IP Address, and the IP Address is a logical Address identifying a host in the internet range. The ARP table contains the IP address and the MAC address of the online client, so that whether the target client is online or not can be judged by comparing the IP address of the target client with the IP address in the ARP table. When the IP address of the target client is in the ARP table, the IP address of the client is taken out to carry out an arping operation, and if the ping is successful, the target client is judged to be online; and when the IP address of the target client is not in the ARP table or the arping operation ping is not on, judging that the target client is not on-line.
Specifically, the target client refers to all online clients, and in this case, the ARP table may be directly obtained, all online clients are resolved from the ARP table, and then the online clients are used as the target clients, which is not limited specifically.
In this embodiment, a manner of determining whether the target client is online is provided, and specifically, the online client is analyzed by analyzing the ARP table of the DHCP server, so that the scheme has implementability and integrity.
In an embodiment, in step S20, that is, detecting whether the host name of the target client is missing, specifically, since the host name of the DHCP client is cached in a DHCP cache table (DHCP. leases) of the DHCP server, the step S20 may be implemented by determining whether the DHCP cache table of the DHCP server is cleared, or determining whether the DHCP cache table of the DHCP server is missing, and specifically, the step S20 may include the following steps:
s21: judging whether a DHCP cache table of the DHCP server is obtained or not;
s22: when the DHCP cache table is not acquired, judging that the host name of the target client side is lost;
in steps S21-S22, the DHCP server tries to acquire its own DHCP cache table first, if the DHCP cache table cannot be acquired, the DHCP cache table may be missing due to some reasons, and because the DHCP cache table is missing, the host name of the DHCP client is also naturally lost, and therefore, when the DHCP cache table is not acquired, it is determined that the host name of the target client is missing.
S23: when the DHCP cache table is obtained, judging whether a host command of the target client exists in the DHCP cache table;
s24: when the host name of the target client side is not in the DHCP cache table, judging that the host name of the target client side is lost;
s25: and when the host name of the target client side is in the DHCP cache table, judging that the host name of the target client side is not missing.
In steps S23-S25, when the DHCP cache table is obtained, it is further determined whether the host name of the target client exists in the DHCP cache table, and when the host name of the target client does not exist in the DHCP cache table, it is determined that the host name of the target client is missing, otherwise, when the host name of the target client exists in the DHCP cache table, it is determined that the host name of the target client is not missing.
Therefore, in this embodiment, a specific way of determining whether the host name of the target client is missing is provided, so that the scheme has implementability.
It should be noted that, in step S30, the host name of the target client is actively obtained, and various implementation manners are specifically provided in this application to increase the solution adaptability, which is described below separately.
In an embodiment, in the step S30, that is, actively acquiring the host name of the target client, the method may specifically include the following steps:
s31 a: acquiring an address record of a DHCP server corresponding to the target client, wherein the address record comprises a corresponding relation between an IP address of the client under the DHCP server and a host name;
s32 a: inquiring the host name corresponding to the target client from the address record of the DHCP server through the IP address of the target client
In steps S31a-S32a, the method is one of the methods for actively obtaining the host name of the target client, in which an Address record (Address record, also called a record) of the DHCP server is obtained first, where the Address record includes a correspondence between an IP Address of the client under the DHCP server and the host name, and then the host name corresponding to the target client is queried from the Address record of the DHCP server through the IP Address of the target client. As mentioned above, the IP address of the target client can be directly obtained by analyzing the ARP table. Specifically, in a specific implementation, the DHCP server may obtain the host name of the target client in a reverse direction through the IP (xxx. xxx) of the target client by using a dig command "dig-x xxx.xxx.xxx.xxx.xxx.xxx + short". The dig command can be generated by a dig tool, wherein the dig tool is a query tool for querying related information including a record and the like in a Unix-like command line mode.
In order to achieve the purpose of obtaining the host name of the target client, the embodiment of the present application provides a manner of actively obtaining the host name of the target client, which improves the implementability of the scheme.
In an embodiment, in the step S30, that is, actively acquiring the host name of the target client, the method may specifically include the following steps:
s31 b: sending a naming service (NBNS) state request to the target client so that the target client forwards the NBNS state request to a display client and receives a host name of the target client fed back by the display client;
s32 b: and receiving the host name of the target client sent by the target client.
In steps S31b-S32b, another way to actively obtain the hostname of the target client is that the DHCP server sends a naming service (NBNS) status request to the target client. It can be understood that NBNS is a naming service of NetBIOS, is used to map a NetBIOS name to an IP address, and is a child of a NetBIOS-over-tcp (nbt) protocol family, and the NBNS implementation of Microsoft is called WINS, and taking the implementation of the NBNS implementation of Microsoft as an example, a DHCP client such as a router may obtain an equipment name by sending an NBNS state request, and display that the client (e.g., windows pc client) receives the equipment name and sends the host name of the DHCP client to the DHCP client through WINS or a local cache, and then the DHCP client feeds back the host name to the DHCP server.
In the embodiment, the characteristics of the NBNS are skillfully utilized, and the DHCP server sends the naming service NBNS state request to the target client to finally acquire the host name acquired by the target client through the NBNS, so that another processing mode is improved, and the diversity and the flexibility of the scheme are improved.
In an embodiment, in the step S30, that is, actively acquiring the host name of the target client, the method may specifically include the following steps:
s31 c: sending a negative response NAK message to the target client so that the target client responds to the NAK message to disconnect the current connection and reinitiate a DHCP request to the DHCP server;
s32 c: responding the DHCP request to update a DHCP cache table of the DHCP server;
s33 c: and acquiring the host name of the target client from the updated DHCP cache table.
In steps S31c-S33c, the present invention is another way of actively obtaining the host name of a target client, in which a negative response NAK message is sent to the target client, so that the target client responds to the NAK message to disconnect the current connection and re-initiate a DHCP request to the DHCP server; in this embodiment, the above characteristics are used ingeniously to send a negative response NAK message to the target client, so that the target client responds to the NAK message to disconnect the current connection and reinitiate a DHCP request to the DHCP server, and thus, the DHCP request is responded to update the DHCP cache table of the DHCP server, and thus, the updated DHCP cache table can recover the state before the host name is lost, so that the host name of the target client can be obtained from the updated DHCP cache table.
In the embodiment, the characteristics of the NAK message are skillfully utilized, the DHCP cache table is finally and actively updated, the host name acquired by the target client through the NBNS is acquired, another processing mode is improved, and the diversity and flexibility of the scheme are improved.
In one embodiment, as shown in fig. 1, there is provided a client hostname processing system including a DHCP server and a display client, wherein:
the display client is used for sending a client management page query request to the DHCP server;
the DHCP server is used for responding to the management page query request and judging whether the target client side is on line or not; when the target client is online, detecting whether the host name of the target client is missing; when detecting that the host name of the target client is missing, actively acquiring the host name of the target client; feeding back the host name of the target client to the display client;
and the display client is also used for displaying a client management page according to the host name of the target client.
In the embodiment, the display client can ensure that the client information containing the host name is displayed in the client management page, so that the use experience is improved.
It should be noted that, in the client hostname processing system provided in the embodiment of the present application, for more contents and functions or steps that can be implemented on the DHCP server side, reference may be made to the description in the foregoing method embodiment, and the description is not repeated here. In the client host name processing system, the target may refer to a router device, or may be another DHCP client, which is not particularly limited.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
In an embodiment, a client host name processing apparatus is provided, which is used for a DHCP server, and corresponds to the client host name processing method in the foregoing embodiments one to one. As shown in fig. 3, the client hostname processing apparatus includes a determination module 101, a detection module 102, and an acquisition module 103. The functional modules are explained in detail as follows:
the judging module 101 is used for judging whether the target client is online or not;
the detection module 102 is configured to detect whether a host name of the target client is missing when the target client is online;
the obtaining module 103 is configured to, when it is detected that the host name of the target client is missing, actively obtain the host name of the target client, so as to be used when a client management page is displayed.
In an embodiment, the determining module 101 is specifically configured to:
acquiring the IP address of the target client and acquiring an Address Resolution Protocol (ARP) table, wherein the ARP table comprises the IP address of the online client;
judging whether the IP address of the target client is in the ARP table or not;
when the IP address of the target client is in the ARP table, the IP address of the client is taken out to carry out an arping operation, and if the ping is successful, the target client is judged to be online;
and when the IP address of the target client is not in the ARP table or the arping operation ping is not on, judging that the target client is not on-line.
In an embodiment, the detection module 102 is specifically configured to:
judging whether a DHCP cache table of the DHCP server is obtained or not;
when the DHCP cache table is not acquired, judging that the host name of the target client side is lost;
when the DHCP cache table is obtained, judging whether a host computer command of the target client exists in the DHCP cache table;
when the host name of the target client side is not in the DHCP cache table, judging that the host name of the target client side is lost;
and when the host name of the target client side is not missed, judging that the host name of the target client side is not missed.
In an embodiment, the obtaining module 103 is specifically configured to:
acquiring an address record of a DHCP server corresponding to the target client, wherein the address record comprises a corresponding relation between an IP address of the client under the DHCP server and a host name;
and inquiring the host name corresponding to the target client from the address record of the DHCP server through the IP address of the target client.
In an embodiment, the obtaining module 103 is specifically configured to:
sending a naming service (NBNS) state request to the target client so that the target client forwards the NBNS state request to a display client and receives a host name of the target client fed back by the display client;
and receiving the host name of the target client sent by the target client.
In an embodiment, the obtaining module 103 is specifically configured to:
sending a negative response NAK message to the target client so that the target client responds to the NAK message to break the current connection and reinitiates a DHCP request to the DHCP server;
responding the DHCP request to update a DHCP cache table of the DHCP server;
and acquiring the host name of the target client from the updated DHCP cache table.
It can be seen from this embodiment that, the embodiment of the present application provides a client host name processing apparatus, which is used for a DHCP server, and when an online target client has a host name missing, the client host name of the target client is actively acquired to make up for the problem of the host name missing, so that client information is perfected, and a subsequent display client can normally acquire the host name from the DHCP server, thereby improving user friendliness and improving user experience.
For specific limitations of the client host name processing apparatus, reference may be made to the above limitations of the client host name processing method, which are not described herein again. The modules in the client host name processing device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, in particular, a DHCP server, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external display terminal and a DHCP client through network connection. The computer program is executed by a processor to implement a client hostname processing method.
In one embodiment, a DHCP server is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
judging whether the target client is online;
when the target client is online, detecting whether the host name of the target client is missing;
and when detecting that the host name of the target client is missing, actively acquiring the host name of the target client for use when displaying a client management page.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, performs the steps of:
judging whether the target client is online;
when the target client is online, detecting whether the host name of the target client is missing;
and when the host name of the target client is detected to be missing, actively acquiring the host name of the target client for use when a client management page is displayed.
For more contents implemented by the DHCP server and the computer-readable storage medium, reference may be made to the description in the foregoing method embodiment, and a description will not be repeated here, so that technical effects brought by the foregoing method embodiment may also be referred to.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A client host name processing method is used for a Dynamic Host Configuration Protocol (DHCP) server, and is characterized by comprising the following steps:
judging whether the target client is on line or not;
when the target client is online, detecting whether the host name of the target client is missing;
and when detecting that the host name of the target client is missing, actively acquiring the host name of the target client for use when displaying a client management page.
2. The client hostname processing method of claim 1, wherein the determining whether the target client is online comprises:
acquiring the IP address of the target client, and acquiring an Address Resolution Protocol (ARP) table, wherein the ARP table comprises the IP address of the online client;
judging whether the IP address of the target client is in the ARP table or not;
when the IP address of the target client is in the ARP table, the IP address of the client is taken out to carry out an arping operation, and if the ping is successful, the target client is judged to be online;
and when the IP address of the target client is not in the ARP table or the arping operation ping is not on, judging that the target client is not on-line.
3. The client hostname processing method of claim 1, wherein the detecting whether the hostname of the target client is missing comprises:
judging whether a DHCP cache table of the DHCP server is obtained or not;
when the DHCP cache table is not acquired, judging that the host name of the target client is lost;
when the DHCP cache table is obtained, judging whether a host computer command of the target client exists in the DHCP cache table;
when the host name of the target client side is not in the DHCP cache table, judging that the host name of the target client side is lost;
and when the host name of the target client side is not missed, judging that the host name of the target client side is not missed.
4. The client hostname processing method of any of claims 1-3, wherein the actively obtaining the hostname of the target client comprises:
acquiring an address record of a DHCP server corresponding to the target client, wherein the address record comprises a corresponding relation between an IP address of the client under the DHCP server and a host name;
and inquiring the host name corresponding to the target client from the address record of the DHCP server through the IP address of the target client.
5. The client hostname processing method of any of claims 1-3, wherein the actively obtaining the hostname of the target client comprises:
sending a naming service (NBNS) state request to the target client so that the target client forwards the NBNS state request to a display client and receives a host name of the target client fed back by the display client;
and receiving the host name of the target client sent by the target client.
6. The client hostname processing method of any of claims 1-3, wherein the actively obtaining the hostname of the target client comprises:
sending a negative response NAK message to the target client so that the target client responds to the NAK message to disconnect the current connection and reinitiate a DHCP request to the DHCP server;
responding the DHCP request to update a DHCP cache table of the DHCP server;
and acquiring the host name of the target client from the updated DHCP cache table.
7. A client host name processing apparatus for a DHCP server, the client management page processing apparatus comprising:
the judging module is used for judging whether the target client is on line or not;
the detection module is used for detecting whether the host name of the target client side is lost or not when the target client side is online;
and the acquisition module is used for actively acquiring the host name of the target client when detecting that the host name of the target client is missing so as to be used when displaying the client management page.
8. A client host name processing system, comprising a DHCP server and a display client, wherein:
the display client is used for sending a client management page query request to the DHCP server;
the DHCP server is used for responding to the management page query request and judging whether the target client side is on line or not; when the target client is online, detecting whether the host name of the target client is missing; when detecting that the host name of the target client is missing, actively acquiring the host name of the target client; feeding back the host name of the target client to the display client;
and the display client is also used for displaying a client management page according to the host name of the target client.
9. A DHCP server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of the client hostname processing method according to any one of claims 1 to 6.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the client hostname processing method according to any one of claims 1 to 6.
CN202210409514.7A 2022-04-19 2022-04-19 Client host name processing method, device, system, equipment and medium Pending CN115002067A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210409514.7A CN115002067A (en) 2022-04-19 2022-04-19 Client host name processing method, device, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210409514.7A CN115002067A (en) 2022-04-19 2022-04-19 Client host name processing method, device, system, equipment and medium

Publications (1)

Publication Number Publication Date
CN115002067A true CN115002067A (en) 2022-09-02

Family

ID=83024072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210409514.7A Pending CN115002067A (en) 2022-04-19 2022-04-19 Client host name processing method, device, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN115002067A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003087273A (en) * 2001-09-11 2003-03-20 Hitachi Ltd Host name generation device
US7437445B1 (en) * 2004-03-30 2008-10-14 Emc Corporation System and methods for host naming in a managed information environment
CN106559506A (en) * 2015-09-28 2017-04-05 中兴通讯股份有限公司 ARP entry generation method and device
CN107404545A (en) * 2016-05-20 2017-11-28 福特全球技术公司 The virtual DNS record update methods that the dynamic IP addressing of vehicle Entrust Server changes
CN108093091A (en) * 2016-11-22 2018-05-29 华为数字技术(苏州)有限公司 A kind of method and agent equipment for obtaining host additional information
CN108429656A (en) * 2018-02-28 2018-08-21 国云科技股份有限公司 A method of monitoring physical machine network interface card connection status
US20190007365A1 (en) * 2017-06-30 2019-01-03 Microsoft Technology Licensing, Llc Geolocation using reverse domain name server information
CN110413350A (en) * 2019-08-05 2019-11-05 中国林业科学研究院热带林业研究所 Request processing method, system, server and storage medium based on dynamic mapping plug-in unit
CN110677316A (en) * 2019-09-05 2020-01-10 苏州浪潮智能科技有限公司 Distributed storage server network card detection method and system
CN111083055A (en) * 2019-11-26 2020-04-28 深圳市共进电子股份有限公司 Client device management method and device, router and storage medium
CN113438292A (en) * 2021-06-22 2021-09-24 深圳前海微众银行股份有限公司 Agent deployment method and device based on automatic operation and maintenance tool

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003087273A (en) * 2001-09-11 2003-03-20 Hitachi Ltd Host name generation device
US7437445B1 (en) * 2004-03-30 2008-10-14 Emc Corporation System and methods for host naming in a managed information environment
CN106559506A (en) * 2015-09-28 2017-04-05 中兴通讯股份有限公司 ARP entry generation method and device
WO2017054526A1 (en) * 2015-09-28 2017-04-06 中兴通讯股份有限公司 Arp entry generation method and device
CN107404545A (en) * 2016-05-20 2017-11-28 福特全球技术公司 The virtual DNS record update methods that the dynamic IP addressing of vehicle Entrust Server changes
CN113037882A (en) * 2016-11-22 2021-06-25 华为数字技术(苏州)有限公司 Method for acquiring additional information of host and proxy equipment
CN108093091A (en) * 2016-11-22 2018-05-29 华为数字技术(苏州)有限公司 A kind of method and agent equipment for obtaining host additional information
US20190007365A1 (en) * 2017-06-30 2019-01-03 Microsoft Technology Licensing, Llc Geolocation using reverse domain name server information
CN108429656A (en) * 2018-02-28 2018-08-21 国云科技股份有限公司 A method of monitoring physical machine network interface card connection status
CN110413350A (en) * 2019-08-05 2019-11-05 中国林业科学研究院热带林业研究所 Request processing method, system, server and storage medium based on dynamic mapping plug-in unit
CN110677316A (en) * 2019-09-05 2020-01-10 苏州浪潮智能科技有限公司 Distributed storage server network card detection method and system
CN111083055A (en) * 2019-11-26 2020-04-28 深圳市共进电子股份有限公司 Client device management method and device, router and storage medium
CN113438292A (en) * 2021-06-22 2021-09-24 深圳前海微众银行股份有限公司 Agent deployment method and device based on automatic operation and maintenance tool

Similar Documents

Publication Publication Date Title
JP6726426B2 (en) Login-free method and device between terminals
JP5342696B2 (en) Download plug-ins in instant messaging client
CN110519409B (en) Domain name dynamic configuration method, device, equipment and storage medium
CN111917900B (en) Domain name agent request processing method and device
CN114629822B (en) Link detection method, device, electronic equipment and storage medium
CN113206785B (en) Network request method and device, terminal equipment and storage medium
CN109246078B (en) Data interaction method and server
CN106210155A (en) The method and apparatus connecting application server
CN107124483A (en) Domain name analytic method and server
CN111107176A (en) Data transmission method and device, computer equipment and storage medium
CN112291384B (en) Information processing method for domain name resolution and electronic equipment
CN111371897B (en) Reverse connection method, device and storage medium based on networking system
CN113691646A (en) Domain name service resource access method, device, electronic equipment and medium
US9344363B2 (en) Information processing system, relay device, information processing device, and information processing method
CN106899456B (en) Method for realizing link detection and repair
CN111104376B (en) Resource file query method and device
CN110324436B (en) Proxy method and device for transport layer proxy
CN115002067A (en) Client host name processing method, device, system, equipment and medium
CN114556891A (en) Method, device, equipment and storage medium for determining equipment state
CN107872493B (en) Information processing method, terminal and server
CN111641664B (en) Crawler equipment service request method, device and system and storage medium
CN110572375B (en) IP address proxy method and device
CN109451047B (en) Data transmission method, device, equipment and storage medium of monitoring alarm system
CN110635958A (en) Network fault diagnosis method, device and storage medium
CN113992583B (en) Table item maintenance method and device

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