I have the following set-up involving two KVM hosts and numerous virtual machine guests on each. The guests communicate to each other on both hosts via [192.168.216.0/24]. [192.168.216.42] is connected to [192.168.216.41] via a cross-over cable. Traffic between [192.168.216.0/24] addresses should not escape out onto the LAN. However, I want to ping [x.y.A.2] from [192.168.216.25].:
ISP ethx[x.y.A.2/30] >-----< eth0[x.y.A.3/30] |
ISP GWAY |
eth1[x.y.z.1/24] >----------< |
GWAY |
|
br0[x.y.z.42/24] >---------------------------------< |
KVM2 |
br0[x.y.z.41/24] >-----< |
KVM1 ~
br1[192.168.216.42] >-----X-----< br1[192.168.216.41]
| KVM2 KVM1 |
| |
| >-----< eth1[192.168.216.21] |
| >-----< eth1[192.168.216.25] |
|
eth1[192.168.216.221] >-----< |
eth1[192.168.216.223] >-----< |
IPTABLES on GWAY is set-up to masquerade outgoing 198.168.0.0/16.
I believe I will need to add a virtual i/f eth1[192.168.0.1/16] to GWAY:
ifcfg-eth1:192168
BOOTPROTO=none
BROADCAST=192.168.255.255
DEVICE=eth1:192168
IPADDR=192.168.0.1
IPV6INIT=no
NETMASK=255.255.0.0
NETWORK=192.168.0.0
#ONBOOT=yes
ONPARENT=yes
As well as a static route similar to:
route-eth1
192.168.216.0/24 via x.y.z.42 dev eth1
And on KVM2 I would need:
ifcfg-br0
BOOTPROTO="none"
DEFROUTE="yes"
DEVICE="br0"
GATEWAY="x.y.z.1"
IPADDR="x.y.z.42"
IPV4_FAILURE_FATAL="no"
IPV6INIT="no"
NAME="System br0"
NETMASK="255.255.255.0"
NETWORK="x.y.z.0"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Bridge"
USERCTL="no
ifcfg-br1
BOOTPROTO="none"
DEVICE="br1"
GATEWAY="x.y.z.42"
IPADDR="192.168.216.42"
IPV4_FAILURE_FATAL="no"
IPV6INIT="no"
NAME="System br1"
NETMASK="255.255.255.0"
NETWORK="192.168.216.0"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Bridge"
USERCTL="no
Am I anywhere close to what actually needs to be done?
0 Answers