Interview Prep/Networking/Addressing, CIDR & Routing

A developer's Docker bridge network 172.17.0.0/16 collides with the corporate VPN range. How do you fix it?

IntermediateScenarioAddressing, CIDR & Routing
Answer

Situation read → Docker's default bridge uses 172.17.0.0/16, and anything on the corporate side using that block becomes unreachable from the host.

What I'd do →

  1. Change the default address pool in /etc/docker/daemon.json: {"bip":"172.30.0.1/24","default-address-pools":[{"base":"172.31.0.0/16","size":24}]}
  2. Restart with sudo systemctl restart docker
  3. Recreate compose networks with docker compose down && docker compose up -d
  4. Check with docker network inspect bridge and ip route

Why → The kernel sees the Docker bridge as a directly connected route that wins over the VPN route.

Interview tip → Roll the daemon.json change through your laptop or runner image so it never happens twice.

All Networking questions Roadmap: Networking for DevOps

More on Addressing, CIDR & Routing