[To] How is the IP address of the carrier assigned by WHOIS?
The IP address distribution of some Chinese telecom operators is obtained under Linux:
Apnic is the organization of IP address allocation in the Asia-Pacific region, it has a rich and accurate IP address allocation database, and this information is also public, and provides a query tool, let us see how to get some of the Chinese basic telecom operators (Netcom, telecommunications, CRC, Education Network) IP address distribution:
(We usually use WHOIS query is to know the domain name or IP check information, which is used to know the geographical area of bulk IP and its information)
wget http://ftp.apnic.net/apnic/dbase/tools/ripe-dbase-client-v3.tar.gz
Tar xzvf ripe-dbase-client-v3.tar.gz
CD whois-3.1
./configure
Make
Make install
After compiling the installation, we can obtain the IP address segment of a carrier by the following command;
China Netcom:
./whois3-h whois.apnic.net-l-imb MAINT-CNCGROUP>/VAR/CNC
Telecom:
./whois3-h whois.apnic.net-l-imb maint-chinanet>/var/chinanet
China CRC:
./whois3-h whois.apnic.net-l-imb MAINT-CN-CRTC>/VAR/CRTC
Open the obtained file can see the information inside very detailed, even can see the head of each branch, telephone, e-mail and so on information. If you want to get a neat and clean IP address segment file, simply filter with grep and awk.
If you want to get specific service providers such as the IP pool of Jiangsu Telecom, the value of MB to Maint-chinanet-js, or Liaoning Netcom, then change to Maint-cncgroup-ln
The following is an example of a short paragraph in the output text:
[To] How is the IP address of the carrier assigned by WHOIS?