From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T73cY-00072m-KE for qemu-devel@nongnu.org; Thu, 30 Aug 2012 08:13:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T73cS-0000Ki-Id for qemu-devel@nongnu.org; Thu, 30 Aug 2012 08:13:14 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:52338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T73cS-0000KZ-C3 for qemu-devel@nongnu.org; Thu, 30 Aug 2012 08:13:08 -0400 Received: by pbbjt11 with SMTP id jt11so2996239pbb.4 for ; Thu, 30 Aug 2012 05:13:07 -0700 (PDT) Message-ID: <503F58D0.2010003@gmail.com> Date: Thu, 30 Aug 2012 20:13:04 +0800 From: ching MIME-Version: 1.0 References: <503D486B.1030208@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] macvlan/macvtap: guest/host cannot communicate when network cable is unplugged List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: netdev@vger.kernel.org, "Michael S. Tsirkin" , qemu-devel@nongnu.org, kaber@trash.net > Can you try the same test with two macvlan interfaces on the host (no > macvtap)? You may need to use the ping -I > argument to force the ping source address to a specific macvlan > interface. > > If you see the same problem, it may just be the macvlan design - it is > stacked on top of eth0 and might not work when eth0 is down. CCing > macvlan/macvtap folks. > > Stefan > tested as below $ifconfig eth0 Link encap:Ethernet HWaddr f4:6d:xx:xx:xx:xx inet6 addr: fe80::xx:xx:xx:xx/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:86507 errors:0 dropped:0 overruns:0 frame:0 TX packets:55940 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:126005746 (120.1 MiB) TX bytes:4394225 (4.1 MiB) macvtap0 Link encap:Ethernet HWaddr 52:54:xx:xx:xx:xx inet6 addr: fe80::xx:xx:xx:xx/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:70 errors:0 dropped:0 overruns:0 frame:0 TX packets:84 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:9036 (8.8 KiB) TX bytes:14734 (14.3 KiB) znet0 Link encap:Ethernet HWaddr 00:60:xx:xx:xx:92 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: 2002:xx:xx:xx:xx/64 Scope:Global inet6 addr: fe80:xx:xx:xx:xx/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4463190 errors:0 dropped:0 overruns:0 frame:0 TX packets:12527522 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3959213697 (3.6 GiB) TX bytes:18590336476 (17.3 GiB) znet1 Link encap:Ethernet HWaddr 00:60:xx:xx:xx:99 inet addr:192.168.1.177 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: 2002:xx:xx:xx:xx64 Scope:Global inet6 addr: fe80:xx:xx:xx:xx/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:9 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1399 (1.3 KiB) TX bytes:1522 (1.4 KiB) $ ip -d link show 10: znet0@eth0: mtu 1500 qdisc noqueue state UP mode DEFAULT link/ether 00:60:xx:xx:xx:92 brd ff:ff:ff:ff:ff:ff macvlan mode bridge 15: znet1@eth0: mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT link/ether 00:60:xx:xx:xx:99 brd ff:ff:ff:ff:ff:ff macvlan mode bridge the macvlan interface cannot ping each other no matter network cable is plugged or not $ ping -I 192.168.1.2 192.168.1.177 PING 192.168.1.177 (192.168.1.177) from 192.168.1.2 : 56(84) bytes of data. --- 192.168.1.177 ping statistics --- 6 packets transmitted, 0 received, 100% packet loss, time 4999ms I also perform an additional test: the guests (macvtap bridge mode) CAN communicate each other no matter network cable is plugged or not.