Linux static IP configuration, DNS configuration, and host name configuration (2)

Source: Internet
Author: User
Tags nslookup nslookup command

We have completed most of the work before configuring static IP addresses, DNS settings, and host names in Linux. However, a small part of the work will be continued here. Continue with the article for configuration, soon you will complete a server host.

③ Configure the secondary DNS Server

Configure the server 11.0.0.2 as the 21php.com secondary dns Server

The secondary DNS Server transfers a complete set of domain information from the primary server. Zone files are transferred from the master server and stored as local disk files on the secondary server. The secondary server has a complete copy of the domain information, so you can also query the domain. The configuration content of this part is as follows:

Zone "21php.com" IN {

Type slave;

File "21php.com. zone ";

Masters {11.0.0.1 ;};

};

As you can see, unlike the primary DNS server, "type" is changed to "slave", and then the address "masters {11.0.0.1 ;};" of the primary DNS server is specified ;};". When the DNS service is started, it automatically connects 11.0.0.1, reads information about the 21php.com domain, and saves it to the 21php.com. zone file on the local machine.

④ Test the DNS server

After modifying the corresponding DNS file, run the "ndc restart" command to restart the service. In redhat 7.1 or a later version, run the following command:

/Etc/rc. d/init. d/named restart

Or

/Etc/rc. d/init. d/named reload

Make the change take effect.

To test DNS, you can find a client and set its DNS address to a new DNS server address. Then, try surfing the Internet, receiving emails, downloading emails, and so on. You can also run the nslookup command: Run nslookup, enter the host name to be queried, and check whether the correct IP address is returned. We recommend that you use the dig command in redhat 7.1 or later versions.

In this way, all configurations of Linux static IP configuration, DNS and host name are completed, and the server can run.

  1. How to Use the Linux rescue mode
  2. Describes the Problems and Solutions of Linux system calls.
  3. Ten common linux management errors
  4. How to configure access for different network segments in Linux
  5. Summary of Linux shortcut keys


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.