CN108462597B - Information reporting method, device and system - Google Patents

Information reporting method, device and system Download PDF

Info

Publication number
CN108462597B
CN108462597B CN201710093882.4A CN201710093882A CN108462597B CN 108462597 B CN108462597 B CN 108462597B CN 201710093882 A CN201710093882 A CN 201710093882A CN 108462597 B CN108462597 B CN 108462597B
Authority
CN
China
Prior art keywords
information
reporting
icmp
equipment
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710093882.4A
Other languages
Chinese (zh)
Other versions
CN108462597A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710093882.4A priority Critical patent/CN108462597B/en
Publication of CN108462597A publication Critical patent/CN108462597A/en
Application granted granted Critical
Publication of CN108462597B publication Critical patent/CN108462597B/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/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route

Abstract

The invention relates to an information reporting method, a device and a system, wherein the information reporting method comprises the following steps: the information reporting equipment acquires reporting information; the information reporting equipment packages the reported information into a network control message protocol ICMP message; and the information reporting equipment executes a Ping command to the IP address corresponding to the first equipment according to the ICMP message so as to report the ICMP message to the first equipment, so that the first equipment extracts the reporting information from the ICMP message and reports the reporting information to the target equipment. The network policy limitation is broken through, and the information reporting processing is realized.

Description

Information reporting method, device and system
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a system for reporting information.
Background
Typically, an organization will have multiple communication devices to handle the various transactions of the organization. Often, based on some service requirements, it is necessary to obtain relevant information of each device.
Each device generally implements reporting processing of the relevant information based on TCP/UDP (Transmission Control Protocol/User data Protocol) communication. However, a network environment of an organization is usually complex, and often based on service needs or security considerations, network policy restrictions are imposed on an application layer, so that some devices cannot communicate with each other based on a TCP/UDP protocol, and thus device information reporting is hindered.
Therefore, how to break through the limitation of network policies to obtain the reported information of the device becomes a difficult problem to be solved urgently.
Disclosure of Invention
Therefore, there is a need to provide an information reporting method and system that can break through the network policy limitation.
A method for reporting information, the method comprising:
the information reporting equipment acquires reporting information;
the information reporting equipment packages the reported information into a network control message protocol ICMP message;
and the information reporting equipment executes a Ping command on an IP address corresponding to first equipment according to the ICMP message so as to report the ICMP message to the first equipment, so that the first equipment extracts the reporting information from the ICMP message and reports the reporting information to target equipment.
An information reporting apparatus, the apparatus comprising:
a report information acquisition module for acquiring report information;
a message generation module, configured to encapsulate the report information into an ICMP message;
and the message reporting module is used for executing a Ping command on the IP address corresponding to the first equipment according to the ICMP message so as to send the ICMP message to the first equipment, so that the first equipment extracts the reporting information from the ICMP message and reports the reporting information to the target equipment.
An information reporting system comprises information reporting equipment and first equipment;
the information reporting device is used for acquiring reporting information and packaging the reporting information into an ICMP message; executing a Ping command to the IP address corresponding to the first device according to the ICMP message so as to report the ICMP message to the first device;
the first device is configured to receive the ICMP packet reported by the information reporting device, extract the reporting information from the ICMP packet, and report the reporting information to a target device.
According to the information reporting method, the device and the system, the reporting information is acquired through the information reporting equipment; encapsulating the reported information into an ICMP message; and executing a Ping command to an IP address corresponding to a first device according to the ICMP message so as to report the ICMP message to the first device, so that the first device extracts the report information from the ICMP message and reports the report information to a target device. The reported information is reported in the form of ICMP message based on ICMP protocol, and the network strategy limitation is usually to limit TCP/UDP protocol, but not to limit ICMP protocol, so the network strategy limitation can be broken through, and the information reporting process can be realized.
Drawings
Fig. 1 is an application environment diagram of an information reporting method in an embodiment;
fig. 2 is an internal structure diagram of an information reporting device in an embodiment;
fig. 3 is a schematic flow chart of an information reporting method in an embodiment;
FIG. 4A is a network topology diagram of a TCP/UDP protocol-based connection communication in one embodiment;
FIG. 4B is a network topology diagram of an embodiment of communicating based on ICMP protocol connections;
fig. 5 is a schematic flow chart illustrating a reporting step of reporting information in an embodiment;
FIG. 6A is a network topology diagram of a TCP/UDP protocol based connection communication in another embodiment;
FIG. 6B is a network topology diagram of communication based on ICMP protocol connections in another embodiment;
fig. 7 is a schematic diagram illustrating a format of an ICMP message in an embodiment;
FIG. 8 is a flowchart illustrating the steps of the policing process in one embodiment;
fig. 9 is a timing diagram of an information reporting method in an embodiment;
fig. 10 is a schematic structural diagram of an information reporting apparatus in an embodiment;
fig. 11 is a schematic structural diagram of an information reporting system in an embodiment;
fig. 12 is a schematic structural diagram of an information reporting system in another embodiment;
fig. 13 is a schematic structural diagram of an information reporting system in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 1 is an application environment diagram of an information reporting method in an embodiment. As shown in fig. 1, the application environment includes an information reporting device 110, a first device 120, and a target device 130. The information reporting device 110, the first device 120, and the target device 130 communicate with each other through a network. The information reporting device 110 obtains the reporting information and encapsulates the reporting information into an ICMP message. Further, a Ping command is executed to the IP address corresponding to the first device 120 according to the ICMP message, so as to report the ICMP message to the first device 120, so that the first device 120 extracts the report information from the ICMP message, and reports the report information to the target device 130.
It is understood that in other embodiments, the first device 120 and the target device 130 may be the same device, i.e., the first device 120 is the target device.
In this embodiment, "device" refers to all devices that can access a network for communication. Further, a "device" may be a server host, but may also be a network device such as a router, switch, etc.
As shown in fig. 2, in one embodiment, an apparatus is provided that includes a processor, a non-volatile storage medium, an internal memory, and a network interface connected by a system bus. The device comprises a nonvolatile storage medium and an information reporting device, wherein the nonvolatile storage medium of the device stores an operating system and a database, the database is used for storing data, and the information reporting device is used for realizing an information reporting method. The processor is used to provide computing and control capabilities to support the operation of the entire device. The internal memory of the device provides an environment for the operation of the information reporting apparatus in the non-volatile storage medium, and the internal memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor can be caused to execute an information reporting method. The network interface is used for network communication with other device hosts. Those skilled in the art will appreciate that the configuration shown in fig. 2 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation on the devices to which the present application applies, and that a particular device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
As shown in fig. 3, in an embodiment, an information reporting method is provided, which is exemplified by the device in fig. 1 or fig. 2, and includes the following steps:
step 302, the information reporting device obtains the reporting information.
In this embodiment, the information reporting device may obtain the reporting information. The information reporting device is a device for reporting the reporting information to the target device. The target device is the final destination for receiving the reported information of each device.
The reporting information refers to information that can be obtained from the device, and may specifically be any information that can be obtained from the device. Further, the reported information may include the device information and the device association information. The device information refers to one or a combination of several of the device attribute, deployment program, status, performance and the like. For example, IP address information of the device, version information of a program deployed on the device, usage status information of the device, connection status information of the device, or load condition of the device. The device association information refers to information associated with a device. For example, the access information for the device includes access priority or access result. The type of the reported information is not limited, and the type of the information to be reported can be set according to the actual service requirement.
In this embodiment, the information reporting device may obtain the local reporting information, that is, obtain the reporting information of itself. The information reporting device may also be configured to obtain reporting information sent by other devices as a forwarding agent device, and specifically, the information reporting device receives an ICMP (Internet Control Message Protocol) Message sent by the information reporting device and extracts the reporting information from the received ICMP Message. Further, one or more ICMP messages are received.
Further, an ICMP client process may be deployed on the information reporting device, and may acquire the reported information through the ICMP client process, and perform information reporting processing in the following steps (such as ICMP packet encapsulation and reporting steps). The ICMP client process is a process having a function of acquiring reported information and a function of sending the reported information to a device deploying an ICMP server process based on an ICMP protocol. Further, the ICMP server process refers to a process having a function of reporting the report information to the target device based on the ICMP protocol. It can be understood that the ICMP server process may report the report information to the target device by forwarding or directly storing.
Step 304, the information reporting device packages the reported information into a network control message protocol ICMP message.
The information reporting device encapsulates the reporting message into an ICMP message based on an ICMP protocol. Specifically, the information reporting device adds the reporting information defined by formatting to the standard ICMP message, so that the reporting information can be carried by the ICMP message.
When the information reporting device is used as a forwarding agent device, the reporting information extracted from the initial ICMP message is encapsulated again, and a new ICMP message is regenerated.
Further, the information reporting device may, when the received initial ICMP message reaches a preset number threshold, combine and encapsulate the reporting information extracted from the received initial ICMP message into a new ICMP message based on an ICMP protocol. Or, when the data size of the reporting information extracted from the received multiple initial ICMP messages reaches a preset threshold, combining and re-encapsulating the multiple reporting information into a new ICMP message based on the ICMP protocol. Or, with a preset frequency, the reporting information extracted from the received initial ICMP message is combined based on the ICMP protocol and encapsulated again into a new ICMP message. The specific time for combining and encapsulating the plurality of reported information is not limited.
And step 306, the information reporting device executes Ping command to the IP address corresponding to the first device according to the ICMP message, so as to report the ICMP message to the first device, so that the first device extracts the reporting information from the ICMP message, and reports the reporting information to the target device.
Among them, Ping (Packet Internet Groper, Internet Packet explorer) is a command under Windows, Unix and Linux systems. It is possible to check whether the network is connected or not by means of the "Ping" command.
In one embodiment, the information reporting device is configured with an IP address of a first device that receives the reporting information in advance. After encapsulating the reporting information into an ICMP message, the information reporting device may directly execute a Ping command to the IP address corresponding to the first device according to the ICMP message in combination with the configured IP address, so as to report the ICMP message to the first device. It can be understood that, when the information reporting device is a forwarding agent device, the information reporting device has a function of accessing the public network, and the information reporting device may directly execute a Ping command to the IP address corresponding to the first device through the public network according to the ICMP message, so as to report the ICMP message to the first device.
Specifically, after executing the Ping command on the information reporting device, the information reporting device may use the IP address corresponding to the configured first device as a destination address, and directly send the encapsulated ICMP packet to the configured IP address based on the ICMP protocol, where when the Ping command is successfully executed, the ICMP packet may reach the first device corresponding to the IP address.
The first device extracts the reporting information from the ICMP message and reports the reporting information to the target device. Further, an ICMP server process is deployed in the first device, and the first device extracts the report information from the ICMP packet through the ICMP server process and reports the report information to the target device.
In another embodiment, the information reporting device may pre-configure an IP address list, where the IP address list includes IP addresses corresponding to devices where ICMP server processes have been deployed. And the information reporting equipment executes the Ping commands on the IP addresses in the IP address list one by one according to the ICMP message until the Ping commands are executed successfully. So as to report the ICMP message to the first device corresponding to the IP address successfully executing the Ping command. The first device extracts the report information from the ICMP message through the deployed ICMP server process, and reports the report information to the target device. The number of the first and second groups may be random or sequential, and may be set according to actual needs, which is not limited. Compared with the method for reporting the ICMP message by executing the Ping command on the pre-configured single IP address, the method improves the success rate of ICMP message uploading. In the embodiment, the Ping commands are executed one by one for each IP address in the IP address list through the preconfigured IP address list, and if the Ping command is not executed for one IP address, the Ping commands can be executed for other IP addresses in the IP address list, obviously, the success rate of executing the Ping commands is improved, and further the success rate of uploading the ICMP message is improved. In addition, the IP address list is configured, the Ping commands are executed on the IP address list in the IP address list one by one, and the corresponding IP addresses needing to execute the Ping commands do not need to be configured on each information reporting device, so that the operation cost of technical personnel is greatly saved.
Further, the IP address list may be a common IP address list, that is, the IP address lists stored in the information reporting devices may be the same and may be the same IP address list (that is, the IP addresses of the information reporting devices in different intranets may be the same). The IP address list may also be configured according to the intranet dimension, that is, the IP address lists stored in each device in the same intranet are the same. Therefore, the waste of system resources caused by the fact that invalid Ping commands are executed among devices of different internal networks can be avoided.
It should be noted that the first device may be a target device, or may be a proxy device having a public network access function. The information reporting device is specifically determined according to a network where the information reporting device is located. When the information reporting device and the target device are in the same intranet, the first device can be the target device. When the information reporting device and the target device are in different intranets, the first device may be a proxy device with a public network access function, or may be a target device.
In addition, the first device may also be a device with a function of forwarding reported information, which is in the same intranet as the information reporting device. In this case, the first device may forward the report information to the target device or the proxy device having the public network access function.
In the embodiment, the report information is acquired; encapsulating the reported information into an ICMP message; and executing a Ping command on the IP address corresponding to the first equipment according to the ICMP message so as to send the ICMP message to the first equipment, so that the first equipment extracts the report information from the ICMP message and reports the report information to the target equipment. The reported information is reported in the form of ICMP message based on ICMP protocol, and the network strategy limitation is usually to limit TCP/UDP protocol, but not to limit ICMP protocol, so the network strategy limitation can be broken through, and the information reporting process can be realized.
The information reporting method will now be explained with reference to the network topology diagrams of fig. 4A to 4B. FIG. 4A is a diagram of a network topology for communicating based on the TCP/UDP protocol under the network policy constraints, under an embodiment. The devices a1, a2, and A3 are in the intranet a, the device A3 is a target device, and there is a network policy restriction between the device a1 and the device A3, so the device a1 cannot report the information of the device to the target device A3 based on the TCP/UDP protocol. But network policy restrictions typically do not limit the ICMP protocol. Then, as shown in fig. 4B, fig. 4B is a network topology diagram for communication based on ICMP protocol under the limitation of network policy in an embodiment. That is, a1 and A3 can normally communicate based on the ICMP protocol. The A1 encapsulates the reported information of the local machine into an ICMP message, and executes the Ping command to the IP address corresponding to the A3 according to the ICMP message, so that the ICMP message is successfully reported to the A3 when the Ping command is executed, thereby breaking through the limitation of network strategies and realizing the reporting of the information.
As shown in fig. 5, in an embodiment, the first device is a proxy device having a public network access function in the first intranet. The method also includes a step (reporting step of reporting information for short) that the first device extracts the reporting information from the ICMP message and reports the reporting information to the target device, and specifically includes the following steps:
step 502, the first device extracts the reporting information from the ICMP message, and encapsulates the reporting information again based on the ICMP protocol.
In this embodiment, the information reporting device and the first device are located in a first intranet, and the second device and the target device are located in a second intranet. The first device is an agent device with a public network access function, the second device also has a public network access function, and the first device and the second device are in communication connection through a public network.
When receiving the ICMP message sent by the information reporting device, the first device parses the ICMP message, and performs reported information extraction processing on the ICMP message, so as to extract the reported information from the ICMP message. And then, the extracted reporting information is encapsulated again based on an ICMP protocol to generate a new ICMP message. It should be noted that the first device may individually encapsulate the received reporting information in the initial ICMP again, or may encapsulate a plurality of pieces of reporting information in combination into a new ICMP message.
In one embodiment, when detecting that the ICMP message carries the information reporting flag, the first device determines that the ICMP message is a message for reporting information, and then performs a step of performing reported information extraction processing on the ICMP message. The information reporting mark is used for identifying that the ICMP message is a message for reporting equipment information.
Step 504, the first device sends the ICMP message after being encapsulated again to the second device in the second intranet through the public network.
Step 506, the second device extracts the reporting information from the repackaged ICMP message, and reports the reporting information to the target device.
The second device extracts the report information from the re-encapsulated ICMP message sent by the first device, and reports the report information to the target device. It is understood that the second device may be a target device or a proxy device with a public network access function. And when the second equipment is the target equipment, directly storing the extracted reporting information. And when the second equipment is the proxy equipment, the extracted reporting information is forwarded and reported to the target equipment.
The first and second components in this embodiment are used only for distinction and are not used for limitation in terms of order, size, hierarchy, and the like.
In this embodiment, the information reporting device reports the ICMP packet encapsulated with the reporting information to an agent device with a public network access function in the first intranet, that is, the first device extracts the reporting information, encapsulates the reporting information again, and sends the information to the second device in the second intranet through the public network, and the second device reports the reporting information to the target device. Breaks through the physical isolation of the network and realizes the reporting processing of the information.
The information reporting method will now be explained with reference to the network topology diagrams of fig. 6A to 6B. FIG. 6A is a network topology diagram of a TCP/UDP protocol based communication under network policy constraints and physical isolation in one embodiment. The devices A1, A2 and A3 are in an intranet A, the devices B1, B2 and B3 are in an intranet B, the A3 is a target device, and network policy restriction exists between the A1 and the A3. Since there is a network physical isolation limit between the devices in intranet a and the devices in intranet B. Therefore, none of B1, B2, and B3 can report its own information to the target device A3 based on TCP/UDP protocol.
For this, a proxy device ProxyA and ProxyB with a public network connection function may be respectively set in each intranet, where the proxy device may be selected from existing devices in the intranet to which it belongs, and the function of connecting the public network is realized by adding a network card, or a special proxy device with a public network connection function may be additionally provided. B1, B2, and B3 in the intranet B may ignore the network policy restriction based on the ICMP protocol, report the respective report information to ProxyB, where ProxyB forwards the report information to ProxyA through the public network, and ProxyA reports the report information to the target device A3, that is, the report information is reported to the target device A3 by breaking through the restrictions of the network policy restriction and the physical isolation. Then as shown in fig. 6B, fig. 6B is a network topology diagram for communication based on ICMP protocol under network policy limitation and network physical isolation in one embodiment.
In one embodiment, the method further comprises: and the first equipment extracts the report information from the ICMP message, detects whether the first equipment is forwarding agent equipment, reports the extracted report information to the target equipment if the first equipment is the forwarding agent equipment, and directly stores the report information if the first equipment is not the forwarding agent equipment.
Specifically, after the information reporting device reports the ICMP message to the first device, the first device may analyze the ICMP message and extract the reporting information from the ICMP message.
Further, the first device may detect whether itself is a forwarding agent device according to the pre-configured attribute information. The forwarding agent device refers to a device for forwarding the extracted report information.
When the first device detects that the first device is a forwarding agent device, the extracted report information may be encapsulated again based on the ICMP protocol, and the ICMP message after being encapsulated again is reported to the target device. Specifically, the first device may directly report the repackaged ICMP message to the target device, or may forward the repackaged ICMP message to a proxy device in another intranet through the public network, and the proxy device in the another intranet reports the report information to the target device. In addition, when the first device is a device without network policy restriction with the target device, the reporting information may also be encapsulated into a TCP packet based on a TCP/UDP protocol and reported to the target device.
When the first device detects that the first device is not the forwarding agent device, it may determine that the first device is the target device, and the first device may directly store the reported information.
In one embodiment, the method further comprises: the method comprises the steps that a first device obtains a plurality of ICMP messages, and corresponding report information is extracted from the plurality of ICMP messages respectively; combining and encapsulating the plurality of pieces of reported information based on the ICMP protocol, and reporting the ICMP message generated after the combination and encapsulation to the target equipment so that the target equipment extracts the plurality of pieces of reported information from the ICMP message generated after the combination and encapsulation.
In this embodiment, the first device may perform the reporting processing uniformly after receiving the ICMP messages sent by the multiple information reporting devices.
Specifically, the first device obtains ICMP messages sent by a plurality of information reporting devices, and extracts corresponding reporting information from the plurality of ICMP messages respectively. Combining and encapsulating the plurality of pieces of reported information based on an ICMP protocol, and reporting the ICMP message generated after the combination and encapsulation to the target equipment, so that the target equipment extracts the plurality of pieces of reported information from the ICMP message generated after the combination and encapsulation.
Further, the first device may, when the received initial ICMP message reaches the preset number threshold, combine and encapsulate the report information extracted from the received initial ICMP message into a new ICMP message based on the ICMP protocol. Or, when the data size of the reporting information extracted from the received multiple initial ICMP messages reaches a preset threshold, combining and re-encapsulating the multiple reporting information into a new ICMP message based on the ICMP protocol. Or, with a preset frequency, the reporting information extracted from the received initial ICMP message is combined based on the ICMP protocol and encapsulated again into a new ICMP message. The specific time for combining and encapsulating the plurality of reported information is not limited.
In this embodiment, the first device combines and encapsulates the reporting information in the received multiple ICMP messages into a new ICMP message, and reports the ICMP message generated after the combination and encapsulation to the target device. The situation that information reporting fails due to interception by a system security mechanism caused by too much reporting frequency and too fast reporting caused by respectively reporting single reporting information is avoided, and therefore the success rate of information reporting is improved. In addition, the multiple reporting messages are combined, packaged and reported, and compared with the case that the single reporting message is reported respectively, the network resource is saved.
In one embodiment, the method further comprises: the first equipment analyzes the ICMP message and detects whether the ICMP message carries an information reporting mark or not; when the ICMP message carries the information reporting mark, the first device extracts the reported information from the ICMP message, extracts the reported information and reports the reported information to the target device.
In this embodiment, the ICMP packet encapsulated according to the report information carries an information report flag. The information reporting mark is used for identifying that the ICMP message is a message for reporting equipment information. Fig. 7 is a schematic diagram illustrating the format of an ICMP message in an embodiment. The ICMP message in fig. 7 is formed by combining and encapsulating a plurality of pieces of reporting information, where each piece of reporting information includes an IP address and other information (e.g., program version information and other arbitrary information that can be acquired from a device), and each piece of reporting information carries an information reporting flag.
After receiving the ICMP message sent by the information reporting device, the first device analyzes the ICMP message, and detects whether the ICMP message carries an information reporting flag.
When the ICMP message carries the information reporting flag, the first device performs reporting information extraction processing on the ICMP message, extracts the reporting information, and reports the reporting information to the target device. When the ICMP message does not carry the message reporting mark, the first device does not extract the reported message from the ICMP message.
Further, the first device may be a target device or a forwarding proxy device.
In this embodiment, when detecting that the ICMP packet carries the information reporting flag, the first device performs the reported information extraction processing. The situation of extraction processing failure caused by direct extraction is avoided, and compared with the system resource occupied by the reported information extraction processing, the system resource occupied by the detected information reporting mark is obviously small, so that the waste of the system resource is avoided.
As shown in fig. 8, in one embodiment, the reporting information includes a local IP address. The method also comprises a management and control processing step, and specifically comprises the following steps:
and step 802, the target device sends the reported local IP address to a management and control server.
In this embodiment, the reporting information includes a local IP address of the information reporting device.
And after acquiring the reported local IP address, the target equipment sends the reported local IP address of the information reporting equipment to the control server.
And step 804, the management and control server is connected with the device corresponding to the local IP address, and performs management and control processing on the device corresponding to the local IP address.
The management and control server can connect the device corresponding to the local IP address through the reported local IP address, namely, the information reporting device is connected. The centralized control server can control and process the reported equipment corresponding to the local IP address.
In this embodiment, the ICMP protocol breaks through network policy restrictions or network physical isolation to report the reporting information of the device to the target device, and the target device sends the reporting information including the local IP address of the information reporting device to the management and control server, so that the management and control server can connect the corresponding device based on the reported local IP address to manage and control the device. Through realizing the management and control of the background equipment, the disordered and seal-free operation of the background equipment in a non-management state is avoided, and the operation performance of the system is improved.
In one embodiment, the reporting information further includes version information of the management and control agent deployed on the information reporting device. The management and control agent program refers to an agent program which is installed in the equipment and is matched with the management and control server to manage and control the equipment.
In this embodiment, the target device sends the version information of the management and control agent program and the reported local IP address to the management and control server. The management and control server registers the management and control agent program according to the version information of the management and control agent program, and after the registration is successful, the management and control agent program deployed on the equipment corresponding to the local IP address is connected according to the reported local IP address, so that the management and control processing of the equipment is realized.
The version information of the management and control agent program deployed on the equipment and the IP address of the local equipment are reported to the target equipment based on the ICMP protocol to break through the network policy restriction or the network physical isolation, the target equipment sends the information to the management and control server, and the management and control server is connected with the local IP address to connect with the management and control agent program deployed on the equipment corresponding to the local IP address, so that the equipment can be managed and controlled more comprehensively and deeply. The operation performance of the system is further improved.
As shown in fig. 9, a timing diagram of an information reporting method is provided. In this embodiment, the specific process of the information reporting method is as follows:
1) the information reporting equipment acquires the reporting information and encapsulates the reporting information into an ICMP message;
2) the information reporting equipment executes the Ping command according to the ICMP message so as to report the ICMP message to first equipment, and the first equipment is positioned in a first intranet;
3) the first equipment extracts the reporting information from the ICMP message and encapsulates the reporting information into the ICMP message again;
4) the first equipment sends the ICMP message after being encapsulated again to second equipment in a second intranet through a public network;
5) the second equipment extracts the reporting information from the ICMP message after being encapsulated again and reports the reporting information to the target equipment;
6) the target equipment sends the IP address in the reported information to a control server, wherein the IP address is the local IP address of the information reporting equipment;
7) and the control server is connected with the information reporting equipment corresponding to the IP address and is used for controlling the information reporting equipment.
As shown in fig. 10, in an embodiment, an information reporting apparatus 1000 is provided, which includes a reported information obtaining module 1002, a message generating module 1004, and a message reporting module 1006. Wherein:
a report information obtaining module 1002, configured to obtain report information.
A message generating module 1004, configured to encapsulate the report information into an ICMP message.
A message reporting module 1006, configured to execute a Ping command on the IP address corresponding to the first device according to the ICMP message, so as to send the ICMP message to the first device, so that the first device extracts reporting information from the ICMP message, and reports the reporting information to the target device.
In an embodiment, the message reporting module 1006 is further configured to obtain an IP address list preconfigured locally, where the IP address list includes IP addresses corresponding to devices that have deployed an ICMP server process, execute Ping commands on the IP addresses one by one according to the ICMP message until the Ping commands are successfully executed, so as to send the ICMP message to a first device corresponding to the IP addresses that have successfully executed the Ping commands, so that the first device extracts reporting information from the ICMP message through the deployed ICMP server process, and reports the reporting information to a target device.
The information reporting device obtains the reporting information; encapsulating the reported information into an ICMP message; and executing a Ping command to the IP address corresponding to the first equipment according to the ICMP message so as to report the ICMP message to the first equipment, so that the first equipment extracts the report information from the ICMP message and reports the report information to the target equipment. Reporting information in the form of ICMP message based on ICMP protocol, and the limitation of network strategy is usually to limit TCP/UDP protocol, but not to ICMP protocol, so the limitation of network strategy can be broken through to realize information reporting processing.
As shown in fig. 11, an information reporting system 1100 is provided, where the system 1100 includes an information reporting device 1102 and a first device 1104. Wherein:
the information reporting device 1102 is configured to acquire reporting information and package the reporting information into an ICMP message; and executing a Ping command on the IP address corresponding to the first device 1104 according to the ICMP message, so as to report the ICMP message to the first device 1104.
The first device 1104 is configured to receive the ICMP packet reported by the information reporting device 1102, extract reporting information from the ICMP packet, and report the reporting information to the target device.
In an embodiment, the information reporting device 1102 is further configured to obtain an IP address list configured locally, where the IP address list includes an IP address corresponding to a device in which an ICMP server process has been deployed; and executing Ping commands to the IP addresses one by one according to the ICMP message until the Ping commands are successfully executed, so as to report the ICMP message to the first device 1104 corresponding to the IP address successfully executing the Ping commands.
The first device 1104 is further configured to extract reporting information from the ICMP message through the deployed ICMP server process, and report the reporting information to the target device.
As shown in fig. 12, in one embodiment, the first device 1104 is a proxy device with a public network access function in the first intranet; the system 1100 also includes a second device 1106.
The first device 1104 is further configured to extract the reporting information from the ICMP message, and encapsulate the reporting information again based on the ICMP protocol; the repackaged ICMP message is sent to the second device 1106 in the second intranet via the public network.
The second device 1106 is configured to extract the reporting information from the repackaged ICMP message, and report the reporting information to the target device.
In an embodiment, the first device 1102 is further configured to extract reporting information from an ICMP message; detecting whether the device is a forwarding agent device, if so, re-encapsulating the extracted reporting information based on an ICMP protocol, reporting the re-encapsulated ICMP message to a target device, and if not, judging that the first device 1102 is the target device and directly storing the reporting information.
In an embodiment, the first device 1102 is further configured to obtain a plurality of ICMP messages, and respectively extract corresponding reporting information from the plurality of ICMP messages; combining and encapsulating the plurality of pieces of reported information based on an ICMP protocol, and reporting the ICMP message generated after the combination and encapsulation to the target equipment, so that the target equipment extracts the plurality of pieces of reported information from the ICMP message generated after the combination and encapsulation.
In an embodiment, the first device 1102 is further configured to analyze the ICMP packet, and detect whether the ICMP packet carries an information reporting flag; when the ICMP message carries the information reporting mark, the ICMP message is processed by the reported information extraction, the reported information is extracted, and the reported information is reported to the target device.
As shown in fig. 13, in an embodiment, the report information includes a local IP address; the system 1100 also includes a target device 1108.
And the target device 1108 is configured to send the reported local IP address to the management and control server, so that the management and control server is connected to the device corresponding to the local IP address, and performs management and control processing on the device corresponding to the local IP address.
In the information reporting system, the information reporting equipment acquires the reported information; encapsulating the reported information into an ICMP message; and the first equipment extracts the reporting information from the ICMP message and reports the reporting information to the target equipment. Reporting information in the form of ICMP message based on ICMP protocol, and the limitation of network strategy is usually to limit TCP/UDP protocol, but not to ICMP protocol, so the limitation of network strategy can be broken through to realize information reporting processing.
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 a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not to be construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (14)

