One of the biggest headaches when configuring China Telecom's dual-line dual-IP address for Internet websites is that China Telecom and China Netcom cannot communicate with each other. In order to allow users of both China Telecom and China Telecom to access the website quickly, the solution is to host a dual-line data center. There are two types of Dual-line data centers. One is to achieve interconnection through BGP technology. The server only needs one IP address of the Network Adapter. The data center performs Intelligent Routing judgment and selects an appropriate route for access, this is very convenient for websites, but the BGP data center generally has less bandwidth. if the traffic is higher, there may be no way. The other is the dual-line dual-IP data center. The bandwidth may be higher, but the routing configuration is extremely complex. The server requires at least two NICs, one Nic is connected to the telecom gateway, and the other Nic is connected to the Netcom gateway, to achieve interconnection. If you have multiple servers, you need to set up 3rd NICs for Intranet Communication. For dual-line dual-IP servers, two problems must be solved: • The IP address used by your website users to access your server • the IP address used to return the content of your website to the user for 1st problems, which can be solved using intelligent DNS resolution, that is, the DNS server determines the IP address of the user. If the user is connected by China Telecom, it will resolve the telecommunication IP address of the server to him. If the user is connected by China Netcom, it will resolve the IP address of the server to him. Intelligent DNS can be customized based on open-source DNS software. However, there is a free smart DNS server provider in China: DNSPod. We recommend using the DNSPod service. It can achieve the above intelligent DNS resolution. For 2nd problems, you need to configure routing rules on the server to determine how to handle the data return path. 1. Fill in the static route table because the server has two IP addresses in different CIDR blocks. If you use the gateway of the Telecom IP address for routing, the IP address users of China Netcom cannot access it, and vice versa. Currently, the popular solution is to use the telecom gateway for default routing, and then manually enter the routing rules for all the IP address segments of the network. This method can be searched by Google, but cannot be expanded. The disadvantage of this method is that adding rules too much is too troublesome, and it is inevitable to miss a thousand. If you miss some CIDR blocks, users of these CIDR blocks will not be able to access your website. Besides, the distribution of CIDR blocks is constantly changing. You must update the route table periodically. 2. Set a dynamic route according to the path accessed by the user. That is to say, if the user accesses the route through the Telecom IP address, use the telecom gateway for routing and the returned content goes to the telecom gateway; if you access it through the IP address of China Netcom, use the China Netcom gateway for routing and the returned content goes through the China Netcom gateway, so that you do not have to worry about maintaining the route table. Take the JavaEye website server as an example. The configuration method is as follows: JavaEye website server Telecom IP Address: 114.80.66.199, telecom Gateway: 114.80.66.1JavaEye website server Netcom IP Address: 60.29.231.190, and Netcom Gateway) the default GATEWAY uses the telecom GATEWAY as the route to configure the default GATEWAY on Linux. For RedHat, add a line in the/etc/sysconfig/network file: GATEWAY = 114.80.66.12) add the route table/etc/iproute2/rt_tables and add the following content: [cpp] # China Telecom 252 tel # China Unicom 251 cnc, then manually add routing rules, and execute the following command in the Console: # add the original route return route [cpp] ip route flush table tel ip route add default via 114.80.66.1 dev eth0 src External table tel ip rule add from 114.80.66.199 table tel ip route flush table cnc ip route add default via 60.29.231.1 dev eth1 src 60.29.231.190 table cnc ip rule add from external table cnc allows Telecom IP the request is returned according to the telecom route, requests from the IP address of the China Netcom are returned from the China Netcom route. This is done. 3) write the routing rules to the boot script. If the server is restarted or the network service is restarted, the preceding routing rules will become invalid, therefore, you need to write the above command into the system startup script and the network STARTUP script/etc/rc. d/rc. local