{"record":{"id":"cd935033035d6fc1","repo":"AdguardTeam/AdGuardHome","slug":"range-end-v-is-outside-network-v","errorCode":null,"errorMessage":"range end %v is outside network %v","messagePattern":"range end (.+?) is outside network (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/dhcpd/config.go","lineNumber":236,"sourceCode":"\tif c.ipRange.contains(gatewayIP.AsSlice()) {\n\t\treturn fmt.Errorf(\n\t\t\t\"gateway ip %v in the ip range: %v-%v\",\n\t\t\tgatewayIP,\n\t\t\tc.RangeStart,\n\t\t\tc.RangeEnd,\n\t\t)\n\t}\n\n\tif !c.subnet.Contains(rangeStart) {\n\t\treturn fmt.Errorf(\n\t\t\t\"range start %v is outside network %v\",\n\t\t\tc.RangeStart,\n\t\t\tc.subnet,\n\t\t)\n\t}\n\n\tif !c.subnet.Contains(rangeEnd) {\n\t\treturn fmt.Errorf(\n\t\t\t\"range end %v is outside network %v\",\n\t\t\tc.RangeEnd,\n\t\t\tc.subnet,\n\t\t)\n\t}\n\n\treturn nil\n}\n\n// V6ServerConf - server configuration\ntype V6ServerConf struct {\n\t// Logger is used for logging the operation of the DHCPv6 server.  It must\n\t// not be nil.\n\tLogger *slog.Logger `yaml:\"-\" json:\"-\"`\n\n\tEnabled       bool   `yaml:\"-\" json:\"-\"`\n\tInterfaceName string `yaml:\"-\" json:\"-\"`\n","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/AdguardTeam/AdGuardHome/blob/b41aefbe51c8dde65e2c50f093996afa0502edf9/internal/dhcpd/config.go#L218-L254","documentation":"Validation found that range_end is not contained within the configured subnet (CIDR). The top of the dynamic lease pool must be inside the interface's network.","triggerScenarios":"Setting range_end outside the interface subnet, e.g. using 192.168.1.255 (broadcast) with a /16-unrelated mask or an address in a different subnet, then calling Create.","commonSituations":"Using .255 as range end with a /24 (also conflicts with broadcast), subnet changes after range was configured, copy-paste errors.","solutions":["Set range_end inside the subnet and below the broadcast address (e.g. .254 for /24)","Check subnet_mask matches the interface network","Re-apply config"],"exampleFix":"# before\nsubnet_mask: 255.255.255.0\nrange_end: 192.168.5.254\n# after\nsubnet_mask: 255.255.255.0\nrange_end: 192.168.0.254","handlingStrategy":"validation","validationCode":"if !subnet.Contains(rangeEnd) { return fmt.Errorf(\"range_end %v outside subnet\", rangeEnd) }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Avoid .255 (broadcast) as range end on /24","Validate entire range at config-build time"],"tags":["dhcp","subnet","range","validation"],"backgroundTag":"dhcp-range-outside-subnet","analyzedSha":"b41aefbe51c8dde65e2c50f093996afa0502edf9","analyzedAt":"2026-08-27T04:57:55.097Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}