From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J2rNF-0001a1-KV for qemu-devel@nongnu.org; Thu, 13 Dec 2007 11:57:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J2rNA-0001X0-HL for qemu-devel@nongnu.org; Thu, 13 Dec 2007 11:57:24 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2rNA-0001Wx-Ew for qemu-devel@nongnu.org; Thu, 13 Dec 2007 11:57:20 -0500 Received: from rn-out-0910.google.com ([64.233.170.184] helo=rn-out-0102.google.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J2rN9-0001Jk-Ij for qemu-devel@nongnu.org; Thu, 13 Dec 2007 11:57:20 -0500 Received: by rn-out-0102.google.com with SMTP id i19so327179rng.2 for ; Thu, 13 Dec 2007 08:57:18 -0800 (PST) Message-ID: <9842d2430712130857m769da6edr516a1ee788f394ec@mail.gmail.com> Date: Thu, 13 Dec 2007 19:57:18 +0300 From: "=?KOI8-R?B?S8nSyczMIPDBzMXOz9c=?=" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9431_4667560.1197565038136" Subject: [Qemu-devel] multiple VM on one tap device 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 ------=_Part_9431_4667560.1197565038136 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello all. Is it possible run several VM connected with one tap device? I tried to run two VM with allready exist tap0 but when I started second I've got message: "warning: could not configure /dev/net/tun: no virtual network emulation Could not initialize device 'tap' ". I did following under root: -bash-3.00# tunctl -b -t tap0 -bash-3.00# ifconfig tap0 192.168.4.1 netmask 255.255.255.0 up -bash-3.00# ifconfig tap0 tap0 Link encap:Ethernet HWaddr 00:FF:A1:81:05:B0 inet addr:192.168.4.1 Bcast:192.168.4.255 Mask:255.255.255.0 UP BROADCAST RUNNING 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) Then started VM with following parameters: 1. -net nic,macaddr=00:1a:4b:34:74:43 -net tap,vlan=0,ifname=tap0,host=sv3,script=no 2. -net nic,macaddr=00:1a:4b:34:74:44 -net tap,vlan=0,ifname=tap0,host=sv4,script=no I did it under linux kernel 2.6.23.9. What does it mean fd in -net tap,fd ? File discriptor of /dev/net/tun or tap device. ------=_Part_9431_4667560.1197565038136 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hello all.
 
Is it possible run several VM connected with one tap device?
I tried to run two VM with allready exist tap0 but when I started second I've got message: "warning: could not configure /dev/net/tun: no virtual network emulation Could not initialize device 'tap' ".
 
I did following under root:

-bash-3.00# tunctl -b -t tap0
-bash-3.00# ifconfig tap0 192.168.4.1 netmask 255.255.255.0 up
-bash-3.00# ifconfig tap0
tap0      Link encap:Ethernet  HWaddr 00:FF:A1:81:05:B0
          inet addr:192.168.4.1  Bcast:192.168.4.255  Mask:255.255.255.0
          UP BROADCAST RUNNING 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)

Then started VM with following parameters:

1. -net nic,macaddr=00:1a:4b:34:74:43 -net tap,vlan=0,ifname=tap0,host=sv3,script=no
2. -net nic,macaddr=00:1a:4b:34:74:44 -net tap,vlan=0,ifname=tap0,host=sv4,script=no

I did it under linux kernel 2.6.23.9.

What does it mean fd in -net tap,fd ?  File discriptor of /dev/net/tun  or  tap device.

------=_Part_9431_4667560.1197565038136--