For, example i have few virtual machines on my home server and several on my work server. I want that they lived in one distributed ethernet network.
OpenVswitch has implementation for GRE tunnels. In our case we will encapsulate all our ethernet traffic over IP.
My servers on Ubuntu 11.10.
Home server IP: 1.1.1.1
Work server IP: 2.2.2.2
On both servers install OVS (OpenVswitch). First install and automatically compile ovs module, then install main packages.
modprobe brcompat_mod
OpenVswitch has implementation for GRE tunnels. In our case we will encapsulate all our ethernet traffic over IP.
My servers on Ubuntu 11.10.
Home server IP: 1.1.1.1
Work server IP: 2.2.2.2
On both servers install OVS (OpenVswitch). First install and automatically compile ovs module, then install main packages.
aptitude install openvswitch-datapath-dkmsThen add brcompat_mod (replace for standart bridge utils) module.
aptitude install openvswitch openvswitch-brcompat
modprobe brcompat_mod
ovs-brcompatd --pidfile --detach
Add ovs bridge and gre interface
ovs-vsctl add-br brs0On work server:
ovs-vsctl add-port brs0 gre0 -- set interface gre0 type=gre options:remote_ip=1.1.1.1On home server
ovs-vsctl add-port brs0 gre0 -- set interface gre0 type=gre options:remote_ip=2.2.2.2Then you need to add tap interface of your VMs into the bridges
ovs-vsctl add-port brs0 vnet0You don't need to add your uplink interface(eth0) to bridge. Now all VMs will live in single network. Note that GRE doesn't encrypt your traffic.
Комментариев нет:
Отправить комментарий