0

I am new in networking and virtualization. I really need assistance on this problem.

I have a scenario: there are 4 virtual machines that created through VirtualBox on WIN7 Host. 2 of them are centos, 1 of them is windows xp, and 1 of them is windows 2008 server. I created and installed all of them on VirtualBox on my WIN7 physical pc.

It is expected that only the windows 2008 server has external internet connection, and other 3 virtual machine will use it to access internet.

I searched on adapter logic (NAT, Bridged, Internal, Host-Only) but didn't get it. How should I select the adapters of VMs to do that? Thanks for help.

2
  • Why can't the host have the internet connection and all the over vm's access the internet through that interface wouldn't it be easier ?
    – MohyedeenN
    Commented Jan 3, 2014 at 11:37
  • you are right but this is my class project and expected to be work this way.
    – smtnkc
    Commented Jan 3, 2014 at 11:43

1 Answer 1

0

Server config:

One interface is Internet WAN, using either NAT or Bridged with the phsycial pc ethernet interface. Let's say you choose Bridged, which means your server VM will get ip from internet router dhcp, for example 192.168.1.5.

2nd interface is Internal LAN, for example using ip address 10.10.10.1/24.

Make sure the default route is pointing to the 1st Internet Interface.

Client config:

One interface using same Internal LAN as server vm, for example ip 10.10.10.2/24.

Make sure default route is pointing to this Internal LAN interface.

Internet Gateway Router config:

Configure a static route to the Internal LAN 10.10.10.0/24 pointing to 192.168.1.5, so that router knows that this LAN is sitting behind your Physical PC.

What about NAT ?

If you choose the 1st server vm interface to use NAT, then it will get ip address from virtualbox dhcp, for example 172.16.1.2, and any traffic will be NATTed to the original physical pc ip address it got from the internet router dhcp, for example 192.168.1.2. This means when using NAT, all the VMs will appear to the internet router as if they were originated by the physical PC. In this case you do not need to add a route to your internet router.

12
  • thanks, how do i "Make sure the default route is pointing to the 1st Internet Interface" ?
    – smtnkc
    Commented Jan 3, 2014 at 11:32
  • run "route print" on windows command prompt or "route -n" on linux, and look for the destination of 0.0.0.0/0. or a quicker way would try to ping any website, if ping works, then you should be ok
    – aseaudi
    Commented Jan 3, 2014 at 12:09
  • I can ping a website or a client (10.10.10.2) from Server (192.168.1.8), but cannot ping a website from XP client. I am taking Ping request could not find host google.com. Please check the name and try again. error. Please look at my cmd screens
    – smtnkc
    Commented Jan 3, 2014 at 12:41
  • the gateway on the xp client should be 10.10.10.1, i.e. pointing to the server 2nd Internal LAN Interface.
    – aseaudi
    Commented Jan 3, 2014 at 12:50
  • Ok, i did it but still gives same error: SCREENSHOT
    – smtnkc
    Commented Jan 3, 2014 at 13:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .