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] Failed to setup NAT network

To: YAO <yffbrave@xxxxxxxxx>
Subject: Re: [Xen-users] Failed to setup NAT network
From: Todd Deshane <todd.deshane@xxxxxxx>
Date: Sun, 19 Jun 2011 21:51:07 -0400
Cc: tlviewer@xxxxxxxxx, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 19 Jun 2011 18:52:50 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=2kAUIrQWpoNUK5TYGV0mzay+acbOBSMxenW/tO1O6kQ=; b=uU0zRVTxNS4tQ52eMSLiq3Wkqjidv3vAuAg1mTmmD2xz3uJfsCawZwYU7F0hshzS7P usJsX7mV/fpoukphBLj8wW3IY3kREDFzg/855sa8Ev89Q17xG1V6Xkih2QHMwftDIgwF MNdbAL3SFOCmx2BNgcNjVRGo9fuPi2kUyHDic=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=CMuPrvt5y7X5x/mKyqobZUfhgdi2GurDQI/EqmP/GFo3ZsWd7LgaEhwlzNkjZ+uPTS xnru38V1o62srSk2LPjYsQK0xiJBbdz+uBrYYxuy8uJqKzyKzKNQFyqNrlNq1gJhATWW aDN8uh/jsTInujqSZWrdAqjHEkujvGTsl+JAA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BANLkTikhzmBY9NNtGF120g+vmi=Ss1U9gg@xxxxxxxxxxxxxx>
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <BANLkTikhzmBY9NNtGF120g+vmi=Ss1U9gg@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, Jun 17, 2011 at 8:32 AM, YAO <yffbrave@xxxxxxxxx> wrote:
> I'm using Xen 4.1 and here's what I did:
> 1.comment network-script and vif-script about bridge in
> /etc/xen/xend-config.sxp, uncomment the lines about nat
> 2.set vm config, add something like vif = [ 'mac=00:16:3e:00:00:11,
> ip=10.0.0.1' ]
> 3.set /etc/network/interfaces in domU, add lines as follows:
> auto eth0
> iface eth0 inet static
> address 10.0.0.1
> gateway 10.0.0.254
> netmask 255.255.255.0
> But it didn't work!
> Here's the output of "ifconfig -a" in dom0
> tap10.0   Link encap:Ethernet  HWaddr a6:8a:1b:92:be:af
>           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:500
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
> vif10.0   Link encap:Ethernet  HWaddr fe:ff:ff:ff:ff:ff
>           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:32
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
> the vif10.0 didn't get an ip!
> The same thing happened in domU whose eth0 didn't get ip, too. Strangely,
> eth0 was renamed to eth9, I don't know why.
> So, where did I make mistake? How to setup NAT network in the new toolstack?

The procedure above seems OK for getting NAT To work with xend. I
don't know what the support is like for the new libxl/xl toolstack
though.

I'm wondering if going forward we should adopt a QEMU-NAT style setup
for NAT on Xen?

http://wiki.qemu.org/Documentation/Networking/NAT

In the long run, we want something that is maintainable by the
appropriate developers (whether that be Xen, the distros, or other
third party tools).

As far as your specific problem goes, I think the best way to debug it
is to do network and kernel (dmesg) traces to see if the packets are
going where they should be. You can also add the line:

set -x

To the xen networking scripts so that debug output is printed to syslog

(http://www.cyberciti.biz/tips/debugging-shell-script.html)


> By the way, can I use bridge mode if I have only one IP?
>

Do you mean that you want to use bridging and NAT with one IP?

Thanks,
Todd

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



-- 
Todd Deshane
http://www.linkedin.com/in/deshantm
http://www.xen.org/products/cloudxen.html
http://runningxen.com/

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

<Prev in Thread] Current Thread [Next in Thread>