On Mon, Jul 09, 2018 at 12:37:42AM +0000, salan...@ouvaton.org wrote:
> Could someone direct me as to how to set up my computer such that I can
> get internet access through? I installed a this model of US Mobile SIM card.
> https://www.usmobile.com/shop/product/Triple-Cut-GSM-SIM-Card
> 
> Then I ran the commands below. What do I need to do next?
> 
> $ dmesg|grep umb 
> umb0 at uhub0 port 4 configuration 1 interface 6 "Lenovo N5321 gw" rev 
> 2.00/0.00 addr 2
> $ ifconfig apn pwg pin 1234 class 2G roaming up
> $ ifconfig
> umb0: flags=8851<UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> index 5 priority 0 llprio 3
> roaming enabled registration home network
> state up cell-class EDGE rssi -77dBm speed 60.4Kps up 242Kps down
> SIM initialized PIN valid (3 attempts left)
> subscriber-id 310260855911295 ICC-id 8901260851159112954 provider US Mobile
> device KRD 131 30/123 - R1A/1 IMEI 004401701565398 firmware R3C11 (Pro), 
> R4A10 (App)
> APN pwg
> dns 10.177.0.34 10.177.0.210
> status: active
> inet 100.144.58.19 --> 100.144.58.18 netmask 0xfffffff8

The general idea is you need to add a route that points to the
interface rather than the IP address. You still need an IP address for
the route command. I wrote a script that automates bringing up a umb(4)
connection. It is configured by default for AT&T.

https://raw.githubusercontent.com/brycv/openbsd-scripts/master/cell-setup

To add the default route, use the following command.

route add -ifp umb0 default 100.144.58.19

This command would be correct for the information you have above. The
-ifp option allows you to specify the name of the interface you are
using for the default route. Then you also add the IP address you are
assigned since route(8) requires an IP address for the command.

The script also adds the dns entry (AT&T only provides one where it
looks like you get two on the dns line) to /etc/resolv.conf so
everything works as expected.

Bryan

Reply via email to