Using Virtual Machine as Gateway between two other VMs
Posted: 22. Mar 2013, 15:37
Hi, i have this setup:
VM1--------VM2-------VM3
All three machines are running Linux (CentOs) on windows 7 host machine.
My target is to use VM2 as a bridge (actually Switch using OVS on VM2) between VM1 & VM3. However i have tried many things but there seem to be a problem.
1. Using Host Only Interface:
With this option all three machines can ping each other via shared windows virtual interface (192.168.56.1) however problem here is that traffic does not pass through VM2 rather directly between VM1 and VM3.
2. Using Internal Network:
To seperate i tried to assign two different internal network on links VM1-VM2 and Vm2-VM3 but this makes them unable to access eachother. The way i can make it work is by enabling IP routing, and natting however this is not what i want, i want L2 bridging via VM2.
Now on VM2 i am running OpenVSwitch, so that i can pass the traffic from one interface to the other and vice versa, but i really need some information, using Virtual Box how can i realize this task??
VM1--------VM2-------VM3
All three machines are running Linux (CentOs) on windows 7 host machine.
My target is to use VM2 as a bridge (actually Switch using OVS on VM2) between VM1 & VM3. However i have tried many things but there seem to be a problem.
1. Using Host Only Interface:
With this option all three machines can ping each other via shared windows virtual interface (192.168.56.1) however problem here is that traffic does not pass through VM2 rather directly between VM1 and VM3.
2. Using Internal Network:
To seperate i tried to assign two different internal network on links VM1-VM2 and Vm2-VM3 but this makes them unable to access eachother. The way i can make it work is by enabling IP routing, and natting however this is not what i want, i want L2 bridging via VM2.
Now on VM2 i am running OpenVSwitch, so that i can pass the traffic from one interface to the other and vice versa, but i really need some information, using Virtual Box how can i realize this task??