WIP !

If not using PCI passthrough, the straightforward way is to use bridges.
Note: do not confuse the "bridging method" and bridges. The "routed method" also make use of bridges.

A real network :

  PC1 - NIC1 <-> switch <-> NIC2 - PC2

A virtual one, connected to a real :

                      real switch
                          |
                   ------------------
  VM1 - vNIC1 <-> | bridge+NIC-dom0 | <-> vNIC2 - VM2
                   ------------------
                          |
                      NIC - dom0

Steps to give your domains network access:

  1. configure networking in dom0, a bit like a local network
  2. in the VMs config files, set the VIFs accordingly
  3. configure networking inside the domu like a real host.

In networking, a bridge is some kind of a virtual switch : it connects hosts together, specifically their network interfaces (NICs), like a switch does "in real life", but without cables.
Once a bridge is created, you can "add" real or virtual NICs on it (respectively called NIC and VIF later on, you could also encounter PIF for NIC in some places).

So if the NIC plugged into a bridge is the one you use for networking in dom0, and it's connected to your local switch or router, when Xen starts a domu and puts its VIF on the same bridge, the VM will be "on your local network" too.

The NICs can be wired or wireless, you can have as many bridges as you want, and you can put as many NICs or VIFs on a bridge. But an interface can only be part of one bridge !

One thing to note: once you put a NIC on a bridge, you need to set the IP for the bridge and not for the NIC.


CategoryXen CategoryVirtualization