- 论坛徽章:
- 0
|
【求助】一个关于主机名是数字获取其IP地址的问题
感谢回复^-^,不过好像不行啊。
我把身边一台ip为10.58.34.218的机器名改为了2608336
下面是测试
C:\Documents and Settings\Administrator>;ping -a 10.58.34.218
Pinging 2608336 [10.58.34.218] with 32 bytes of data:
Reply from 10.58.34.218: bytes=32 time<10ms TTL=128
Reply from 10.58.34.218: bytes=32 time<10ms TTL=128
Reply from 10.58.34.218: bytes=32 time<10ms TTL=128
Reply from 10.58.34.218: bytes=32 time<10ms TTL=128
Ping statistics for 10.58.34.218:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Documents and Settings\Administrator>;ping "2608336"
Pinging 0.39.204.208 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 0.39.204.208:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Documents and Settings\Administrator>;ping '2608336'
Unknown host '2608336'.
C:\Documents and Settings\Administrator>;
可以看到,通过ping -a 命令可以把IP地址转换成主机名,但“2608336”还是当作IP处理的,倒是‘2608366’像是作为主机名处理了,但怎么是unknown呢?
另外,我又用局域网查看工具(lansee)看了下,这个功能可以实现。
求助啊~ |
|