Debian KVM上的主机网卡停止响应PING请求

一天之后,通过networkingping到我的KVM主机停止响应。 当我实际在主机上,如果我ping其中一个访客虚拟机,然后我得到一个响应。 之后,我可以ping通networking上的远程计算机,并且可以从远程客户端ssh进入。

在ping来宾虚拟机之前,发出一个ifconfig返回所有的接口,并将主机接口enp12s0显示为up:

 enp12s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.42.100 netmask 255.255.0.0 broadcast 192.168.255.255 inet6 fe80::7285:c2ff:fe3f:cb08 prefixlen 64 scopeid 0x20<link> ether 70:85:c2:3f:cb:08 txqueuelen 1000 (Ethernet) RX packets 151642 bytes 16951519 (16.1 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 13070 bytes 11039843 (10.5 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enp15s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6900 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:00 txqueuelen 1000 (Ethernet) RX packets 31387417 bytes 42363890116 (39.4 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 9447905 bytes 1370779218 (1.2 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 63 memory 0xf6920000-f6940000 enp15s0f1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6901 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:01 txqueuelen 1000 (Ethernet) RX packets 5848816 bytes 721677598 (688.2 MiB) RX errors 0 dropped 14 overruns 0 frame 0 TX packets 21714326 bytes 29290657911 (27.2 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 65 memory 0xf6900000-f6920000 enp16s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6902 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:02 txqueuelen 1000 (Ethernet) RX packets 3498591 bytes 419615294 (400.1 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 9399179 bytes 12592547704 (11.7 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 67 memory 0xf6720000-f6740000 enp3s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6910 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:10 txqueuelen 1000 (Ethernet) RX packets 219737 bytes 35550756 (33.9 MiB) RX errors 0 dropped 14 overruns 0 frame 0 TX packets 2169 bytes 162589 (158.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 47 memory 0xf6d20000-f6d40000 enp3s0f1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6911 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:11 txqueuelen 1000 (Ethernet) RX packets 2084917 bytes 1609357440 (1.4 GiB) RX errors 0 dropped 14 overruns 0 frame 0 TX packets 2138132 bytes 1958382410 (1.8 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 57 memory 0xf6d00000-f6d20000 enp4s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6912 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:12 txqueuelen 1000 (Ethernet) RX packets 2212282 bytes 2371181244 (2.2 GiB) RX errors 0 dropped 92848 overruns 0 frame 0 TX packets 2744983 bytes 2981552195 (2.7 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 59 memory 0xf6b20000-f6b40000 enp4s0f1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6913 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:13 txqueuelen 1000 (Ethernet) RX packets 235488 bytes 147317246 (140.4 MiB) RX errors 0 dropped 2414 overruns 0 frame 0 TX packets 178339 bytes 15932826 (15.1 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 61 memory 0xf6b00000-f6b20000 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1 (Local Loopback) RX packets 55700 bytes 12788961 (12.1 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 55700 bytes 12788961 (12.1 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 macvtap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6913 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:13 txqueuelen 500 (Ethernet) RX packets 198539 bytes 141790421 (135.2 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 178026 bytes 15171235 (14.4 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 macvtap1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6911 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:11 txqueuelen 500 (Ethernet) RX packets 1184915 bytes 1522791611 (1.4 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1102261 bytes 1881329000 (1.7 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 macvtap2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6912 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:12 txqueuelen 500 (Ethernet) RX packets 2026152 bytes 2335877853 (2.1 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1126626 bytes 2863199685 (2.6 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 macvtap3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6910 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:10 txqueuelen 500 (Ethernet) RX packets 117422 bytes 9079137 (8.6 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2012 bytes 130725 (127.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 macvtap4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6900 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:00 txqueuelen 500 (Ethernet) RX packets 30818630 bytes 42202578005 (39.3 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 9447901 bytes 1317528665 (1.2 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 macvtap5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6901 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:01 txqueuelen 500 (Ethernet) RX packets 5715462 bytes 670877055 (639.7 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 21714250 bytes 29202659977 (27.1 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 macvtap6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5054:ff:fe42:6902 prefixlen 64 scopeid 0x20<link> ether 52:54:00:42:69:02 txqueuelen 500 (Ethernet) RX packets 3492775 bytes 405250410 (386.4 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 9399108 bytes 12554386875 (11.6 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 

正如你所看到的,我的Debian KVM主机有几个networking接口(两个4端口网卡和主板上的集成网卡)。

我也得到一些奇怪的日志在我的路由器关于一些ARP条目:

 Oct 28 08:06:13 kernel arp: 192.168.42.100 moved from 52:54:00:42:69:10 to 70:85:c2:3f:cb:08 on re1 Oct 28 08:06:08 kernel arp: 192.168.42.100 moved from 52:54:00:42:69:12 to 70:85:c2:3f:cb:08 on re1 Oct 28 07:36:13 kernel arp: 192.168.42.100 moved from 52:54:00:42:69:10 to 70:85:c2:3f:cb:08 on re1 Oct 28 07:36:08 kernel arp: 192.168.42.100 moved from 52:54:00:42:69:11 to 70:85:c2:3f:cb:08 on re1 Oct 28 07:06:13 kernel arp: 192.168.42.100 moved from 52:54:00:42:69:10 to 70:85:c2:3f:cb:08 on re1 Oct 28 07:06:08 kernel arp: 192.168.42.100 moved from 52:54:00:42:69:12 to 70:85:c2:3f:cb:08 on re1 Oct 28 05:59:17 kernel arp: 192.168.42.100 moved from 52:54:00:42:69:10 to 70:85:c2:3f:cb:08 on re1 Oct 28 05:59:12 kernel arp: 192.168.42.100 moved from 52:54:00:42:69:11 to 52:54:00:42:69:12 on re1 

我不知道为什么我的主机在IP 192.168.42.100跳转到不同的接口。

这是我的系统信息:

 Linux rack 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux 

/etc/network/interfacesconfiguration:

 # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface # allow-hotplug enp12s0 # iface enp12s0 inet dhcp auto enp12s0 iface enp12s0 inet static address 192.168.42.100 netmask 255.255.0.0 broadcast 192.168.255.255 gateway 192.168.42.1 

另外奇怪的是,在我设置了这台主机之后,做了一个ifconfig用来只显示loenp12s0 。 我不确定是什么导致所有的额外和虚拟接口出现。

那么,如何保持enp12s0响应ping请求,而不是在ARP条目中移动呢?