[Ilugc] Find IP address of a machine

  • From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
  • Date: Tue Oct 24 05:47:27 2006

On Mon, Oct 23, 2006 at 10:09:12PM +0200, Binand Sethumadhavan wrote:

On 23/10/06, Arun Velusamy <arunvelusamy@xxxxxxx> wrote:
   I have a scenario where my perl program has to find the IP address
of the machine.

Well, a given machine could have several different IP addresses, so
you need to be a bit more specific than that.
There are both multi homed and single interface having mutiple IP addresses 
problem.

You have to basically figure out which network you have to cater to if you are 
a server. If you are a client (which is unlikely in this case), then I guess 
there is not much of an issue

Anyway that said you can make do with the manual approach for most common 
cases(the script i sent)

Other related posts: