How I Built a Cheap Mobile Network Simulation Lab for Real-World App Testing

A practical, low-cost playbook to simulate Indian mobile network conditions (latency, loss, throttling) for testing apps—without expensive hardware.

Written by: Arjun Malhotra

Laptop on a desk next to a smartphone and a small router, used for network testing.
Image credit: Unsplash / Jesus Kite

Shipping mobile apps that behave across India’s chaotic mix of carriers, handsets, and locations is one of those problems that looks simple until you hit real users. Emulators and lab devices are great, but nothing beats testing under actual network conditions: latency spikes, packet loss, asymmetric bandwidth, and weird carrier middleboxes.

I built a low-cost mobile network simulation lab that lets me reproduce most of those problems reliably, on a budget that fits a small Indian team. It won’t perfectly replicate every telco quirk, but it catches the bugs you actually see in production—without calling expensive test vendors.

Why you should care (and when not to)

What I built (budget and parts)

How it works, simply

  1. Put the Linux box between your internet uplink and the router (or use the router with OpenWrt if you prefer).
  2. Use Linux tc (traffic control) with netem for latency/jitter/loss and tbf/htb for bandwidth limits.
  3. Route phone traffic through this box by tethering the phone to the router or using the router’s Wi‑Fi connected to the Linux box.
  4. Automate scenarios (commute, crowded office, patchy rural) as scripts you can run before a test.

Why netem + tc is the right balance You get precise control: add 200–500 ms delay, introduce jitter, drop packets, and cap bandwidth. It’s repeatable, scriptable, and cheap. You can also chain rules to create asymmetric up/down behaviour (important—mobile uploads are often much slower).

A few useful commands

Tip: script these with bash or a tiny Python wrapper and label scenarios (metro-peak, commuter, rural-2G). That makes test runs consistent across your CI or local dev machines.

Scenarios that found real bugs

Practical tips for India-specific testing

Tradeoffs and things that bite you later

How to integrate into your workflow

Final thought You don’t need a lab that costs lakhs to catch the majority of network-related bugs. A small, scripted mobile network simulation rig brings the weirdness of real networks into your local tests and saves users from the worst surprises. It’s not perfect—keep some real SIMs and devices for final validation—but it will cut down the “works on my phone” excuses and make your app more resilient where it matters.

If you want, I can share the basic script I use to produce three scenarios (commute, crowded-peak, rural) and a quick guide to setting up ifb on a Raspberry Pi.