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

[Xen-users] Networking problem: "routing" from domUs through dom0

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Networking problem: "routing" from domUs through dom0
From: "Jiaqi Tan" <jiaqi.tan@xxxxxxxxx>
Date: Mon, 8 Oct 2007 17:59:31 -0400
Cc: jiaqi.tan@xxxxxxxxx
Delivery-date: Mon, 08 Oct 2007 15:00:21 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; bh=7Ddy82xoDDg5ye0rN44b3tvpC3/b4rnt7oXris3s9ZE=; b=I7A87py0bbeL6KNvALfHVgUJUkHx8FErN91S3AKORnev/gHP3DXK83PPL1wTI4jXteXbD8RFR6hoPjdAlZU16aIa5giDQbQxIhRXKm2EZbfU6sZXzFclISkHfyFMYCw8He8s+ZQ/ZulLKPd/8QJIpcSLswqHc23P7GlY/9RvKS0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=sGGyNq5FokdKnBJE11xwKUOsDYoTE8R0It/EFWaA3bXAHfZomy5ivj9u4XRHX+UPeG8LDo50IW6Dgq4bwGfFxuQYhM2t3KgChJ+xwcGreRDICtwVvjfSOSfovAGSesm+tYNA/zHcVRpAP/6JHb7dtqesTQkPTqbd7HA97kZ8Foo=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

I'm trying to get the following setup working: I have 2 physical
machines, both with Xen 3.1.0 running Fedora Core 6, and 2.6.18
kernels, both with 2 NICs each. 1 NIC on each machine is connected to
the Internet (eth0), and 1 NIC on each machine (eth1) is connected on
a private network. I have set up bridging using netdev=eth1 for the
domUs on each dom0. I want the domUs on both machines to have direct
access to each other, which works fine right now via the private
network on the 2nd NIC on each machine, and I also want to access the
Internet on each domU through dom0. I'm trying to do that using IP
masquerading on the dom0s.

Currently, my setup is as follows:
1. Each dom0 has network-bridge netdev=eth1
2. Each dom0 has the FORWARD chain set to ACCEPT, and additionally has
rules for each vif#.0 to allow forwarding (created by xend when I boot
the domUs):

Chain INPUT (policy ACCEPT 325 packets, 30149 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain FORWARD (policy ACCEPT 2 packets, 168 bytes)
 pkts bytes target     prot opt in     out     source               destination
   16  4760 ACCEPT     all  --  any    any     anywhere             anywhere

Chain OUTPUT (policy ACCEPT 266 packets, 39670 bytes)
 pkts bytes target     prot opt in     out     source               destination

3. In the NAT table, I have:
Chain PREROUTING (policy ACCEPT 12 packets, 776 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 4 packets, 376 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 MASQUERADE  all  --  any    eth0    anywhere             anywhere

Chain OUTPUT (policy ACCEPT 2 packets, 208 bytes)
 pkts bytes target     prot opt in     out     source               destination

4. IPv4 forwarding is enabled as well:
$ sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1

5. eth1 on dom0 has 10.1.1.3/255.255.255.0, and eth0 on domU has
10.1.1.103/255.255.255.0. Routing tables look like:

dom0:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.1.1.0        0.0.0.0         255.255.255.0   U     0      0        0 eth1
<net of internet connection>     0.0.0.0         <netmask>   U     0
   0        0 eth0
0.0.0.0         <internet gateway>     0.0.0.0         UG    0      0
      0 eth0

domU:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.1.1.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         10.1.1.3        0.0.0.0         UG    0      0        0 eth0

Also, xenbr0 and peth1 have no IPs, and eth1 has 10.1.1.3/255.255.255.0.

I can ping both ways (ping the dom0 eth1 IP from domU, and the domU IP
from dom0).

But when I try to ping an external host from the domU, there's simply
no response. tcpdump shows the packet appearing on eth1, but not eth0.
When I do iptables -t nat -L -v, none of the packets matches the -o
eth0 -j MASQUERADE rule, but when I insert a rule for -o xenbr0, all
the packets are seen going out through xenbr0 and matching that rule.
All my packets are getting from domU to dom0, and it hits the FORWARD
and POSTROUTING chains, but the packets are all going out through
xenbr0 although xenbr0 is not even in the routing tables.

Any ideas?

Thanks in advance.

Jiaqi Tan

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] Networking problem: "routing" from domUs through dom0, Jiaqi Tan <=