My understanding is that during the initialisation sequence the modem sends a DHCP request to the CMTS and receives an IP address. When the modem binds to the router, the IP address can be passed to the router.
Incidentally, the CMTS is not located at the headend.
Just as I told it! Well almost. The modem is a DHCP client to the CMTS and receives a local IP address (10.xx). The modem then receives a public routable IP address for use by the router (be it internal or external).
Area CMTSs are located at a hub site (e.g. Reading) or at a headend (e.g. Knowsley). A key function of a headend is to distribute video/TV content to smaller regional headends and hub sites.
For others having trouble - this thread helped me, but actually, I had another issue: I bought the Synology router because it handles WAN failover, and I'd bought and plugged in a 4g router to the secondary WAN port. The Synology router didn't recognise the Virgin router until I'd disabled the secondary WAN and then re-enabled it.