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

Jäkel, Guido G.Jaekel at dnb.de
Fri Dec 2 08:31:02 UTC 2011


Dear Nishant,

why do you not to use DHCP with a static configurations for this hosts?

If you realy don't rely on DHCP, you may use something like

	lxc-start ... -n $CONTAINERNAME  -s lxc.network.ipv4=193.163.195.${CONTAINERNAME#container}

for the containerN startup.

Guido

>-----Original Message-----
>From: nishant mungse [mailto:nishantmungse at gmail.com]
>Sent: Friday, December 02, 2011 9:11 AM
>To: lxc-users at lists.sourceforge.net; containers at lists.linux-foundation.org
>Subject: [Lxc-users] How assign the IP address of containers sequentially.
>
>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.
>
>Regards,
>Nishant Mungse





More information about the lxc-users mailing list