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

[Xen-users] Re: Xen Network



Andi Nebel írta:
> Hello Geza,
>
> for a couple of weeks you post a meesage in the xen-users mailing list:
>
> /"Hi
> I've found the solution to my problem, changed the script to specify the
> vifnums explicitly:"
>
> /my adapted script:/
>
> //#!/bin/sh
> # Exit if anything goes wrong.
> set -e
>
> # First arg is the operation.
> OP=$1
> shift
>
> script=/etc/xen/scripts/network-bridge.xen
>
> case ${OP} in
> start)
> $script start vifnum=0 bridge=xenbr0 netdev=eth0
> $script start vifnum=1 bridge=xenbr-lan netdev=dummy0
> $script start vifnum=2 bridge=xenbr-dmz netdev=dummy1
> ;;
>
> stop)
> $script stop vifnum=0 bridge=xenbr0 netdev=eth0
> $script stop vifnum=1 bridge=xenbr-lan netdev=dummy0
> $script stop vifnum=2 bridge=xenbr-dmz netdev=dummy1
> ;;
>
> status)
> $script status vifnum=0 bridge=xenbr0 netdev=eth0
> $script status vifnum=1 bridge=xenbr-lan netdev=dummy0
> $script status vifnum=2 bridge=xenbr-dmz netdev=dummy1
> ;;
>
> *)
> echo 'Unknown command: ' ${OP}
> echo 'Valid commands are: start, stop, status'
> exit 1
> esac
>
> /now my problem is, that i can't get access to the internet with my domU's.
>
> my /etc/network/interfaces:
>
> /auto lo
> iface lo inet loopback
>
> # This is a list of hotpluggable network interfaces.
> # They will be activated automatically by the hotplug subsystem.
> mapping eth0
>     script grep
>     map eth0
>
> # The primary network interface
> allow-hotplug eth0
> iface eth0 inet static
> address 192.168.1.50
> netmask 255.255.255.0
> gateway 192.168.1.1
>
> #The primary dummy network interface
> auto dummy0
> iface dummy0 inet static
> address 172.16.2.1
> netmask 255.255.255.0
>
> #The secondary dummy network interface
> auto dummy1
> iface dummy1 inet static
> address 10.10.1.1
> netmask 255.255.255.0/
>
> and my domU config file:
>
> /kernel = "/boot/vmlinuz-2.6.16-xen0"
> ramdisk = "/boot/initrd.img-2.6.16-xen0"
> memory = 128
> name = "lan-debian-plain"
> disk = ['file:/home/vserver/lan/lan-debian-plain-3.1.img,sda1,w',
> 'file:/home/vserver/lan/lan-debian-plain-3.1.swap,sda2,w']
> root = "/dev/sda1"
>
> # Network
> vif = ['ip=172.16.2.10, bridge=xenbr-lan']
> dhcp = "off"
> ip = "172.16.2.10"
> netmask = "255.255.255.0"
> gateway = "172.16.2.1"
> hostname = "lan-debian-plain"/
>
>
> How did you solve this problem?
>
> Thanks in advance
>
> Andi
>
>
>   
I'm using Xen 3.0.2 on Debian etch and my config is:

-------------------------------/etc/network/interfaces:--------------------------------------------------

iface lo inet loopback

auto br-xen-tg3
iface br-xen-tg3 inet static
      address 10.0.100.1
      netmask 255.0.0.0
      network 10.255.255.255
      bridge_ports eth-tg3


------and so on (I've renamed the network interfaces from eth0, etc to
the drivers name using udev)--------
My www called DomUs config is looking like:
------------------------------------------------------------------------------------------------------------

kernel = "/boot/vmlinuz-2.6.16-1-xen-686"
ramdisk = "/boot/initrd.img-2.6.16-1-xen-686"
memory = 128
name = "www"
vif = [ 'mac=00:00:00:00:00:04, bridge=br-xen-tg3' ]
disk = [ 'phy:/dev/DomU/www_root,0x301,w',
'phy:/dev/DomU/www_swap,0x302,w' ]
root = "/dev/hda1 ro"
extra = "2"


--------------------------------------------------------------------------------------------------------------
With Xen 3.0.2 Debian packages I didn't need to thinker with the xen
scripts any more, since the network bridge configuration happens right
at the network startup.

Good Luck!

Geza

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