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

Re: [Xen-users] 2 network connection for dom0 and domU(s)


  • To: xen-users <xen-users@xxxxxxxxxxxxxxxxxxx>
  • From: Gabor Szilagyi <szilagyi@xxxxxxxxxxxx>
  • Date: Fri, 19 Feb 2010 10:16:28 -0500
  • Delivery-date: Fri, 19 Feb 2010 07:17:37 -0800
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • Openpgp: id=357A2D5A

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

To reply to myself !!! So someone can find the problem quicker than I
had !!!

The below config is OK as far as xen and the scripts

My problem was on dom0. The interface setup had one extra information
which did not effect networking on dom0 but spooked XEN's network-bridge
scripts.

Details of my mistake:

Running Debian squeeze and used the /etc/network/interfaces file to
bring up the nics

auto lo eth0 eth1
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address XX.XX.242.105
        netmask 255.255.255.0
        network XX.XX.242.0
        broadcast XX.XX.242.255
        gateway XX.XX.242.1
        # dns-* options are implemented by the resolvconf package, if
installed
        dns-nameservers XX.XX.242.10
        dns-search nyo.unep.org
# Secondary network for backup
allow-hotplug eth1
iface eth1 inet static
        address 10.0.0.105
        netmask 255.255.255.0
        network 10.0.0.0
        broadcast 10.0.0.255
#        gateway XX.XX.242.1   <==== this was the problem !!!
        # dns-* options are implemented by the resolvconf package, if
installed
#        dns-nameservers XX.XX.242.10
#        dns-search nyo.unep.org


The second interface gateway line caused the problem when script was run
on the second interface. It seems logical that if no gateway for this
interface just use default (which is already defined when the first nic
was brought up). Well this was not soo obvious to me ... until I checked
every command with -v and found that it stops adding the default gw for
the second card...

Thanks Chris to offer help.

Gabor

Gabor Szilagyi wrote:
> I am new to xen and went through the wiki(s) on bridging btw dom0 and domU.
> 
> My physical host has two network card which needs to be attached to two
> different network (one private one public).
> 
> First using one bridge was successful but I am having trouble to bring
> up the second. I have tried to  modifie the xendconfig and tried to
> create a custom wrapper for the bridging script following some examples.
> 
> The dom0 is Debian Squeeze (base install) with dom0 kernel compiled from
> the jeremy's tree (no problem there). The Hypervisor 3.4.2 (64bit)
> 
> I have not found exact receipt for the layout I want
> 
> dom0 -- eth0 -- XX.XX.242.0/24 -- "bridge1" -- eth0 -- domU1
> dom0 -- eth1 -- 10.0.0.0/24    -- "bridge2" -- eth1 -- domU1
> 
> All the interfaces will be using static IP (I have no problem
> configuring those within their OS).
> 
> 
> Current setup:
> 
> rasnew:/etc/xen# cat xend-config.sxp|grep -v ^#|grep bridge
> (network-script network-bridge-custom)
> (vif-script vif-bridge)
> 
> rasnew:/etc/xen# cat ./scripts/network-bridge-custom
> #!/bin/sh
> /etc/xen/scripts/network-bridge "$@" netdev=eth0
> /etc/xen/scripts/network-bridge "$@" netdev=eth1
> 
> 
> The test domU config is like this the uncommented line would hang the
> domU although it shows up in xm list
> 
> rasnew:/etc/xen# cat test1_pv.cfg
> bootloader = '/usr/lib/xen-3.4/bin/pygrub'
> memory = 256
> name = "testPV"
> vif = [ 'mac=00:16:3e:00:01:06, bridge=eth0' , ]
> #vif = [ 'mac=00:16:3e:00:01:06, bridge=eth0' , 'mac=00:16:3e:10:01:01,
> bridge=eth1', ]
> disk = [ 'phy:/dev/vm-vg/testdomU.disk,xvda1,w', ]
> 
> On the host both eth0 and eth1 us up :
> 
> rasnew:/etc/xen# ifconfig
> eth0      Link encap:Ethernet  HWaddr 00:21:86:ef:3e:bb
>           inet addr: XX.XX.242.105  Bcast: XX.XX.242.255  Mask:255.255.255.0
>           inet6 addr: fe80::221:86ff:feef:3ebb/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:643696 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:61616 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:129478544 (123.4 MiB)  TX bytes:7094105 (6.7 MiB)
> 
> eth1      Link encap:Ethernet  HWaddr 00:0e:0c:64:cf:3c
>           inet addr:10.0.0.105  Bcast:10.0.0.255  Mask:255.255.255.0
>           UP BROADCAST MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
> 
> 
> 
> Not sure what else I should list here :-)
> 
> Any suggestion would be appreciated. Can this be done with the xen
> scripts or I have to build the bridges manually?
> 
> Thanks.
> 
> Gabor
> 

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



- --
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Gabor Szilagyi (Mr.)                    Gabor.Szilagyi@xxxxxxxxxxxx |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkt+q0wACgkQcYMbOTV6LVrDKACgxoo6v/p7bNGBJm45PICl/xrM
fqYAoOFcEyq+hqmkRGz0SFevx3QiS/kX
=2eKc
-----END PGP SIGNATURE-----

_______________________________________________
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®.