I have been struggling a bit getting the situation below working. There are some post describing to create tunnels and it is not a problem getting them to work. But I was not able to glue it all together. I have looked at posts like these Transparent tunnel between interfaces on remote hosts and http://blog.asiantuntijakaveri.fi/2012/01/layer-2-over-layer-3-using-linux-built.html. But i think these are for situations where h2, h3 and h5 (and vm's?) are non existing.
Furthermore I tried connecting the vm adapter via macvtap attached to the tun1, but I get the error device or resource busy. (The tun1 is part of the bridge)
This is the setup:
+----+
| h2 |
+----+
192.168.121.30
+----+ +----+
| h1 | | h3 |
+----+ +----+
192.168.121.1 192.168.121.105
192.168.50.4
+----+
| h4 |
+----+
192.168.121.211
+----+
| h5 |
+----+
192.168.50.110
+-------------------------------------------------+
| h5 |
| +----+ +----+ +----+ |
| |vm2 | |vm3 | | vm5 | |
| +----+ +----+ +----+ |
| 192.168.121.210 192.168.121.63 192.168.121.200 |
| |
| 192.168.121.10 |
+-------------------------------------------------+
192.168.50.110
- the hosts h2, h3, h4 are sending traffic to the gateway h1 via the 192.168.121.x network
- h5 and h1 communicating via the 192.168.50.x network
- on h5 are vm's with the 192.168.121.x network
- i would like to use macvtap on h5
- i don't mind creating static routes to vm's on h5
- 192.168.50.x is on a vlan
- 192.168.121.x is on a vlan
- i don't mind creating gre tunnel instead of gretab
- i am not using a vpn
Can anyone suggest possible solutions?
I will put the statements for the config here (and update them);
for h1 here:
ip link add tun1 type gretap local 192.168.50.4 remote 192.168.50.110
for h5 here:
ip link add tun1 type gretap local 192.168.50.110 remote 192.168.50.4