[Lxc-users] How assign the IP address of containers sequentially.

Gordon Henderson gordon at drogon.net
Fri Dec 2 08:23:27 UTC 2011


On Fri, 2 Dec 2011, nishant mungse wrote:

> Hi,
>
> I want the ip address to be assigned in order as the containers are started
> and not assigned by DHCP. For example :: container1::
> 193.163.195.01,container2:: 193.163.195.02 like wise if there is
> container30 :: 193.163.195.30, this should be its ip address.
>
> What are changes that are to done in *conf file of lxc* so as to get this
> kind of address?
>
> Plz help me ASAP.

According to the file manual

   man lxc.conf

you set lxc.network.ipv4 to the IP address and network prefix.

e.g.

   lxc.network.ipv4 = 193.163.195.1/24

Gordon







More information about the lxc-users mailing list