From: Gregor Milos Subject: Re: how to setup NAT for domU? Date: Thu, 27 Jan 2005 21:59:14 +0000 Message-ID: <200501272159.14169.gm281@hermes.cam.ac.uk> References: <9cde8bff050126022375e27d89@mail.gmail.com> <200501261135.23170.gm281@hermes.cam.ac.uk> <41F9123A.7030907@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <41F9123A.7030907@us.ibm.com> Content-Disposition: inline Sender: xen-devel-admin@lists.sourceforge.net Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: xen-devel@lists.sourceforge.net List-Id: xen-devel@lists.xenproject.org > Gregor, in your xmexample script you have: > > vif =3D [ 'ip=3D192.168.%d.1/24' % (vmid)] The way the default setup (xmexample) works is as follows: in domain 0 - vif gets ip =3D 192.168.vmid.1 in domU - eth0 gets ip =3D 192.168.vmid.2 this way we can easily update the routing tables in dom0.=20 There can be up to 255 unprivileged domains (which is plenty). > I have a much simpler config file, which has: > > vif =3D [ 'ip=3D192.168.2.1/24'] This way all the virtual interfaces in dom0 would be getting the same ip,=20 which will not work for more then one domU. > ...which I tried to use but I get an error from xm create. =A0Looking at What is the error? Does it happen when you are trying to set up the first=20 unprivileged domain or any subsequent ones. What IP address do you give to= =20 eth0 in domU? > create.py (xen-unstable) , I don't see a provision to parse assignment > for ip=3D for vif: > > gopts.var('vif', val=3D"mac=3DMAC,bridge=3DBRIDGE,script=3DSCRIPT,backend= =3DDOM", The whole 'ip=3D192.168.whatever.1' gets passed to vif-nat script=20 (/etc/xen/scripts/vif-nat) which then uses it in to bring the vif up. > Am I missing something, or is it possible you are using this on an > unreleased build? That should work for both the unstable and testing trees. Maybe you have no= t=20 reinstalled the tools, and the vif-nat and network-nat scripts did not get= =20 copied to /etc/xen/scripts? Have you modified xend-config.sxp to use the ne= w=20 scripts? Cheers Gregor > Thanks, > > Andrew Theurer > > Grzegorz Milos wrote: > >I've created scripts to do that. Should they be included in the > > repositories (Ian, Keir)? > >Here are they again. > > > >(configure your xend-config.sxp to use them instead of the default ones, > > place them at /etc/xen/scripts) > > > >Cheers > >Gregor > > > >>hello, > >> > >>I want my domU to use NAT, so it can access the internet with private > >>IP address, but dont know how to do that. I looked at the Xen user > >>manual, but it doesnt mention the solution for this problem either. > >> > >>Thank you a lot, > >>AQ > >> > >> > >>------------------------------------------------------- > >>This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > >>Tool for open source databases. Create drag-&-drop reports. Save time > >>by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > >>Download a FREE copy at http://www.intelliview.com/go/osdn_nl > >>_______________________________________________ > >>Xen-devel mailing list > >>Xen-devel@lists.sourceforge.net > >>https://lists.sourceforge.net/lists/listinfo/xen-devel =2D-=20 Quidquid latine dictum sit, altum viditur --- Anon ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl