lost internet access when assigning static IP - please help

Discussions about using Windows guests in VirtualBox.
Post Reply
panupat
Posts: 3
Joined: 11. Jan 2011, 14:05
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: windows server 2008

lost internet access when assigning static IP - please help

Post by panupat »

I installed windows server 2008 on virtual box. When I leave everything default, the internet access works fine. I did ipconfig /all and use all the numbers exactly as they are and put them into the IPv4 settings and bam, the network card can no longer connects to the internet

I don't understand. Can anyone help explaining this to me please? >_<;

Also I'm curious, why is the ip address of my windows server 2008 10.0.2.15 while the subnet is still 255.255.255.0?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: lost internet access when assigning static IP - please help

Post by Perryg »

That's because you are using NAT.
If you want this to work and still be able to use the Internet you should use (2) adapters in the guest.
One set to NAT (to be able to get to the Internet) and the other one set to host-only (to be able to see the host)
Or switch to Bridged mode (if you have a router)
panupat
Posts: 3
Joined: 11. Jan 2011, 14:05
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: windows server 2008

Re: lost internet access when assigning static IP - please help

Post by panupat »

Perryg - thank you very much for your reply! I added another adapter as you suggested. Nat, and a host only. Sorry I'm so new to all this IP thing. If I want to assign this guest a static IP, should I do it with the NAT adapter or host-only adapter?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: lost internet access when assigning static IP - please help

Post by Perryg »

Set it on the host-only adapter.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: lost internet access when assigning static IP - please help

Post by BillG »

Why do you want to set a static IP in the guest? Remember that the only thing that you can see through the host only connection is the host OS, so the only static IP which makes any sense is one in the same IP subnet as the host-only interface in the host - ie 192.168.56.0/24 .
Bill
Post Reply