1. A method for reporting information, the method comprising:
the information reporting equipment acquires reporting information;
the information reporting equipment packages the reported information into a network control message protocol ICMP message;
the information reporting equipment executes a Ping command to an IP address corresponding to first equipment according to the ICMP message so as to report the ICMP message to the first equipment; the information reporting device and the first device are located in a first intranet;
if the first device is a proxy device with a public network access function in the first intranet, the first device extracts the reporting information from the ICMP message and encapsulates the reporting information again based on an ICMP protocol;
the first equipment sends the ICMP message after being encapsulated again to second equipment in a second intranet through a public network; the second device is a proxy device with a public network access function in the second intranet;
and the second equipment extracts the reporting information from the ICMP message after being encapsulated again and reports the reporting information to the target equipment in the second intranet.
2. The method of claim 1, wherein the information reporting device executes a Ping command for an IP address corresponding to a first device according to the ICMP packet, so as to report the ICMP packet to the first device, and the method includes:
the information reporting equipment acquires a locally pre-configured IP address list, wherein the IP address list comprises IP addresses corresponding to equipment with an ICMP server process deployed;
the information reporting equipment executes Ping commands on the IP addresses one by one according to the ICMP message until the Ping commands are successfully executed, so as to report the ICMP message to first equipment corresponding to the IP addresses successfully executing the Ping commands;
if the first device is a proxy device with a public network access function in the first intranet, the first device extracts the reporting information from the ICMP message, and re-encapsulating the reporting information based on an ICMP protocol includes:
if the first device is a proxy device with a public network access function in the first intranet, the first device extracts the reporting information from the ICMP message through the deployed ICMP server process, and encapsulates the reporting information again based on an ICMP protocol.
3. The method according to claim 1, wherein if the first device is a proxy device in the first intranet having a public network access function, the first device extracts the reporting information from the ICMP packet, and encapsulates the reporting information again based on an ICMP protocol, including:
the first equipment detects whether the first equipment is forwarding agent equipment or not;
if the first device is a forwarding agent device and has a public network access function, the first device extracts the reporting information from the ICMP message and encapsulates the extracted reporting information again based on an ICMP protocol;
and if the first equipment is not forwarding agent equipment, judging that the first equipment is target equipment, and directly storing the reported information.
4. The method according to claim 1, wherein if the first device is a proxy device in the first intranet having a public network access function, the first device extracts the reporting information from the ICMP packet, and encapsulates the reporting information again based on an ICMP protocol, including:
the first equipment acquires a plurality of ICMP messages;
if the first device is a proxy device with a public network access function in the first intranet, the first device extracts the corresponding reporting information from the plurality of ICMP messages respectively;
the first equipment combines and encapsulates the reported information based on an ICMP protocol;
the first device sends the ICMP message after being encapsulated again to a second device in a second intranet through a public network, and the method comprises the following steps:
the first device reports the ICMP message generated after the combined encapsulation to a second device, so that the second device forwards the ICMP message generated after the combined encapsulation to a target device, so that the target device extracts a plurality of pieces of reported information from the ICMP message generated after the combined encapsulation.
5. The method according to claim 1, wherein if the first device is a proxy device in the first intranet having a public network access function, the extracting, by the first device, the reporting information from the ICMP packet includes:
if the first device is a proxy device with a public network access function in the first intranet, the first device analyzes the ICMP message and detects whether the ICMP message carries an information reporting mark;
when the ICMP message carries the message reporting flag, then
And the first equipment extracts the reported information of the ICMP message and extracts the reported information.
6. The method according to any one of claims 1 to 5, wherein the reporting information includes a native IP address;
the method further comprises the following steps:
and the target equipment sends the reported local IP address to a control server so that the control server is connected with equipment corresponding to the local IP address and controls the equipment corresponding to the local IP address.
7. An information reporting apparatus, comprising:
a report information acquisition module for acquiring report information;
a message generation module, configured to encapsulate the report information into an ICMP message;
a message reporting module, configured to execute a Ping command on an IP address corresponding to a first device according to the ICMP message, so as to send the ICMP message to the first device, so that the first device extracts the reporting information from the ICMP message, and encapsulates the reporting information again based on an ICMP protocol; sending the repackaged ICMP message to a second device in a second intranet through a public network so as to extract the reporting information from the repackaged ICMP message and report the reporting information to a target device in the second intranet;
the information reporting equipment and the first equipment are positioned in a first intranet; the first device is a proxy device with a public network access function in the first intranet; the second device is a proxy device having a public network access function in the second intranet.
8. The apparatus according to claim 7, wherein the message reporting module is further configured to obtain an IP address list configured locally, where the IP address list includes IP addresses corresponding to devices that have deployed an ICMP server process, execute Ping commands on the IP addresses one by one according to the ICMP message until the Ping command is successfully executed, so as to send the ICMP message to a first device corresponding to an IP address that has successfully executed a Ping command, so that the first device extracts the reporting information from the ICMP message through the deployed ICMP server process, and encapsulates the reporting information again based on an ICMP protocol.
9. An information reporting system is characterized by comprising information reporting equipment, first equipment and second equipment; the first equipment is proxy equipment with a public network access function in a first intranet; the second device is a proxy device with a public network access function in a second intranet;
the information reporting device is used for acquiring reporting information and packaging the reporting information into an ICMP message; executing a Ping command to the IP address corresponding to the first device according to the ICMP message so as to report the ICMP message to the first device; the information reporting equipment and the first equipment are positioned in a first intranet;
the first device is configured to receive the ICMP packet reported by the information reporting device, extract the reporting information from the ICMP packet if the first device is an agent device having a public network access function in the first intranet, and encapsulate the reporting information again based on an ICMP protocol;
the first equipment is also used for sending the ICMP message after being encapsulated again to second equipment in a second intranet through a public network;
and the second device is configured to extract the reporting information from the repackaged ICMP message, and report the reporting information to a target device in the second intranet.
10. The system according to claim 9, wherein the information reporting device is further configured to obtain a locally preconfigured IP address list, where the IP address list includes IP addresses corresponding to devices in which ICMP server processes have been deployed; executing Ping commands to the IP addresses one by one according to the ICMP message until the Ping commands are successfully executed, so as to report the ICMP message to a first device corresponding to the IP address successfully executing the Ping commands;
the first device is further configured to extract the reporting information from the ICMP packet through the deployed ICMP server process, and encapsulate the reporting information again based on an ICMP protocol.
11. The system according to claim 9, wherein said first device is further configured to extract said reporting information from said ICMP message; detecting whether the first device is a forwarding agent device, if the first device is the forwarding agent device and has a public network access function, extracting the report information from the ICMP message, and encapsulating the extracted report information again based on an ICMP protocol; and if the first equipment is not forwarding agent equipment, judging that the first equipment is target equipment, and directly storing the reported information.
12. The system according to claim 9, wherein the first device is further configured to obtain a plurality of ICMP messages, and if the first device is a proxy device having a public network access function in the first intranet, extract the corresponding reporting information from the plurality of ICMP messages respectively; combining and encapsulating a plurality of pieces of reported information based on an ICMP protocol, reporting the ICMP message generated after the combination and encapsulation to a second device, and enabling the second device to forward the ICMP message generated after the combination and encapsulation to a target device so that the target device extracts a plurality of pieces of reported information from the ICMP message generated after the combination and encapsulation.
13. The system according to claim 9, wherein said first device is further configured to parse said ICMP packet, and detect whether an information reporting flag is carried in said ICMP packet; and when the ICMP message carries the information reporting mark, carrying out reported information extraction processing on the ICMP message, and extracting the reported information.
14. The system according to any one of claims 9 to 13, wherein the reporting information includes a native IP address; the system further comprises a target device;
and the target device is used for sending the reported local IP address to a control server so that the control server is connected with the device corresponding to the local IP address and performs control processing on the device corresponding to the local IP address.
CN201710093882.4A 2017-02-21 2017-02-21 Information reporting method, device and system Active CN108462597B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710093882.4A CN108462597B (en) 2017-02-21 2017-02-21 Information reporting method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710093882.4A CN108462597B (en) 2017-02-21 2017-02-21 Information reporting method, device and system

