North-South intercommunication no worries about dual-line DNS Creation

Source: Internet
Author: User
Tags mx record nslookup nslookup command subdomain url forwarding

What is DNS

Domain Name System (DNS) is an English abbreviation of "Domain Name System". It is a computer and network service naming System organized into a Domain hierarchy. It is used for TCP/IP networks, it is mainly used to replace the boring and hard-to-remember IP addresses with user friendly names to locate the corresponding computers and services. Therefore, to enable friendly and friendly names to be recognized by the network, you must have a "translator" between the name and IP address ", it can translate related domain names into IP addresses that can be accepted by the network. DNS is such a "translator ".

What is dual-line smart DNS resolution?

Dual-line smart resolution is a DNS solution designed to address the problem of communication between China Telecom and China Netcom. The specific implementation result is: For the same domain name such as www.winiis.com, the access by the Netcom customer will return an IP address pointing to the Netcom server, and the access by the telecom customer will point to the IP address of a Telecom server. In this way, try to avoid Netcom customers from accessing the telecom network, and telecom customers from accessing the Netcom network. for websites with large traffic, you can use this function to allocate traffic to several different servers to speed up website operation. Through the definition of the IP table, foreign customers can automatically access the English version of the website; so that domestic customers can automatically access the Chinese version of the website.

Several Basic Concepts in DNS

Domain Name Space: The only and friendly host name space of all hosts on the internet. It is a DSN

The logical tree structure of the naming system at a level. Each machine can use its own domain name space to create an invisible private network on the internet.

DNS server: The computer on which the DNS service program runs. It contains the DNS database for the DNS domain tree result.

DNS Client: a DNS Client is used to query information from the server. The parser can communicate with the remote DNS server or the local computer that runs the DNS server program.

Resource Record: The information set in the DNS database, which can be used for client queries.

Region: the server is a continuous part of its authorized DNS namespace. A server can be authorized in one or more regions.

Region file: a file that contains region resource records. The server authorizes this region. In most DNS implementations,

Use a text file to implement the region.

Internet Domain Name Space

The DNS domain name system on the Internet adopts a tree hierarchy.

The top layer is called the root domain. the InterNIC organization is responsible for dividing the IP address ranges all over the world and allocating the domain name structure on the Internet. The root domain DNS server is only responsible for processing resolution requests from some top-level domain name DNS servers.

The 2nd layer is called a top-level domain. A name consisting of two or three letters is used to indicate a country (region) or a unit using the name. Common types include com, org, gov, and net.

Layer 2 is the second-level domain under the top-level domain, and the second-level domain is a variable-length name registered to an individual or unit for use on the Internet. These names are always based on the corresponding top-level domain, depending on the type of the unit or the geographical location of the name used. For example, edu.cn indicates the website of an education institution in China.

Layer 2 is a subdomain under the second-level domain, and the subdomain is another name that can be created by the Unit. These names are derived from registered second-level domain names, include the name added to the DNS tree for the name of the expanded Unit and divide it into departments or geographical locations. For example, winiis.com indicates a top-level domain name. Next we can continue to divide subdomains or mount hosts.

The second layer is the host or resource name. The common www stands for a WEB server, ftp stands for an FTP server, and news stands for a newsgroup server.

Through such hierarchical structure division, the meaning of servers on the Internet is very clear.

DNS domain name resolution Method

DNS query method

Recursive query: If the DNS server cannot resolve the IP address corresponding to the domain name to be queried by the DNS customer service machine, the DNS server queries or contacts other DNS servers on behalf of the DNS customer service machine, and return the response to the customer service machine.

Iterative query: to overcome the disadvantages that all domain name resolution tasks in the recursive query method fall into the DNS server, you can find a way for the DNS client to undertake a certain amount of DNS domain name resolution work.

Reverse query method: recursive query and iterative query are both forward domain name resolution, that is, querying IP addresses from the domain name.

