Course contents

Unit 1: Enterprise designLesson 1.5 (3 of 5 in this unit)3 of 63 in the Advanced Cisco SD-WAN course

Full-mesh economics and tunnel scale

Count BFD sessions and tunnels for full mesh, hub-and-spoke and regional designs, see where the load lands, and compare the busiest router with its platform limit before building.

Advanced · 16 min read

You'll learn to calculate the tunnels and BFD sessions that a full mesh, a hub-and-spoke design and a regional design need, see where the load lands, and compare the result with a platform limit before the design is built.

Technical definition

Tunnel scale is the number of tunnels, and therefore BFD sessions, that a design asks each router and the whole fabric to hold. Every pair of sites that may connect, on every transport pair that is allowed to connect, becomes a tunnel with its own BFD session, so the count grows with the square of the number of sites in a full mesh.

Count the tunnels before you design

Topology is often chosen by habit: a full mesh because it gives the shortest paths, or hub-and-spoke because it is simple. A short calculation turns that into a decision. Every tunnel needs a BFD session to watch it, and every router has a limit on how many sessions it can hold, so the first design question is how many sessions each router will carry.

Diagram
Five steps to a tunnel count
Five steps to a tunnel count

Count the sites, count the tunnels each pair of sites forms, multiply to get the sessions on each router, total for the fabric, then compare the busiest router with its limit.

  1. Siteshow many,and which kind
  2. Per pairtunnels fromallowed transports
  3. Per routersessions oneach router
  4. Fabrictotal tunnelsin the network
  5. Limitcompare thebusiest router
The busiest router decides whether a design fits. In hub designs it is a hub, not a branch.

The arithmetic of a full mesh

Let N be the number of sites and K the number of tunnels that a pair of sites forms. With two transports that connect only to their own kind, K is 2. In a full mesh every site connects to the other N minus 1 sites, so each router holds (N minus 1) times K sessions and the fabric holds N times (N minus 1) times K divided by 2 tunnels.

Diagram
Full mesh with two transports (K = 2)
Full mesh with two transports (K = 2)
SitesSessions on each routerTunnels in the fabric
101890
50982,450
1001989,900
25049862,250
400798159,600
500998249,500
Doubling the sites roughly quadruples the tunnels in the fabric, while each router's share only doubles.

BFD sends hello packets on every session at a regular interval, commonly one second by default, so the sessions on a router also set how many hello packets it sends each second. A router with 998 sessions sends about 998 hellos every second in addition to user traffic, before counting the keys and the control traffic. The datasheet limit is the number to design against.

The same sites under different transport rules

Worked example (assumed limit, numbers computed by script). K is not fixed by the number of transports. It follows from which colors are allowed to connect. The example limit stays at 500 sessions.

Diagram
Transport rules and the full-mesh ceiling
Transport rules and the full-mesh ceiling
Transport ruleKSessions at 100 sitesLargest mesh at limit 500
2 transports, matching colors only2198251 sites
3 transports, matching colors only3297167 sites
2 transports, every color to every color4396126 sites
3 transports, every color to every color989156 sites
Largest mesh is the limit divided by K, rounded down, plus one site. Restricting colors is the cheapest way to lower K.

The same 100 sites need 198 sessions on each router or 891, depending only on the color rules. When a design looks too big, check the color restrictions before blaming the topology.

Hub-and-spoke moves the load to the hubs

In hub-and-spoke a spoke connects only to the hubs. With two hubs and K equal to 2, a spoke holds 4 sessions however large the network grows. Each hub holds the sessions for every spoke, plus the sessions to the other hub, which comes to the same number as a router in a full mesh of that size.

Diagram
Where the sessions land
Where the sessions land

In a full mesh every router carries the same large number of sessions. In hub-and-spoke the spokes carry only a few and the hubs carry the large number.

Full meshEvery router holds(N-1) x K sessionsLoad is spread evenly
Hub-and-spokeSpoke: hubs x KHub: spokes x KLoad sits on the hubs
Hub-and-spoke saves branch capacity and total tunnels, but the hubs still need a platform sized for the full count.
Example output written for this lesson, simplified; real output has more fields and a different layout
HUB-01#show sdwan bfd summary
SESSIONS-TOTAL  SESSIONS-UP  SESSIONS-MAX  SESSIONS-FLAP
198             198          198           0
A hub in a network of 100 sites with two hubs. The count is 98 spokes times 2 tunnels, which is 196, plus 2 tunnels to the other hub. When the real count is lower than the formula says, some tunnels are missing, and the next question is which spoke or transport lost them.

Regions keep both numbers small

A regional design gives each region its own hubs. Spokes connect to the hubs of their region, and the regional hubs connect to each other across the network. With 20 regions of 20 sites, where each region has 2 hubs and 18 spokes, a spoke holds 4 sessions and a hub holds 36 for its spokes plus 78 for the other 39 hubs, which is 114 in total.

Diagram
Four hundred sites, three designs (K = 2)
Four hundred sites, three designs (K = 2)
DesignSpoke or branchHubTunnels in the fabric
Full mesh798Not applicable159,600
Two central hubs47981,594
20 regions, 2 hubs each41143,000
The regional design costs more tunnels than two central hubs, but no router carries more than 114 sessions.

