Categories
Development System & Network

linux – routing between bridge networks without overlay

Here’s the scenario. There are two hosts in a subnet (both are virtualbox VMs) and both are on the same network 192.168.1.0.
I’ve additionally created two bridge interfaces with separate network slices.

Question:
Is there a way ip on host1 bridge to communicate with an ip on host2 bridge?
I’m looking if there’s a way to configure the routes using ip route or similar to route the L3 packets on one bridge to another without the need to install additional networking layer like vxlan or something.

Configuration:

Host1 interfaces:

2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:ca:4a:14 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.197/24 brd 192.168.1.255 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:feca:4a14/64 scope link
       valid_lft forever preferred_lft forever```

7: br-faf88cbd32f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:28:8c:40:00 brd ff:ff:ff:ff:ff:ff
    inet 172.11.11.1/24 brd 172.11.11.255 scope global br-faf88cbd32f0
       valid_lft forever preferred_lft forever

Host1 routing:

default via 192.168.1.1 dev enp0s3 proto static
172.11.11.0/24 dev br-faf88cbd32f0 proto kernel scope link src 172.11.11.1
192.168.1.0/24 dev enp0s3 proto kernel scope link src 192.168.1.197

Host2 interfaces:

2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:40:ae:5f brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.196/24 brd 192.168.1.255 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe40:ae5f/64 scope link
       valid_lft forever preferred_lft forever

92: br-037dfd7b32bc: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:fe:0d:54:86 brd ff:ff:ff:ff:ff:ff
    inet 172.11.12.1/24 brd 172.11.12.255 scope global br-037dfd7b32bc
       valid_lft forever preferred_lft forever
    inet6 fe80::42:feff:fe0d:5486/64 scope link
       valid_lft forever preferred_lft forever

Host2 routing:

default via 192.168.1.1 dev enp0s3 proto static
172.11.12.0/24 dev br-037dfd7b32bc proto kernel scope link src 172.11.12.1
192.168.1.0/24 dev enp0s3 proto kernel scope link src 192.168.1.196

Leave a Reply

Your email address will not be published. Required fields are marked *