1

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

1 Answer 1

0

The problem was the connection dropping every x time. This was resolved by setting a manual arp table entry. on h1

arp -s 192.168.121.63 00:51:59:01:12:7b -i tun1

And for the connection

route add -host 192.168.121.63 dev tun1
2
  • 1
    If you are the original poster then you should request to recover or merge your account using the contact form (superuser.com/contact). New questions should not be asked as answers.
    – Mokubai
    Commented Oct 25, 2017 at 8:51
  • So give me 50 reputation! Commented Apr 11, 2018 at 13:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .