ping question

Hi,

I am running NT Server.
I type , at the dos prompt, ping localhost

The anser is

pinging A123.whatever  where
A123 is the computer name and whatever is the domain.
We have set up a DNS that maps my machine to A123.whatever.com.

I can say ping A123.whatever.com and the ping works, however if I just say ping A123 or ping localhost it just resolve it to A123.whatever , without the .com

My problem is that on that machine I am running a servlet engine, and that also returnes A123.localhost, as a request URL(the url that the client running a web browser typed to get to the web server running on A123.whatever.com), and that created problems.

I need to have A123.whatever.com returned, and I presume that the ping uses something to resolve the IPadress or the word localhost, but that something is obviously not the DNS. As I said the ping works also if I say ping A123.whatever.com, so I just think that that something takes precedency in resolving the name of the host.

Thanks.
simiAsked:
Who is Participating?
 
geoffrynConnect With a Mentor Commented:
The host name "localhost" is specified in the HOSTS file in c:\winnt\system32\drivers\etc.  You need to check the DNS setup on the server.  on NT 4, you have the ability to set both a netbios name and a DNS name for your server.  Check the domain name in the DNS settings, it sounds like it is set to whatever instead of whatever.com
0
 
dcgamesCommented:
Yes, first check the hosts file to make sure it doesn't have any hard coded stuff in it. But I doubt this is the problem. The hosts file shouldn't have anything relevant in it.

If not set there (which it shouldn't be), next you need to check the network settings.

Use IPCONFIG /ALL in a cmd (DOS) window. You will see the HOST NAME and the "primary DNS suffix". The primary DNS suffix should be either blank or whatever.com, but not "whatever".

Look also at the "connection specific DNS suffix" which is set in the TCP/IP Properties for each NIC. If you have one single NIC, the primary DNS suffix can be blank and the TCP/IP connection specific DNS can be "whatever.com". This one definitely should not be blank. And neither should it be "whatever".

Unfortunately I'm running Win2K and don't have an NT system available to double check the exact names of the pieces, because Win2K is different from NT in the handling of domain names. However, there are 3 main things to check:

-The name of the system under non-TCP/IP network protocols, such as NETBIOS and WINS. Look for Control Panel under SYSTEM/NETWORK IDENTIFICATION

-The name under TCP/IP. Look under Control Panel / Network, and TCP/IP Properties. Here is where you see the "connection specific DNS suffix".

-In the same place, you also can specify whether the local machine domain name should be appended to the machine name to create the fully qualified domain name for the machine.

If this last is unchecked, try checking it and see what that does.

Hope this helps. If not, do an IPCONFIG /ALL and capture it to a file, then post the contents here so we can see what's what.

To do that, in a DOS window type:

  IPCONFIG /ALL >ipconfig.txt

then edit the file by typing :

  NOTEPAD ipconfig.txt

or look for it in Explorer and then open it to get at the contents.


Dave
0
 
simiAuthor Commented:
Thanks a lot.
I changed the DNS for the TCP/IP from whatever to whatever.com and it works.

I am still wondering, why do I have the opportunity to set up my own host name and suffix for the TCP/IP DNS.
How are things working in the scenario where I have a web server running on that box as well as a servlet engine.

What I suspect is that when a browser makes a request like http://A123.whatever.com, the Domain Name Server that runs on the intranet resolves that to an ip adress and the browser finds out my machine and sends the comunication over TCP/IP, with HTTP to port say 80 on my machine. Here, the webserver passes the url to jakarta-tomcat, my servlet engine. But before passing it it resolves the ip_adress, no matter how it came to the webserver by using the TCP/IP protocol. So even if the initial request was http://A123.whatever.com/something.htm, the webserver(Apache), will resolve it to http://A123.whatever/something.htm and that will be what jakarta-tomcat will use.

Do you think my understanding is OK ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.