When I ping a server name, how is the domain determined?

2

1

On my machine, when I ping a server with fully qualified name, it works fine

ping myserver.newcompanyname.com

But when I ping the server name by itself, it fails. And it also indicates that it has resolved the server name to the wrong domain.

ping myserver
pinging myserver.oldcompanyname.com

Our default domain name has changed recently. I can login with the new domain name without a problem, but I cannot ping or access network shares without using fully qualified domain names. How do I specify which domain name should be used when no domain name is explicitly given?

FWI, I've already tried to flush my dns and this didn't help.

epotter

Posted 2012-11-15T15:17:47.817

Reputation: 349

Answers

6

It's most likely a DHCP or network adapter misconfiguration - try running ipconfig /all in a Command Prompt and look for the Primary Dns (sic) Suffix and Connection Specific DNS Suffix lines. The first I believe is set by the Windows domain you're joined to, the second by DHCP or adapter configuration.

To fix the first, you'll need to edit your DHCP settings (option 015, DNS Domain Name) on the DHCP server for your network. If you don't use DHCP you'll need to edit your IP configuration for that adapter:

  • Open the adapter properties window, select Internet Protocol Version 4 (TCP/IPv4) and click Properties:

    enter image description here

  • Click Advanced:

    enter image description here

  • Select the DNS tab and review the area in blue: (this section can be used to override the defaults if required)

    enter image description here

The second is somewhat more complicated and will require reconfiguration of Active Directory, unless you opt to manually override it as above.

Graham Wager

Posted 2012-11-15T15:17:47.817

Reputation: 10 589

1

Or if you want explicitly set that:

In network cards preferences -> protocol ipv4 -> preferences -> tab "DNS"
Domain DNS Suffix

network settings

Don't have an english version, sorry..

week

Posted 2012-11-15T15:17:47.817

Reputation: 3 128

0

How DNS works and how to troubleshoot similar problems:

Whenever you ping something or open web page using domain name (and not IP address) DNS client first asks from DNS server what is IP address for this domain name.

If DNS server has record for asked domain name then DNS server sends IP address as response. If DNS server does not find record for asked domain name it could either try to ask it from another server and forward response for you or it could just return "record not found".

Picture about how internet works

Does programs use domain names while connecting to server?
No, IP programs does not use domain names for connecting/exchanging data with server. After program (ping, web browser ...) knows IP address it can send request to real endpoint that is server you are trying to ping or server that holds web pages you want to read. This connection is always done with IP address, it does not use domain name to send/receive data.

DNS servers are also reached by IP address when program does query, not by domain name. This is why you must have correct IP addresses for DNS server in your network configuration.

Troubleshooting DNS:
Windows has nslookup CLI tool that can be used to query DNS servers, there is also better tool called dig that shows more useful information about server response.

Sampo Sarrala - codidact.org

Posted 2012-11-15T15:17:47.817

Reputation: 2 268