我在從執行 Ubuntu 的 Proxmox 虛擬機器與不同 VLAN 上的 NSA 通訊時遇到問題。此問題僅發生在該特定虛擬機器上。我在同一台機器上還有其他虛擬機,可以很好地 ping 通其他 VLN。我注意到一件奇怪的事情是,當我嘗試 ping NAS 時,「寄件者」IP 位址不正確:
PING 192.168.30.17 (192.168.30.17) 56(84) bytes of data.
From 192.168.16.1 icmp_seq=1 Destination Host Unreachable
From 192.168.16.1 icmp_seq=2 Destination Host Unreachable
192.168.16.1不是虛擬機器的IP。這是我的 ifconfig:
br-bdc324865e7c: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.16.1 netmask 255.255.240.0 broadcast 192.168.31.255
ether 02:42:05:de:59:9f txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
br-e6ff6afcb423: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.22.0.1 netmask 255.255.0.0 broadcast 172.22.255.255
inet6 fe80::42:1fff:fe6e:32bf prefixlen 64 scopeid 0x20<link>
ether 02:42:1f:6e:32:bf txqueuelen 0 (Ethernet)
RX packets 664 bytes 2500219 (2.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 582 bytes 106273 (106.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
br-ea68e1731716: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.19.0.1 netmask 255.255.0.0 broadcast 172.19.255.255
ether 02:42:2d:22:ff:68 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
br-ee877fa76586: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.31.0.1 netmask 255.255.0.0 broadcast 172.31.255.255
ether 02:42:39:6f:43:d0 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
br-fd077aeb7a68: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.30.0.1 netmask 255.255.0.0 broadcast 172.30.255.255
ether 02:42:fc:7f:81:b1 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
inet6 fe80::42:ffff:fe62:814 prefixlen 64 scopeid 0x20<link>
ether 02:42:ff:62:08:14 txqueuelen 0 (Ethernet)
RX packets 8251 bytes 17989335 (17.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8149 bytes 5781191 (5.7 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens18: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.123 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::84e1:2aff:fefb:8b37 prefixlen 64 scopeid 0x20<link>
ether 86:e1:2a:fb:8b:37 txqueuelen 1000 (Ethernet)
RX packets 32519 bytes 11182404 (11.1 MB)
RX errors 0 dropped 2277 overruns 0 frame 0
TX packets 12508 bytes 23008661 (23.0 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
正如您所看到的,我在此虛擬機上運行 docker,因此還有許多其他接口,包括 192.168.16.1。為什麼該介面在那裡,為什麼要使用它來 ping NAS?
答案1
事實證明 docker compose 正在創建糟糕的網路。我不知道為什麼或如何開始這樣做,但刪除它後一切又恢復了。