Publications (2)

Publication Number Publication Date
CN108462597A CN108462597A (en) 2018-08-28
CN108462597B true CN108462597B (en) 2022-05-06

Family

ID=63228924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710093882.4A Active CN108462597B (en) 2017-02-21 2017-02-21 Information reporting method, device and system

Country Status (1)

Country Link
CN (1) CN108462597B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202664A (en) * 2007-11-30 2008-06-18 华为技术有限公司 Method for reporting equipment information, system and method for obtaining equipment information
CN101510849A (en) * 2009-03-18 2009-08-19 中国电信股份有限公司 Method and equipment for obtaining node transmission information of transmission path
CN102413012A (en) * 2011-11-21 2012-04-11 上海交通大学 System for automatically analyzing computer network connectivity
CN102439905A (en) * 2011-09-30 2012-05-02 华为技术有限公司 Method, device and system of finding network topology automatically
CN105281951A (en) * 2015-09-29 2016-01-27 北京星网锐捷网络技术有限公司 Double-main-device conflict detection method for VSU system, and network equipment
CN106130827A (en) * 2016-08-30 2016-11-16 杭州迪普科技有限公司 The detection method of network equipment accessibility and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202664A (en) * 2007-11-30 2008-06-18 华为技术有限公司 Method for reporting equipment information, system and method for obtaining equipment information
CN101510849A (en) * 2009-03-18 2009-08-19 中国电信股份有限公司 Method and equipment for obtaining node transmission information of transmission path
CN102439905A (en) * 2011-09-30 2012-05-02 华为技术有限公司 Method, device and system of finding network topology automatically
CN102413012A (en) * 2011-11-21 2012-04-11 上海交通大学 System for automatically analyzing computer network connectivity
CN105281951A (en) * 2015-09-29 2016-01-27 北京星网锐捷网络技术有限公司 Double-main-device conflict detection method for VSU system, and network equipment
CN106130827A (en) * 2016-08-30 2016-11-16 杭州迪普科技有限公司 The detection method of network equipment accessibility and device

