Monday, August 24, 2015

Linux: USB Tether and Local Network, Solved Ethernet Case

Let me show first about my ethernet connection configuration in a fine-working LAN below as of from Connection Information menu on connection manager:

Wired connection1
InterfaceEthernet (eth0)
IP Adress192.168.1.9
Netmask255.255.255.0
Gateway192.168.1.254
DNS10.25.1.0,10.10.0.110

Few days ago, my internet router line cable had cut off on an accident by some stupid site project people which dig along side road in which internet cable where buried.



In short solution I pick my android phone for temporarily solution and plug it via USB Tether connection with IP table as below:

Wired connection2
InterfaceEthernet (usb0)
IP Address192.168.42.196
Default Route192.168.42.129
DNS192.168.42.129
Netmask255.255.255.0

The problem was we had two connections with different ip address structure, and we can't make both work in the same time. If we want internet connection on USB, we must disconnect eth0 (Local Area Network) and vice versa. This situation was not what we need.

Finally I after some digging I find solution to work with both connection together, just follow these steps:

  • Disconnect eth0 (Wired connection1), and let usb0 (wired connection2) connected as is.
  • Set eth0 Gateway and DNS to blank.
  • Save setting and connect. And try ..
Hope this will help somebody who face same problem as I. As for your note, this configuration just work for PC which connected to usb0 not for entire Local Network.

Thanks.