Linux Server DNS Configuration

Source: Internet
Author: User
Tags nameserver


DNS is used to resolve servers for domain name back-end IP.

Domain name interpreter: Resolver, a library that resolves IP addresses based on host name


1. Configuration files

[Email protected] init.d]$ cat/etc/resolv.conf; Generated By/sbin/dhclient-script search localdomain nameserver 192.168.56.2 nameserver 114.114.114.114


2, the key word of resolv.conf mainly has four

nameserver #定义DNS服务器的IP地址 domain #定义本地域名 search #定义域名的搜索列表 #sortlist #对返回的域名进行排 Order


3. Modify DNS Address

1. Configure IP Address file/etc/sysconfig/network-scripts/ifcfg-eth0 Add dns1=8.8.8.8 DNS configuration file/etc/ The address of the resolv.conf will automatically match the manually added address, and restarting the NIC will not clear


2, manually add the DNS address to/etc/resolv.conf nameserver 114.114.114.114 Note: DHCP environment, the DNS address added in the/etc/resolv.conf, restart the network card will automatically clear


Linux Server DNS Configuration

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.