cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3556
Views
0
Helpful
5
Replies

DNS question

rezaalikhani
Spotlight
Spotlight

I have three routers; yosemite, Seville and Albuquerque. I must test DNS commands for the CCNA exam. I picked the Albuquerque, my DNS server and add the other routers along with itself by using the "ip host" command. now when I use the ping command to ping Yosemite, everything is Ok, but when I use ping Albuquerque from the Yosemite router, the Albuquerque router cannot reply, although I can ping it by using its IP address.

Am i missing something?

P.S. I have enabled DNS in all my routers by using the "ip domain-lookup" command. And also I have set the Albuquerque as DNS server in other routers.

Albuquerque#sh hosts

Default domain is not set

Name/address lookup uses domain service

Name servers are 255.255.255.255

Codes: UN - unknown, EX - expired, OK - OK, ?? - revalidate

temp - temporary, perm - permanent

NA - Not Applicable None - Not defined

Host Port Flags Age Type Address(es)

yosemite None (perm, OK) 0 IP 10.1.128.252

Seville None (perm, OK) 0 IP 10.1.129.253

Albuquerque None (perm, OK) 0 IP 10.1.128.251

Albuquerque#

Thanks

Reza

1 Accepted Solution

Accepted Solutions

Reza

I do not believe that your configurations are necessarily wrong but it does not follow the logic given in one of the links. I believe that you have a misunderstanding about the ip host command. Using the ip host command does not make the router into a real DNS server. Using the ip host command allows the router to refer to devices by name without having a real DNS server in the network. But the ip host command does not make the router into a DNS server.

The ip host command operates locally on the router. So if you configure R1 with ip host commands for R2, R3, or other devices then R1 will be able to access them by name. But R1 will not respond to DNS requests and this is the behavior that you have.

If you follow the logic in one of the links presented you could try configuring no ip domain-lookup and configure ip dns server. This should enable DNS spoofing. I am still not sure that this would accomplish what you want. But you could give it a try and let us know what happens.

HTH

Rick

HTH

Rick

View solution in original post

5 Replies 5

Jon Marshall
Hall of Fame
Hall of Fame

Hi Reza

When you ping Albuquerque from Yosemite do you get an unrecognised host error message.

I believe you can setup a router to be a DNS server although i have never done it myself. I had a quick search through NetPro and found this thread

http://forum.cisco.com/eforum/servlet/NetProf?page=netprof&forum=Network%20Infrastructure&topic=LAN%2C%20Switching%20and%20Routing&CommCmd=MB%3Fcmd%3Dpass_through%26location%3Doutline%40%5E1%40%40.1ddd12c0/3#selected_message

HTH

Jon

Thanks for your reply. I do everything that the link says, but my problem still exists.

Reza

My configuration with two Routers:

R1 is my DNS Server:

R1(config)#ip host R1 10.1.128.251

R1(config)#ip hos R2 10.1.128.252

R1(config)#ip domain lookup

R1(config)#ip name-server 10.1.128.251

R1(config)#ip domain name Cisco.com

R1(config)#^Z

R1#ping R2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.128.252, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 56/104/152 ms

R1#

And R2 configuration:

R2#conf t

Enter configuration commands, one per line. End with CNTL/Z.

R2(config)#ip domain lookup

R2(config)#ip name-server 10.1.128.251

R2(config)#ip domain name Cisco.com

R2(config)#^Z

R2#ping 10.1.128.251

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.128.251, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 28/61/96 ms

R2#ping R1

Translating "R1"...domain server (10.1.128.251)

% Unrecognized host or address, or protocol not running.

R2#

Are my configurations wrong?

I have tested this scenario with two different IOSes.

c3660-is-mz.122-8.T5.bin

c3660-jk9o3s-mz.124-5a.bin

IOS issue?

Thanks

Reza

Reza

I do not believe that your configurations are necessarily wrong but it does not follow the logic given in one of the links. I believe that you have a misunderstanding about the ip host command. Using the ip host command does not make the router into a real DNS server. Using the ip host command allows the router to refer to devices by name without having a real DNS server in the network. But the ip host command does not make the router into a DNS server.

The ip host command operates locally on the router. So if you configure R1 with ip host commands for R2, R3, or other devices then R1 will be able to access them by name. But R1 will not respond to DNS requests and this is the behavior that you have.

If you follow the logic in one of the links presented you could try configuring no ip domain-lookup and configure ip dns server. This should enable DNS spoofing. I am still not sure that this would accomplish what you want. But you could give it a try and let us know what happens.

HTH

Rick

HTH

Rick

I tested as you advised, and everything is Ok.

Review Cisco Networking for a $25 gift card