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

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:192.168.1.100
>
> 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 192.168.5.2' and 'ifconfig vif1.0 192.168.5.1' 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 192.168.5.1
# dhclient eth0 
# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A POSTROUTING -o eth0 -s 192.168.5.2 -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 
box.
* 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!
Christian


-------------------------------------------------------
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.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

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