Introduction to the Internet Domain Name System (DNS)

Source: Internet
Author: User
Tags subdomain

The Internet uses IP addresses for communication, but generally for human and easy memory, defines a set of domain names and a mechanism for mapping domain names to IP addresses. The Domain name collection forms a hierarchy that can be represented as a tree, the nodes of the tree represent the domain name, and the path to the root forms the domain name. Subtree is called subdomain, the first level domain name includes com/edu/gov/org/net and so on, the first level domain name includes two level domain name, for example Cmu.edu, once an organization obtains a two level domain name, then he can create any new domain name in this subdomain.

The internet defines the IP-to-domain mapping, which was done manually by a HOSTS.TXT text file in 1988. Later, this mapping was maintained by distributing database DNS around the world. The DNS database consists of thousands of host entry structures (host entry structure), each of which defines a mapping between a set of domain names and a set of IP addresses. You can assume that each host entry is an equivalent class of domain name and IP address.

The following is the composition code for the host entry structure:

struct Hostent {char *h_name;    Official domain name Char **h_aliases;    A series of aliases int h_addrtype;    Host address type int h_length;    The length of the address, in bytes, of Char **h_addr_list; Address};

The internet can retrieve arbitrary host entries from the DNS database by invoking the gethostbyname and GETHOSTBYADDR functions.

Introduction to the Internet Domain Name System (DNS)

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.