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: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] How to tell which tapX interface belongs to which domain...
From: James Oakley <jfunk@xxxxxxxxxxxxxx>
Date: Wed, 10 Oct 2007 15:03:49 -0300
Delivery-date: Wed, 10 Oct 2007 11:05:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20071009053051.GA18951@xxxxxxxxxxxx>
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>
Organization: Funktronics
References: <AEC6C66638C05B468B556EA548C1A77D012499FA@trantor> <AEC6C66638C05B468B556EA548C1A77D01249A1A@trantor> <20071009053051.GA18951@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 20070904.708012)
On October 9, 2007, Christian Horn wrote:
> - 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
>    [.....]
>    -----------

One thing to watch out for: While the port number gets incremented for each 
device you add to the bridge, any devices that are removed leave a hole. If 
you remove vif1.0 from the bridge above, tap0 will still be port 4, but it 
will be the third entry in 'brctl show' output. If you start/stop instances a 
lot, you will run into that problem.

Unfortunately, the true mapping is not exposed to userspace. At least I could 
not find it in linux/if_bridge.h.

-- 
James Oakley
jfunk@xxxxxxxxxxxxxx

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