0

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
5
  • What are you trying to ping ?! Please post the output of ipconfig /all
    – voodooo
    Jan 12, 2011 at 17:38
  • 3
    You do realize that 0x7F000001 is 127.0.0.1 in hexadecimal, right?
    – DerfK
    Jan 12, 2011 at 17:38
  • voodooo: I am trying to ping my remote server, which is named 0x7F000001
    – esac
    Jan 12, 2011 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, 2011 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. Jan 12, 2011 at 20:37

3 Answers 3

4

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.

2
3

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

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

4
  • Why should that matter, my server is named that.
    – esac
    Jan 12, 2011 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. Jan 12, 2011 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, 2011 at 17:55
  • LOL, nice one..
    – voodooo
    Jan 12, 2011 at 18:11
2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .