OPS245 Lab 6: Difference between revisions

From Littlesvr Wiki
Jump to navigation Jump to search
Line 14: Line 14:
= New network: ops245net =
= New network: ops245net =


* Use a terminal in your host machine to run this command:<syntaxhighlight lang="bash">VBoxManage natnetwork add --netname ops245net --network "10.2.45.0/24" --enable</syntaxhighlight>
* Use a terminal in your host machine to run this command:<syntaxhighlight lang="bash">VBoxManage natnetwork add --netname ops245net --network "10.2.45.0/24" --dhcp off --enable</syntaxhighlight>If your host is Linux: run that as a regular user, not as root.
* Run <code>VBoxManage natnetwork list</code> to check that it worked.
* Run <code>VBoxManage natnetwork list</code> 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).
* For each of your 4 virtual machines: change their network settings for Adapter 1 from NAT to NAT Network (ops245net).


[[File:NatNetwork.png|800px|border|center]]
[[File:NatNetwork.png|800px|border|center]]

Revision as of 18:00, 10 March 2023

!!!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:

  1. 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.
  2. 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.
  3. 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.
  4. 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:
    VBoxManage natnetwork add --netname ops245net --network "10.2.45.0/24" --dhcp off --enable
    
    If your host is Linux: run that as a regular user, not as root.
  • 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).
NatNetwork.png