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-users

Re: [Xen-users] How to tell which tapX interface belongs to which domain

To: James Harper <james.harper@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] How to tell which tapX interface belongs to which domain...
From: Christian Horn <chorn@xxxxxxxxxxxx>
Date: Tue, 9 Oct 2007 07:30:51 +0200
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 08 Oct 2007 22:31:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D01249A1A@trantor>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <AEC6C66638C05B468B556EA548C1A77D012499FA@trantor> <20071008165642.GA17799@xxxxxxxxxxxx> <AEC6C66638C05B468B556EA548C1A77D01249A1A@trantor>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
On Tue, Oct 09, 2007 at 12:00:29PM +1000, James Harper wrote:
> 
> I noticed that when I do a 'brctl show', the tap interface is on the
> line before the vif interface, so I made use of that. Hopefully it's
> always true!

Also seen that, but how do you conclude from that to which domU the
tap-device belongs?

I think i found something usable:


- ping the ip of the domU on the tap-interface you want to identify,
i.e. 'ping -c2 ch_hvmadm'
I also have the mac of my domU on that interface from the xen-config,
its aa:00:00:00:00:03 in this case.


- from the ping we have the mac in the arp-cache, and 
'brctl showmacs xenadm0' shows the macs known on that bridge:
   -----------
   port no mac addr             is local?  ageing timer
     2     00:03:d2:11:0d:fb    no            1.57
   [....]
     4     6e:14:9d:77:3a:cd    yes            0.00
     4     aa:00:00:00:00:03    no          138.21
     1     fe:ff:ff:ff:ff:ff    yes            0.00
   -----------


- the 'port' column of my well-known mac is important, its 4.
Issuing 'brctl show' i get the connected tap-interface on the
4th line:
   -----------
   bridge name     bridge id       STP enabled     interfaces
   xenadm0         8000.6e149d773acd       no      vif0.0
                                                   peth0
                                                   vif1.0
                                                   tap0
                                                   vif17.0
   [.....]
   -----------

So now for implementing it into my perl/rrdtool scripts..


Christian

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