{"record":{"id":"e03615ea2ae6ab05","repo":"hashicorp/vagrant","slug":"you-assigned-a-static-ip-ending-in-1-or-1-to","errorCode":null,"errorMessage":"You assigned a static IP ending in \".1\" or \":1\" to this machine.\nThis is very often used by the router and can cause the\nnetwork to not work properly. If the network doesn't work\nproperly, try changing this IP.","messagePattern":"You assigned a static IP ending in \"\\.1\" or \":1\" to this machine\\.\nThis is very often used by the router and can cause the\nnetwork to not work properly\\. If the network doesn't work\nproperly, try changing this IP\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"plugins/kernel_v2/config/vm.rb","lineNumber":930,"sourceCode":"              end\n\n              fp_used.add(key)\n            end\n\n            if !port_range.include?(options[:host]) || !port_range.include?(options[:guest])\n              errors << I18n.t(\"vagrant.config.vm.network_fp_invalid_port\")\n            end\n          end\n\n          if type == :private_network\n            if options[:type] && options[:type].to_sym != :dhcp\n              if !options[:ip]\n                errors << I18n.t(\"vagrant.config.vm.network_ip_required\")\n              end\n            end\n\n            if options[:ip] && (options[:ip].end_with?(\".1\") || options[:ip].end_with?(\":1\")) && (options[:type] || \"\").to_sym != :dhcp\n              machine.ui.warn(I18n.t(\n                \"vagrant.config.vm.network_ip_ends_in_one\"))\n            end\n          end\n        end\n\n        # Validate disks\n        # Check if there is more than one primary disk defined and throw an error\n        primary_disks = @disks.select { |d| d.primary && d.type == :disk }\n        if primary_disks.size > 1\n          errors << I18n.t(\"vagrant.config.vm.multiple_primary_disks_error\",\n                           name: machine.name)\n        end\n\n        disk_names = @disks.map { |d| d.name }\n        duplicate_names = disk_names.find_all { |d| disk_names.count(d) > 1 }\n        if duplicate_names.any?\n          errors << I18n.t(\"vagrant.config.vm.multiple_disk_names_error\",\n                           name: machine.name,","sourceCodeStart":912,"sourceCodeEnd":948,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/kernel_v2/config/vm.rb#L912-L948","documentation":"During private_network validation, a static IP whose string ends with \".1\" or \":1\" (and whose type is not dhcp) draws this warning. The first address of a subnet conventionally belongs to the router/gateway, so assigning it to a guest very often breaks networking; it is only a warning and the config still validates.","triggerScenarios":"`config.vm.network \"private_network\", ip: \"192.168.33.1\"` or an IPv6 form like `ip: \"fd00::1\"` where options[:type] is not :dhcp.","commonSituations":"Copying the gateway address from router docs into the Vagrantfile; habit of using .1 as a host address; example IPs pasted without editing.","solutions":["Move the address up in the subnet, e.g. 192.168.33.2 or higher for the guest","Switch the network to dhcp (options[:type] = :dhcp) so no static IP is needed and the check is suppressed","Keep the .1/:1 address only if the machine intentionally acts as the router, and accept the warning"],"exampleFix":"# before\nconfig.vm.network \"private_network\", ip: \"192.168.33.1\"\n# after\nconfig.vm.network \"private_network\", ip: \"192.168.33.10\"","handlingStrategy":"type-guard","validationCode":"# Vagrantfile-side check while composing networks\nip = \"192.168.33.1\"\nwarn \"looks like a gateway address\" if ip.end_with?(\".1\") || ip.end_with?(\":1\")","typeGuard":"gateway_like_ip = ->(ip) { ip.to_s.end_with?(\".1\") || ip.to_s.end_with?(\":1\") }","tryCatchPattern":null,"preventionTips":["Assign guests .2 and above within the subnet","Prefer dhcp private networks when the address does not matter","Reserve .1/:1 addresses for router roles only"],"tags":["vagrant","network","private-network","static-ip","gateway"],"backgroundTag":"reserved-ip-address-warning","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}