Method for quickly classifying IP addresses
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 mergi...
Gespeichert in:
Hauptverfasser: | , , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | 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.
本发明公开了种对IP地址进行快速分类的方法,包括如下步骤:步骤1,统网段及其标识的格式为键值对的形式;步骤2,按规则等价拆分步骤1的键值对,并合并为键值对组:设定子网掩码长度为X,X介于0到32之间,按X长度的不同,遵循以下规则对子网进行 |
---|