A method for NAT subnet discovery based on domain name resolution protocol analysis
By analyzing the domain name frequency in network traffic and identifying the existence of NAT devices, the problem of the existing technology being unable to identify NAT devices is solved, and accurate NAT device positioning is achieved.
Patent Information
- Application Number
- CN202210650594.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-09
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-06-09
AI Technical Summary
The prior art cannot effectively identify and locate NAT devices, resulting in increased difficulty in network operation and maintenance management.
The network traffic information is obtained and analyzed through the gateway hardware device, the frequency of common domain names is counted, and the domain names of the devices to be tested are classified and in-depth analysis to determine whether they have NAT subnet characteristics.
Effectively identifying and positioning NAT devices in the network solves the problem that NAT devices cannot be recognized.
Smart Images

Figure CN115174521B_ABST
Abstract
Description
[Technical field]
[0001] The invention relates to the technical field of NAT identification, in particular to a method for discovering a NAT subnet based on domain name resolution protocol analysis. [Background technology]
[0002] NAT (Network Address Translation), or network address translation technology, is widely used as a temporary solution to the increasingly exhausted IPv4 address resources. It is used by operators and home networks. The use of NAT has greatly reduced the threshold for network access, while making the network topology more complex and greatly increasing the difficulty of operation and maintenance management. Conventional scanning tools cannot identify NAT devices. In order to solve the above problems, it is necessary to propose a method that can actively scan and discover the NAT characteristics of devices to locate NAT devices in the network. [Summary of the invention]
[0003] The purpose of the present invention is to solve the problems in the prior art and propose a method for NAT subnet discovery based on domain name resolution protocol analysis, which can actively scan and discover device NAT features and locate NAT devices in the network.
[0004] To achieve the above object, the present invention proposes a method for NAT subnet discovery based on domain name resolution protocol analysis, comprising the following steps:
[0005] S1. Obtain traffic information of all devices through gateway hardware devices, analyze and count the frequency of common domain names;
[0006] S2. Obtain the flow information of the device under test through the gateway hardware device;
[0007] S3. If the domain name information is not obtained in step S2, it is determined that the device under test has no NAT subnet characteristics; otherwise, go to step S4;
[0008] S4. Classify the acquired domain names of the devices under test, analyze the frequency of the same domain name appearing in a unit time, and compare it with the frequency of all device statistics in step S1;
[0009] S5. If the domain name frequency of the device under test is higher than the frequency of all device statistics, it is determined that there is a NAT subnet feature; otherwise, it is determined that there is no NAT subnet feature.
[0010] Preferably, in step S1, the gateway hardware device is deployed in a bypass of the core switch, and the network traffic information flowing through the core switch is provided to the gateway hardware device in a mirrored form.
[0011] Preferably, step S3 specifically includes the following steps:
[0012] S31. The gateway hardware device analyzes the traffic information of the device under test in real time, separates the DNS data flow, and performs in-depth analysis on the domain name request message information;
[0013] S32. Analyze different domain name request information for the same IP address. If there is no domain name information, it is determined that there is no NAT subnet feature. If the domain name information is extracted, go to step S4.
[0014] Preferably, in step S1, the common domain names include Microsoft's own domain names and common software domain names.
[0015] Preferably, the commonly used software domain names include domain names of anti-virus software, communication tools, and browsers.
[0016] Beneficial effects of the present invention: The present invention discovers the frequency regularity of various common domain name request information through traffic to determine whether a device has NAT subnet characteristics, thereby effectively solving the problem that NAT devices cannot be identified.
[0017] The features and advantages of the present invention will be described in detail through embodiments in conjunction with the accompanying drawings.
Brief Description of the Drawings
[0018] Figure 1 The invention discloses a flow chart of a method for discovering a NAT subnet based on domain name resolution protocol analysis. [Specific implementation method]
[0019] See also Figure 1 The present invention provides a method for discovering NAT subnets based on domain name resolution protocol analysis, which analyzes the domain name information by collecting and analyzing network traffic, thereby determining whether the source address of the domain name is a NAT subnet, and can more accurately identify devices with NAT characteristics. Specifically, it includes the following steps:
[0020] S1. Obtain traffic information of all devices through gateway hardware devices, analyze and count the frequencies of common domain names, where common domain names are classified as Microsoft's own domain names and common software domain names (such as anti-virus software, communication tools, browsers, etc.). In this embodiment, the gateway hardware device is deployed in bypass mode on the core switch, and all network traffic information flowing through the core switch is provided to the gateway hardware device in a mirrored form.
[0021] S2. Obtain the flow information of the device under test through the gateway hardware device.
[0022] S3. The gateway hardware device analyzes the traffic information of the device under test in real time, separates the DNS data stream, and performs in-depth analysis on the domain name request message information; parses different domain name request information of the same IP address. If there is no domain name information, it is determined that there is no NAT subnet feature. If the domain name information is extracted, go to step S4.
[0023] S4. Classify the acquired domain names of the devices under test, analyze the frequency of the same domain name appearing in a unit time, and compare it with the frequency of all devices counted in step S1.
[0024] S5. If the frequency of a certain type of domain name in the IP address of a certain device under test is significantly higher than the frequency of other IPs, it can be determined that the IP is a NAT subnet IP. At the same time, according to the frequency, it can be determined how many devices are suspected to exist in the subnet; otherwise, it is determined that there is no NAT subnet feature.
[0025] The above embodiments are intended to illustrate the present invention, not to limit the present invention. Any solution that is a simple transformation of the present invention belongs to the protection scope of the present invention.
Claims
1. A method for NAT subnet discovery based on domain name resolution protocol analysis, Features: The following steps are involved: S1. Obtain traffic information of all devices through gateway hardware devices, analyze and count the frequency of common domain names; S2. Obtain the flow information of the device under test through the gateway hardware device; S3. If the domain name information is not obtained in step S2, it is determined that the device under test has no NAT subnet characteristics; otherwise, go to step S4; Step S3 specifically includes the following steps: S31. The gateway hardware device analyzes the traffic information of the device under test in real time, separates the DNS data flow, and performs in-depth analysis on the domain name request message information; S32 resolves the same IP address different domain name request information, if there is no domain name information, it is determined that there is no NAT subnet feature, if the domain name information is extracted, go to step S4; S4. Classify the acquired domain names of the devices under test, analyze the frequency of the same domain name appearing in a unit time, and compare it with the frequency of all device statistics in step S1; S5. If the domain name frequency of the device under test is higher than the frequency of all device statistics, it is determined that there is a NAT subnet feature; otherwise, it is determined that there is no NAT subnet feature.
2. A method for NAT subnet discovery based on domain name resolution protocol analysis as claimed in claim 1, Features: In step S1, the gateway hardware device is deployed in a bypass of the core switch, and the network traffic information flowing through the core switch is provided to the gateway hardware device in a mirrored form.
3. A method for NAT subnet discovery based on domain name resolution protocol analysis as claimed in claim 1, Features: In step S1, the common domain names include domain names provided by Microsoft and common software domain names.
4. A method for NAT subnet discovery based on domain name resolution protocol analysis as claimed in claim 3, Features: The commonly used software domain names include domain names of anti-virus software, communication tools, and browsers.