Also Published As

Publication number Publication date
CN108462597A (en) 2018-08-28

Similar Documents

Publication Publication Date Title
US9491189B2 (en) Revival and redirection of blocked connections for intention inspection in computer networks
EP3435606B1 (en) Message processing method, computing device, and message processing apparatus
CN110601902B (en) Interactive data processing method and device based on block chain network
US10680893B2 (en) Communication device, system, and method
CN112398781B (en) Attack testing method, host server and control server
CN103763121A (en) Method and device for quickly issuing network configuration information
KR102155262B1 (en) Elastic honeynet system and method for managing the same
EP2939401B1 (en) Method for guaranteeing service continuity in a telecommunication network and system thereof
CN108390937B (en) Remote monitoring method, device and storage medium
CN106713420B (en) The dispositions method and device of monitoring
US20150341235A1 (en) Packet Processing Method, Forwarder, Packet Processing Device, and Packet Processing System
CN108173810B (en) Method and device for transmitting network data
CN112822146A (en) Network connection monitoring method, device, system and computer readable storage medium
CN111935108B (en) Cloud data security access control method and device, electronic device and storage medium
CN108462597B (en) Information reporting method, device and system
CN109117243B (en) Service deployment method, device, client device and computer readable storage medium
CN114095213B (en) Network access control policy management system
CN113873041B (en) Message transmission method, device, network equipment and computer readable storage medium
CN112910991B (en) Back-end application calling method and device, computer equipment and readable storage medium
CN115664738A (en) Communication method, communication device, electronic device, and computer storage medium
CN113839894A (en) Message processing method and system
CN115913824B (en) Virtual server communication method and system crossing VPC
CN114301960B (en) Processing method and device for cluster asymmetric traffic, electronic equipment and storage medium
CN113098954B (en) Message forwarding method and device, computer equipment and storage medium
CN110691151B (en) Distributed equipment IP address distribution management method and system

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