这似乎是一个难题。 因此,我会非常感谢你的build议。 我花了两天的时间试图让这个跑步,但没有成功。 (公共IPfunction正在工作,但不是专用networking)
在debian上用KVMbuild立“第二个专用networking”
RootServer 1 =其中有多个虚拟机
RootServer 2 =其中有多个虚拟机
两个根服务器都有一个“公共”接口= eth0(插入互联网)和一个“私人”接口= eth1(直接插入交换机)。
=>我只想在10.1.0.0networking中与其他盒子进行私密通讯…
auto eth0 iface eth0 inet static address 11.11.11.91 broadcast 11.11.11.95 netmask 255.255.255.224 gateway 11.11.11.65 # Private IP Adress of the HOST auto eth1 iface eth1 inet static address 10.1.1.20 broadcast 10.1.255.255 netmask 255.255.0.0 network 10.1.0.0 ## Bridge vor Private Network auto vbr2 iface vbr2 inet static address 10.1.1.21 netmask 255.255.0.0 pre-up brctl addbr vbr2 post-up route add -host 10.1.1.100 vbr2 post-down brctl delbr vbr2
auto eth0 iface eth0 inet static address 11.11.11.87 netmask 255.255.255.255 gateway 11.11.11.91 pointopoint 11.11.11.91 ## Private IP Address of the Guest auto eth1 iface eth1 inet static address 10.1.1.100 netmask 255.255.255.255 gateway 10.1.1.20 pointopoint 10.1.1.20
如果我在主机(10.1.1.20/11.11.11.91)上执行ping 10.1.1.100 ,则即使驻留在同一台服务器上,(10.1.1.100)guest虚拟机也不会收到任何响应。 所以任何内部路由的东西一定是错的……但是我没有办法弄清楚这个呢?
更新:我只是想知道。 也许我需要一个“网关”的私人networking。 但另一方面,如果我使用网桥,为什么我需要这个专用networking的网关?
任何提示为什么这不起作用非常非常感激。
Thanky非常非常!
你需要做的是几件事情。
networking设置scheme应该如下:
eth0(无IP) – > br0(带公网IP)< – VM(公网IP)
eth1(无IP) – > br1(使用私有IP)< – VM(私有IP)