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.

$ sudo lshw -c network
[sudo] password for maxgitt: 
       description: Ethernet interface
       product: Ethernet Connection (5) I219-LM
       vendor: Intel Corporation
       physical id: 1f.6
       bus info: pci@0000:00:1f.6
       logical name: enp0s31f6
       version: 00
       serial: 50:9a:4c:18:ad:9f
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k duplex=full firmware=0.1-4 ip= latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:138 memory:f7100000-f711ffff
       description: Ethernet interface
       physical id: 1
       bus info: usb@2:3.1
       logical name: enx000acd2f045e
       serial: 00:0a:cd:2f:04:5e
       size: 1Gbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=ax88179_178a duplex=full ip= link=yes multicast=yes port=MII speed=1Gbit/s

The answer did mention checking my routing table, stating that I can't have more than one gateway. So I ran the following:

Before connecting to enx000

 $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    100    0        0 enp0s31f6   U     100    0        0 enp0s31f6 UGH   100    0        0 enp0s31f6     U     1000   0        0 enp0s31f6

After connecting to enx000

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 enx000acd2f045e         UG    100    0        0 enp0s31f6   U     100    0        0 enp0s31f6 UGH   100    0        0 enp0s31f6     U     1000   0        0 enp0s31f6   U     0      0        0 enx000acd2f045e

Finally, he states "If you have two gateways, your routing table would have a double entry for dest 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

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 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 or set the routing order so the enpXXX interface comes first in the routing table.

There is a good description of how to use multiple NICs with Ubuntu here: https://askubuntu.com/questions/310355/networking-with-multiple-nics

| improve this answer | |
  • Yes, your statement on using enpXXX for Internet traffic and enxXXX for LAN traffic is correct – Max Sep 15 '17 at 13:58

Thank you for your reference. It helped me solve the problem. I must've added in the default gateway to my routing table earlier. You can check and make sure that when you run ip route show that you only have 1 default gateway:


$ ip route show
default via dev enx000acd2f045e  proto static 
default via dev enp0s31f6  proto static  metric 100

All I had to do was delete the second route via:

sudo route del default gw enx000acd2f045e


$ ip route show
default via dev enp0s31f6  proto static  metric 100
| improve this answer | |
  • Although this is indeed a "solution" it's not ideal as you need to run a command every time - you can add them into the networking scripts via the link in my answer to do that automatically after the interfaces come up. – Dave Sep 21 '17 at 17:15
  • You are correct. I went 1 step further and simply edited the Network Settings for IP addr and deleted the Default Route that I had set to – Max Sep 25 '17 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.