I have following:
3 Mini-PC’s with 1 ethernet port
Setup incus cluster with OVN the details are following:
MIni PC 1:
IPv4 address: 192.168.1.12
Mini PC 2:
IPv4 address: 192.168.1.13
Mini PC 3:
IPv4 address: 192.168.1.14
Now to setup cluster did following:
Setup netplan with br0 the setup is as follows for netplan:
network:
version: 2
renderer: networkd
ethernets:
enp1s0:
dhcp4: no
dhcp6: no
bridges:
br0:
dhcp4: no
dhcp6: no
addresses:
- 192.168.1.12/24
- 172.21.8.1/24
routes:
- to: default
via: 192.168.1.1
interfaces:
- enp1s0
nameservers:
search: [example.com]
addresses: [1.1.1.1, 1.1.2.2, 8.8.8.8]
For the other two just change the ip but to 13,14 for 192 subnet and 2 and 3 for 172 subnet.
In all the PC’s ip_forward is set to 1 using sysctl.
Now created an ovn cluster for this 3 PC’s.
After setting up ovn cluster properly did the following to setup the network:
incus network create UPLINK --type=physical parent=br0 --target=pc1
incus network create UPLINK --type=physical parent=br0 --target=pc2
incus network create UPLINK --type=physical parent=br0 --target=pc3
incus network create UPLINK --type=physical ipv4.ovn.ranges=172.21.8.6-172.21.8.88 ipv4.gateway=172.21.8.1/24 dns.nameservers=1.1.1.1,1.1.2.2
incus network create test-ovn --type=ovn
incus launch images:ubuntu/22.04 c1 --network test-ovn
incus list
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | LOCATION |
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+----------+
| c1 | RUNNING | 10.133.131.2 (eth0) | fd42:483b:c318:8d60:216:3eff:fe3d:4e36 (eth0) | CONTAINER | 0 | pc1 |
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+----------+
But the container c1 cannot access internet or even the internal address of 192.168.1.12 or 13.
If I create an UPLINK within 192.168.10/24 network with gateway of 192.168.1.1 then it can.
incus network create UPLINK --type=physical ipv4.ovn.ranges=192.168.1.190-192.168.1.206 ipv4.gateway=192.168.1.1/24 dns.nameservers=1.1.1.1,1.1.2.2
I do not want to use 192.168.1.1 subnet as its not controlled by me for the ovn network and thats the reason choose another ip of 172.21.8.0/24 network for it. But 172.21.8.0 network is not directly connected to internet as using PC1 as the gateway node with ip 172.21.8.1, but it doesn’t seem to work form within the ovn network probably some setup linked in ovn-nbctl for router needs to be updated.
Anyone can let me know how to fix it?