The OVN setup tutorial is great and I want to go one step further to setup a physical network dedicated for shared use by OVN networks. But to my surprise I can’t find any instruction or tutorial on subject of physical network setup.
lxc network create <name> \
parent=<physical interface>
ipv4.gateway=n.n.n.n/24 #uplink gateway address and subnet size
ipv4.ovn.ranges=n.n.n.n-n.n.n.n # Range of addresses that LXD should use to allocate to OVN gateways on uplink network
The instance u2 can get DHCP IP 198.52.100.2 from OVN1 network. it can ping 192.52.100.1 which I believe it is OVS route’s internal IP. But inside instance I can’t ping OVN external IP 192.0.2.10, host ip: 192.168.56.20, and Internet IP: 8.8.8.8.
Finally here is the ovn-vsctl output:
# ovs-vsctl show
cfdac91d-a98c-4b03-a195-62f477030a08
Bridge br-int
fail_mode: secure
Port veth621a288d
Interface veth621a288d
Port br-int
Interface br-int
type: internal
Port vethada5185a
Interface vethada5185a
Port patch-br-int-to-lxd-net21-ls-ext-lsp-provider
Interface patch-br-int-to-lxd-net21-ls-ext-lsp-provider
type: patch
options: {peer=patch-lxd-net21-ls-ext-lsp-provider-to-br-int}
Port patch-br-int-to-lxd-net7-ls-ext-lsp-provider
Interface patch-br-int-to-lxd-net7-ls-ext-lsp-provider
type: patch
options: {peer=patch-lxd-net7-ls-ext-lsp-provider-to-br-int}
Bridge lxdovn20
Port enp0s9
Interface enp0s9
Port lxdovn20
Interface lxdovn20
type: internal
Port patch-lxd-net21-ls-ext-lsp-provider-to-br-int
Interface patch-lxd-net21-ls-ext-lsp-provider-to-br-int
type: patch
options: {peer=patch-br-int-to-lxd-net21-ls-ext-lsp-provider}
Bridge lxdovn9
Port patch-lxd-net7-ls-ext-lsp-provider-to-br-int
Interface patch-lxd-net7-ls-ext-lsp-provider-to-br-int
type: patch
options: {peer=patch-br-int-to-lxd-net7-ls-ext-lsp-provider}
Port lxdovn9
Interface lxdovn9
type: internal
Port lxdovn9b
Interface lxdovn9b
ovs_version: "2.13.3"
The same setup with lxdbr1 works fine. This is a single node setup. I also run into same situation with 5 node bare-metal setup.
Can you ping 192.0.2.10 from the external uplink network (i.e can the external network reach the OVN router’s external address on the physical network)?
To be honest, I don’t know what are required to the physical uplink. So I set 192.0.2.1/24 to the uplink interface (enp0s9), this way this IP is reachable at host side. And the routing table have 192.0.2.0/24 be routed through 192.0.2.1/24.
With the above setup, I can’t ping 192.0.2.10 from both host side and inside container. tcpdump -i enp0s9 -vv ether host <ovn_router mac-address> from host side can’t see any packets from ovn router.
If you’re using a physical network interface as the uplink then you should not assign an IP to the interface, as that will not work. The physical interface will be connected to an OVS bridge by LXD for use with connecting OVN networks to the uplink network.
You need to make sure that the details you are using with the physical network are correct for the external network on that interface (i,e that the gateway and subnet info is correct).
You should then check that the OVN router’s external address (lxc network get ovn1 volatile.network.ipv4.address) is pingable from a device on the external network.
The 192.168.84.0/24 is a uplink network the physical NIC located. After container is started, lxc network get ovn1 volatile.network.ipv4.address shows the OVN1 is assigned 192.168.84.101. But still ping this IP from external network does not work.
I am not sure if this is limited by the host-only network feature of VirtualBox I used on my laptop. And I don’t have free wired physical uplink in lab to let me try more. So probably for now bridge is the only choice.
Yes very likely as LXD will create an OVS bridge and connect the physical uplink port enp0s9 to it, so the OVN router will use its own MAC address on the uplink network. If the network filters that traffic out that would explain why it doesn’t work.