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