我有3台服务器,名为Server-A,Server-B,Server-C
这是IP :(例如)
Server-A(100.0.0.18/29)
Server-B(100.0.0.21/29)
Server-C(100.0.0.22/29)
在Server-A(100.0.0.18/29)我有两个名为VM-1的VM,VM-2
这是IP:
VM-1(100.0.0.19/29)
VM-2(192.168.1.2/24)
我的问题是:
1. VM-1和VM-2可以访问互联网,但有时VM-1超时
2. VM-1无法ping Server-B或Server-C,反之亦然。
这是/etc/network/interfaces
配置:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 100.0.0.18
netmask 255.255.255.248
gateway 100.0.0.17
post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
iface eth1 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.1.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE
auto vmbr1
iface vmbr1 inet static
address 100.0.0.18
netmask 255.255.255.248
bridge_ports none
bridge_stp off
bridge_fd 0
up ip route add 100.0.0.19/32 dev vmbr1
如何让VM-1能够从Server-B和Server-C ping,反之亦然?