Yes, basically I follow the same steps but the instance can’t reach host IP and Internet.
create physical uplink network:
lxc network create phys --type=physical \
parent=enp0s9 \
ipv4.gateway=192.0.2.1/24 \
ipv6.gateway=2001:db8:1:1::1/64 \
ipv4.ovn.ranges=192.0.2.10-192.0.2.19 \
ipv4.routes=198.52.100.0/24 \
ipv6.routes=2001:db8:1:2::/64 \
dns.nameservers=192.168.1.1
Create OVN network that links to phys
network:
lxc network create ovn1 --type=ovn network=phys \
ipv4.address=198.52.100.1/24 \
ipv6.address=2001:db8:1:2::1/64 \
ipv4.nat=true \
ipv6.nat=true
Here is the show
result of OVN1:
$ lxc network show ovn1
config:
bridge.mtu: "1450"
ipv4.address: 198.52.100.1/24
ipv4.nat: "true"
ipv6.address: 2001:db8:1:2::1/64
ipv6.nat: "true"
network: phys
volatile.network.ipv4.address: 192.0.2.10
volatile.network.ipv6.address: 2001:db8:1:1:216:3eff:fe70:b1a4
description: ""
name: ovn1
type: ovn
used_by:
- /1.0/instances/u2
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.
Thanks,
Robert