# Tethering



## balanga (Jun 1, 2021)

I just discovered how easy it is use tethering to provide Internet access to one of my FreeBSD system... basically you connect up your phone (mine's an Android) using a USB <-> mini-USB cable the sort you charge your phone with. Go into your phone's settings and enable USB tethering. On your FreeBSD box the following msg pops up on the console:-



> urndis0 on uhub4
> urndis0: <RNDIS Communications Control> on usbus2


When you run `ifconfig` a new interface ue0 appears and you can get an IP address assigned using `dhclient ue0`. Eventually, after some 'fiddling about' with various settings (yet to be fully understood) you can `ping 8.8.8.8` via ue0.

Armed with this knowledge I'm thinking of getting a cheap phone specifically for tethering, so can anyone suggest what features/spec I need in a phone to provide a reliable Internet connection. Also if I'm using a cable for tethering, I'm assuming the phone is being charged up at the same time...


----------



## SirDice (Jun 1, 2021)

balanga said:


> so can anyone suggest what features/spec I need in a phone to provide a reliable Internet connection.


4G at least, preferably 5G. But that might not be available in your part of the world yet. There are also specific 4G/5G routers, no need for a phone, they work in a similar fashion as "traditional" modem/routers you get for xDSL or cable but use 4G/5G to connect to the internet.


----------



## balanga (Jun 1, 2021)

Just as an afterthought, I wonder if you can install FreeBSD from a mini-memstick image... Would the installation pick up ue0 as route to the Internet?


----------



## SirDice (Jun 1, 2021)

balanga said:


> Would the installation pick up ue0 as route to the Internet?


It should, yes. It's just an ethernet interface like every other ethernet interface. Keep in mind that many mobile internet providers have data limits though. You might get charged extra if you go over it.


----------



## balanga (Jun 1, 2021)

SirDice said:


> 4G at least, preferably 5G. But that might not be available in your part of the world yet. There are also specific 4G/5G routers, no need for a phone.



But if you are travelling you don't want to be taking a router with you. 

Also, having just bought a new 4G router, it's reliability is not all I would have hoped for. In addition, some ISPs say you can't use their SIMs on routers, whereas a phone, that's just a phone... I have had my router not connecting with my ISP at times, for some reason, but the same SIM card works fine in my phone.


----------



## SirDice (Jun 1, 2021)

balanga said:


> But if you are travelling you don't want to be taking a router with you.


There are mobile variants. Relatively small devices that can operate on battery. 



balanga said:


> Also, having just bought a new 4G router, it's reliability is not all I would have hoped for.


You're going to have that same reliability with a phone. Those routers are really just a phone without the "talking" part. 


balanga said:


> In addition, some ISPs say you can't use their SIMs on routers, whereas a phone, that's just a phone...


They're not going to be able to tell the difference. Those routers use the exact same chips to connect to 4G as a phone does.


----------



## balanga (Jun 1, 2021)

SirDice said:


> It should, yes. It's just an ethernet interface like every other ethernet interface. Keep in mind that many mobile internet providers have data limits though. You might get charged extra if you go over it.


Yes, I'm very much aware of that, and few of us realise just how much data we use. Luckily I just got myself an unlimited data package, although just how 'unlimited' it is in real life, I'll find out over the next few weeks/months. The great thing is that I get faster speeds over 4G than over home 'broadband' because the telephone lines are so old and haven't yet been updated to optical fibre. *And* I have a cheaper service, one that I can take with me if I'm travelling.


----------



## SirDice (Jun 1, 2021)

balanga said:


> The great thing is that I get faster speeds over 4G than over home 'broadband' because the telephone lines are so old and haven't yet been updated to optical fibre.


It's the same here. I can't get more than 12Mbps on a xDSL connection. Can't get fibre (old neighborhood). Cable internet is pretty decent here though. That's 600Mbps for me.


----------



## balanga (Jun 1, 2021)

SirDice said:


> It's the same here. I can't get more than 12Mbps on a xDSL connection. Can't get fibre (old neighborhood).


I was lucky to get 2-3Mbps, and last year they doubled the price!


----------



## Geezer (Jun 1, 2021)

Been tethering for a while, whenever I am away from home. 

Don't use DHCP. The android (mine anyway) has an IP of 192.168.42.129. So I use a fixed IP on the same subnet, and use the android IP as the default route, and in resolv.conf. Do it all with doas and use an app launcher on the desktop.


----------



## tingo (Jun 5, 2021)

wireless tethering (using an Android phone at least) also works, and is easier in places were you don't have wireless access. It is usually called "Internet sharing"  in Android. Be aware it might use the phone battery harder, so it is advisable to have the phone connected to a charger if you are using it more than briefly.


----------



## Geezer (Jun 5, 2021)

tingo said:


> wireless tethering (using an Android phone at least) also works, and is easier in places were you don't have wireless access. It is usually called "Internet sharing"  in Android. Be aware it might use the phone battery harder, so it is advisable to have the phone connected to a charger if you are using it more than briefly.


If you are tethering, then it is plugged in, and so charging too.

Phone can get hot though.


----------



## balanga (Jun 6, 2021)

Geezer said:


> If you are tethering, then it is plugged in, and so charging too.
> 
> Phone can get hot though.


Didn't tingo say 'wireless tethering' ?


----------



## Geezer (Jun 6, 2021)

balanga said:


> Didn't tingo say 'wireless tethering' ?



I beg his pardon.


----------