How many regions?

Worked example (assumed values, numbers computed by script). Take 400 sites, K = 2, two hubs per region and the example limit of 500 sessions. A regional hub holds one set of sessions for its own spokes and one for every other hub in the network, so changing the number of regions moves load between the two.

Diagram
Hub load by number of regions
Hub load by number of regions
RegionsSites eachBusiest hubHeadroomTunnels in the fabric
1 (central hubs)400798Over by 2981,594
220040220%1,596
410021058%1,624
85012675%1,776
162510878%2,464
202011477%3,000
401017465%7,600
Headroom is the share of the 500-session example limit left on the busiest hub. Tunnels in the fabric include the mesh between hubs.

The busiest hub is lightest at about 16 regions. Fewer regions leave each hub carrying many spokes. More regions leave each hub carrying many other hubs, and the tunnels in the fabric keep growing. Four regions already leave more than half of the limit free. Going from 4 to 16 saves 102 sessions on the busiest hub but adds 840 tunnels to the fabric, so the lowest hub count is not the best design.

Diagram
Options when the count does not fit
Options when the count does not fit

If a design needs more sessions than a platform can hold, reduce the sessions per router by adding regions, by sending branch traffic through hubs, by restricting which colors connect, or by using tunnels that are built only when needed.

Too many sessions
  • Regionshubs per regionlimit the mesh
  • Hub pathsbranch trafficgoes via hubs
  • Color rulesfewer tunnelsper site pair
  • On demandtunnels builtwhen needed
Each option trades some path length or some configuration effort for a lower session count.

A worked case: the mesh that does not fit

A retailer plans 400 stores with two transports each and wants a full mesh because every store talks to every other store for inventory transfers. The branch model it wants to buy has a datasheet limit that, for this lesson, is taken as 500 sessions. The figure is an example. In a real project it comes from the datasheet and release notes for the model and software release in use.

Diagram
The design check
The design check

Four hundred sites with two transports need 798 sessions on each router in a full mesh. The example limit is 500, so the design does not fit. A regional design needs at most 114 on any router, which fits.

  1. Requirement400 sites, 2 transportsK = 2 tunnels per pair
  2. Full mesh(400 - 1) x 2 = 798 sessionsExample limit 500: does not fit
  3. RegionalSpoke 4, hub 114 at mostFits with room to grow
  4. DecisionRegional hubs with a core meshInventory traffic uses the hub path
The check takes a few minutes and avoids a failure that would only appear when the last stores are added.

The trade is path length. Store-to-store inventory traffic now crosses a regional hub instead of going directly, which adds a little latency that the transfers can tolerate. Where a few store pairs truly need a direct path, a small number of extra tunnels, or tunnels built only when traffic needs them, can be added without turning the whole design back into a full mesh.

Learn more: Hub-and-Spoke vs MeshTLOC ComponentsDual-Hub Data Center Design

Test yourself

Predict · scenario 1

A full mesh has 60 sites with two transports, and a pair of sites forms 2 tunnels. How many BFD sessions does each router hold?

Predict · scenario 2

A network has 10 sites in a full mesh and each pair forms 2 tunnels. How many tunnels are in the fabric?

Predict · scenario 3

A design uses two central hubs for 100 sites. Which statement is correct?

Predict · scenario 4

The count on a hub is lower than the formula says. What is the most useful reading?

Predict · scenario 5

Each site has 3 transports and every color may connect to every color. How many tunnels does one pair of sites form?

Predict · scenario 6

The example limit is 500 sessions and K is 3. What is the largest full mesh that fits?

Predict · scenario 7

For 400 sites, 16 regions give a busiest hub of 108 sessions and 4 regions give 210. Why not keep adding regions?

FAQ

Why does full mesh grow so quickly?
Each new site must connect to every existing site, on every allowed transport pair. The tunnels per router grow in step with the number of sites, and the tunnels in the whole fabric grow with the square of it.
Does hub-and-spoke remove the large number?
It moves it. A spoke holds only a few sessions, but each hub holds one set of sessions for every spoke, which is as many as a mesh router would hold. The hubs need platforms sized for that count.
What decides how many tunnels a pair of sites gets?
The transports each site has and the rules on which colors may connect. Two sites with a private color and a public color, where only matching types connect, form two tunnels. Restricting colors, or limiting a color to its own kind, reduces the count.
Where do I find the real limit for a platform?
In the datasheet and release notes for the router model and the software release. Limits depend on both, so any figure used in a design should come from those documents, not from a rule of thumb.
How many regions should a design use?
The fewest that leave comfortable headroom on the busiest hub. In the 400-site example on this page, 4 regions leave 58% of the example limit free, and going to 16 regions saves about 100 more hub sessions at the cost of 840 more tunnels in the fabric. The numbers change with K and the limit, so rerun the arithmetic for your own design.
Does a third transport multiply the count?
It can. With matching colors only, K rises from 2 to 3. If every color may connect to every color, K rises from 4 to 9. The color rules decide the count, so write them down before counting.