Method for quickly classifying IP addresses

A technology of IP address and rapid classification, which is applied in the Internet field to achieve the effect of reducing the number of queries

CN109246014AActive Publication Date: 2019-01-18CHINA INFOMRAITON CONSULTING & DESIGNING INST CO LTD
4 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2019-01-18

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a method for quickly classifying IP addresses, and the method comprises the following steps: 1, unifying the format of a network segment and its identifier as a key-value pair;2, performing the equivalent splitting of the key-value pair at step 1 according to a rule and merging the split parts into a key-value pair group: setting the length of a subnet mask as X, wherein Xis between 0 and 32, and according to the difference of the length X, the subnet is split based on the following rules: splitting the subnet into 232-X 32-bit subnets if X is between 25 and 32; splitting the subnet into 224-X 24-bit subnets if X is between 17 and 24; splitting the subnet into 216- X 16-bit subnets if X is between 9 and 16; splitting the subnet into 28-X 8-bit subnets if X is between 1 and 8; 3, sequentially querying a target IP according to the codes based on the key value at step 2.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention belongs to the technical field of the Internet, in particular to a method for rapidly classifying IP addresses. Background technique

[0002] An autonomous system (Autonomous System), referred to as AS, refers to a group of networks that use a unified internal routing protocol. Generally, if the network scale of a unit is relatively large and there are multiple exits, it will usually be established as an autonomous system. Different AS numbers are planned for each autonomous system, and many non-duplicate subnet groups are planned for each AS number. For example, domestic operators plan different AS numbers for MANs, IDC outlets, and large units in different cities. In the data center computer room, we can obtain all flow data packets under the device through the netflow protocol. Each flow is marked with information such as source address IP, destination address IP, flow size, inbound and outbound port numbers, etc. We often need to ch...

Examples

Embodiment Construction

[0042] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0043] The invention discloses a method for rapidly classifying IP addresses. The specific steps of the method are as follows:

[0044]Step 1. The format of the unified network segment and its identification is in the form of a key-value pair, that is, the network segment is identified as a network segment in the form of xx.xx.xx.xx~xx.xx.xx.xx of N (that is, xx.xx. xx.xx~xx.xx.xx.xx:N) to xx.xx.xx.xx / X:N (hereinafter referred to as subnet). Among them, xx.xx.xx.xx is the IPV4 address in dotted decimal notation, X is the mask length, 1≤X≤32, xx.xx.xx.xx / X indicates the subnet, N indicates the identifier of the network segment, xx.xx.xx.xx / X:N represents a key-value pair, and ":" is the symbol between the key and the value in the key-value pair. The content in front of it is the key, and the content in the back is the value. For example, if figure 1 S...