Changing Docker IP Ranges

Docker powers the NetOps platform within Lighthouse. By default, Docker and NetOps utilize the 172.17.0.0/16 and 172.18.0.0/16 subnets. This has the potential to cause collisions inside of some networks.

To avoid this, you can change these settings.

To update Dockers subnet, you need to alter 2 parameters, Docker's default subnet and the NetOps modules subnet. To do so:

  1. Login to the Lighthouse shell CLI as a Lighthouse Administrator or the root user

  2. Ascertain the number of running containers to ensure you select an appropriate subnet size:

sudo docker ps -q | wc -l

  1. Open a config CLI session on the Lighthouse Server and run the following to enter configuration management:

ogconfig-cli

  1. Set the IP Range of the Docker subnet in CIDR format:

set services.nom.default_subnet "10.123.17.1/24"

  1. Set the IP Range of the NetOps subnet in CIDR format:

set services.nom.netops_subnet "10.123.18.0/24"

  1. Push the config to become the running config:

push

  1. Exit the configuration management:

exit

  1. Restart Docker:

sudo /etc/init.d/docker.init restart

  1. Restart the NetOps Module(s):

sudo /etc/init.d/docker.init reset

Note: The network mask selected for these subnets limits the maximum number of containers that can run on Lighthouse. NetOps currently runs up to approximately 10 containers.