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] concepts of Xen networking

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] concepts of Xen networking
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Mon, 21 Jul 2008 15:20:37 +0100
Cc: Siddharth Deshpande <siddharth.d@xxxxxxxxxxx>
Delivery-date: Mon, 21 Jul 2008 07:21:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1216586277.12834.29.camel@xxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <1216586277.12834.29.camel@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.9
Hello Siddharth,

On Sunday 20 July 2008, Siddharth Deshpande wrote:
> Hello,
>
> Newbie question. I've been through a few books and online documents
> about Xen, but I still have a few doubts about how bridged networking is
> achieved in xen. I also found a thread in the archives
> (http://lists.xensource.com/archives/html/xen-useraes/2006-02/msg00030.html
>) which was helpful but not completely.
>
> I'm running Xen 3.0 on CentOS 5. All the docs talk about xen bridge and
> vif's but maybe the difference in my setup is that i'm running all fully
> virtualized domains. Maybe that's why i see network interfaces like tapX
> when i run ifconfig on the host?

HVM networking does indeed work a bit differently and has probably been less 
well explained on the mailing lists in the past...

For HVM domains, emulated network devices are provided by the Qemu-derived 
device models running in dom0.  These use the Linux tun/tap usermode network 
driver code.  This is why you're seeing lots of tap devices, representing the 
emulated ethernet devices provided for the domain's by Qemu.

The tap devices you see represent the "dom0 end" of an imaginary crossover 
cable between dom0's tap device and the domU's emulated NIC.

I assume that the numbering of the tap devices is due to some policy either in 
Linux or in the Qemu device model.

> I currently have 21 domains running on the host. And i see interfaces
> tap0 - tap21. And i see vif's starting from vif0.1 with arbitrary
> numbers like vif{104,138,158,163...}. Can anybody explain the
> significance of these?

You see vifs because the tools automatically set up a PV network device 
corresponding to each emulated device available to the the guest.  This is so 
that if you load a PV network device driver in the guest, it can switch to 
using the higher performance PV channel instead of using emulation.  The 
numbering of the vifs corresponds to the domain they belong to.

> Also, most of the docs i have come across say that the physical
> interface (eth0) of the host is renamed to peth0 . But if that is the
> case, then shouldn't peth0 reflect the host IP? Instead, i see that the
> interface listed as eth0 shows the host IP, while peth0 shows no IP and
> a MAC of FF:FF:FF:FF:FF:FF.

I believe this is some kind of "trick" the Xen networking code uses to cope 
with some corner cases in Linux/Xen networking behaviour.  I think what 
you're seeing is normal but if I recall correctly the details of the exact 
reasons for this are rather arcane :-)

The eth0 you have is a "virtual" device that packets pass through on their way 
to the real device, peth0.

> Can somebody please explain or point me to 
> some documentation that explains networking fully virtualized domains?
> Sorry if the questions seem stupid! Any help will be greatly
> appreciated.

I'm not sure if it's written up in a particular document anywhere but I hope 
this explanation clarifies things somewhat!

Cheers,
Mark

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



-- 
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)

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

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