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