I am using Ubuntu 14.04 with MATE, and my problem is that when I use a local Ethernet cable to access local network via a router (which is not connected to Internet), and at the same time Wireless (or Mobile Broadband) to access the internet - I cannot access the Internet, because apparently Ubuntu tries to first do Internet communication via the wired Ethernet cable, and it locks in there (as the wired Ethernet is, as I mentioned, not connected to Internet).
So, I've seen Set specific interface for internet access , where the answer is:
These routes are automatically created by NetworkManager. Try checking Edit ▸ IPv4 Settings ▸ Routes ▸ Use this connection only for resources on its network on the two LAN connections to prevent them from becoming the default gateway.
Ok, so I go to Network Connections / Edit, Edit the "Auto Ethernet connection", and enable "Use this connection only..." and Save. Then
ifconfig reports to me (say) 192.168.100.10 for
eth0, and so I test first pinging other local PCs:
$ ping 192.168.100.11 PING 192.168.100.11 (192.168.100.11) 56(84) bytes of data. 64 bytes from 192.168.100.11: icmp_seq=1 ttl=64 time=0.554 ms 64 bytes from 192.168.100.11: icmp_seq=2 ttl=64 time=0.638 ms ...
Well, so far so good; so I enable my Broadband - and at this point, I have this route:
$ ip route default via 10.64.64.64 dev ppp0 proto static 10.64.64.64 dev ppp0 proto kernel scope link src 10.206.104.70 192.168.100.0/24 dev eth0 proto kernel scope link src 192.168.100.10 metric 1
... and let's see if pinging something online works:
$ ping google.com PING google.com (220.127.116.11) 56(84) bytes of data. 64 bytes from 18.104.22.168: icmp_seq=1 ttl=224 time=1155 ms 64 bytes from 22.214.171.124: icmp_seq=2 ttl=224 time=436 ms
Oh nice, it works... or does it? Let's try retrieving something online:
$ wget http://google.com -O - --2016-04-27 10:50:09-- http://google.com/ Resolving google.com (google.com)... 126.96.36.199 Connecting to google.com (google.com)|188.8.131.52|:80... ^C
Basically it hangs there for more than a minute, and I have to hit Ctrl-C to break/interrupt it.
And now, from Network Manager, I disconnect "Auto Ethernet", and when I try downloading the same resource again:
$ wget http://google.com -O - --2016-04-27 10:51:12-- http://google.com/ Resolving google.com (google.com)... 184.108.40.206, 220.127.116.11, 18.104.22.168, ... Connecting to google.com (google.com)|22.214.171.124|:80... connected. HTTP request sent, awaiting response... 302 Found Location: http://www.google.dk/?gws_rd=cr&ei=gX0gV4rVAYe6sQHrzbnICg [following] --2016-04-27 10:51:13-- http://www.google.dk/?gws_rd=cr&ei=gX0gV4rVAYe6sQHrzbnICg Resolving www.google.dk (www.google.dk)... 126.96.36.199, 2a00:1450:4010:c08::5e Connecting to www.google.dk (www.google.dk)|188.8.131.52|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: ‘STDOUT’ [<=> ] 0 --.-K/s <!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" ...
Well... now it works - but of course, NOT with the both connections active, but only with the Ethernet disconnected.
So let me repeat the question: how can I have two network connections active at the same time in Network Manager, such that the wired Ethernet connection is used to communicate only to the local network of the router it is connected to - and the wireless/broadband connection is used to access the Internet?