Create lxc container with static ip

Can you please confirm how to provide static ip to container with bond1 in IBM metal server

Are you using LXD or LXC?

yes I am using Lxc Lxd

Please show lxc config show <instance> --expanded?

Hi Sir,

I am using IBM metal server(ubuntu20.04) with bond0 and bond1 interface now we have installed lxc without dnsmasq(DHCP) we want to provide static ip through bond0 interface also when we create new container then provide ip manually

So please suggest how to configure lxdbr0 network

image

The lxdbr0 interface provides a internal “managed network”, that is a virtual bridge interface (lxdbr0) and the dnsmasq service listening on it providing DNS and DHCP services to that bridge network.

I’m not clear what it is you’re trying to achieve with regards to the bond interfaces.

But LXD does not support directly setting a static IP on an interface that isn’t a managed network (with the exception of routed and ipvlan NICs), as it uses static DHCP allocations when instances connect to a managed network.

Please can you explain more about what it is you want to achieve.