我通过Wifi登录到我的Lubuntu 16.04.2 LTS服务器,每次启动docker容器时,我的连接都会被丢弃.因为我对码头工具比较新,我只能猜测这与dockers虚拟网络创建有关.我还应该提到我禁用了ipv6,但如果启用则没有区别.
这是我的syslog,它显示了当我运行sudo docker run -it ubuntu bash时会发生什么.我可以在冻结前看到容器/ ubuntu提示2-3秒.使用–net = host运行它,但不是我想要的.
ifconfig显示
docker0 Link encap:Ethernet HWaddr 02:42:8d:8b:b7:4c
inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:162 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:536 (536.0 B) TX bytes:9678 (9.6 KB)
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:538 errors:0 dropped:0 overruns:0 frame:0
TX packets:538 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:49592 (49.5 KB) TX bytes:49592 (49.5 KB)
vethee1cf14 Link encap:Ethernet HWaddr ba:53:4c:08:89:64
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:167 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:648 (648.0 B) TX bytes:9888 (9.8 KB)
wlp2s0 Link encap:Ethernet HWaddr f4:06:69:5d:ba:f6
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:3082 errors:0 dropped:0 overruns:0 frame:0
TX packets:2916 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:556197 (556.1 KB) TX bytes:569381 (569.3 KB)
码头网络检查桥梁显示
[
{
"Name": "bridge","Id": "8ec46d17f5cba798c8aba5c8457e019dcb24eade1285054f59c3430c33ff74f8","Created": "2017-03-04T10:44:27.966018717+01:00","Scope": "local","Driver": "bridge","EnableIPv6": false,"IPAM": {
"Driver": "default","Options": null,"Config": [
{
"Subnet": "172.17.0.0/16","Gateway": "172.17.0.1"
}
]
},"Internal": false,"Attachable": false,"Containers": {},"Options": {
"com.docker.network.bridge.default_bridge": "true","com.docker.network.bridge.enable_icc": "true","com.docker.network.bridge.enable_ip_masquerade": "true","com.docker.network.bridge.host_binding_ipv4": "0.0.0.0","com.docker.network.bridge.name": "docker0","com.docker.network.driver.mtu": "1500"
},"Labels": {}
}
]
随着docker停止ip显示
1: lo:
我的Wifi连接会怎样?任何帮助表示赞赏.如果有更多信息有用,请告诉我.
UPDATE
谢谢你的帮助.根据我到目前为止的反应,我的网络配置似乎有些问题.
cat /etc/NetworkManager/NetworkManager.conf显示
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
[ifupdown]
managed=false
cat / etc / network / interfaces显示
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
由于我没有特殊配置,一切看起来都很好.有什么建议,我可以寻找信息或如何解决问题?
UPDATE
nmcli dev显示
DEVICE TYPE STATE CONNECTION
docker0 bridge connected docker0
wlp2s0 wifi unavailable --
vethf9342a9 ethernet unmanaged --
lo loopback unmanaged --
当docker正在运行时
DEVICE TYPE STATE CONNECTION
docker0 bridge connected docker0
wlp2s0 wifi connected meins
lo loopback unmanaged --
当docker停止时.
UPDATE
在/etc/NetworkManager/NetworkManager.conf中添加了以下行,以使NetworkManager忽略docker接口.
[keyfile]
unmanaged-devices=interface-name:docker0;interface-name:veth*
网络管理员忽略了接口,但问题仍然存在.所以我的猜测是,我的DHCP配置存在问题.
UPDATE
DHCP客户端似乎确实存在问题.禁用它有帮助.有关解决方法的任何建议吗?
Mar 1 13:54:44 kodi NetworkManager[1054]:
在我自己的环境中,在NetworkManager看到链接连接后,我只看到以下内容:
Mar 5 12:32:39 bmitch-asusr556l NetworkManager[827]:
我在上面的评论中的问题,在哪里弄清楚你是否以某种方式将容器IP硬编码到192.168.178.x网络.由于没有发生这种情况,您应该看到容器以172.17.0.x地址启动.您的环境中似乎有错误配置NetworkManager或dhcpd尝试使用无线(wlp2s0)使用的相同IP为docker容器(veth)提供IP,然后将容器列为首选连接.