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 selected the bridged adapter, and it would normally work fine when my laptop is connected to my wireless router. I just use the IP address of eth0 resulted from command ifconfig. But this morning, after I failed to authenticate myself to the library's free wifi, I was trying to telnet from my hosting OS to the virtual OS and found that there was no IP address of eth0. I tried configuring an IP address to eth0 using command sudo ifconfig eth0 x.x.x.x and setting an IP(which was in the same subnet as the previous one) to the hosting OS as well. But after all this, it still won't work. Is it because a switch or router is needed to assign IP addresses to the interfaces?

share|improve this question
add comment

2 Answers 2

When using Bridged mode, Yes you need to be connected. Since all traffic is bridged over the Physical Adapter.

To make it work when not connected use a NAT connection or HostOnly. Disadavantages of both are that other computers on the physical network cannot access the machine. However when using NAT you can add Port Forwards from your local machine to the virtual machine.

I hope this helps

Kind regards,
Jochen.

share|improve this answer
    
I thought that only Bridged mode could be used to connect two systems... But how could I configure it, do I have to configure a static ip address for both systems? –  xczzhh Jul 25 '12 at 13:52
    
Bridged mode lets the VM and the host communicate with each other (and the outside world), and it lets outside systems (other computers) access the VM. NAT lets the VM and the host communicate with each other, and allows the VM to communicate out. You do not need to fiddle with the interfaces file - VB will setup the network for you, once you select NAT as the interface type. –  Tom Aug 8 '12 at 20:16
    
Oops, that's not quite right. You need HostOnly to let the VM talk to the host. I don't need outside systems (or even other VMs) to access my VMs, so I create both a NAT interface and a HostOnly interface. –  Tom Aug 8 '12 at 20:25
add comment

In bridged mode, to work without a router/DHCP server, you need to assign a static IP to the guest within the same subnet as the host (and no conflicts!!)

Use Network Manager to do that on Ubuntu Desktop -- the old CLI network config commands (ifconfig, resolv.conf, etc.) are often overridden by the Net manager before they can take effect.

share|improve this answer
    
I am using the Ubuntu server version... I have tried configuring the ip address by editing the file: /etc/network/interfaces. Still not working :P –  xczzhh Jul 25 '12 at 13:49
add 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.