Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How the H*ll does WinXP's PING Know?

Status
Not open for further replies.

RobIncMBAperma

Technical User
Sep 3, 2005
5
0
0
CA
I have a question pertaining to WinXP's implementation of PING--and probably other MS flavours as well.

I, as I'm sure many other home users do, have a system that hides behind a (insert brand name) consumer home router/firewall. WinXP is set up, again, as I'm sure many other cable modem users do, to obtain its Private IP, default gateway, and DNS server information automagically via DHCP through the router.

Having been active online since the 80s, I thought I understood most of the nuances of the little tools we have come to take for granted--like PING... So here's where I kind of am not sure if I should feel dumb or rightly puzzled...

PING localhost behaves as it should. No surprise there.

For some strange reason (I can't remember), this morning I typed "PING ?" and was quite surprised when it returned my EXTERNAL IP. Forgive me if my lack of sleep has made me overlook something obvious, but as far as I know, my happy, oblivious little WinXP machine behind the router should know nothing of the actual external IP address... It is told what private IP address to use, what gateway to the Internet to use--and even uses the router as a DNS server--but should see my cable modem's actual IP address as if it were any other IP address on the Internet...

Is there some magical switch to PING that I've overlooked that causes my machine to fetch the cable modem's IP address, router and firewall notwithstanding, and somehow knows to associate itself with this IP address? It kind of scares me to think about it...
 
This is what ping ? said to me.

>ping ?

Ping request could not find host ?. Please check the name and try again.

Do you have a host called "?"?
 
Thanks for taking the time to try it :)

1. No, I do not have a host called "?"
2. Will WinXP even survive someone trying to define a host called "?" ?

 
By the way, I think it's clear upon re-reading what I wrote that what I was *trying* to do was get the syntax for PING, which I would have gotten by "C:\> PING" by itself, "C:\> PING /?" or even "C:\> PING -?" ...

What I ended up doing was "C:\> PING ?" which gave me the IP that XP should have no idea about...
 
? like * can be a wild card.

"Using wildcard characters. A wildcard character is a keyboard character such as an asterisk (*) or a question mark (?) that is used to represent one or more characters when you are searching for files, folders, printers, computers, or people. Wildcard characters are often used in place of one or more characters when you do not know what the real character is or you do not want to type the entire name."

"Question mark (?) Use the question mark as a substitute for a single character in a name. For example, if you type gloss?.doc, you will locate the file Glossy.doc or Gloss1.doc but not Glossary.doc."

From Help and Support - Wildcard

Reading the above maybe you have a Host named as a single letter or numeral?


This next is totally irrelevant but I'll post it anyway -

You Cannot Use IPCONFIG with a Wildcard Character to Set the ClassIDs of Multiple Network Adapters
 
Putting aside how you came up with the IP, just what is it you're afraid of? The whole wide world knows your IP address and most certainly your router does.
 
Sorry, perhaps I emphasized the wrong point. It's not whether the IP is "known" that puzzles me; it's

1. how passing "?" as an argument to PING somehow translated into my entire host.domain; and

2. how whether it was wildcarded or not (e.g. passing a "*") it happened to choose my external IP/domain as opposed to any other

Other installations don't do this as far as I can tell...

 
RobIncMBAperma,
By the way, I think it's clear upon re-reading what I wrote that what I was *trying* to do was get the syntax for PING, which I would have gotten by "C:\> PING" by itself, "C:\> PING /?" or even "C:\> PING -?" ...
As linney correctly stated the "?" acts as "*".

As you were looking for syntax you should have entered:

PING /? as this is the switch for what is available.


rvnguy
"I know everything..I just can't remember it all
 
RobIncMBAperma,

Can you reproduce this result? If you type in Ping ?, does this happen again?

And, does it happen from any other systems. Ping should (like this needs to be restated) pass you any information unless there's a host with that name responding from somewhere.
 
Yes, it seems no matter what I change about the TCP/IP connection properties (in response to the post above, again I point out there is no single character entry in my HOSTS and since then I have found that PING * produces the same result; why it is choosing that specific domain is what I am now trying to figure out) it has been doing the same thing since my original post repeatedly.

And in response to your second question, as I mentioned previously, it does not seem to produce the same result on other installations I've tried it on. PING * and PING ? don't pick anything, let alone my domain specifically... and then it proceeds to resolve my domain to my external IP (I guess thinking about it, it must be the NAT router responding to the ICMP)
 
Oddball question, what's in your local hosts file on that system?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top