Ubuntu 12.04.5 Two Network Interfaces


I have a virtual machine running on ESXi 6.5 and need to set up two network interfaces, one for internet access and remote access and the other to access local resources.

I created eth0 and assigned a static IP and it works fine, the problem is when I add a second network interface eth1 with static IP the eth0 stops working and I have no internet on the virtual machine.

My interface file and route details are attached.
Julian HainesIT EngineerAsked:
Who is Participating?
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
First off, when you add your 2nd interface, don't add it in /etc/network/interfaces, which is what you appear to have done.

If you add an interface here, errors can block boots from completing or crash the VM when you issue a /etc/init.d/networking restart command.

Best to just bring up your VM with one interface + then issue command line commands to come up with the correct incantation to add your 2nd interface, so both interfaces work + your VM survives.

Once you have the correct command line sequence, you can add it to your /etc/network/interfaces file + all will be well.

As you hit problems with your command line commands, post your full command + what you expected to occur + what really occurred.

Setting up networking may seem simple + each runtime environment tends to have it's own quirks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.