From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqQke-0000p7-5E for qemu-devel@nongnu.org; Wed, 02 Jan 2013 11:01:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqQkY-0000PK-Nn for qemu-devel@nongnu.org; Wed, 02 Jan 2013 11:01:08 -0500 Received: from mail-we0-f175.google.com ([74.125.82.175]:36397) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqQkY-0000P5-Hm for qemu-devel@nongnu.org; Wed, 02 Jan 2013 11:01:02 -0500 Received: by mail-we0-f175.google.com with SMTP id z53so6720987wey.6 for ; Wed, 02 Jan 2013 08:01:01 -0800 (PST) Date: Wed, 2 Jan 2013 17:00:59 +0100 From: Stefan Hajnoczi Message-ID: <20130102160059.GD12357@stefanha-thinkpad.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] How to make TCP/IP applications run on guest OS? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: GaoYi Cc: qemu-devel@nongnu.org On Wed, Dec 19, 2012 at 09:54:32PM +0800, GaoYi wrote: > Hi all, > > I have bridged the network of the host. There was one br0 and several > taps on it. When I started up a guest using: > > #kvm -hda ubuntu.img -localtime -m 1G -net nic, -net > tap,ifname=tap0,script=no > > The guest can ping to other VMs or physical PCs within the same LAN. > However, when I tried to communicate with other VMs/PCs using TCP/IP, > the incoming IP at the receiver side is the same as the host IP instead of > the VM's IP. Then how to configure the network so that > the TCP/IP applications run well just like the phsical PC? libvirt/virt-manager can set up the network for you. I suggest using them if you're having issues configuring bridging. There is some basic information here but you'll find specifics if you do a web search for "qemu bridging" or similar: http://wiki.qemu.org/Documentation/Networking Stefan