How to use a 4G phone to provide WAN/Internet service to a LAN? I intend to use this as backup when my cable modem Internet goes down. (It goes down frequently and it is down now.)
My phone has a fast 4G connection, I pay for tethering with my provider and I have about 30 GB of data per month available.
There are several possible different ways to solve this and many people have asked similar questions. I have not found a solution from those other questions so I am asking a new and unique question.
Here is what my network looks like normally:
CableModem <-- Router <-- 48 port GigE switch <-- LAN: many wired devices (printers and Ubuntu computers) plus several wireless clients that connect to the router.
Here is what I want it to look like when Comcast goes down:
Phone's 4G Internet <-- Router <-- 48 port GigE switch <-- LAN: many wired devices (printers and Ubuntu computers) plus several wireless clients that connect to the router.
I will start by outlining the possible approaches:
Connect my phone to my router via USB cable. My router has USB ports. Enable USB tethering on the phone.
Enable Mobile Hotspot mode on my phone. Connect router to phone (e.g. as WDS wireless bridging or whatever mode is appropriate). Router obtains Internet access through phone.
Connect my phone to a Kubuntu laptop via USB cable. Enable USB tethering on the phone. Share this Internet connection to my router by connecting a cable from eth0 on laptop to WAN / Internet port on the router.
I prefer choice 1, but that functionality appears to be limited to specific routers. Can anyone tell me which routers support this? Another option is to use dd-wrt. Unfortunately, my present router is a Netgear R8000 and I don't think there is a stable version of dd-wrt for it (that supports openvpn, ssh tunneling, etc). I already spent time research dd-wrt. So I'm moving on to a Kubuntu-focused solution.
I understand that choice 2 will cut my bandwidth in half, so I will use that option only if I can't get the others to work.
The reason I'm here is to focus on option 3. (However, I am open to suggestions regarding getting any of these approaches to work.)
I have laptops with both Kubuntu 12.04 and 14.04. Let's assume I keep using 12.04 for this, which is what I've been working with so far. Here is what I have done already:
I created a new network connection called tethered_usb0. I restricted it to interface usb0. I enable DHCP client mode.
I connected a usb cable between my phone and my laptop. I enabled usb tethering on my phone. I now have working Internet access through this connection on my laptop. Here are the details:
Type: Wired Ethernet
Connection State: Connected
IP Address: 192.168.42.3
Connection Speed: Unknown
System Name: usb0
MAC Address: <redacted>
Driver: cdc_ether
(BTW, I edited the standard network connection called auto_eth0 and restricted it to interface eth0.)
I created a new network connection called shared_connection. I restricted it to interface eth0.
I connected a cat5e cable between eth0 on the laptop and the WAN/Internet port on the router. I connected to this connection using KDE's network manager. It said "connected".
I went into the router GUI and set its WAN/Internet port to a static IP address of 192.168.42.4 and a gateway of 255.255.255.0.
Unfortunately, my router is not getting Internet access. I rebooted the router several times and I tried variations on my settings. No luck.
What next?
I got it working. Here are the steps I used. I have a Kubuntu laptop with one ethernet port and several usb ports. I have a 4G Android phone with a tethering plan.
First, to access KDE's network manager in Kubuntu click the tray icon that looks like a connection and then click "Manage Connections..."
Using KDE's network manager in Kubuntu I edited the standard network connection called auto_eth0 and restricted it to interface eth0. That makes sense from the nomeclature perspective. (While you can probably skip this step, without it the default connection settings mean that the usb0 connection is made through the connection named auto_eth0, creating a source of confusion.)
Still using KDE's network manager in Kubuntu I created a new network connection named tethered_usb0. I restricted it to interface usb0. I enable DHCP client mode. All other settings are default.
I connected a usb cable between my phone and my laptop. I enabled usb tethering on my phone in the Android settings under "Tethering and networks". If Kubuntu doesn't automatically get an Internet connection, open the network manager tray icon and click on the connection named tethered_usb0. It will connect. I now have working Internet access through this connection on my laptop.
Here are the details of this connection:
Next I connected a cat5e (ethernet) cable between the only physical ethernet port on the laptop and the WAN/Internet port (where the cable modem would normally connect) on the router. It is a normal (straight through) cable.
Still using KDE's network manager in Kubuntu I created a new network connection called shared_connection. I left all settings as default. You need to click on the connection named shared_connection in network manager to activate this connection.
The connection details are:
Note that there are now two active connections on the Kubuntu laptop: tethered_usb0 and shared_connection. Both are required.
I went into the router GUI and set its WAN/Internet port to a static IP address of 10.42.0.2 and a gateway of 10.42.0.1. The subnet mask is 255.255.255.0. Note that I used a different computer to connect to my router. I used any computer on my lan. The router has the same address it always had and accessing the router's GUI is the same as before. My LAN IP address range is not the same as any of the addresses listed above. My router is a DHCP server. In short, the LAN side of the router does not change at all in this process.
Optional. Because my cable modem internet connection is not reliable, I have a frequent need to do the steps above. Therefore, I plan to purchase a fanless Intel NUC (or similar), install Kubuntu 14.04 on it, and leave it by my router. That way I won't have to dedicate a laptop to this job. I also purchased an extra phone line. (T-Mobile USA has a great deal right now called 10G 4 All.) For a very reasonable cost I now have a backup Internet service for when Comcast goes down. (This week it was down all day Monday, part of Tuesday, part of Thursday and now it has been down all day Friday as of 9pm.)