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:
-
Login to the Lighthouse shell CLI as a Lighthouse Administrator or the root user
-
Ascertain the number of running containers to ensure you select an appropriate subnet size:
sudo docker ps -q | wc -l
-
Open a config CLI session on the Lighthouse Server and run the following to enter configuration management:
ogconfig-cli
-
Set the IP Range of the Docker subnet in CIDR format:
set services.nom.default_subnet "10.123.17.1/24"
-
Set the IP Range of the NetOps subnet in CIDR format:
set services.nom.netops_subnet "10.123.18.0/24"
-
Push the config to become the running config:
push
-
Exit the configuration management:
exit
-
Restart Docker:
sudo /etc/init.d/docker.init restart
-
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.