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/
Home Products Support Community News


Re: [Xen-devel] Networking problems with debian packages

> In the bridged setup xen-br0 acts in two ways. As a virtual interface on
> the host machine taking over the eth? role of provide an NIC interface
> to the application layer. Second, as a virtual switch which other
> interfaces on the host can plug into.
> vif1.0 should have no IP in a bridged setup. It should only be connected
> to the xen-br0 bridge. Packets from eth0 in domU go though the tun p-t-p
> tunnel and hit the xen-br0 bridge. So eth0 on domU should be on the same
> sbunet as xen-br0 on domO.

Understood. All interfaces that are bridged together must share the same 
subnet. There is one ip address for the whole bridge. Therefore I don't need 
to assign an ip address to the vif interfaces inside the bridge.

> Try
> ifconfig eth0 addr:
> on domU.

This works, great!

> I haven't tested this myself, but I assume in a routed setup vif1.0 and
> eth0 are more like two networks cards with a crossover. In this case
> you'd ignore the 'pointopoint' part of the configuration for vif1.0.
> 'ifconfig eth0' and 'ifconfig vif1.0' would
> probably be sufficent. Nicholas

Yes, this is working, too. But vif1.0 must not be on the brigde together with 
eth0 then. I took eth0 off from the bridge so that only the vif interfaces 
are bridged:

# brctl delif xen-br0 eth0 
# ifconfig xen-br0
# dhclient eth0 
# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A POSTROUTING -o eth0 -s -j MASQUERADE

I summarize the result: 
* If I have a local network with free ip addresses in my subnet, then I assign 
those addresses to my domUs. The debian packages plus iproute work out of the 
* If I don't have free ip addresses in the subnet of eth0, I use local 
addresses for my domU. I can bridge the vif interfaces so that they the domUs 
can talk to each other, but eth0 must not be on the bridge. I need to set up 
masquerading and ip forwarding if domU wants to connect to the internet.

Thank you for your help!

SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
Xen-devel mailing list