I have to create my own network between three virtual machines. One would be the machine that will act as the host and the rest will be connected to it.
The three virtual machines that I have to connect are:
- Windows Server 2008 (host)
- Windows 7
- Ubuntu 14.04
I was able to connect Windows 7 virtual machine with Windows Server 2008 and have connection to Internet in both of them but I am getting troubles with the last one.
I have to use the following configuration:
Windows 7 Ubuntu Windows Server
IP 192.168.1.3 192.168.1.4 192.168.1.5
Subnet mask 255.255.255.0 255.255.255.0 255.255.255.0
Gateway 192.168.1.1 192.168.1.1 192.168.1.1
Main DNS 192.168.1.5 192.168.1.5 127.0.0.1
Secondary DNS 8.8.8.8 8.8.8.8 8.8.8.8
On Ubuntu virtual machine is where I am getting problems so I am going to describe the process that I use to configure the network on it.
I have used the following command to configure the interface:
sudo nano /etc/network/interfaces
and I have edited the file as follows:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.4
netmask 255.255.255.0
gateway 192.168.1.1
nameserver 192.168.1.5 8.8.8.8
And I tried to restart the network to save the changes with the following command:
sudo /etc/init.d/networking restart
but I am getting the following error:
stop: Job failed while stopping
start: Job is already running: networking
I thought that the problem was here because it gave to me that error but if I use the command ifconfig
I am getting the configuration that I have already configurated.
I do not have access to Internet, though.
Am I missing some configuration? Am I configurating my network in the wrong way?
EDIT: This is the output when I use ifconfig eth0
:
Direc. inet: 192.168.1.4 Difus: 192.168.1.255 Masc: 255.255.255.0
....................................
Packages RX:535 errors: 0 lost: 0 overruns: 0 frame: 0
Packages TX:87 errors: 0 lost: 0 overruns: 0 carrier: 0
colisions: 0 long.colaTX: 1000
Bytes RX: 41785 (41.7 KB) TX bytes: 10286 (10.2 KB)
Thanks in advance!
sudo service network-manager restart
. Also please post the output ofifconfig eth0
– Gansheim Apr 10 '17 at 20:35ifconfig eth0
. – Error404 Apr 10 '17 at 21:37sudo service network-manager restart
and I did not have any error there. After that I reboot the virtual machine but I still do not have connection to Internet – Error404 Apr 10 '17 at 21:44192.168.1.4
? – Gansheim Apr 10 '17 at 21:48