# Cutting Over to T-Mobile Home Internet

I'm currently downgrading from AT&T to T-Mobile, so I figure I might as well document my experience doing so. The plan looked simple until I actually researched it; T-Mobile does not natively support modem mode. There is no clean way to make the T-Mobile Gateway just be a modem.

No biggie tho, the network gets built around that limitation instead of fighting against it.

Also I finally got a router so I can actually manage my network now and not be locked down to OEM-harware. The router I got was a [Linksys-MXS4300](https://openwrt.org/toh/linksys/mx4300).

```markdown
[ T-Mobile Gateway ]  <-- Performs cellular NAT, ignores my home devices

         │  Ethernet cable from T-Mobile LAN to Linksys-Router WAN
         ▼

[ Linksys OpenWrt Router ]  <-- The ONLY network my house and lab talk to
   ├── TVs, Phones, Laptops (Wi-Fi)
   └── Proxmox Server ── Multiple k3s Clusters (Ethernet)
```

The T-Mobile Gateway still does its own NAT in the background, but nothing on my network actually talks to it directly. Everything routes through the Linksys running OpenWrt instead. I also disabled the tri-band radios on the T-Mobile gateway so my devices only see the Linksys Wifi

* * *

## Step One: Flash the Linksys Router

Standard OpenWrt install; navigated to the router's default address, uploaded the OpenWrt factory firmware built for my specific model, and followed the [official OpenWrt wiki guide](https://openwrt.org/toh/linksys/mx4300#tab__openwrt_firmware) for the device the whole way through.

## Step Two: Flash the Backup Partition Too

This router dual-boots between two firmware partitions, which means a power outage mid-update could drop it back onto stock Linksys firmware. To avoid that I flashed OpenWrt onto the second partition as well, using the Sysupgrade image and not the Factory image. Now there is no corporate firmware left on the device to fall back to, no matter what happens.

## Step Three: Set Up the Home Network

At this point in time there were 3 subnets in play; my old AT&T LAN on 192.168.1.1/24, the T-Mobile Gateway on 192.168.12.1/24, and a new 10.10.10.1/24 network for the Linksys router, configured under `Network > Interfaces`.

The T-Mobile Gateway connects into the Internet port on the back of the Linksys, since it cannot be bridged. During setup I kept my laptop plugged into a different LAN port to make sure I was configuring the router itself and not accidentally sitting on the wrong side of the network.

I then disabled the T-Mobile Gateway's tri-band radios through its companion app, so they would not interfere with the new Linksys radios.

To keep every TV and Wi-Fi device from needing to be reconnected by hand, I set the Linksys SSID and password to match the old network exactly, under the wireless interface settings.

Router and gateway both went to their permanent spot after that, and the new network was live. I could now finally unplug my AT&T router.✌️

## Step Four: Migrate Proxmox and the Homelab

First, a new static IP for the Proxmox node:

```shell
vim /etc/network/interfaces # Add IP/Gateway Here
systemctl restart networking
```

Example:

```shell
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface using DHCP
auto eth0
iface eth0 inet dhcp

# Static IP Address Example
This configuration assigns a fixed IP address, subnet mask, gateway, and DNS server to an interface.

# The primary network interface using a static IP
auto eth0
iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8 8.8.4.4
```

And a matching static reservation on the OpenWrt side, in the web-gui under `Network > DHCP > Add`, then Save and Apply.

The VMs and k3s clusters were big concern for me, but FluxCD had my back. Destroy VMs, redeploy VMs, point Flux at them, and the homelab comes back on its own.💎️

The reason a redeploy was necessary at all was because k3s ties a node's IP address to its local TLS certificates at cluster creation. Change the IP and that binding breaks.

I could have gone in and hand patched certificates to work around it, but that is exactly the kind of old-school manual fix GitOps is supposed to make unnecessary. Destroy the cluster, recreate it, let Flux reapply everything from the repo. Done.

There is one step above even this, worth mentioning for later. Provisioning the VMs themselves with Terraform or OpenTofu, cloud-init, and Packer, instead of doing it by hand. That is the next layer to build toward.

* * *

## Wrap Up

Now that I can manage my own network the sky is the limit for homelab, and very happy w/my documentation. Every project has had a full write up/post-mortem and I now have a back log of things to write about/publish.

Up next: Data Backups, Dev-Containers, and Finally deploying Production.
