[ovs-discuss] Creating custom topology using openvswitch on LAN

Dushyant Arora dushyant at CS.Princeton.EDU
Thu Jan 19 03:59:25 UTC 2012


Hello,

I have access to 4 PCs connected to a LAN. I wish to connect these using openvswitch in a diamond topology like so.

H1 ----- H2 ------H4
|                  |
---------H3---------

H1 and H4 have VMs running on VirtualBox. All hosts have openvswitches running. Here is the configuration I used:
Create TAP interface on H1 and H4 using ip tuntap command. Attach virtualbox VMs using bridged networking to the tap interfaces. Create gre tunnels between H1<-->H2, H2<-->H1, H2<-->H4, H4<-->H2, and similarly for H3. Commands I used:

H1 & H4
sudo ovs-vsctl add-br br0
sudo ip tuntap add mode tap br0p1
sudo ip link set br0p1 up
sudo ovs-vsctl add-port br0 br0p1
sudo ovs-vsctl add-port br0 gre1 -- set interface gre1 type=gre options:remote_ip=xxx.xxx.xxx.xxx (IP address of H2)
sudo ovs-vsctl add-port br0 gre2 -- set interface gre2 type=gre options:remote_ip=xxx.xxx.xxx.xxx (IP address of H3)

Host VM is connected to br0p1 via bridged networking

H2 & H3
sudo ovs-vsctl add-br br0
sudo ovs-vsctl add-port br0 gre1 -- set interface gre1 type=gre options:remote_ip=xxx.xxx.xxx.xxx (IP address of H1)
sudo ovs-vsctl add-port br0 gre2 -- set interface gre2 type=gre options:remote_ip=xxx.xxx.xxx.xxx (IP address of H4)


After starting the VMs on H1 and H4, I configure the interfaces on them and give them IP addresses from private IPv4 address space. The VMs cannot ping each other. What am I doing wrong?

Thanks,

Dushyant






More information about the discuss mailing list