Ubuntu DNS Resolution

Source: Internet
Author: User
Keywords Nbsp; name server DHCP
Tags address aliyun cat client dhcp dns dns resolution dns server

Resource records are DNS database records that are used to reply to DNS client requests, and each http://www.aliyun.com/zixun/aggregation/33842.html ">dns server contains all resource records for the DNS namespace that it manages. A resource record contains information about a specific host, such as the IP address, free dynamic dns ubuntu the type of service provided, and so on.

See dns server ubuntu

The following is a detailed explanation of the Common command operations for DNS in Ubuntu systems: ubuntu dns config

DNS resolution

root@ubuntu:~# cat/etc/resolv.conf
NameServer 202.101.172.35
NameServer 202.101.172.47
Domain Domain
Search domain

Hosts

Dns server linux ubuntu 

root@ubuntu:~# cat/etc/hosts
127.0.0.1 localhost
127.0.1.1 ubuntu.ubuntu-domain Ubuntu

192.168.0.251 web1.example.com Web1

192.168.0.252 web2.example.com WEB2

# The following lines are desirable for IPV6 capable hosts
:: 1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 Ip6-mcastprefix
Ff02::1 Ip6-allnodes
Ff02::2 ip6-allrouters
Ff02::3 ip6-allhosts

Ubuntu dns

For local resolution of domain names, higher than the previous priority.

Dhclient Lock DNS

Getting IP via DHCP

sudo dhclient network card name

The NameServer field in resolv.conf is also modified according to the DHCP server settings.

Lock domain name resolution server address in resolv.conf

root@ubuntu:/home/qii# nano/etc/dhcp3/dhclient.conf

Add both lines

Prepend domain-name-servers 8.8.8.8;

Prepend domain-name-servers 8.8.4.4;
8.8.8.8
8.8.4.4

Check dns in ubuntu

This is Google public DNS.

When you configure network information with DHCP, the field is placed in the front

root@ubuntu:/home/qii# cat/etc/resolv.conf
NameServer 8.8.4.4
NameServer 8.8.8.8
NameServer 202.101.172.35
NameServer 202.101.172.47
Domain Domain
Search domain

Related Article

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.