If you’ve ever tried to create a custom Docker network and hit the dreaded Error response from daemon: numerical result out of range, you’re not alone. At first glance, this error looks like an IPv6 misconfiguration : bad subnet, invalid gateway, or wrong sysctl.
But the real cause might surprise you. 👇
🛑 The Initial Problem
When starting our stack, Docker failed to create the custom IPv6 network with this error:
failed to create network wikitwist-ipv6-net:
Error response from daemon: numerical result out of range
At first it seemed related to IPv6 settings subnet or gateway issues but that wasn’t the case.
🔍 The Real Root Cause
The issue was not IPv6 at all. The culprit was the bridge interface name length. In our Docker Compose config, we had:
com.docker.network.bridge.name: "br-short-ipv6"
Linux only allows 15 characters for network interface names. br-wikitwist-ipv6
was too long, so the kernel rejected it. Docker then surfaced the vague “numerical result out of range” error.
✅ How to Fix It
The resolution is simple: shorten the bridge name to 15 characters or less, or let Docker auto-generate one. For example:
com.docker.network.bridge.name: "br-lc-v6" # 9 chars, valid
Alternatively, remove the setting and Docker will automatically assign a valid br-xxxxx
name.
📌 Key Takeaways
- The error had nothing to do with IPv6 subnets or sysctls.
- It was caused by a Linux interface name length limit (15 characters max).
- Renaming the bridge fixed the problem immediately.