Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BKSNg-0006HJ-Ny for qemu-devel@nongnu.org; Sun, 02 May 2004 21:36:28 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BKSMu-0005S5-Li for qemu-devel@nongnu.org; Sun, 02 May 2004 21:36:13 -0400 Received: from [203.12.160.53] (helo=mail5.tpgi.com.au) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1BKSMt-0005Oj-HT for qemu-devel@nongnu.org; Sun, 02 May 2004 21:35:39 -0400 Received: from tigan.tpg.com.au (tigan.tpgi.com.au [203.12.160.51]) by mail5.tpgi.com.au (8.12.10/8.12.10) with ESMTP id i431ZXgj029934 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 3 May 2004 11:35:33 +1000 Received: from tigan.tpg.com.au (localhost.localdomain [127.0.0.1]) by tigan.tpg.com.au (8.12.8/8.12.8) with ESMTP id i431ZXbH007212 for ; Mon, 3 May 2004 11:35:33 +1000 Received: (from apache@localhost) by tigan.tpg.com.au (8.12.8/8.12.8/Submit) id i431ZWFw007209 for qemu-devel@nongnu.org; Mon, 3 May 2004 11:35:32 +1000 Message-ID: <1083548132.4095a1e4ba072@www.postoffice.tpg.com.au> Date: Mon, 3 May 2004 11:35:32 +1000 From: nhand42@tpg.com.au Subject: Re: [Qemu-devel] Question about tun/tap networking References: <1083546791.16974.25.camel@localhost> In-Reply-To: <1083546791.16974.25.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Quoting Arne Bernin : > Hi, > > i am trying to set up two virtual machines with qemu 0.5.4. I have them > running, both with 2 network cards. I am able to ping all 4 interfaces > from the host they are running from but am not able to ping between both > virtual machines... > If i do a tcpdump on the corrsponding tun interfaces while trying to > ping i see a lot of arp who-has 172.16.0.254 tell 172.16.0.1 messages > (172.16.0.1 is the one machine, the other is 172.16.0.254). > Is there something i have to do to get the arp responses right ?? > Or am i totally wrong ? > You've stuck both virtual machines on the same subnet, so they think they're on the same physical LAN. That's why they're doing ARPs and expecting replies. But you're actually running two QEMU instances on two seperate TUN interfaces and they *aren't* bridged. So the ARP on tun0 never gets seen on tun1 (and vice-versa). Set the second TUN interface to a different subnet (eg, 172.16.1.x) and enable ipv4 forwarding. Linux will then forward packets between tun0 and tun1. You could also muck about with proxyarp or bridging but honestly, I wouldn't bother with that. Routing is a lot easier to understand.