General Vagrant doc page: Public Networks.
Public networking by the Parallels provider is fully compatible with the basic Vagrant approach.
In order to implement a public network, the Parallels provider configures a Bridged network.
The easiest way to use a public network is to allow the IP address to be assigned via DHCP. Use the following syntax to define a public network:
Vagrant.configure("2") do |config| config.vm.network "public_network" end
When DHCP is used, the IP address can be determined by using
vagrant ssh to
SSH into the machine and using the appropriate command-line tool to find the
address, such as
Default Network Interface
If more than one network interface is available in the host machine, Vagrant
will ask you to choose which interface the virtual machine should bridge to. A
default interface can be specified by adding a
bridge clause to the network
Vagrant.configure("2") do |config| config.vm.network "public_network", bridge: "en1" end
The string identifying the desired interface must match either the name or identifier of an available interface. If it can't be found, Vagrant will ask you to pick the one from a list of available network interfaces.
It is also possible to specify a list of adapters to bridge against:
config.vm.network "public_network", bridge: ["en1", "en6"]
In this case, Vagrant will use the first network adapter which exists and can be used as a bridge.