From: Stefan Hajnoczi <stefanha@gmail.com>
To: ching <lsching17@gmail.com>
Cc: qemu-devel@nongnu.org, kaber@trash.net,
"Michael S. Tsirkin" <mst@redhat.com>,
netdev@vger.kernel.org
Subject: Re: [Qemu-devel] macvlan/macvtap: guest/host cannot communicate when network cable is unplugged
Date: Thu, 30 Aug 2012 13:53:28 +0100 [thread overview]
Message-ID: <CAJSP0QXkHLKpo0kbnPu7L1zH5aL2XCPdmzi7+-xFctU7Pchyqw@mail.gmail.com> (raw)
In-Reply-To: <503F58D0.2010003@gmail.com>
On Thu, Aug 30, 2012 at 1:13 PM, ching <lsching17@gmail.com> wrote:
>
>> Can you try the same test with two macvlan interfaces on the host (no
>> macvtap)? You may need to use the ping -I <interface-address>
>> 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: <BROADCAST,MULTICAST,UP,LOWER_UP> 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: <BROADCAST,MULTICAST,UP,LOWER_UP> 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
In bridge mode I expected them to be able to communicate.
> I also perform an additional test: the guests (macvtap bridge mode) CAN communicate each other no matter network cable is plugged or not.
Strange. I thought the original problem was that the macvtap guests
cannot communicate with each other when the network cable is
unplugged?
Hopefully someone else can help you, I'm not familiar enough with
macvlan/macvtap.
Stefan
next prev parent reply other threads:[~2012-08-30 12:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <503D486B.1030208@gmail.com>
2012-08-29 7:03 ` [Qemu-devel] macvlan/macvtap: guest/host cannot communicate when network cable is unplugged Stefan Hajnoczi
2012-08-30 12:13 ` ching
2012-08-30 12:53 ` Stefan Hajnoczi [this message]
2012-08-30 22:32 ` ching
2012-08-31 5:34 ` [Qemu-devel] " Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJSP0QXkHLKpo0kbnPu7L1zH5aL2XCPdmzi7+-xFctU7Pchyqw@mail.gmail.com \
--to=stefanha@gmail.com \
--cc=kaber@trash.net \
--cc=lsching17@gmail.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).