To configure your system to use DNS for name resolution, add the IP addresses of the DNS servers
that are appropriate for your network in the file /etc/resolv.conf. You can also add an optional
DNS suffix search-lists to match your network domain names.
Below is an example of a typical configuration of /etc/resolv.conf for a server on the domain
"example.com" and using two public DNS servers.
search example.com
nameserver 8.8.8.8
nameserver 8.8.4.4
The search option can also be used with multiple domain names so that DNS queries will be
appended in the order in which they are entered. For example, your network may have multiple sub-
domains to search; a parent domain of example.com, and two sub-domains, sales.example.com and
dev.example.com.
If you have multiple domains you wish to search, your configuration might look like the following.
search example.com sales.example.com dev.example.com
nameserver 8.8.8.8
nameserver 8.8.4.4
If you try to ping a host with the name of server1, your system will automatically query DNS for its
Fully Qualified Domain Name (FQDN) in the following order:
1. server1.example.com
2. server1.sales.example.com
3. server1.dev.example.com
If no matches are found, the DNS server will provide a result of notfound and the DNS query will fail.
that are appropriate for your network in the file /etc/resolv.conf. You can also add an optional
DNS suffix search-lists to match your network domain names.
Below is an example of a typical configuration of /etc/resolv.conf for a server on the domain
"example.com" and using two public DNS servers.
search example.com
nameserver 8.8.8.8
nameserver 8.8.4.4
The search option can also be used with multiple domain names so that DNS queries will be
appended in the order in which they are entered. For example, your network may have multiple sub-
domains to search; a parent domain of example.com, and two sub-domains, sales.example.com and
dev.example.com.
If you have multiple domains you wish to search, your configuration might look like the following.
search example.com sales.example.com dev.example.com
nameserver 8.8.8.8
nameserver 8.8.4.4
If you try to ping a host with the name of server1, your system will automatically query DNS for its
Fully Qualified Domain Name (FQDN) in the following order:
1. server1.example.com
2. server1.sales.example.com
3. server1.dev.example.com
If no matches are found, the DNS server will provide a result of notfound and the DNS query will fail.
Comments
Post a Comment
https://gengwg.blogspot.com/