上QQ阅读APP看书,第一时间看更新
Configuring a network for VirtualBox virtual machines
Some of our training scenarios will require you to simulate creating a connection to a remote server. You would do this by using your host machine to connect to a virtual machine. When you first create a virtual machine on VirtualBox, the networking is set to NAT mode. In order to connect to the virtual machine from the host, you'll need to set the virtual machine's network adapter to Bridged Adapter mode. Here's how you can do this:
- Shut down any virtual machines that you've already created.
- On the VirtualBox Manager screen, open the Settings dialog for a virtual machine.
- Click the Network menu item, and change the Attached to setting from NAT to Bridged Adapter, as shown in the following screenshot:
- Expand the Advanced item, and change the Promiscuous Mode setting to Allow All, as shown in the following screenshot:
- Restart the virtual machine and set it to use a static IP address.
If you assign static IP addresses from the high end of your subnet range, it will be easier to prevent conflicts with low-number IP addresses that get handed out from your internet gateway.