General Questions + Networking Problem

Discussions related to using VirtualBox on Windows hosts.
Post Reply
VMNOOB
Posts: 7
Joined: 1. Jun 2015, 20:49

General Questions + Networking Problem

Post by VMNOOB »

First question (basic): I have Linux Ubuntu 64 but installed as a virtual machine in virtual box... does that make it a Linux Guest?

My actual problems stems from the fact that when I change the network adapter from NAT to Bridged, I have no internet access on my Ubuntu VM. Does it have to do anything with a difference between windows and linux drivers/network cards? When I type /sbin/ifconfig in terminal on Ubuntu after setting it to bridged, I get no inet addr for eth0, instead I have:
Link encap
inet6 addr: fe80::a00...
UP BROADCAST RUNNING MULTICAST...
RX packets:0 errors:0...
TX packets:24 errors:0...
collisions:0
RX bytes:540

*The "..." are not actually there the line goes on to say more stuff.

Working as an intern and the project I'm working on requires 2 VMs in a network so I can ping them.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: General Questions + Networking Problem

Post by Perryg »

Was/Were the guest/s shut down when you changed from NAT to bridged?

Do you have a router or some other device that hands out DHCP leases?

Oh and yes if the guest is Linux then it would be called a Linux guest.
VMNOOB
Posts: 7
Joined: 1. Jun 2015, 20:49

Re: General Questions + Networking Problem

Post by VMNOOB »

Perryg wrote:Was/Were the guest/s shut down when you changed from NAT to bridged?

Do you have a router or some other device that hands out DHCP leases?
I close down the guest(s) before I change from NAT to Bridged.
Also, I am working right now in a University on WiFi so maybe that could be the problem? On NAT the public IP addresses from (whatismyipaddress website) are the same on guest and host. I don't see an eth0 inet addr when I type /sbin/ifconfig in terminal on the guest.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: General Questions + Networking Problem

Post by Perryg »

Using NAT you will not be able to see guest-to-guest communications. You can however add a second adapter to each guest set to host-only and they should work. Use the Internal adapter if you do not want the host involved but the latter will require you specifying the IP information unless you want to add a DHCP server for that. You can see all of this in the users manual under virtual networking.
VMNOOB
Posts: 7
Joined: 1. Jun 2015, 20:49

Re: General Questions + Networking Problem

Post by VMNOOB »

Is there any reason for Bridged Adapter not allowing internet access? I'm trying to create two machines with distinct I.P. Addresses so that they can communicate with each other on a network.

Also will the public IP address (obtained from whatismyipaddress website) always be the same on host and guest?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: General Questions + Networking Problem

Post by Perryg »

That is impossible for anyone to answer without knowing about your LAN and its configuration.
VMNOOB
Posts: 7
Joined: 1. Jun 2015, 20:49

Re: General Questions + Networking Problem

Post by VMNOOB »

I am connected to a router using WiFi on my laptop
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: General Questions + Networking Problem

Post by Perryg »

Then the issue is probably with your router. Some wifi access points have special security that prevent your guest/s from getting an address from the built in DHCP server. Plus it could be blocking your guests via an internal firewall. Like I said hard to tell. As for the whatsmyip address it will always be the public address since it has no way of dealing with private addresses which is what you have on your local LAN.
VMNOOB
Posts: 7
Joined: 1. Jun 2015, 20:49

Re: General Questions + Networking Problem

Post by VMNOOB »

But if I connect via Ethernet directly, same problem.

The only way internet works is if I enable another NAT adapter.

Is there any other way I can get the VM's to have two distinct IPs and be able to communicate with each other?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: General Questions + Networking Problem

Post by Perryg »

I described that in my second post. Use the host-only adapter as a second adapter on each guest. See chapter 6 in your users manual.
Post Reply