Beginner in linux Network dns

Source: Internet
Author: User
Tags convert domain name to ip address time 0 nameserver

For linux Network dns beginners, the linux dns information is usually stored in the/etc/resolv. conf file. Sh-# cat/etc/resolv. confnameserver 192.168.0.2nameserver 192.168.0.1/etc/resolv. the conventional format of conf is as follows: domainname www. xxx. xxxsearch www. ooo. ooonameserver primary_dns_servernameserver secondary_dns_server so nameserver is used to specify the IP address of the dns server. DNS, short for Domain Name System, is a core service of the Internet. It serves as a distributed database that maps domain names and IP addresses, allowing people to access the Internet more conveniently. Therefore, the IP address specified by nameserver is the IP address of a dns server, which is used to reflect the mutual relationship between domain names and IP addresses. Sh-3.2 # ping www. baidu. comPING www.a.shifen.com (115.239.210.27) 56 (84) bytes of data. ^ C ^ C64 bytes from 115.239.210.27: icmp_req = 1 ttl = 45 time = 508 MS --- www.a.shifen.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0 msrtt min/avg/max/mdev = 508.968/508.968/508.968/0.000 MS from the ping command output results can see www.baidu.com this domain name corresponding IP address. Enter the domain name and IP address of baidu in the browser to access this website. It turns out that dns is used to convert domain name to IP address. From this point of view, directly entering an IP address for access is theoretically more efficient. Why not directly entering an IP address for access? This is because domain names are usually relatively easy to remember. Who would like to remember IP addresses like 115.239.210.27? Is it not objective and convenient, even if it is subjective? Therefore, the Internet provides the dns service for convenience of human access to the network. So you enter www.baidu.com in your browser, and dns will help you convert it to 115.239.210.27. This is what dns does. Mobile phone --> wireless router --> internet my mobile phone connects to the internet through a wireless router, but it is found that gateway and nameserver are the same IP address. This is because the wireless router is a server, and the IP address of the mobile phone is allocated by the wireless router.

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.