How to obtain the latest IP segments of China Telecom, China Netcom, and China tietong

Source: Internet
Author: User
Tags dbase

APNIC is an organization that manages IP Address Allocation in the Asia Pacific region. It has a rich and accurate IP Address Allocation library, and this information is also made public to the public! Next let's take a look at how to obtain the IP address distribution of some telecom operators in Linux:

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
After completing the above compilation and installation, we start to get the IP address segment;

China Netcom:
./Whois3-H whois.apnic.net-l-I MB MAINT-CNCGROUP>/var/CNC

China Telecom:
./Whois3-H whois.apnic.net-l-I MB MAINT-CHINANET>/var/Chinanet

China tietong:
./Whois3-H whois.apnic.net-l-I MB MAINT-CN-CRTC>/var/CRTC

When you open the obtained file, you can see that the information in it is very detailed, and even the owner, phone number, email, and other information of each branch. If you want to get a neat and clean IP address segment file, simply use grep and awk for simple filtering.

Filter and extract IP segments

China Netcom:
Sed-e '/./{H; $! D;} '-e' X;/cncgroup /! D'/var/CNC | grep 'inetnum'>/var/cnc.txt

China Telecom:
Sed-e '/./{H; $! D;} '-e' X;/Chinanet /! D'/var/Chinanet | grep 'inetnum'>/var/chinanet.txt

China tietong:
Sed-e '/./{H; $! D;} '-e' X;/CN-CRTC /! D'/var/CRTC | grep 'inetnum'>/var/crtc.txt

 

This includesChina Telecom-grade Netcom and China tietong IP Address Allocation segments

[Guangdong IP segment: Beijing Netcom IP segment, Liaoning IP segment, China Netcom IP segment: Beijing IP segment, China Telecom IP segment, Zhejiang IP segment, Hunan IP segment, Guangdong Telecom IP segment, zhejiang Telecom IP segment, China IP segment, Shandong Netcom IP segment, Shandong IP segment, Guangzhou IP segment, Fujian IP segment, Shanghai Telecom IP segment, tietong IP segment, Guangxi IP segment,
Taiyuan IP segment, Liaoning Netcom IP segment, Beijing Telecom IP segment, adsl ip segment, Guangdong Province IP segment, Hebei IP segment, Heilongjiang Netcom IP segment, Shanghai IP segment, Shanxi IP segment, sichuan IP segment, Jiangxi IP segment,
Hebei Netcom IP segment, Sichuan Telecom IP segment, Guangzhou Telecom IP segment, Guangxi Telecom IP segment, Guangdong Telecom adsl ip segment, Server IP segment, regional IP segment, China Netcom IP segment, china Unicom IP segment, public IP segment, Chengdu IP segment, Henan IP segment, Xiamen IP segment,
Dalian IP segment, Guizhou IP segment, Shaanxi IP segment, Guangzhou adsl ip segment, Jinan IP segment, Telecom adsl ip segment, Fuzhou IP segment, Henan Netcom IP segment, Heilongjiang IP segment, shandong IP segment, Sichuan Netcom IP segment]

I also checked on the Internet and someone provided the following: (download IP segment finder, IP segment query software, IP segment scanner, and IP segment search), but I think it is not a good reason, because none of them are the latest.
Foreign IP segment such as [U. S. IP segment, South Korea IP segment, Japan IP segment, the latest U. S. IP segment, IP segment of Japan,] please go to the http://ftp.apnic.net to query

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.