Network

Setup

To allow the Windows host to connect to the Linux guest operating system:

Host Setup (Windows)

  • Create a new virtual machine (see Getting Started).

  • Click on Network to configure network settings for your VM

  • In the latest installation I did, I just selected Bridged Adapter, and everything just worked!

    Note: On Virtual Box 2.2.0, I wanted to created a Debian virtual machine which could access the internet AND I could connect to using putty. The only way I could get this working was with a Bridged Network (had to Repair the Virtual Box install before I could select a Bridged Network Adpater.

    Note: Don’t think we need the following instructions any more…

    • Add a new host interface by click the add button next to the Host Interfaces select box. Name it anything you like.

    • Change the Attached to option to Host Interface. Choose your new host interface in the Interface name option.

      Network Settings
      ../../images/howto/virtual-box/network-settings.gif
      
    • This will create a virtual interface TAP adapter in the Windows Network Connections.

    • Go to the Windows Network Connections. Highlight your main connection and the new virtual interface, right click and choose Bridge Connections.

      Network Connections
      ../../images/howto/virtual-box/network-connections.gif
      

      This is how the network connections screen looks after the bridge is set-up:

      Network Connections
      ../../images/howto/virtual-box/network-connections-result.gif
      

      Now all packets sent to or from the virtual interface will be routed through your main network connection.

    Now to set up the client:

Guest Setup (Linux)

  • Start the virtual machine with Ubuntu Installed (Debian in my case).

  • Make sure ssh is installed (../linux/debian/install).

  • Restart the network

    /etc/init.d/networking restart
    
  • Test

    ifconfig
    

    …(we should see the address set in the /etc/network/interfaces file)… but we don’t… but the address we see is the one to use…

Issues

eth0

http://www.debianhelp.org/node/2432

I was not sure eth0 existed, so I browsed for allow-hotplug and found the above article. When I ran:

dhclient eth0

…the message makes me think that eth0 does not exist. When I ran:

dhclient eth1

…the network burst into life…