[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] How to get VM IP address through XenStore


  • To: "jian zhang" <cheechuang@xxxxxxxxx>, "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
  • Date: Tue, 10 Jun 2008 16:29:32 +1000
  • Delivery-date: Mon, 09 Jun 2008 23:29:58 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcjKvw58ZQvQQu1AQDC5RbIDZ1abewAAu+QQ
  • Thread-topic: [Xen-devel] How to get VM IP address through XenStore

> Hi all:
> I am wondering how to get current VM IP address in XenStore, does it
> contains such information??

No, it does not. xenstore keeps layer 2 (eg MAC address) information,
but has no visibility to layer 3 (IP) and above.

What you need to do is:
1. get the mac address from xenstore
2. watch IP traffic on your network with that src or dst mac address
3. extract the IP address from that packet
4. repeat 2-3 if you suspect that there is more than one IP address
attached to that mac address.

If the mac address belongs to a router then you'll see heaps of IP
addresses attached to it, so the exercise may be futile... you should
only see one on the 'local' subnet though.

You could also try a scan of the network subnet to figure it out.

I just did a google search for "ip address from mac address" and there
are lots of people asking much the same question but I didn't come
across any useful answers.

James

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.