Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I recently setup a new server for use with SQL. When I tried to connect via SSMS remotely, it failed. When I pinged it, it is pinging localhost, what is going on here? Please let me know if more details will help. It is Windows Server 2008.

C:\>ping 0x7F000001

Pinging 127.0.0.1 with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
share|improve this question
    
What are you trying to ping ?! Please post the output of ipconfig /all –  voodooo Jan 12 '11 at 17:38
3  
You do realize that 0x7F000001 is 127.0.0.1 in hexadecimal, right? –  DerfK Jan 12 '11 at 17:38
    
voodooo: I am trying to ping my remote server, which is named 0x7F000001 –  esac Jan 12 '11 at 17:48
    
Did you actually set the name of your remote server to 0x7F000001 or are you reading that value from some screen/display? –  Zoredache Jan 12 '11 at 17:57
2  
maybe you should give some serious consideration to your naming scheme. As you have now discovered, using wacko and obscure names creates far more trouble than it's worth. –  John Gardeniers Jan 12 '11 at 20:37

3 Answers 3

up vote 4 down vote accepted

OK, I feel like I'm on candid camera, but I'll take a whack at it.

I want to introduce a domain name to the equation, so I'm going to use example.com in lieu of actually knowing what your local domain is.

You have a server whose nodename is 0x7f000001. Its FQDN is 0x7f000001.example.com. 0x7f000001 is also a valid IP address, represented also as decimal 2130706433, 0b1111111000000000000000000000001, or dotted-quad 127.0.0.1.

Your problem is that when you type ping 0x7f000001, the ping program evaluates that as an IP address instead of a hostname. The ping program cannot read your mind, it does not know that the valid IP address you told it to ping is also a hostname, and it evaluates whether it is an IP first.

Imagine if you will that you created a hostname 127, put it in the zone 0.0.1.example.com, and make example.com your default search domain. According to your logic, it should then be valid to type ping 127.0.0.1 and have ping not use the IP 127.0.0.1 but instead use the A record pointed to by the FQDN 127.0.0.1.example.com, which is silly.

Short of recompiling ping to behave the way you think it should, try pinging the FQDN 0x7f000001.example.com.

share|improve this answer
    
Addresses do indeed take precedence over hostnames: msdn.microsoft.com/en-us/library/ms738524%28VS.85%29.aspx –  Gerald Combs Jan 12 '11 at 18:29
    
+1 for the Candid Camera bit. Some questions do feel a bit like that. –  John Gardeniers Jan 12 '11 at 20:34

0x7F000001 is the hexadecimal representation of 127.0.0.1 - unless I'm missing something here...

http://www.kloth.net/services/iplocate.php

share|improve this answer
    
Why should that matter, my server is named that. –  esac Jan 12 '11 at 17:48
3  
It matters because the command-line parsing of 'ping' tries the hexadecimal representation of 127.0.0.1 before it tries to parse it as a name. You found a hostname which causes interesting problems. –  Koos van den Hout Jan 12 '11 at 17:55
1  
Because the command-line ping command will treat any representation of a number as an IP address? If you ping 2130706433 you get the same results. –  Zoredache Jan 12 '11 at 17:55
    
LOL, nice one.. –  voodooo Jan 12 '11 at 18:11

If you give it a domain then it should work e.g.

ping 0x7F000001.lan

otherwise ping is assuming that it's a hexadecimal number to convert into an IP address

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.