hashicorp/vagrant · warning
You assigned a static IP ending in ".1" or ":1" to this mach
Error message
You assigned a static IP ending in ".1" or ":1" to this machine. This is very often used by the router and can cause the network to not work properly. If the network doesn't work properly, try changing this IP.
What it means
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.
Source
Thrown at plugins/kernel_v2/config/vm.rb:930
end
fp_used.add(key)
end
if !port_range.include?(options[:host]) || !port_range.include?(options[:guest])
errors << I18n.t("vagrant.config.vm.network_fp_invalid_port")
end
end
if type == :private_network
if options[:type] && options[:type].to_sym != :dhcp
if !options[:ip]
errors << I18n.t("vagrant.config.vm.network_ip_required")
end
end
if options[:ip] && (options[:ip].end_with?(".1") || options[:ip].end_with?(":1")) && (options[:type] || "").to_sym != :dhcp
machine.ui.warn(I18n.t(
"vagrant.config.vm.network_ip_ends_in_one"))
end
end
end
# Validate disks
# Check if there is more than one primary disk defined and throw an error
primary_disks = @disks.select { |d| d.primary && d.type == :disk }
if primary_disks.size > 1
errors << I18n.t("vagrant.config.vm.multiple_primary_disks_error",
name: machine.name)
end
disk_names = @disks.map { |d| d.name }
duplicate_names = disk_names.find_all { |d| disk_names.count(d) > 1 }
if duplicate_names.any?
errors << I18n.t("vagrant.config.vm.multiple_disk_names_error",
name: machine.name,View on GitHub (pinned to 35f3160f4a)
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
Example fix
# before config.vm.network "private_network", ip: "192.168.33.1" # after config.vm.network "private_network", ip: "192.168.33.10"
Defensive patterns
Strategy: type-guard
Validate before calling
# Vagrantfile-side check while composing networks
ip = "192.168.33.1"
warn "looks like a gateway address" if ip.end_with?(".1") || ip.end_with?(":1") Type guard
gateway_like_ip = ->(ip) { ip.to_s.end_with?(".1") || ip.to_s.end_with?(":1") } Prevention
- 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
When it happens
Trigger: `config.vm.network "private_network", ip: "192.168.33.1"` or an IPv6 form like `ip: "fd00::1"` where options[:type] is not :dhcp.
Common situations: Copying the gateway address from router docs into the Vagrantfile; habit of using .1 as a host address; example IPs pasted without editing.
Related errors
- There was an error while downloading the metadata for this b
- Vagrant failed to load a configured plugin source. This can
- The Vagrant Cloud server is not currently accepting connecti
- The Docker provider is unable to connect the container to th
- The Docker provider was unable to configure networking using
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/e03615ea2ae6ab05.
Report an issue: GitHub.