本地网络中所有机器的IP地址 [英] all ip addresses of machines in the local network

查看:89
本文介绍了本地网络中所有机器的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

那里。我在编写一个程序时遇到问题,该程序可以获得在同一本地网络中运行的机器的地址。


比如,有4台机器存在于网络; [a],[b],[c]和[d]

如果我在[a]上运行我的程序,它应该能够找到主机名

和ip addresses其他机器; [b],[c]和[d]?


i已经阅读了这个组中发布的一些帖子,但是,他们只为localhost工作了
,而不是整个网络。


如果可能有任何提示?


感谢您的时间。


问候,damacy

解决方案

damacy写道:


那里。我在编写一个程序时遇到问题,该程序可以获得在同一本地网络中运行的机器的地址。


比如,有4台机器存在于网络; [a],[b],[c]和[d]

如果我在[a]上运行我的程序,它应该能够找到主机名

和ip addresses其他机器; [b],[c]和[d]?


i已经阅读了这个组中发布的一些帖子,但是,他们只为localhost工作了
,而不是整个网络。


如果可能有任何提示?


感谢您的时间。


问候,damacy



这是为了什么?某种高可用性的服务器设置?我不会知道任何对你有用的东西,但我很好奇,也许

它会澄清你对别人的意图。


-Sandra


桑德拉。


不,这是'没那么复杂。我想要做的就是将一个

数据库加载到驻留在同一网络中的不同机器上。我希望

有办法做到这一点。或者我对

网络的运作方式了解甚少。


问候,damacy


Sandra-24写道:


damacy写道:


那里。我在编写一个程序时遇到问题,该程序可以获得在同一本地网络中运行的机器的地址。


比如,有4台机器存在于网络; [a],[b],[c]和[d]

如果我在[a]上运行我的程序,它应该能够找到主机名

和ip addresses其他机器; [b],[c]和[d]?


i已经阅读了这个组中发布的一些帖子,但是,他们只为localhost工作了
,而不是整个网络。


如果可能有任何提示?


感谢您的时间。


问候,damacy



这是为了什么?某种高可用性的服务器设置?我不会知道任何对你有用的东西,但我很好奇,也许

它会澄清你对别人的意图。


-Sandra


" damacy" < we **** @ gmail.comwrote:


那里。我在编写一个程序时遇到问题,该程序可以获得在同一本地网络中运行的机器的地址。


比如,有4台机器存在于网络; [a],[b],[c]和[d]

如果我在[a]上运行我的程序,它应该能够找到主机名

和ip addresses其他机器; [b],[c]和[d]?


i已经阅读了这个组中发布的一些帖子,但是,他们只为localhost工作了
,而不是整个网络。


如有可能提示?



google for nmap,不要重新发明轮子。

-

John MexIT:< a rel =nofollowhref =http://johnbokma.com/mexit/target =_ blank> http://johnbokma.com/mexit/

个人页面: http://johnbokma.com/

经验丰富的程序员: http://castleamber.com/

快乐客户: http://castleamber.com/testimonials.html


hi, there. i have a problem writing a program which can obtain ip
addresses of machines running in the same local network.

say, there are 4 machines present in the network; [a], [b], [c] and [d]
and if i run my program on [a], it should be able to find "host names"
and "ip addresses" of the other machines; [b], [c] and [d]?

i have read some threads posted on this group, however, they only work
for localhost, not the entire network.

any hints if possible?

thanks for your time.

regards, damacy

解决方案

damacy wrote:

hi, there. i have a problem writing a program which can obtain ip
addresses of machines running in the same local network.

say, there are 4 machines present in the network; [a], [b], [c] and [d]
and if i run my program on [a], it should be able to find "host names"
and "ip addresses" of the other machines; [b], [c] and [d]?

i have read some threads posted on this group, however, they only work
for localhost, not the entire network.

any hints if possible?

thanks for your time.

regards, damacy

What is this for? Some kind of high availablity server setup? I don''t
know anything that would be useful to you, but I am curious, and maybe
it will clarify your intentions for others.

-Sandra


hi, sandra.

no, it''s not as complicated as that. all i want to do is to load a
database onto different machines residing in the same network. i hope
there is a way doing it. or perhaps i have a poor understanding of how
networks work.

regards, damacy

Sandra-24 wrote:

damacy wrote:

hi, there. i have a problem writing a program which can obtain ip
addresses of machines running in the same local network.

say, there are 4 machines present in the network; [a], [b], [c] and [d]
and if i run my program on [a], it should be able to find "host names"
and "ip addresses" of the other machines; [b], [c] and [d]?

i have read some threads posted on this group, however, they only work
for localhost, not the entire network.

any hints if possible?

thanks for your time.

regards, damacy


What is this for? Some kind of high availablity server setup? I don''t
know anything that would be useful to you, but I am curious, and maybe
it will clarify your intentions for others.

-Sandra


"damacy" <we****@gmail.comwrote:

hi, there. i have a problem writing a program which can obtain ip
addresses of machines running in the same local network.

say, there are 4 machines present in the network; [a], [b], [c] and [d]
and if i run my program on [a], it should be able to find "host names"
and "ip addresses" of the other machines; [b], [c] and [d]?

i have read some threads posted on this group, however, they only work
for localhost, not the entire network.

any hints if possible?

google for nmap, don''t reinvent the wheel.
--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html


这篇关于本地网络中所有机器的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