|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] How to tell which tapX interface belongs to which domain
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
|
|
|
|
|