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

Source: Internet
Author: User

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

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.