Understand and configure: Create a host name and DNS name resolution on the vro

Source: Internet
Author: User

Understand and configure: Create a host name and DNS name resolution on the vro


Created Technical Group No.: 195228906


In network management, the memory of IP addresses is always a headache, especially in large networks. Therefore, a device in the network is usually named with a unique identifier, for example, a vro located in Shanghai is named "shanhai" and a name is mapped to a valid IP address. In the event of network management, such as ping or Telnet, you can directly use pingshanhai or telnet shanhai, which saves the trouble of memorizing IP addresses and forms the corresponding relationship between these IP addresses and names. In Cisco IOS, the host name list is called. Configure the Host Name List on the Cisco router, as shown in Figure 9.40. Create a host name list for the routers R2, R3, and R4 on the router R1. Then, use the host name on router R1 to manage the network.


650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1611426060-0.png "title =" 1.png" alt = "185002113.png"/>


Configure the Host Name List on router R1:

R1 (config) # ip host R2 192.168.1.2 * maps IP 192.168.1.2 with the name R2

R1 (config) # ip host R3 192.168.1.3 * maps IP 192.168.1.3 to the name R3

R1 (config) # ip host R4 192.168.1.4 * maps IP 192.168.1.4 to the name R4


After completing the above configuration, you can use the vro host name to complete the corresponding management tasks in the future network management. For example, you need to execute the configuration on vror1 R1, connectivity tests on routers R2, R3, and R4 do not need to remember their IP addresses, but directly ping their host names, as shown in Figure 9.41. If you need to Telnet a vrotelnet, such as vror2 R2, you can directly Telnet the Host Name of the vror2, as shown in Figure 9.42. The reason why the above functions can be achieved is that the router R1 stores a list of IP addresses and host names corresponding to other routers, you can run the show hosts command on router R1 or view this list, as shown in Figure 9.43.


650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1611422358-1.png "title =" 2.png" alt = "185102857.png"/>

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1611424259-2.png "title =" 3.png" alt = "185131997.png"/>

Using a host name to manage the network is a more effective solution, but a simple host name is in a "flat" structure. What is a "flat" structure? That is to say, if you use a simple host name and one vror2 named R2 in the entire network, there will be no other vror2 named R2. In this way, network management using the host name will lead to confusion, even if their IP addresses are different. Because the router is not so intelligent, it can be understood that 192.168.1.2 is an R2, 192.168.1.12 is another R2, at least in the network that you manage. In this way, we need to introduce a Name resolution solution for a three-dimensional structure-DNSDomain Name System ).

Domain Name SystemDNS Domain Name Service System) is now a core service on the Internet. DNS is used as a distributed database to map Domain names and IP addresses, A name resolution system with a multi-logical flat structure allows you to easily access devices or services on the Internet. Instead, you need to remember the IP address string, as shown in Figure 9.44, in the flat name structure, only one router in the whole plane can be called R2, which is unique in the entire network, but in the three-dimensional name system at the logical level, there can be two routers called R2, which are respectively in two different logical layers. One plane is ccna.com, And the other plane is ccie.com; the Name of the two planes is FQDNFully Qualified Domain Name.) For example, the FQDN of R2 in the ccna.com plane is R2.ccna.com; the FQDN of R2 in the ccie.com plane is R2.ccie. c Om; although they are all named R2, they belong to different DNS levels and can be differentiated by the domain name suffix ccna.com and ccie.com. In fact, the description of the DNS system can form a book that involves a wide range of knowledge fields. Here, due to limited space, it only plays a key role in DNS, and how to configure the IP address of the DNS server on a Cisco device to complete domain name resolution.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1611423496-3.png "title =" 4.png" alt = "185217844.png"/>


DNS is a service system based on the service/customer mode, which uses UDP port 53 domain name query) and TCP port 53 region synchronization) to work, due to the fast domain name resolution process, the UDP53 port is used. Because the regional synchronization of the DNS server requires reliability and stability, the TCP port 53 is used, because the three-way handshake process of the TCP protocol can provide reliable transmission at the transport layer. As shown in figure 9.45, there are two components required by the DNS service in this environment: the DNS server and the client.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1611423453-4.png "title =" 5.png" alt = "185312228.png"/>

