Mesh networking

What is a mesh network?

A mesh network is a network in which devices connect directly to the devices near them and pass traffic along for each other, instead of all connecting to one central point. A message can travel through several devices to reach one that is out of direct range, and when a device drops out, traffic can take another path.

Learning objectives

After reading this article you will be able to:

  • Distinguish a mesh network from a star network built around one centre
  • Describe how a message moves through a mesh by flooding or routing
  • Recognise the costs of a mesh in battery, airtime, delay and security

How a mesh differs from a star

Most networks people use every day are stars. Phones connect to a cell tower, laptops connect to a Wi-Fi access point, and every message passes through that centre on its way somewhere else. The centre is convenient: it knows where everyone is, and it can be managed in one place. It is also the part that fails. When the tower loses power or the access point goes down, every device that depended on it loses the network at the same moment.

In a mesh there is no single centre. Each device, often called a node, keeps links to the nodes within its radio range. Those links overlap, so the network is a web of short connections rather than a set of spokes. A node that receives a message meant for someone else can forward it, and the message moves hop by hop toward its destination.

In a star, every device depends on the centre. In a mesh, each device links to its neighbours, so there is usually more than one way through.

How a message moves through a mesh

Three things have to happen for a message to cross a mesh. First, nodes discover their neighbours, usually by broadcasting short announcements and listening for others. Second, the network decides which neighbour carries each message next. Some meshes flood: every node rebroadcasts what it hears, which is simple and copes well with change but uses a lot of airtime. Others route: nodes learn paths and send each message along a chosen one. Third, the network stops messages from living forever. Messages carry a hop limit, often called a time to live (TTL), and a unique identifier, so nodes can drop copies they have already handled.

How does a message cross a mesh network? goes through each step in detail.

Kinds of mesh network

Mesh is a shape, not a single technology. Several standards use it:

  • Wi-Fi mesh. IEEE 802.11s defines mesh networking between Wi-Fi stations, and home mesh Wi-Fi systems use a set of access points that relay for each other. The phones and laptops you connect are still clients of those access points.
  • Bluetooth Mesh. The Bluetooth SIG publishes a mesh specification built on Bluetooth Low Energy for lighting, sensors, and building control. It relays messages by managed flooding, and later versions add directed forwarding.
  • Thread and Zigbee. Both run on IEEE 802.15.4 radios and form low-power meshes for home and building devices. Thread carries IPv6, and Matter, the smart-home application standard, can run over it.
  • Mobile ad hoc networks. The IETF has published routing protocols such as AODV (RFC 3561) and OLSR (RFC 3626) for networks of moving devices with no fixed infrastructure.
  • Application-level meshes. Software on phones or computers can build a mesh over links the devices already have, such as Bluetooth Low Energy or a local IP network, and handle discovery and routing itself.

What a mesh is good at

A mesh keeps working when part of it fails, because there is usually more than one path. It can cover ground no single radio could, because each hop is a short link. It grows with the number of devices present instead of depending on one piece of fixed infrastructure. And it lets nearby devices talk to each other directly, without a round trip to a distant server.

That makes mesh a natural fit where infrastructure is missing, overloaded, or untrusted: disaster zones, crowded venues, ships, mines, farms, and industrial sites.

The trade-offs

A mesh is not free. Every relay spends battery and airtime on other devices’ traffic. Each hop adds delay and another chance of loss, so long routes are slower and less reliable than short ones. Coverage depends on where devices happen to be, which changes as they move. And because messages pass through devices the sender does not control, a mesh needs end-to-end encryption and a way for devices to prove who they are, so relays carry content they cannot read.

A mesh also does not create internet access on its own. If one device has a connection and is set up as a gateway, the mesh can reach the cloud through it. Otherwise the mesh is a local network, which is often exactly what is needed.

Frequently asked questions

Does a mesh network need the internet?

No. A mesh is a local network between the devices in it. It can reach the internet only if one of its devices is set up as a gateway with its own connection; otherwise devices in the mesh can still reach each other, but not the cloud.

Is a mesh network the same as mesh Wi-Fi at home?

Not quite. Home mesh Wi-Fi is a set of access points that relay for each other, while your phones and laptops stay ordinary clients of those access points. In a device mesh, the devices themselves relay traffic.

Is a mesh network secure?

It can be, but the shape alone does not make it so. Messages pass through devices the sender does not control, so a secure mesh encrypts content end to end and lets devices prove who they are with keys, so relays carry ciphertext they cannot read.

Sources

Build it with Offline Protocol

The Offline Protocol mesh SDK forms an application-level mesh between devices over Bluetooth LE, local IP networks, and an internet relay, with routing, acknowledgments, and MLS encryption built in. The transport docs list what each path supports in the current release.

Read the transport and routing docs