1. Help & Support
  2. Hyperglance Admin

How To Change The Default Docker Subnet IP Range

By default, Docker uses 172.17.0.0/16. This can conflict with the IP range you use for your cloud subnet. Here's how to update it.

If you're using Docker, then there's a good chance you could join some of the world's largest companies and government agencies that already benefit from Hyperglance.

Features they love include:

  • Automatically document & export your aggregated cloud inventory
  • Search your entire multi-cloud inventory, including its metadata
  • Generate real-time, interactive diagrams of your AWS, Azure and Kubernetes infrastructure

For more information, visit hyperglance.com

 

Step 1

SSH into the Hyperglance Instance/VM.

Step 2

You need to edit /etc/docker/daemon.json:

sudo vi /etc/docker/daemon.json

Add "bip": "172.26.0.1/16" to the JSON, in daemon.json.

The JSON will look like this after you have updated it:


{
"log-driver": "journald",
"log-opts": {
"tag": "{{.Name}}"
},
"bip": "172.26.0.1/16"
}

Step 3

Restart Docker:

sudo systemctl restart docker

Step 4

Check the routing table:

netstat -rn

You should see the following output (note the penultimate row):

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 172.31.16.1 0.0.0.0 UG 0 0 0 eth0
169.254.169.254 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
172.18.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-e9768d205a82
172.26.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.31.16.0 0.0.0.0 255.255.240.0 U 0 0 0 eth0

Once you're done, the docker containers will restart, then begin to collect.