Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using windows 7 as host OS, then I installed linux mint debian as guest OS.

My Windows 7 is using dynamic ip. Here is the setting:

ip: 192.168.1.101
mask: 255.255.255.0
gateway: 192.168.1.1

Currently network adapter in virtualbox is using NAT.

If I want to use static ip in linux guest OS, how to do it?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

If you do want network connection (so access to your LAN) select Bridged Adapter in the VirtualBox settings > Network. On linux you can set the ip in /etc/network/interfaces. When done, reboot the interface with ifdown interface & ifup interface (or service networking restart).

iface *interface* inet static
address *ipaddress*
netmask 255.255.255.0
gateway *gateway*
share|improve this answer
    
I think I found the GUI tool for to do this :) (Menu -> Administration -> Network), pardon for my laziness, once a windows user. I had put the static ip address and subnet mask, but I don't know what value to put for the gateway address. Do you know? –  suud Oct 22 '12 at 10:03
1  
Gateway address is your router IP. –  Jeroen Oct 22 '12 at 10:06
    
so it's same as the windows host OS has? 192.168.1.1 ? –  suud Oct 22 '12 at 10:07
1  
That is correct. –  Jeroen Oct 22 '12 at 10:07
1  
Oh my bad. Posted for CentOS :) Changed it now. –  Jeroen Oct 22 '12 at 10:25
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.