我使用LXD
和cloud-init
配置一个具有两个接口的实例,这两个接口通过 DHCP 分配 IP。
eth0
(10.23.44.177/24) 连接到主机 (lxdbr0) 上的网桥以访问互联网。enp5s0
(192.168.100.179) 连接到私有 LAN 上的另一个节点,无法访问互联网。
我的问题是,我可以 ping 8.8.8.8 或专用 LAN 上的 IP,但它们都严重滞后,10 秒内无法工作,然后进行 ping,然后一段时间没有任何结果。如果我关闭两个接口之一,另一个就可以正常工作。我确信我的路由有问题。
这是一些信息。
$ ip route s
default via 192.168.100.1 dev enp5s0 proto dhcp src 192.168.100.179 metric 100
default via 10.23.44.1 dev eth0 proto dhcp src 10.23.44.177 metric 100
10.23.44.0/24 dev eth0 proto kernel scope link src 10.23.44.177
10.23.44.1 dev eth0 proto dhcp scope link src 10.23.44.177 metric 100
192.168.100.0/24 dev enp5s0 proto kernel scope link src 192.168.100.179
192.168.100.1 dev enp5s0 proto dhcp scope link src 192.168.100.179 metric 100
$ ifconfig
enp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.179 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::216:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x20<link>
ether 00:16:3e:xx:xx:xx txqueuelen 1000 (Ethernet)
RX packets 144 bytes 15102 (15.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 705 bytes 55690 (55.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.23.44.177 netmask 255.255.255.0 broadcast 10.23.44.255
inet6 fd42:45c6:df12:80cb:216:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x0<global>
inet6 fe80::216:3eff:xxxx:xxxx prefixlen 64 scopeid 0x20<link>
ether 00:16:3e:12:xx:xx txqueuelen 1000 (Ethernet)
RX packets 15620 bytes 95337338 (95.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10186 bytes 740093 (740.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
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 1000 (Local Loopback)
RX packets 182 bytes 17262 (17.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 182 bytes 17262 (17.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
谁能提供一些帮助来修复我的路线?