Page 1 of 1
simulate a manually configuration between 2 virtual machines
Posted: 8. Mar 2014, 12:23
by andreww
Well monday or tuesday i have to setup an ubuntu server(a real one). I have to setup to setup a dhcp for lan from the guide.
Code: Select all
# minimal sample /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.150 192.168.1.200;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.example";
}
Until i do that i want to simulate a manually configuration between 2 virtual machines(one is ubuntu server 12.04 and the second is windows xp or 7). Is this possible?
Re: simulate a manually configuration between 2 virtual mach
Posted: 9. Mar 2014, 16:06
by andreww
Well, i changed my mind, i don't want any manually configuration.
I have installed on my host machine arch linux, and i have 2 virtual guests machines installed (like i said): an ubuntu server 12.04 and an windows xp.
For ubuntu I setup 2 adapters, the firs one is a NAT(which works) and the second is an internal network(to connect to windows xp, but doesn't work). On the windows machine the only adapter is setup to be internal network.
Ubuntu eth0: inet addr 10.0.2.15 mask 255.255.255.0
eth1: there is no inet(only inet6)
/etc/network/interfaces
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
/etc/dhcp/dhcpd.conf
subnet 10.0.2.0 netmask 255.255.255.0 {
range 10.0.2.16 10.0.2.20;
}
I realy hope someone could give an advice..
p.s.I know... my english and the way I presented the problem are terrible.
Re: simulate a manually configuration between 2 virtual mach
Posted: 9. Mar 2014, 16:25
by Perryg
The internal adapter will not communicate with the host. It is designed to connect guest-to-guest.
See chapter 6 in your VirtualBox user manual
Re: simulate a manually configuration between 2 virtual mach
Posted: 9. Mar 2014, 16:54
by andreww
Perryg wrote:The internal adapter will not communicate with the host. It is designed to connect guest-to-guest.
See chapter 6 in your VirtualBox user manual
Yes, i want to connect these 2 guets.
Re: simulate a manually configuration between 2 virtual mach
Posted: 9. Mar 2014, 17:20
by Perryg
OK so the first guest would have two virtual adapters and the second one would have just one.
First guest:
Set one to NAT so it can get to the Internet.
Set the second one to internal. ( you will need to define the address for each adapter other than the NAT )
Also remember to not set a gateway on this guests internal adapter.
Be sure to keep the address schemes different. Don't use 10.0.2.* on the internal.
If you set your dhcp server properly you should be able to get an address on the second guest using dhcp, if not set it manually.
Re: simulate a manually configuration between 2 virtual mach
Posted: 9. Mar 2014, 18:35
by andreww
Perryg wrote:OK so the first guest would have two virtual adapters and the second one would have just one.
First guest:
Set one to NAT so it can get to the Internet.
Set the second one to internal. ( you will need to define the address for each adapter other than the NAT )
Also remember to not set a gateway on this guests internal adapter.
Be sure to keep the address schemes different. Don't use 10.0.2.* on the internal.
If you set your dhcp server properly you should be able to get an address on the second guest using dhcp, if not set it manually.
I chose an ip static and it works, thanks.

Re: simulate a manually configuration between 2 virtual mach
Posted: 9. Mar 2014, 18:44
by andreww
andreww wrote:Perryg wrote:OK so the first guest would have two virtual adapters and the second one would have just one.
First guest:
Set one to NAT so it can get to the Internet.
Set the second one to internal. ( you will need to define the address for each adapter other than the NAT )
Also remember to not set a gateway on this guests internal adapter.
Be sure to keep the address schemes different. Don't use 10.0.2.* on the internal.
If you set your dhcp server properly you should be able to get an address on the second guest using dhcp, if not set it manually.
I chose an ip static and it works, thanks.

false alarm, i was pinging the windows ip from ubuntu and it worked but the way around...not

Re: simulate a manually configuration between 2 virtual mach
Posted: 9. Mar 2014, 18:56
by andreww
So the static ip for the eth1 is 10.0.3.1 it works when I ping to this ip from ubuntu, but if i ping 10.0.2.15(ubuntu ip) from windows it doesn't work.
Re: simulate a manually configuration between 2 virtual mach
Posted: 9. Mar 2014, 19:04
by Perryg
Then you need to configure your routing. Different subnets require routers.
This of course is not within the scope of this forum.
Hint: for Linux look up IP tables.
Re: simulate a manually configuration between 2 virtual mach
Posted: 9. Mar 2014, 21:40
by andreww
Perryg wrote:Then you need to configure your routing. Different subnets require routers.
This of course is not within the scope of this forum.
Hint: for Linux look up IP tables.
Ok, maybe i'm not so good with ip..i did try 10.0.2.16 with 255.255.255.0 or even 10.0.2.129 with 255.255.255.128, what ip should i use?