Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need to set up local network between Ubuntu Server 11.04 in VirtualBox and my 11.04 desktop. Best of all would be 127.0.0.1 for main, and 192.168.0.100 for virtulal machine.

My ifconfig -a

    eth0      Link encap:Ethernet  HWaddr 00:19:66:71:33:00  
          inet addr:192.168.0.243  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::219:66ff:fe71:3300/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3397254 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1973637 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4291602479 (4.2 GB)  TX bytes:141489577 (141.4 MB)
          Interrupt:40 Base address:0xc000 

lo        Link encap:Локальная петля (Loopback)  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:124 errors:0 dropped:0 overruns:0 frame:0
          TX packets:124 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:19528 (19.5 KB)  TX bytes:19528 (19.5 KB)

vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
share|improve this question
    
That doesn't make 100% sense. 127.0.0.1 is localhost, which every machine has, but you won't be able to access other machines from it. You can make your virtual machine 192.168.0.100, but you will need your desktop to be in the 192.168.0.x range as well. –  tgm4883 Jul 20 '11 at 12:05
    
I haven't think about it. 192.168.0.1 will be great. –  NiLL Jul 20 '11 at 13:51

2 Answers 2

In Virtualbox you can have a number of network configurations. If you want two virtual machines to be part of a private network you set the network properties of both virtual machines to internal. Only these machines will be able to talk to each other. I've done this when I needed to setup a prototype, and I wanted to make very certain it wouldn't introduce unpredictable issues onto the actual network.

If you want the host and guest to appear on the same network, you will need to setup the VM in bridged mode. The VM will pull an IP from the network's DHCP server and not the local DHCP server. Hope that helps.

share|improve this answer

You should make sure that your home router isn't using 192.168.0.1 as it's IP address. You could inadvertently take down your home network with duplicate IP's.

share|improve this answer

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.