cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3108
Views
0
Helpful
2
Replies

Unable to ping or telnet a device by its hostname - but it resolves fine

William76280
Level 1
Level 1

Hello everyone, I've got a question about an home network where a 1941 is the WAN router (hostname: NWR01).

 

I've set a while ago a DNS server on that router, everything runs smoothly. However, in order to be able to telnet other devices, I've added their hostnames in router.

 

From Windows CMD, if I enter the command 'nslookup' and the hostname of a device, it resolves fine. However, I cannot ping it or telnet it:

 

C:\>nslookup nwx01
Server : NWR01
Address: 192.168.0.254

Non-authoritative answer:
Name: nwx01
Address: 192.168.0.250


C:\>ping nwx01
Ping request could not find host nwx01. Please check the name and try again.

(note: identical results if I ping nwr01, the DNS server) 

 

C:\>ping google.com

Pinging google.com [216.58.204.142] with 32 bits of data:
Reply from 216.58.204.142: bytes=32 time=25ms TTL=53
Reply from 216.58.204.142: bytes=32 time=25ms TTL=53
Reply from 216.58.204.142: bytes=32 time=27ms TTL=53
Reply from 216.58.204.142: bytes=32 time=25ms TTL=53

Ping statistics for 216.58.204.142:
Packets: sent = 4, received = 4, lost = 0 (loss 0%),
(...)

 

What I have in the router :

 

ip host NWR01 192.168.0.254

ip host NWX01 192.168.0.250

(...)

ip name-server 212.27.40.240
ip name-server 212.27.40.241
ip name-server 208.67.222.222
ip name-server 208.67.220.220

(...)

ip domain-lookup (not visible in 'sh run' since default command but entered it to be sure)

(...)
ip dns server

ip dns server queue limit forwarder 1000000

 

Testing if NWX01 is in hosts table:

 

NWR01#sh hosts | include NWX01
NWX01 None (perm, OK) 0 IP 192.168.0.250

 

Note 1: as computers are in default Windows workgroup (W7 & W10), there is obviously no FQDN.

Note 2: of course, editing hosts file in windows do the job, but I want to avoid editing each computer.

 

 

Thanks for your inputs and ideas!

1 Accepted Solution

Accepted Solutions

Philip D'Ath
VIP Alumni
VIP Alumni
When you are trying to ping it by name you are not specifying a prefix, so the machine will need to append its default prefix. So I'm guessing your machines default prefix does not match the domain name the entry is in. Try pinging the FQDN the the host name is in. For example:
ping nwx01.xxx.local

View solution in original post

2 Replies 2

Philip D'Ath
VIP Alumni
VIP Alumni
When you are trying to ping it by name you are not specifying a prefix, so the machine will need to append its default prefix. So I'm guessing your machines default prefix does not match the domain name the entry is in. Try pinging the FQDN the the host name is in. For example:
ping nwx01.xxx.local

Hi, many thanks for your answer! I do not have any FQDN:

 

C:\Windows\system32>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : PC1
Primary DNS Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) Ethernet Connection I217-LM

Physical Address. . . . . . . . . : 34-17-EB-B1-4F-3C
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
(...)
DNS Servers . . . . . . . . . . . : 192.168.0.254
NetBIOS over Tcpip. . . . . . . . : Enabled

 

However, following your advice, adding a dot at the end of the device's hostname solved the issue:

C:\>ping nwr01.

Pinging nwr01 [192.168.0.254] with 32 bytes of data:

Reply from 192.168.0.254: bytes=32 time<1ms TTL=255
(...)

[For anyone interested in, notice the dot after 'ping nwr01' and how Windows behave, by removing the dot after the sentence 'Pinging nwr01']

 

Pretty logical though. Would be perfect though to change behaviour of Windows, by not entering a dot at the end of hostname. But perhaps asking too much ;-)

 

Anyway, thanks a bunch!

 

Review Cisco Networking for a $25 gift card