Can only bring up one interface at a time

I took a look at the most relevant question, and am a step further but am not sure where to go from here.

I am currently trying to connect two ethernet interfaces but am having trouble establishing a connection to both interfaces at the same time. When I connect the second interface enx000acd2f045e my connection through enp0s31f6 to the Internet is disconnected. And unlike the cited answer, neither of my networks are disabled when I run sudo lshw -c network.

Finally, he states "If you have two gateways, your routing table would have a double entry for dest 0.0.0.0 and the system can't handle this." I'm relatively new to networks and am not sure what I can do to fix this. It appears I may have a conflict on the first two rows of my routing table.

Should I update:

the default gateway found in Ubuntu's Network menu
OR

edit /etc/network/interfaces, this doesn't seem to be used for much in recent versions of Ubuntu let alone 16.04

Answers 1

The answer you cite has pointed you to the issue - it lies in the routing table. What's happening is you're having two "default routes" created (the 0.0.0.0 route). This is the route that matches if no other is found hence the default name.

In your case once the second interface is up you can see two default routes and the system uses the first one that matches, hence the enxXXX adaptor.

It's simplistic to say you can't have two default routes because everything is possible and you can have traffic balanced between the two but for your purposes it seems that you actually only want to use the original enpXXX interface for your Internet traffic? And have only LAN traffic through the other interface?

This is simple to accomplish - you need to disable the enxXXX adaptor being a default route (this will add a route to the LAN but not to the world 0.0.0.0) or set the routing order so the enpXXX interface comes first in the routing table.