WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "jian zhang" <cheechuang@xxxxxxxxx>, "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] How to get VM IP address through XenStore
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <c77ea6600806092257h2778a129vb9d4e6bf5eccba6c@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <c77ea6600806092257h2778a129vb9d4e6bf5eccba6c@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>