Centos obtains the IP address of the carrier.

Source: Internet
Author: User
Tags dbase
Currently, ISPs in China mainly include China Telecom, China Netcom (now merged with China Netcom), and China Mobile (already merged with China Tietong), and China Telecom and China Unicom (China Netcom ). Due to the differences between ISPs in the south and the North, ISP restrictions lead to slow access to various websites in the south and north. To solve this problem, the common practice is to obtain the IP address segment of the carrier. by setting dual-line (multi-line) DNS access, "China Telecom takes China Telecom and China Netcom takes China Telecom" to solve the problem. 1. download and compile the software # wgethttp: // Obtain the carrier's IP address
Currently, ISP providers in China mainly include China Telecom, China Netcom (now connected with the Internet), and China Mobile (already merged with China Tietong). The largest ISP is China Telecom and China Unicom (China Netcom ). Due to the differences between ISPs in the south and the North, ISP restrictions lead to slow access to various websites in the south and north. To solve this problem, the common practice is to obtain the IP address segment of the carrier. by setting dual-line (multi-line) DNS access, "China Telecom takes China Telecom and China Netcom takes China Telecom" to solve the problem.
1. download and compile software
# 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

2. obtain the IP address Library of China Netcom
./Whois3-h whois.apnic.net-l-I mb MAINT-CNCGROUP-RR> data/cnc-rr

3. obtain China Telecom's IP address Library
./Whois3-h whois.apnic.net-l-I mb MAINT-CHINANET> data/chinanet

4. get China Tietong
./Whois3-h whois.apnic.net-l-I mb MAINT-CN-CRTC> data/crtc

5. format the Netcom address;
Cat data/cnc-rr | grep route | sed's/route: // g' | sed's/. // g'

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.