The following describes the DNS domain name resolution process in the WEB Access column of the client. The resolution method is recursive query.

How to Set up Microsoft DNS

2. Install the DNS Service

Starting from guanli.sjsgz.net, we are preparing to install the DNS server service on this computer. To install DNS, follow these steps:

(1) Select "Start> Settings> Control Panel" and open "Add/delete programs ".

(2) Click "Add/delete Windows Components" and wait for the Windows component Wizard to start.

(3) Click [next] to bring up the Windows component list.

(4) Click [network service], and then click the [Details] button.

(5) Click the check box next to "DNS (Domain Name System.

(6) Click the [OK] button to return to the "Windows Components" dialog box.

(7) Click [next] to install the corresponding service, and then click [finish] and [close] one by one.

You do not need to restart the computer. Click Start> program> Management Tools> DNS ".

3. Create the "winiis.com" region

(1) Right-click the "+" root directory in DNS and select "new region" to enter the new region wizard.

(2) When the wizard prompts that you want to select "region type", select "Main region ",

(3) If "region name" is displayed on the screen, enter "winiis.com" in the text box after "name", and then enter the "region file" Prompt window in the Wizard, the system automatically selects the "Create new file, file name is" item, and automatically fills in "winiis.com. dns, click the [next] button, and then click [finish] to complete the region creation, in this case, the winiis.com area () is displayed in CHINA-RLMCOCOSN → forward search area on the left of DNS manager ().

Note: the purpose of creating a forward search area is to translate the host name into an IP address. You can also create a reverse search area to translate the IP address into a corresponding host name, the creation method is similar to that of the forward search area.

4. Create a host

The following describes how to create a Web server (www.sjsgz.net) as an example.

(1) Right-click the "winiis.net" area in the window, select "New Host", and enter the host name "www" in the "name" column in the subsequent dialog box ", enter "192.168.1.213" in the "ip address" column ".

(2) Click the [add host] button to create the host address record www. Winiis.com. In the "new host" window, select "finish" to return to the DNS manager.

Configure DNS Client

The procedure is as follows:

(1) Click Start> Control Panel> network connection> local connection. Right-click and choose Properties from shortcut menu.

(2) Open the "General" tab in the "Local Connection Properties" dialog box. Select Internet Protocol (TCP/IP) in the "use the following items" list box for this connection, and click "properties ".

(3) the "Internet Protocol (TCP/IP)" properties "dialog box" general "tab appears. Select the "use the following DNS server address" option and enter the IP address of the primary DNS server in the "preferred DNS server" text box, in the "backup DNS server" text box, enter the IP address of the secondary DNS server.

(4) If you want to set up multiple DNS servers, click "advanced. 8.6.3. Click Add to add multiple DNS servers.

5. Test Configuration

Nslookup is the most common tool used for Dynamic DNS queries. It can simulate both standard customer Resolvers and servers. As a customer parser, nslookup can directly Query Information on the server. As a server, nslookup can be transferred from the primary server to the secondary server.

The Nslookup command is used as follows:

Nslookup [option] [host-to-find | server]

It can be used in the following two modes:

Non-interactive mode: Enter the complete command in the command line, such as nslookup www.winiis.com.

Interaction Mode: Enter "nslookup" and press Enter. No parameter is input. In interactive mode, you can enter "help or?" at the prompt "> ?" To obtain help information.

(Note: The computer must be configured with a static IP address before "DNS server" is installed .)

WinMyDNS dual-line smart DNS resolution System

WinMyDNS is a new smart DNS software that fully supports Chinese parsing. In addition to the basic DNS resolution function, the software can automatically identify the source of the browser and resolve the same domain name to the IP address of the China Netcom or China Telecom on a dual-line machine, so that the customer can access your website nearby. At the same time, the system can automatically perform downtime detection on the parsed server to ensure that viewers can always access the normal server.

The system also saves the DNS configuration information in the ACCESS or MSSQL database. The application develops a specific DNS application and can easily add or remove records of the SOA and RR tables in the database. This system works perfectly with squid and other WEB Cache software to build its own CDN accelerator.

