[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Virtual Machine Interfaces



OK great this is getting clearer :-).

I thought i would do the virtual bridge networking as I can then use iptables etc to manage it.  I am not able to use full bridged networking for the static public IP addresses for my domUs as I have to use routing as this is a restriction imposed by my hosting provider.

So this is what it think I can do:

    - comment out network script in xend-config.xsp
    - create the bridges as needed, e.g. virbr0 and brtap0
    - configure routing and masqurading for the public IP addresses to NAT through to the internal addresses on the domUs connected to virbr0
    - use the bridged brtap0 and assign ip addresses on my domUs that are within my OpenVPN subnet

I think that is correct, apologies if I am barking up the wrong tree.

Thanks very much for your help.

Russell



On 29/12/2010 21:47, Fajar A. Nugraha wrote:
On Thu, Dec 30, 2010 at 4:31 AM, Russell Seymour
<russell.seymour@xxxxxxxxxxxxxxxxxxx> wrote:
Fajar,

Thanks very much for this.

I am looking at changing the way the networking works as you have
suggested.  I used iptables currently for my home router so am familiar with
this sort of setup.

I have created my virbr0 using libvirt,
I use virbr0 as an example. It's setup by default by libvirt using
masquarade NAT. If you want routing without NAT, create a new bridge
using your OS's networking setup.

See http://wiki.debian.org/BridgeNetworkConnections for
/etc/network/interfaces example. You won't need "bridge_ports" for
this purpose (since the bridge will only connect with domU's
interfaces, not dom0's eth).

but how do I know tell Xen to use
this interface?  I have modified the .sxp file to use bridge networking,
which sxp? xend-config.sxp?

but
it creates its own thing.
if you don't need to bridge domU directly to dom0's eth, you can just
comment-out network-script line on xend-config.sxp entirely.

  I have tried to set it to netdev=virbr0 but that
did not seem to have any effect.  IN other words how can I get Xen to use
this custom bridge?
Are you going for full bridged networking?
If yes, the easiest way would be to :
- comment-out network-script on xend-config.sxp (or leave it with
network-route, if you still need it)
- create your own bridge in /etc/network/interfaces (call it brtap0 or whatever)
- create necessary routing/iptables rules
- use something like this on domU's vif config line

vif = [ 'mac=00:16:3E:7F:A5:5C, script=vif-bridge, bridge=brtap0,
vifname=domU1-eth0' ]

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.