在尝试联系访客虚拟机时,数据包丢失标头时出现非常奇怪的问题。
我有裸机运行CentOS 7和VirtualBox v.5.0.14。 然后我有一个客户使用桥接networking运行Ubuntu 15.10。 它很高兴地从我们的DHCP服务器上获取IP地址。 客户正在运行SSH和Apache。
在下面的testing中使用的VirtualBox主机,客户和所有客户端上的所有防火墙都被禁用。
我可以从客户端SSH连接到我们networking上的任何其他Linux主机。 我还可以连接到Windows Samba服务,由Windows hosts = D提供服务
一切正常,应该吧?
使用Solaris获取Apache网页或SSH可以让我们了解更多信息。 我猜测它的行为与Windows主机一样,只是我们获得了更多的debugging输出。
ssh fullyqualifiedguesthostname 0000 0000 0000 a89f Disconnecting: Bad packet length 0.
这行数字的结尾每次都是不同的,用hexstring。 即0000 0000 0000 xxxx
而当使用wget获取网页…
wget --no-proxy fullyqualifiedguesthostname --09:57:38-- fullyqualifiedguesthostname => `index.html' Resolving fullyqualifiedguesthostname... xxxx Connecting to fullyqualifiedguesthostname|xxxx|:80... connected. HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9 Length: unspecified [ <=> ] 11,638 2.33K/s 09:57:43 (2.33 KB/s) - `index.html' saved [11638]
注意No头,假设HTTP / 0.9
另外,下载这个11Kb文件需要几秒钟的时间。
在Ubuntu主机上使用wget:
wget --no-proxy fullyqualifiedguesthostname --2016-02-26 10:08:06-- fullyqualifiedguesthostname Resolving fullyqualifiedguesthostname (fullyqualifiedguesthostname)... xxxx Connecting to fullyqualifiedguesthostname (fullyqualifiedguesthostname)|xxxx|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 11321 (11K) [text/html] Saving to: 'index.html' 100%[=========================================================>] 11,321 --.-K/s in 0s 2016-02-26 10:08:06 (160 MB/s) - 'index.html' saved [11321/11321]
没有任何问题,没有关于丢失标题的信息,它就像你期望的那样一眨眼的工作。
现在,这是在Solaris主机上下载的index.html文件的第一行:
cat index.html .1 200 OK Date: Fri, 26 Feb 2016 10:18:26 GMT Server: Apache/2.4.12 (Ubuntu) Last-Modified: Tue, 26 Jan 2016 15:38:24 GMT ETag: "2c39-52a3e79e18489" Accept-Ranges: bytes Content-Length: 11321 Vary: Accept-Encoding Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html
正常的,不受干扰的HTML代码如下所示。
在Ubuntu主机上下载的index.html文件不包含这些第一行。 这只是HTML代码。
我假设缺less的标题是从Windows主机访问网页时导致无法理解的文本 – 浏览器不知道文件是什么,因此不知道如何显示它。 我也假设SSH失败也是如此 – 缺less头文件。
我也应该注意到,我可以从任何地方,Windows,Linux,Solaris ping来宾。
我认为这只是捕捉了这个混乱networking中的所有variables。
有谁知道这是怎么回事?
我将客户操作系统的networking适配器types更改为“半虚拟化networking(virtio-net)”,问题全部消失。