OPS245 Lab 6
Jump to navigation
Jump to search
!!!THIS LAB IS NOT READY YET!!!
The default networking setup in VirtualBox works fine for accessing the internet from guests, but it's not very good for communicating between the guests and the host.
In this lab we'll set up a new virtual network, and a very basic name resolution mechanism.
Basic concepts
Your machine needs these four things configured correctly in order to be able to connect to the internet. Nearly all networking problems you'll run into in this course are due to one of these things being misconfigured:
- IP address. This address is used to connect to anything else on the local network. You'll be using an address on a private subnet, which means that your IP address cannot be used outside your subnet. All communication protocols on the internet work over IP.
- Subnet Mask. No matter which notation you use: the subnet mask does the same thing. It specifies and implies some important technical details about the network you're connected to. Any machines in the same subnet can communicate directly with each other using broadcasts.
- Default gateway. As soon as you want to connect to anything outside your own subnet: you need to go through a gateway. In this course you'll only have one gateway. The gateway is a router which must be inside your subnet.
- DNS server. Provides a service which translates domain names into IP addresses. Though all communication on the internet is done with IP addresses: people are very bad at remembering numbers, so everything is built with the assumption that DNS works.
New network: ops245net
- Use a terminal in your host machine to run this command:If your host is Linux: run that as a regular user, not as root.
VBoxManage natnetwork add --netname ops245net --network "10.2.45.0/24" --dhcp off --enable
- Run
VBoxManage natnetwork list
to check that it worked. - For each of your 4 virtual machines: change their network settings for Adapter 1 from NAT to NAT Network (ops245net).