How to Assign IPv4 Addresses to Containers in Fan Networked Cluster?

I have a fresh LXD cluster on version 3.13.

$ lxc cluster list
+-------------------+---------------------------+----------+--------+-------------------+
|       NAME        |            URL            | DATABASE | STATE  |      MESSAGE      |
+-------------------+---------------------------+----------+--------+-------------------+
| codewerks-alpha   | https://xxx.xxx.45.202:8443 | YES      | ONLINE | fully operational |
+-------------------+---------------------------+----------+--------+-------------------+
| codewerks-baker   | https://xxx.xxx.45.203:8443 | YES      | ONLINE | fully operational |
+-------------------+---------------------------+----------+--------+-------------------+
| codewerks-charlie | https://xxx.xxx.45.204:8443 | YES      | ONLINE | fully operational |
+-------------------+---------------------------+----------+--------+-------------------+

I create a container on the cluster and get this result:

$ lxc list
+------+---------+------+------+------------+-----------+-----------------+
| NAME |  STATE  | IPV4 | IPV6 |    TYPE    | SNAPSHOTS |    LOCATION     |
+------+---------+------+------+------------+-----------+-----------------+
| p1   | RUNNING |      |      | PERSISTENT |           | codewerks-baker |
+------+---------+------+------+------------+-----------+-----------------+

The container doesn’t receive an IPv4 address.

$ lxc network list
+---------+----------+---------+-------------+---------+---------+
|  NAME   |   TYPE   | MANAGED | DESCRIPTION | USED BY |  STATE  |
+---------+----------+---------+-------------+---------+---------+
| enp2s0  | physical | NO      |             | 0       |         |
+---------+----------+---------+-------------+---------+---------+
| lxdfan0 | bridge   | YES     |             | 1       | CREATED |
+---------+----------+---------+-------------+---------+---------+

I noted this answer from Stéphane about clustering assuming “an existing layer 2 infrastructure”. (LXD cluster network question) I don’t understand that, but what I’d like is to have LXD provide dhcp service, assigning these containers an IP address and allowing them to access the internet.

Is there a way to configure my cluster to use a DHCP server for its containers?

I think I may have fixed it! My problem appeared to arise from the fact that I configured my servers with the cluster, and then shipped the boxes off to the colo facility, with a different network config. I noted the underlay-subnet that lxd init had configured for my network was still looking at my home network and updated it.

$ lxc network edit lxdfan0

then I set the line

fan.underlay_subnet: xxx.xxx.45.0/24

and that seems to have done it. New containers are getting an IP address and the containers are online, by all appearances.