main idea:
- Issue resolution request from the client based on the source IP address of the client to determine the geographical area where the analysis results to determine how to return, in order to achieve the nearest traffic scheduling.
- DNS configuration file /etc/named.conf master file match the client defined in the IP acl
- ACL match different client read different regional database file
- DNS technology will view ACL and regional mapping database file, note that once enabled DNS technology is the view of all areas must be included in the definition of the view.
First, the network topology description
Second, server configuration
1. Definitions resolution request traffic classification
Edit bind master configuration file /etc/named.conf, defined acl request traffic classification, such as: the definition of three matches respectively ACL resolution request from China Unicom, China Telecom, China Mobile three ISP's domain name.
acl cmnet {
192.168.39.0/24;
192.168.10.0/24;
};
acl cunet {
192.168.38.0/24;
192.168.20.0/24
};
acl ctnet {
192.168.37.0/24;
192.168.30.0/24
};
allow-query { 192.168.39.0/24;192.168.10.0/24;192.168.20.0/24;192.168.30.0/24;};
2. Define a view to resolve
DNS technology will view ACL and regional library file mapping, include references to the region name file. Note that once you enable a view of all the regions must be included in the view, so you need to zone /etc/named.conf file, and comment out the last sentence includ zone file, or delete, and then defined within the file referenced by the view.
view cmcc {
match-clients { cmnet;};
include "/etc/named.rfc1912.zones.cmcc";
};
view cucc {
match-clients {cunet;};
include "/etc/named.rfc1912.zones.cucc";
};
view ctcc {
match-clients {ctnet;};
include "/etc/named.rfc1912.zones.ctcc";
};
Whether named-checkconf check the configuration file syntax errors
3. Create a zone file
When files respectively defining area for each view, the DNS domain name resolution request is received from the ISP customers three, each region corresponding to ISP reads three documents, the present analytical regions are mapped three libraries, according to the domain name resolution request packet a node within the source resource record returned IP address of ISP network.
Cmnet zone file file defines the network /etc/named.rfc1912.zones.cmcc
zone "magedu.com" IN {
type master;
file "magedu.com.zone.cmcc";
};
Cunet zone file file defines the network /etc/named.rfc1912.zones.cucc
zone "magedu.com" IN {
type master;
file "magedu.com.zone.cucc";
};
Ctnet zone file file defines the network /etc/named.rfc1912.zones.ctcc
zone "magedu.com" IN {
type master;
file "magedu.com.zone.ctcc";
};
4. Define resolver library file
definition to parse user library /var/named/magedu.com.zone.cmcc cmnet
The corresponding user-defined cunet parsing library file /var/named/magedu.com.zone.cucc
definition to ctnet user parsing library file /var/named/magedu.com.zone.ctcc
5. Check parsing library file syntax errors
chgrp named /var/named/magedu.com.zone.cmcc
chgrp named /var/named/magedu.com.zone.cucc
chgrp named /var/named/magedu.com.zone.ctcc
6. Change the zone file, the file parsing library is a group named
chgrp named /etc/named.rfc1912.zones.c
chgrp named /var/named/magedu.com.zone.c
7. Do rndc reload reload the zone
Third, the client test
- Mobile network testing
- Unicom network test
- Telecommunications network testing