aspose file tools*
The moose likes Linux / UNIX and the fly likes how to find ip address Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "how to find ip address" Watch "how to find ip address" New topic
Author

how to find ip address

rama ilango
Greenhorn

Joined: Dec 11, 2008
Posts: 24
Hi,
I created one virtual machine(using like xp os).I was power on the machine from it's server by following command

"xm create /mnt/1/vm.hvm"

the machine was powered on.In the above command /mnt/1/vm.hvm is the path of the virtual machine in server.
Now my question is before go to the console how to find ip address of the virtual machine?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

A server can have multiple NICs and therefore can have multiple IP addresses. Or, for that matter, you can configure a NIC to respond to multiple IP addresses, and I have machines that do so.

The IP addresses are defined via the virtual NIC configuration in the /mnt/1/vm.hvm config file. I think if you don't explicitly specify one, Xen may create a single NIC and expect the IP address to be supplied by DHCP. In that case, the IP address will be variable, and the easiest way in a Linux VM to find out what it is is to start the VM (since it won't even have an IP address if it's not running), "xm console" to connect to the started VM's console, log in and issue the /sbin/ifconfig command to see what address was assigned by DHCP. You could also do this from outside, but that requires being able to look at the DHCP log and figure out which lease corresponds to the VM.

For a Windows VM the process is the same except that the command-line way to determine your IP address is by using the "IPCONFIG" command.


Customer surveys are for companies who didn't pay proper attention to begin with.
rama ilango
Greenhorn

Joined: Dec 11, 2008
Posts: 24
i know the mac address of all machines in a network. how to find ip address of all the machines using mac.
i am using rarp and dhcp to find ip address.but it shows commands not found.
how can i access the rarp or dhcp?. or
any other way to find ip address from mac in a network?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

rama ilango wrote:i know the mac address of all machines in a network. how to find ip address of all the machines using mac.
i am using rarp and dhcp to find ip address.but it shows commands not found.
how can i access the rarp or dhcp?. or
any other way to find ip address from mac in a network?


You asked that as a separate question in a new message thread, and I answered it there. But please don't do that. If you ask a question more than once, it confuses people. You get multiple answer threads which don't know what the others are saying.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to find ip address