-2

I am trying to implement tunneling as described here with the following setup (without any success):

test setup

ho1 is a host only interface. I want to connect Nested Guest 11 and Nested Guest 21.

I have read some other tutorials like:

https://blog.scottlowe.org/2013/05/07/using-gre-tunnels-with-open-vswitch/

http://networkstatic.net/open-vswitch-gre-tunnel-configuration/

https://costiser.ro/2016/07/07/overlay-tunneling-with-openvswitch-gre-vxlan-geneve-greoipsec/#.YIHTG9JR2Uk

but I'm clearly missing something. I think I'm doing something wrong with those tap devices used here.

UPDATE

Guest1 (network interfaces)

lo               UNKNOWN        127.0.0.1/8 ::1/128
ens33            UP             192.168.41.140/24 fe80::4f54:fbff:6d87:b5a7/64
ens34            UP             192.168.239.128/24 fe80::761f:aa88:a28a:aeba/64
virbr1           DOWN           192.168.100.1/24
virbr1-nic       DOWN
virbr0           DOWN           192.168.122.1/24
virbr0-nic       DOWN
virbr2           DOWN           192.168.10.1/24
virbr2-nic       DOWN
vboxnet0         UP             192.168.56.1/24 fe80::800:27ff:fe00:0/64
ovs-system       DOWN
br0              DOWN
tap0             DOWN           10.1.1.1/8 fe80::9401:52ff:fe46:86e6/64
br1              DOWN

ovs-vsctl show (I have removed other ports right now)

    Bridge br1
        Port br1
            Interface br1
                type: internal
    Bridge br0
        Port br0
            Interface br0
                type: internal
    ovs_version: "2.15.0"

According to this I should add a tap interface to br0, this command: ovs-vsctl add-port br0 tap0. I created tap0 with this command: ip tuntap add mode tap tap0. Here is the problem. I don't know what IP address I should use for the tap, or should I even assign it an address? and then how to connect it to the nested guest. I use VirtualBox for the nested guests and I tired to attach to bridge adapter on VirtualBox. In this case the nested guest didn't get and IP address.

Another thing that I don't understand from the picture here, is that how br0 is connected to the outside world (transport network) if I don't add eth0 to br0?

UPDATE 2

I also tried to use hostonly interface vboxnetX for the nested guest. In this case the nested guest had an IP address but when I added vboxnetX to br0 I lost connection between the guest and the nested guest.

2
  • You might want to edit your question to get a little more specific than "without success" - we cannot see your configuration, logs and test results.
    – anx
    Apr 23, 2021 at 16:52
  • @anx I have update the question. If there is any particular info that I should add please let me know.
    – a5hk
    Apr 23, 2021 at 17:56

1 Answer 1

1

I got it working. This answer helped me. I had two problems with my config.

First, I should have added an IP address for the nested guests. With tap0 up and connected to the nested guest, I configured a static IP for the nested guest.

Second, I noticed that I have a duplicate MAC address. That was because I had cloned the Guest1 after the installation of the Nested Guest 11, so Nested Guest11 and Nested Guest21 had the same MAC address. I changed the MAC address of Nested Guest21 and tried again.

It didn't worked at first. I was forced to restart Guest1 because of a crash. After that I tried again. This time the nested VMs were able to ping each other.

My configuration:

Guest 1

ovs-vsctl show

Bridge br0
    Port gre0
        Interface gre0
            type: gre
            options: {remote_ip="192.168.239.129"}
    Port tap0
        Interface tap0
    Port br0
        Interface br0
            type: internal
ovs_version: "2.15.0"

ip -br a

lo               UNKNOWN        127.0.0.1/8 ::1/128
ens33            UP             192.168.41.140/24 fe80::4f54:fbff:6d87:b5a7/64
ens34            UP             192.168.239.128/24 fe80::761f:aa88:a28a:aeba/64
virbr2           DOWN           192.168.10.1/24
virbr2-nic       DOWN
virbr1           DOWN           192.168.100.1/24
virbr1-nic       DOWN
virbr0           DOWN           192.168.122.1/24
virbr0-nic       DOWN
vboxnet0         DOWN
ovs-system       DOWN
br0              DOWN
gre0@NONE        DOWN
gretap0@NONE     DOWN
erspan0@NONE     DOWN
gre_sys@NONE     UNKNOWN        fe80::989f:9eff:fe5d:d7ce/64
tap0             UP             fe80::9401:52ff:fe46:86e6/64

Nested Guest11

enter image description here

Guest2

ovs-vsctl show

Bridge br0
    Port tap0
        Interface tap0
    Port gre0
        Interface gre0
            type: gre
            options: {remote_ip="192.168.239.128"}
    Port br0
        Interface br0
            type: internal
ovs_version: "2.15.0"

Nested Guest21

enter image description here

Forgot to add that in this case too, there is no connection between guest and nested guest, which I think is expected.

You must log in to answer this question.

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