qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Guest fails to reconnect after host network goes down


From: Davide Baldini
Subject: Re: [Qemu-discuss] Guest fails to reconnect after host network goes down
Date: Sun, 23 Aug 2015 13:31:28 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.6.0

Thanks Vlad,

apparently everything is fine on `ifconfig` after the ethernet cable is unplugged and re-plugged; I don't see what is wrong:


Before unplugging the cable – guests network works:
—————————————————————————————————————————————————————————————

address@hidden:/home/davide# ifconfig
br0       Link encap:Ethernet  HWaddr 00:30:48:34:ba:66
          inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1240 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1100 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:119495 (116.6 KiB)  TX bytes:120045 (117.2 KiB)

eth1      Link encap:Ethernet  HWaddr 00:30:48:34:ba:66
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2194 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2146 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:962419 (939.8 KiB)  TX bytes:282788 (276.1 KiB)
          Interrupt:18 Memory:d8000000-d8020000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  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:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tap0      Link encap:Ethernet  HWaddr fe:48:f3:d7:e7:a8
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:32 errors:0 dropped:0 overruns:0 frame:0
          TX packets:111 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:3120 (3.0 KiB)  TX bytes:19977 (19.5 KiB)

tap1      Link encap:Ethernet  HWaddr fe:4a:01:97:86:22
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:957 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1094 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:142946 (139.5 KiB)  TX bytes:841308 (821.5 KiB)

tap2      Link encap:Ethernet  HWaddr fe:8e:6b:11:a4:2a
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:56 errors:0 dropped:0 overruns:0 frame:0
          TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:7367 (7.1 KiB)  TX bytes:12866 (12.5 KiB)


After unplug and replug — guests network stops working, host's works:
—————————————————————————————————————————————————————————————

address@hidden:/home/davide# ifconfig
br0       Link encap:Ethernet  HWaddr 00:30:48:34:ba:66
          inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:207 errors:0 dropped:0 overruns:0 frame:0
          TX packets:163 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:23747 (23.1 KiB)  TX bytes:17026 (16.6 KiB)

eth1      Link encap:Ethernet  HWaddr 00:30:48:34:ba:66
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2629 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2572 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1019843 (995.9 KiB)  TX bytes:520666 (508.4 KiB)
          Interrupt:18 Memory:d8000000-d8020000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  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:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tap0      Link encap:Ethernet  HWaddr fe:48:f3:d7:e7:a8
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:56 errors:0 dropped:0 overruns:0 frame:0
          TX packets:124 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:5378 (5.2 KiB)  TX bytes:21231 (20.7 KiB)

tap1      Link encap:Ethernet  HWaddr fe:4a:01:97:86:22
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1102 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1232 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:347548 (339.4 KiB)  TX bytes:862119 (841.9 KiB)

tap2      Link encap:Ethernet  HWaddr fe:8e:6b:11:a4:2a
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:56 errors:0 dropped:0 overruns:0 frame:0
          TX packets:63 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:7367 (7.1 KiB)  TX bytes:13524 (13.2 KiB)


—————————————————————————————————————————————————————————————

As far as I notice, there are no differences shown by `ifconfig`.
The fact is, that all guests drop the network after a cable is unplugged and then replugged, while the host's network keeps functioning.

Where else can I look?

-- Davide

On 08/19/2015 08:02 PM, Vlad Yasevich wrote:
On 08/16/2015 12:55 PM, Davide Baldini wrote:
When I unplug the ethernet cable from the physical host, guest fails to 
reconnect; host
does reconnect.

What do you mean by 'reconnect'?  Unplugging the cable for the nic on the 
physical host
does not really disconnect the guest from the network.  According to the 
configuration
your provided, the guest is still connected to the bridge on the host and can 
still
communicate with other guests on the same host.

Once the host network is plugged back in, the bridge should start forwarding 
packets
back to the guest.


A very simple configuration here, with an almost default Debian 7 on both host 
and guest:

-- ON HOST:

/etc/network/interfaces

   auto lo
   iface lo inet loopback

   auto br0
   iface br0 inet dhcp
       bridge_ports    eth1
       bridge_stp      off
       bridge_maxwait  0
       bridge_fd       0


-- ON GUEST:

/etc/network/interfaces

   auto eth0
   allow-hotplug eth0
   iface eth0 inet static
       address 192.168.1.109
       netmask 255.255.255.0
       network 192.168.1.0
       broadcast 192.168.1.255
       gateway 192.168.1.1
       dns-nameservers 192.168.1.1


QEMU is started as:

/usr/local/bin/qemu-system-x86_64 -hda /media/raid1/qemu-109 -m 8G -smp 4 
-enable-kvm
-netdev bridge,id=br109 -device 
virtio-net-pci,netdev=br109,id=nic0,mac=00:00:00:00:01:09
-k it -daemonize

QEMU emulator version 2.3.0

Nothing appears on dmesg. Any hints?

Make sure that the bridge on the host is formed correctly after the cable has 
been plugged
back in.

-vlad


-- Davide





reply via email to

[Prev in Thread] Current Thread [Next in Thread]