Step 1:Vro11r1193851.1) must be connected with vro r2.ccna. com192.168.1.2) communication. First, the router needs to send a domain name query message to the specified DNS server 192.158.1.254, and resolve the FQDN of R2.ccna.com to the corresponding IP address, the domain name query data frame sent by router R1 to the DNS server is shown in Figure 9.46. We can see that it is using the UDP53 port and asking what the IP address corresponding to r2.ccna.com is?

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/161142AZ-5.png "title =" 6.png" alt = "185355586.png"/>


Step 2:In this case, the DNS server queries your DNS region ccna.com and determines the IP address corresponding to r2. Note that the corresponding region must be configured on the DNS server, the A record host record is stored in the region. This book does not focus on the configuration of the DNS server, for more information about server configuration, see.


Step 3:When the DNS server finds a host record about the IP address of r2, it returns a DNS response record, inform the DNS client that the IP address corresponding to r2.ccna.com is 192.168.1.2. The response data frame of the DNS server is shown in Figure 9.47.


650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/16114243Q-6.png "title =" 7.png" alt = "185545166.png"/>


Step 4:After the DNS Client obtains the DNS response message returned by the DNS server, it uses the IP address in the Response Message to complete the communication with vror2 R2. Note that the data frame during the communication process is shown in Figure 9.48, we can see that the first step is to get the target IP address through DNS query and response, and then complete the formal communication.


650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/161142GT-7.png "title =" 8.png" alt = "185650559.png"/>


Demonstration: configure the DNS query function for Cisco devices


Demonstration objectives:Configure a Cisco router to use a DNS server for domain name resolution.

Demo environment:For example, the demo environment of 9.49.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1611421539-8.png "title =" 9.png" alt = "185814277.png"/>

Demonstration Background:First, configure two DNS regions, ccna.com and ccie.com, and create A host record with the Host Name R2 ); the IP address corresponding to R2.ccna.com is 192.168.1.2, And the IP address corresponding to R2.ccie.com is 192.168.1.3. Then, configure the DNS server address of router R1 to allow the router to complete domain name resolution through the specified DNS server.

Demo steps:


Step 1:Configure the DNS server. On the DNS server 192.168.1.254, create two regions, ccna.com and ccie.com respectively. Then, create the host records of R2 in the two differences, as shown in Figure 9.50. Note, in this step, I use the DNS service components of Microsoft Based on the Windows 2003 server System. The configuration method of the DNS service of Microsoft is not the focus of this book, therefore, no more detailed description is provided here. You can complete the DNS server configuration by watching the tutorial demonstration video corresponding to this section.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/161142A17-9.png "title =" 10.png" alt = "185903825.png"/>


Note: in fact, the DNS region and host records configured on Microsoft servers can be configured on Cisco routers with the same functions. However, in practice, an independent server is usually used as the DNS server in the network engineering environment. Here I chose to configure an independent DNS server.



Step 2:After configuring the DNS server, configure the DNS query function of router R1 as follows:

Configure DNS query on Cisco devices:

R1 (config) # ip domain-lookup

* Configure router R1 to enable domain name query.

R1 (config) # ip name-server192.168.1.254

* Set the IP address of the DNS server to 192.168.1.254, which is the IP address of the DNS server set up in step 1.

R1 (config) # ip domain-name ccna.com

* Configure the domain name suffix ccna.com of router R1, which is not a required command for DNS query.


Step 3:Run the ping r2.ccna.com and ping r2.ccie.com commands on router R1 to send a DNS query to the DNS server 192.168.1.254, as shown in Figure 9.51, then, according to the query response results, the IP address corresponding to r2.ccna.com is 192.168.1.2, the IP address corresponding to r2.ccie.com is 192.168.1.3, and ICMP communication is completed with the two IP addresses.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/16114252K-10.png "title =" 11.png" alt = "190043919.png"/>






This article is from the "unknown Christ" blog. For more information, contact the author!

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.