Page 1 of 1

Fedora 17 Guest Static IP and Internet On Same Interface.

Posted: 18. Nov 2012, 18:11
by AnshumanPT
I am running Oracle Virtual Box Release 4.2.4 on Windows 7 Host.
As a guest OS, I have installed Fedora 17. My Problem is that I want to give a static IP to my Guest OS and enable internet on the same.
I dont want two interfaces on my Guest OS and also I do a lot of SSH to my Guest OS from Host.

Currently I have selected Host Only Adaptor for my guest and assigned a static IP 192.168.56.200 (Which is in range of default DHCP IP provided by Virtual Box).

Due to this every time I reboot the Guest, IP remains the same and thus I can do SSH to that machine. But the internet is not working. Is there any way, i can make internet work on the same interface as well? If Yes, please let me know how is this possible.

Re: Fedora 17 Guest Static IP and Internet On Same Interface

Posted: 18. Nov 2012, 18:15
by Perryg
You can use Bridged if there is a router in the LAN or if not simply add another virtual adapter to the guest set to NAT for Internet connection

Re: Fedora 17 Guest Static IP and Internet On Same Interface

Posted: 18. Nov 2012, 18:24
by AnshumanPT
Bridged I cannot use, as i keep on changing networks (I am on move most of the times).

NAT on another adaptor is a good option, but for that I need another interface on Guest but that I dont want. I want only one interface on my Guest OS.

So, is there any other option I can use Like, modifying the Virtual Box Adaptor to pick up internet feed from my wi-fi adaptor etc.?

Re: Fedora 17 Guest Static IP and Internet On Same Interface

Posted: 18. Nov 2012, 18:31
by Perryg
No.
The host-only gives you the necessary adapter that you need to get to the guest at all times. NAT is simply to allow the Internet and is on a completely different subnet.

The only other way that you could make this work and only have one address on the guest is to use another guest to do the routing for you (pFsense) or ICS from the host.

Re: Fedora 17 Guest Static IP and Internet On Same Interface

Posted: 18. Nov 2012, 18:38
by AnshumanPT
Ok, This very well answers my question. Thanks. The Question can now be marked as closed.

Thanks a lot for your prompt reply and answers.