cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4520
Views
5
Helpful
3
Replies

ip name server and ip domain-name server command

Hello,

 

With no the ip name server and ip domain-name server command on a switch what happens to the switch and computer connected to that switch. Can the switch and the computer connected to the switch ping host names still without the command or no?

 

Thanks,

3 Replies 3

vmiller
Level 7
Level 7

As far as a device connected to the switch, they "usually" go elsewhere to resolve name services.

using a domain-name in a config is done for SSH configurations, and in large environments, a quick(er) way to

access another device from the command line.

Roger De Couto
Level 1
Level 1

---results WITHOUT ip name-server configured on the router/switch---


RDC-Home#ping facebook.com
Translating "facebook.com"...domain server (255.255.255.255)
% Unrecognized host or address, or protocol not running.


---results WITH ip name-server configured on the router/switch---

RDC-Home(config)#ip name-server 4.2.2.2

!
RDC-Home#ping facebook.com
Translating "facebook.com"...domain server (4.2.2.2) [OK]

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 173.252.110.27, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 348/350/352 ms

 

Likewise, devices connected to the switch will need to know which DNS server to contact to resolve hostname to IP address. A device can obtain a DNS IP address either via DHCP from a router or static IP config on the device itself.

 

Example of DHCP config on a router:

!
ip dhcp pool LAN
   network 192.168.2.0 255.255.255.0
   default-router 192.168.2.1
   dns-server 4.2.2.1 4.2.2.2
!

 

HTH :)

HTH.

no suprise there. you can kill the lookup from ther router with the command no ip domain-lookup. This will prevent a mistyped command from kicking off a a name lookup.

 

Generally i prefer something other than the router to do the dns work.