How to assign public ip to the container of centos where ubuntu focal as hypervisor

Right I see now, thanks.

By the way, do you know about the ipv4.routes setting on the lxdbr0 network, you can add your 51.195.168.16/28 subnet to that and LXD will automatically re-create the static route you are currently manually adding, so you won’t have to run the ip -4 route add 51.195.168.16/28 dev lxdbr0 command on each start up.

lxc network set <network name> ipv4.routes=<subnet CIDR>

See https://linuxcontainers.org/lxd/docs/master/networks#network-bridge

Back to your main question, how to configure CentOS to use the external IP.

In CentOS 8, this should configure the network how you want:

nmcli connection down "System eth0"
nmcli connection modify "System eth0" IPv4.address 51.195.168.24/28
nmcli connection modify "System eth0" IPv4.method manual
nmcli connection modify "System eth0" IPv4.gateway 10.192.120.1
nmcli connection modify "System eth0" IPv4.dns 10.192.120.1
nmcli connection up "System eth0"