[Original] DNS Reading Notes: subdomains, delegation, wildcard domain names, etc.
Source: Internet
Author: User
[Original] DNS Reading Notes: subdomains, delegation, and wildcard domain names-Linux Enterprise applications-Linux server applications. For details, refer to the following. As mentioned above, DNS is a huge Hierarchical Distributed Database System, and hierarchical and distributed is implemented through subdomains. subdomain creation can be divided into two types: one is that the subdomain is on the same DNS server as the parent domain, and the other is that the subdomain and parent domain are on different DNS servers.
1. The parent and child domains are on the same DNS server, which is easier to implement. for example, create A subdomain nic.test.com for the test.com domain, that is, create A record and a cname record in the forward region database, and create A reverse record in the data of the reverse region, that is, create A reverse record in the test.com. add the following to the zone file:
....
Server.nic.test.com in a 192.168.1.102
Www.nic.test.com in cname server.nic.test.com
2. parent and child domains are assigned on different DNS servers.
Parent and Child Domains can fully reflect the distributed characteristics on different DNS servers, which is also the root cause for DNS replacing hosts files. this parent-child domain is called Regional Delegation on different DNS servers, that is, the parent domain delegates the subdomain to another machine for management, that is, adding
.....
Nic.test.com. in ns www.nic.test.com
Www.inc.test.com. in a 192.168.1.102
Similarly, create a reverse region file.
Forwarder: this is certainly not a stranger to those who are familiar with windows2003 configurations. Setting a forwarder on the DNS in the local area not only allows Intranet machines to resolve machines in the LAN, but also Internet machines, this is also applied to Cache-only servers.
It is also easy to implement the forwarder: vi/etc/named. conf, add in the options section
...
Forward first; // defines the priority to use the forwarder
Forwarders {210.51.1.108}; // list of IP addresses of the specified Forwarder
The simplest load balancing mechanism of DNS --- round robin
Www.test.com. in a 192.168.1.100
In a 192.168.1.101
In a 192.168.1.102
When querying www.test.com, the DNS server first uses the value 192.168.1.100 of the first record to respond. When querying www.test.com again, the DNS server uses 192.168.1.101 to respond, and so on, loop uses the corresponding records to respond to the customer's request, thus achieving the simplest load balancing.
Wildcard Domain Name: for example, if the user's domain name is abc.com, we will set the host name to "*" and resolve the IP address to, for example, 218.104.78.100. We all know that * is a wildcard, it indicates that all subdomain names before abc.com will be resolved to 218.104.78.100, which means that, for example, the input of bbs.abc.com, 123.abc.com, or 123.234.abc.com will be resolved to 218.104.78.100, in our system, if a sub-domain name resolution is set separately, for example, the host name is set to mail and resolved to 218.104.78.79 separately, the resolution record takes precedence.
Wildcard domain names play a very wide role in actual use. For example, the unlimited second-level domain name function provides free url forwarding and automatically allocates free URLs in the IDC department, the implementation of website Classification Management in large enterprises has played a huge role.
Implementation of wildcard domain names
* .Test.com in a 192.168.1.102
After entering sina.test.com, www.test.com.ns.test.com, you will be able to get the resolution 192.168.1.102
DDNS is a special form of DNS. It is also recorded in my blog. It was successfully passed under RHEL4. If you are interested, you can compare it with the experiment. This article is original. For details, please indicate the source:
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