AdguardTeam/AdGuardHome · error

range start %v is outside network %v

Error message

range start %v is outside network %v

What it means

Validation found that range_start is not contained within the configured subnet (CIDR). DHCPv4 requires the dynamic pool to be inside the interface's network.

Source

Thrown at internal/dhcpd/config.go:228

	c.ipRange, err = newIPRange(rangeStart.AsSlice(), rangeEnd.AsSlice())
	if err != nil {
		// Don't wrap the error since it's informative enough as is and there is
		// an annotation deferred already.
		return err
	}

	if c.ipRange.contains(gatewayIP.AsSlice()) {
		return fmt.Errorf(
			"gateway ip %v in the ip range: %v-%v",
			gatewayIP,
			c.RangeStart,
			c.RangeEnd,
		)
	}

	if !c.subnet.Contains(rangeStart) {
		return fmt.Errorf(
			"range start %v is outside network %v",
			c.RangeStart,
			c.subnet,
		)
	}

	if !c.subnet.Contains(rangeEnd) {
		return fmt.Errorf(
			"range end %v is outside network %v",
			c.RangeEnd,
			c.subnet,
		)
	}

	return nil
}

// V6ServerConf - server configuration

View on GitHub (pinned to b41aefbe51)

Solutions

  1. Set range_start to an address inside the interface subnet
  2. Verify subnet_mask matches the actual network
  3. Re-apply config

Example fix

# before
subnet_mask: 255.255.255.0
range_start: 192.168.2.10
# after
subnet_mask: 255.255.255.0
range_start: 192.168.0.10
Defensive patterns

Strategy: validation

Validate before calling

if !subnet.Contains(rangeStart) { return fmt.Errorf("range_start %v outside subnet", rangeStart) }

Prevention

When it happens

Trigger: Setting range_start outside subnet_mask/interface subnet, e.g. subnet 192.168.0.0/24 with range_start 192.168.1.10, then calling Create.

Common situations: Subnet mask changed on the interface but DHCP range not updated; typos in the third octet; mixing /24 and /16 conventions.

Related errors


AI-assisted analysis of AdguardTeam/AdGuardHome@b41aefbe51 (2026-08-27). Data as JSON: /api/errors/510378588ab5f987. Report an issue: GitHub.