hashicorp/vagrant · error
The provided gateway IP address is invalid (%{gateway}). Ple
Error message
The provided gateway IP address is invalid (%{gateway}). Please
provide a valid IP address. What it means
Error "The provided gateway IP address is invalid (%{gateway}). Please provide a valid IP address." thrown in hashicorp/vagrant.
Source
Thrown at plugins/providers/docker/action/prepare_networks.rb:258
while !gateway
gateway = env[:ui].ask(I18n.t(
"docker_provider.network_bridge_gateway_request",
interface: interface,
default_gateway: network_options[:gateway]) + " ",
prefix: false
).strip
if gateway.empty?
gateway = network_options[:gateway]
end
begin
gateway = IPAddr.new(gateway)
if !subnet.include?(gateway)
env[:ui].warn(I18n.t("docker_provider.network_bridge_gateway_outofbounds",
gateway: gateway,
subnet: network_options[:subnet]) + "\n", prefix: false)
end
rescue IPAddr::InvalidAddressError
env[:ui].warn(I18n.t("docker_provider.network_bridge_gateway_invalid",
gateway: gateway) + "\n", prefix: false)
gateway = nil
end
end
gateway.to_s
end
# Request the IP range allowed for use by docker when creating a new
# public network
#
# TODO: When the Vagrant installer upgrades to Ruby 2.5.x,
# remove all instances of the roundabout way of determining a prefix
# and instead just use the built-in `.prefix` method
#
# @param [Hash] network_options Docker scoped networking options
# @param [Socket::Ifaddr] interface The bridge interface used
# @param [Hash] env Local call env
# @return [String] Address rangeView on GitHub (pinned to 35f3160f4a)
When it happens
Trigger: Thrown at plugins/providers/docker/action/prepare_networks.rb:258 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/2dcc49f14f7386ba.
Report an issue: GitHub.