Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I'm currently having a bizarre issue with my Xen setup where one of my VMs can see the outside network, but the other is isolated despite having an almost-identical ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2011
    Posts
    3

    [SOLVED] Xen Network Bridging Issue for two guests


    Hi,
    I'm currently having a bizarre issue with my Xen setup where one of my VMs can see the outside network, but the other is isolated despite having an almost-identical setup. I'm running Debian Squeeze on Dom0, with all traffic being bridged through eth0.

    Network setup
    Dom0 - 192.168.1.210 (Debian Squeeze)
    iris.home - 192.168.2.211 (Ubuntu 10.10, Working)
    erica.home - 192.168.1.213 (Debian Lenny, Isolated)

    ifconfig on Dom0
    Code:
    eth0      Link encap:Ethernet  HWaddr 00:1e:8c:6b:ea:db  
              inet addr:192.168.1.210  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::21e:8cff:fe6b:eadb/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:256791 errors:0 dropped:0 overruns:0 frame:0
              TX packets:372897 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:50615287 (48.2 MiB)  TX bytes:223610143 (213.2 MiB)
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:13788 errors:0 dropped:0 overruns:0 frame:0
              TX packets:13788 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:2612307 (2.4 MiB)  TX bytes:2612307 (2.4 MiB)
    
    peth0     Link encap:Ethernet  HWaddr 00:1e:8c:6b:ea:db  
              inet6 addr: fe80::21e:8cff:fe6b:eadb/64 Scope:Link
              UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
              RX packets:257860 errors:0 dropped:0 overruns:0 frame:0
              TX packets:440896 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:54458170 (51.9 MiB)  TX bytes:228229645 (217.6 MiB)
              Interrupt:23 Base address:0xc000 
    
    vif10.0   Link encap:Ethernet  HWaddr fe:ff:ff:ff:ff:ff  
              inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
              UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
              RX packets:6 errors:0 dropped:0 overruns:0 frame:0
              TX packets:560 errors:0 dropped:15 overruns:0 carrier:0
              collisions:0 txqueuelen:32 
              RX bytes:392 (392.0 B)  TX bytes:87922 (85.8 KiB)
    
    vif9.0    Link encap:Ethernet  HWaddr fe:ff:ff:ff:ff:ff  
              inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
              UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:119 errors:0 dropped:454 overruns:0 carrier:0
              collisions:0 txqueuelen:32 
              RX bytes:0 (0.0 B)  TX bytes:18462 (18.0 KiB)
    brctl on Dom0
    Code:
    bridge name	bridge id		STP enabled	interfaces
    eth0		8000.001e8c6beadb	no        		peth0
    					                  		vif10.0
    						                 	vif9.0
    xend-config.sxp (only the uncommented bits)
    Code:
    #
    # Xend configuration file.
    #
    
    (network-script 'network-bridge netdev=eth0')
    (vif-script vif-bridge)
    
    (dom0-min-mem 128)
    (enable-dom0-ballooning yes)
    (total_available_memory 0) 
    
    (dom0-cpus 0)
    (vncpasswd '')
    iris.home.cfg
    Code:
    #
    #  Kernel + memory size
    #
    
    bootloader = '/usr/lib/xen-default/bin/pygrub'
    
    vcpus       = '1'
    memory      = '128'
    
    #
    #  Disk device(s).
    #
    root        = '/dev/xvda2 ro'
    disk        = [
                      'file:/vserver/images/domains/iris.home/disk.img,xvda2,w',
                      'file:/vserver/images/domains/iris.home/swap.img,xvda1,w',
                  ]
    
    #
    #  Hostname
    #
    name        = 'iris.home'
    
    #
    #  Networking
    #
    vif         = [ 'ip=192.168.1.211' ]
    
    #
    #  Behaviour
    #
    on_poweroff = 'destroy'
    on_reboot   = 'restart'
    on_crash    = 'restart'
    erica.home.cfg
    Code:
    #
    #  Kernel + memory size
    #
    kernel      = '/boot/vmlinuz-2.6.32-bpo.5-xen-686'
    ramdisk     = '/boot/initrd.img-2.6.32-bpo.5-xen-686'
    
    vcpus       = '1'
    memory      = '256'
    
    #
    #  Disk device(s).
    #
    root        = '/dev/xvda2 ro'
    disk        = [
                      'file:/xen/domains/erica.home/disk.img,xvda2,w',
                      'file:/xen/domains/erica.home/swap.img,xvda1,w',
                  ]
    
    #
    #  Hostname
    #
    name        = 'erica.home'
    
    #
    #  Networking
    #
    vif         = [ 'ip=192.168.1.213,mac=00:16:3E:B8:6A:30,bridge=eth0' ]
    
    #
    #  Behaviour
    #
    on_poweroff = 'destroy'
    on_reboot   = 'restart'
    on_crash    = 'restart'
    erica: /etc/network/interfaces
    Code:
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    iface eth0 inet static
     address 192.168.1.213
     gateway 192.168.1.1
     netmask 255.255.255.0
    iris.home /etc/network/interfaces
    Code:
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    iface eth0 inet static
     address 192.168.1.211
     gateway 192.168.1.1
     netmask 255.255.255.0
    -------------------

    I'm pretty stumped as to what's going on, so any help would be greatly appreciated.

  2. #2
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    erica is the one that doesn't work, so I'll make a good guess here: may this line is wrong?

    vif = [ 'ip=192.168.1.213,mac=00:16:3E:B8:6A:30,bridge=eth 0' ]
    and should be read like this:

    vif = [ 'ip=192.168.1.213' ]
    just like the configuration for iris?

    beware of re-using MACs or faked MACs!

  3. #3
    Just Joined!
    Join Date
    Feb 2011
    Posts
    3
    Just a little update, I've got the VM communicating with the outside world, but the connection isn't stable. If I try to connect to it, i.e. via SSH or to the Minecraft server inside it, it sometimes ends up dropping off the face of the earth and I have to use /etc/init.d/xendomains restart to restore it.

    Here's my current setup:
    Dom0 /etc/network/interfaces
    Code:
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto xenbr0
    iface xenbr0 inet static
            bridge_ports regex (eth|vif).* noregex
            address 192.168.1.210
            netmask 255.255.255.0
            gateway 192.168.1.1
    xend-config.sxp
    Code:
    #
    # Xend configuration file.
    #
    
    (network-script network-dummy)
    (vif-script vif-bridge)
    
    (dom0-min-mem 128)
    (enable-dom0-ballooning yes)
    (total_available_memory 0) 
    
    (dom0-cpus 0)
    (vncpasswd '')
    erica.home.cfg
    Code:
    #
    #  Kernel + memory size
    #
    kernel      = '/boot/vmlinuz-2.6.32-bpo.5-xen-686'
    ramdisk     = '/boot/initrd.img-2.6.32-bpo.5-xen-686'
    
    vcpus       = '1'
    memory      = '256'
    
    #
    #  Disk device(s).
    #
    root        = '/dev/xvda2 ro'
    disk        = [
                      'file:/xen/domains/erica.home/disk.img,xvda2,w',
                      'file:/xen/domains/erica.home/swap.img,xvda1,w',
                  ]
    
    
    #
    #  Physical volumes
    #
    
    
    #
    #  Hostname
    #
    name        = 'erica.home'
    
    #
    #  Networking
    #
    vif         = [ 'ip=192.168.1.213, bridge=xenbr0' ]
    
    #
    #  Behaviour
    #
    on_poweroff = 'destroy'
    on_reboot   = 'restart'
    on_crash    = 'restart'
    So, I've made much more progress compared to my first post, but is there any way I can make my connection more stable?

  4. #4
    Just Joined!
    Join Date
    Feb 2011
    Posts
    3
    Right, looks like that second setup is correct. Turns out my problem was caused by BOINC using up too much CPU time! All's working perfectly now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •