I am using LXD and OVN to prototype a bastion host and a set of hosts behind it prior to implementing with real hardware. One of the functions the bastion host will implement in the physical world is DHCP (and DNS). However, OVN implements DHCP itself which conflicts with the explicit DHCP daemon. How do I turn off DHCP for the OVN network?
What I did. Create a network in OVS to be used for OVN:
$ sudo ovs-vsctl set open_vswitch . \
external_ids:ovn-remote=unix:/var/run/ovn/ovnsb_db.sock \
external_ids:ovn-encap-type=geneve \
external_ids:ovn-encap-ip=127.0.0.1
And then use it when creating a network in LXD that uses it:
$ lxc network create ovnbr0 \
ipv4.address=10.10.10.1/24 ipv4.nat=true \
ipv4.dhcp.ranges=10.10.10.2-10.10.10.199 \
ipv4.ovn.ranges=10.10.10.200-10.10.10.254 \
ipv6.address=fd42:4242:4242:1010::1/64 ipv6.nat=true \
ipv6.ovn.ranges=fd42:4242:4242:1010::200-fd42:4242:4242:1010::254
$ lxc network create ovn0 --type=ovn network=ovnbr0
And use it when creating some hosts inside the bastion area:
$ lxc init ubuntu:22.04 c1
$ lxc config device override c1 eth0 network=ovn0
$ lxc start c1
$ lxc info c1
...
IP addresses:
inet: 10.19.156.2/24 (global)
...
I don't want c1 to be able to get an address via DHCP from OVN. I want to provide an explicit DHCP server to give c1 an address. How do I do this? What am I missing?