WARNING - OLD ARCHIVES

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

xen-users

Re: [Xen-users] question on bridged OR routed configuration & public IP

To: Steven Timm <timm@xxxxxxxx>
Subject: Re: [Xen-users] question on bridged OR routed configuration & public IP addresses
From: xenlist@xxxxxxxxxxxxx
Date: Wed, 13 Feb 2008 14:04:28 -0500
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 13 Feb 2008 11:04:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <Pine.LNX.4.64.0802081623310.7240@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <47ACD577.1060608@xxxxxxxxxxxxx> <Pine.LNX.4.64.0802081623310.7240@xxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.14 (Macintosh/20071210)
Steven Timm wrote:
Use the bridging (not the nat).  The machines will have public/routable.
We are doing this now.

I'm still having trouble with this. I started with a clean install of CentOS 5.1. I am testing it on an internal network currently until I get the problems worked out.

Here's what I have:

1) I have set the dom0 server to have an IP address of 192.168.1.200/24 on eth0. This machine sees the actual network default gateway of 192.168.1.1.

2) CentOS installs the following default.xml file under /etc/libvirt/qemu/networks:

<network>
  <name>default</name>
  <uuid>cut-out</name>
  <bridge name="virbr0" />
  <forward/>
  <ip address="192.168.122.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.122.2" end="192.168.122.254" />
    </dhcp>
  </ip>
</network>

3) I changed the above file to use the IP address 192.168.1.199 with the same netmask. I am, after all, wanting to verify that I can have dom0 and domU on the same network as the gateway and other systems.

4) I created a logical volume for my domU.

5) I created a config file for my hardware virtual machine which looks like this:

****************
imprt os, re
arch = os.uname ()[4]
if re.search('64', arch):
        arch_libdir = 'lib64'
else:
        arch_libdir = 'lib'
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory = 1024
shadow_memory = 8
name = "servername"
pae=1
vif = [ 'type=ioemu, bridge=virbr0, ip=192.168.1.201' ]
disk = ['phy:/dev/VolGroup00/lvguest,hda,w', 'phy:/dev/hdb,hdc:cdrom,r']
device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
boot='dc'
sdl=0
vnc=1
vnclisten='0.0.0.0'
vncunused=1
stdvga=0
serial='pty'
*****************

6) I installed a copy of CentOS on this HVM.

7) I configured the network on this domU to use 192.168.1.201 with a /24 netmask.

8) I turned OFF iptables on both machines to ensure there are not blockages there.

SO, at this point, from the domU, I can:

        ping 192.168.1.201 (theh domU itself)
        ping 192.168.1.199 (the virbr0 IP address)
        ping 192.168.1.200 (the dom0)

BUT, I cannot ping beyond the dom0.

ALSO, from dom0, I cannot ping 192.168.1.1, the default gateway, even though I could before hand.

If I do a netstat -rn, it appears that I have TWO network routes:

Destination     Gateway         Genmask         Iface
192.168.1.0     0.0.0.0         255.255.255.0   virbr0
192.168.1.0     0.0.0.0         255.255.255.0   eth0
169.254.0.0     0.0.0.0         255.255.0.0     eth0
0.0.0.0         192.168.1.1     0.0.0.0         virbr0

So the default route is pointing to the bridge. I'm not sure if that is correct or incorrect behavior, as I have not gotten this to work yet.

I'm also guessing that at least ONE of these 192.168.1.0 network routes is unnecessary, but I'm not sure which.

I'm also unclear as to how to fix it and what configuration files need to be changed in order to maintain proper behavior across reboots.

Any ideas or pointers would be appreciated. Working examples get bonus points. 8^)

Thanks.

LT


--
Craig Thompson, President
Caldwell Global Communications, Inc.
423.559.5465 (v)
423.559.5145 (f)
"Why Surf When You Can Fly?" (TM)

Visit http://www.thompsonreviews.com for family friendly reviews

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