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 am running Virtual box with two VMs (Debian 6) on Ubuntu 12.04 host. One of the VM is DHCP server and has 3 NICs. One connected to Internet (NAT through Virtualbox) and two NICs are connected to internal networks.

My clients PCs can get IP from DHCP server i.e. VM Debian 6. But how do I get Internet working on them?

here is my configuration.

eth0 - 10.0.2.15 - connected to Internet with NAT (Virtualbox GUI)
eth1 (DHCP) - 192.168.1.x - connected with switch. Client PCs connect to switch.
eth2 - 192.168.2.x - other internal network.

if I add this command, DHCP stops working.

route add -net 192.168.1.0 netmask 255.255.255.0 gw 10.0.2.15 eth0

I am not sure if this is right command. Please Help!

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

thats because you add a route for 192.168.0.0/24 (where ur DHCP! is) to the gateway 10.0.2.15. Means, whenever your dhcp-client tries to DHCPAck to the server located in 192.168.0.0/24, your kernel will send it to 10.0.2.15.

share|improve this answer
    
Thankx. I figured out my mistake :) –  Newbie Oct 11 '12 at 13:02
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.