怎么能知道旁边的一台没有显示器的 windows 的 ip 呢?

我旁边有个 windows,是 dhcp 获取 ip 的,ip 总变,很恶心。这机器还没有显示器,我都是通过 rdesktop 连上去用的,这样必须知道 ip 才行。那不接显示器,怎么能知道 ip 呢?

方法一,写一个脚本定时把 ipconfig 的结果通过 scp 或 ftp 发到某个有固定 ip 的机器。这样 ip 变了我至少过那么久的间隔就能知道他目前的 ip 了。时间设的长短可能就是你等的时间了。

方法二,扫描一下局域网结果存到 a,给那个机器断网,再扫一下存到 b,diff 比较那个状态有变化的。我用的就是这个方法。

# nmap -PN 10.32.20.0/24 -p 3389 –open > a

要用 root 执行,此外还有别的方法没?呵呵

No related posts.

6 Comments

  1. interskh
    Posted 一月 21, 2010 at 5:23 上午 | Permalink

    强制设ip哈..

  2. Posted 一月 24, 2010 at 1:32 上午 | Permalink

    可以试试用机器名访问!
    我用ssh连局域网里的ubuntu server服务器就用机器名:ssh ubuntu@ubuntu
    刚试了试,也可以通过tsclient用机器名连接windows2003服务器。

  3. Posted 一月 26, 2010 at 2:14 下午 | Permalink

    @zhcj
    可能需要 dns 或 windows 装什么 netbios 之类的协议支持,我这里试了不行。

  4. Posted 一月 27, 2010 at 3:24 下午 | Permalink

    你看看这个:
    http://forum.ubuntu.org.cn/viewtopic.php?f=116&t=162900&start=0
    我的ubuntu是照这个方法改过的。

  5. Posted 一月 31, 2010 at 2:36 下午 | Permalink

    知道那台机器的mac地址吗?如果知道的话,下面这个方法也行:
    sudo nmap -sP 192.168.1.1/24
    结果如下:
    Starting Nmap 5.00 ( http://nmap.org ) at 2010-01-31 14:32 CST
    Host bogon (192.168.1.1) is up (0.0043s latency).
    MAC Address: 00:21:91:05:CD:69 (D-Link)
    Host bogon (192.168.1.2) is up (0.0037s latency).
    MAC Address: 00:21:91:05:CE:16 (D-Link)
    ……
    是不是有了ip地址?

  6. Posted 一月 31, 2010 at 9:06 下午 | Permalink

    zhcj :
    知道那台机器的mac地址吗?如果知道的话,下面这个方法也行:
    sudo nmap -sP 192.168.1.1/24
    结果如下:
    Starting Nmap 5.00 ( http://nmap.org ) at 2010-01-31 14:32 CST
    Host bogon (192.168.1.1) is up (0.0043s latency).
    MAC Address: 00:21:91:05:CD:69 (D-Link)
    Host bogon (192.168.1.2) is up (0.0037s latency).
    MAC Address: 00:21:91:05:CE:16 (D-Link)
    ……
    是不是有了ip地址?

    这个方法好,比我那个好。

Post a Comment

Your email is never shared.