5. Direct domain name resolution, wildcard domain name resolution configuration, Domain Name Server Load balancer configuration, secondary Domain Name Server, and domain name resolution Server Load balancer
Based on the previous 3. DNS server functions (forward and reverse resolution), 1. Configure direct domain name resolution
Most users do not want to enter domain names such as www.gr.org. Generally, they want to directly access the company's WWW website through the gr.org domain name. In this case, you need to configure the domain name resolution configuration on the Domain Name Server.
Before Configuration:
① Add the following statement to the end of the regional database file/var/named/gr.org. db
@ In a 192.168.170.3
[Root @ localhost root] # vi/var/named/gr.org. db
② Restart the BIND Service
[Root @ localhost root] # rndc reload
③ Use the host command for testing
If you enter the domain name in your browser, you can directly access the WWW server on host 192.168.170.3.
2. wildcard domain name resolution Configuration
To make the domain names wwww.gr.org, ww.gr.org, and WWv.gr.org correct, but the website can also be accessed if the host name fails, you can configure wildcard domain name resolution.
(Note:
"*" Can only be correctly resolved to the server corresponding to the domain name. Therefore, if the domain name entered by the user fails to be correctly resolved. For example, www.baiduuu.com won't be the same as Baidu)
① Add the following statement to the end of the regional database file/var/named/gr.org. db
* In a 192.168.170.3
[Root @ localhost root] # vi/var/named/gr.org. db
② Restart the BIND Service
[Root @ localhost root] # rndc reload
③ Use the host command for testing
3. Domain Name Server Load balancer Configuration
When you need to simply implement the Server Load balancer function, you can use Domain Name Server Load balancer configuration to relieve the pressure on some overloaded hosts.
However, the disadvantage is that the server load of each server cannot be effectively detected, and some hosts may be frequently parsed,
Therefore, some users may access the website quickly, and some users may be slow.
The IP addresses of the two WWW servers corresponding to the www.gr.org domain name are 192.168.170.3 and 192.168.170.4 respectively.
① Add the following statement to the regional database file/var/named/gr.org. db:
Www in a 192.168.170.5
[Root @ localhost root] # vi/var/named/gr.org. db
② Restart the BIND Service
[Root @ localhost root] # rndc reload
③ Use the host command for testing
Indicates that two hosts with different IP addresses are successfully resolved, and DNS load balancing is configured successfully.
④ Use the ping command for testing
If the number of times is large, DNS load balancing is probably random, which is useful to reduce the load. Server Load balancer software is expensive, so we can accept its disadvantages at this stage.
4. Secondary Domain Name Server
To relieve the pressure on the Primary Domain Name Server, add a secondary Domain Name Server (192.168.170.4). When the Primary Domain Name Server encounters a problem, the secondary Domain Name Server can also provide the domain name resolution function.
Primary Domain Name Server:
[Root @ localhost root] # vi/etc/named. conf
Vi/etc/named. conf
Others are similar to the previous ones