How to Build WinMyDNS dual-Line Intelligent Resolution System

Main Components and files of WinMyDNS:

Winmydnsadmin.exeis the management configuration program. ;winmydns.exe is the service program, and WinMyDNS. xml is the configuration file. Install the service. bat, uninstall the service. bat, start the service. bat, and stop the management script of the service. bat batch.

The database directory is the database directory, WinMyDNS. mdb is the ACCESS database, and winmydns. bak is the MSSQL database backup, which can be restored to MSSQL. A web directory is a WEB management system. The IPtable directory is the default IP Address Allocation Table. Update the table in time. The accuracy of the allocation table is directly related to the accuracy of the intelligent judgment of the customer source. LOG is the LOG directory.

How to Use winmydns to build a DNS server?

1. You must have your own domain name. For example, abc.com. If you do not have a domain name, you must first register a domain name.

2. Register a DNS domain in the international domain name center to make your DNS server globally valid.

A. register the DNS under the domain name in the domain name control panel of the domain name registrar (such as xinnet and xinnet interconnection.

B. Click here to add two DNS servers, such as ns1.abc.com and ns2.abc.com. Fill in the IP address of the server where winmydns is installed. If you do not have two machines or two fixed IP addresses, you can write an IP address for NS2.

C. Enter your dnsdomain name on the http://www.internic.com/whois.html page, for example, ns1.abc.com. select "Nameserver" and click submit to see if your registered DNS has taken effect.

3. When registering a new domain name, enter your own ns1.abc.com and ns2.abc.com In the DNS server box. Do not use the default domain name registrar. If the domain name is already registered, change the DNS server of the domain name to ns1.abc.com and ns2.abc.com.

4. Copy the downloaded WinMyDNS to the d: \ directory and double-click Install service. bat to register the NT Service for WinMyDNS.

5. Configure the WEB administrator. In the WEB folder under the WinMyDNS directory, open conn. asp and modify the database link parameters in conn. asp. Modify the connection parameters of WinMyDNSDbType, WinMyDNSDbUser, and WinMyDNSbPass. :

3. In the IIS manager, create a website or virtual directory pointing to the WEB directory. Access the index. asp page. The default user name is admin and the password is 123456.

4. After logging in, you can perform DNS resolution management.

6. Set the URL forwarding server (you do not need to set the URL forwarding function ).

Find a server as the URL forwarding server. In addition, the main directory of the default IIS Site (the site with an empty Host header) is directed to the URL directory, and index. asp is set as the default homepage.

Modify the database link parameters in URL/index. asp. Same as WEB/CONN. asp in the previous step.

Enter the WinMyDNSURL parameter correctly, for example, url.abc.com. And direct the record that parses A url.abc.com to the URL forwarding server.

How can I test whether WinMyDNS works properly?

1. Run the netstat command to check whether DNS works on UDP port 53.

Run the netstat command to check whether port 53 is Enabled: Start-> Run-> cmd.exe and enter netstat-an-p udp as follows:

If winmydns works properly. The corresponding IP address is displayed in step 53. The above record: UDP 192.168.1.158: 53 *:*. If no port 53 is enabled. Start winmydns in winmydnsadmin.exe.

2. Run the nslookup command to test whether DNS resolution is normal.

First, check whether the DNS server of the domain name is your company's DNS server. For an international domain name, go to http://www.internic.com/whois.html. For domestic domain names, go to www.cnnic.cn.

Run the nslookup command to check whether your DNS server is properly resolved: Start-> Run-> cmd.exe and enter nslookup as follows:

Use the server command nslookup to point to your DNS server for query

Run the set type = MX or set type = A command to query the DNS type.

Directly enter www.abc.com and other domain names to query the DNS resolution results. If it is A record, the IP address is displayed. If the MX record is used, the domain name will be exchanged in the mailbox.
 

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.