Page 1 of 1

VBox and Ubuntu... Ping to gateway doesn't work.

Posted: 21. Oct 2009, 23:53
by saber88
Hi everyone,

I'm a French student, so my english could be a little bit bad :oops:

I have a project of virtual networking with VirtualBox :D
It is a very nice project, however problems started :(

Host: Vista64
Guests: Ubuntu 9.04

Here is my problem:

User(192.168.56.3) ----- (192.168.56.4) (server) (DHCP 192.168.1.21) ----- NeufTelecom Router (192.168.1.1)

I added routes in Ubuntu User virtual machine. I can ping the server 192.168.56.4, and I can ping 192.168.1.21. But when I try to ping 192.168.1.1, it doesn't work :(
I can access 192.168.1.1 from the server, so I have access to the internet.

Here is my route table:

For User:
Destination Passerelle Genmask Indic Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth4
192.168.1.0 default.local 255.255.255.0 UG 0 0 0 eth4
192.168.56.0 * 255.255.255.0 U 0 0 0 eth4
192.168.56.0 * 255.255.255.0 U 0 0 0 eth4
link-local * 255.255.0.0 U 1000 0 0 eth4
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth4
default default-2.local 0.0.0.0 UG 0 0 0 eth4
default default.local 0.0.0.0 UG 100 0 0 eth4

Maybe some routes are wrong, but Linux test every routes, and if I can ping the 192.168.1.21, the route to 192.168.1.0 is working I think.

In VirtualBox, all Ethernet interfaces are Private hosts, on the same Private host controller. Maybe I'm wrong?

Thanks for help :)

Re: VBox and Ubuntu... Ping to gateway doesn't work.

Posted: 22. Oct 2009, 00:15
by Perryg
Have you tried to use Bridged mode in the guests since you have a router?
Then you should not need to setup routing routines.

Re: VBox and Ubuntu... Ping to gateway doesn't work.

Posted: 22. Oct 2009, 00:30
by saber88
I tried to change to Mac Bridge, but it doesn't work. (I chose this option for every guests, is this ok?)

The aim of what I try is to have static IP for each guests, I must use IP which I wrote above. Does the bridge let me setup a static IP, I mean will the Internet will be routed by the server? Or the Internet will come directly from the hardware Ethernet?

Re: VBox and Ubuntu... Ping to gateway doesn't work.

Posted: 22. Oct 2009, 00:39
by Perryg
No not if they are not in the same range as the router.
So all of the guest must be as you stated. Does the Host?
Or can the host be in the same range as the guest?
The reason I ask is you can set the guests up for host-only and then set the address range in the VBox Program to be what you are needing and set the VBox dhcp router up there.
Then if you need the Internet on the guests you can setup a second adapter set to NAT to do that.
Of course this all depends on exactly what they are wanting you to do.

Re: VBox and Ubuntu... Ping to gateway doesn't work.

Posted: 22. Oct 2009, 00:47
by saber88
I set up a bridge between VBox host-only controller and my host network connection. The IP of the host (bridge) is 192.168.1.25. I can ping it with my server, as the router.

I need static IPs because if, for example, I need to make a webserver with the guest user, the IP must be the same in order that we can connect from outside, I have to set up a NAT rule in my router, so I need a static IP.

This is my teacher who did this diagram, that's why I want to respect it.

Re: VBox and Ubuntu... Ping to gateway doesn't work.

Posted: 31. Oct 2009, 03:13
by rodrigolopezguerra
I m spanish , so my english will not be any better than yours ! (you can t image my TERRIBLE french LoL)
1) You need connectivity with internet? if not , you can just set an internal network and define all the virtual machines under the same network.
2) If you need it , you can let the server as proxy , and conect thought another interface (Eth1 for example) to the internal machines.

If you need further help , PM for mail.

Au revoir
A bientot!