I am using Hyper v for my linux lab.
I have Ubuntu Server 16.04 which contain 2 network cards that shown in the system as 2 Interfaces.
eth0: I configured it to get IP from DHCP server (my dlink router which provides internet access).
eth1: I configured a static IP on it for my internal network.
This is the
/etc/network/interfaces file that I edit:
#######Primary Network interface Auto eth0 Iface eth0 inet DHCP #######The Internal Network interface Auto eth1 Iface eth1 inet static address 192.168.1.1 netmask 255.255.255.0 gateway 192.168.1.254 dns-nameservers 192.168.1.254
After I finish to edit the configuration file and doing reboot to server - I loses my Internet access.
Even if I try to ping to 18.104.22.168 from eth0 (with
ping -I eth0 22.214.171.124 command) it fails.
When I delete the internal network interface from the configuration file and reboot, my internet connection gets restored.
What am I doing wrong? How can I configure my machine so that the eth0 device will use for internet access only, and the eth1 will use for my internal network?