Standard Branch Network Design: A Repeatable Small Office Template

How do you prepare a common template for branch networks? We cover branch profiles, the device set, the address and VLAN layout, backup WAN and the opening checklist.
Technical summary
Technology
VLAN, IP address planning, IPsec/SD-WAN, LTE backup line, ZTP, Jinja2 template
Topic
A repeatable branch network template for multi-branch organizations
Level
Intermediate
Prerequisites
  • A decision on the central WAN model (SD-WAN, MPLS or IPsec)
  • Access to the enterprise IP address plan
In this article8 sections

When the number of branches approaches ten, the bill for designing each network separately arrives: configurations that don’t resemble each other, exceptions nobody wrote down, and longer outages. The engineer connecting remotely at 11 p.m. first looks for the answer to “what’s the user VLAN at this branch?” The solution is to standardize the branch like a product: the same profile, the same device set, the same addressing rule, the same opening procedure. Below we explain how to build a repeatable template for the in-branch network, independent of WAN technology.

What does a standard template gain you in operations?

The payoff shows up in operations. Opening a new branch stops being a design project and becomes a matter of filling in the template’s variables. Whichever branch the remote support team connects to, they know the user VLAN number, the gateway address and which port the backup line is on. The spare device stock stays limited to a few models; a failed device is replaced within hours, together with a configuration generated from the template. In audits, too, documenting a single template is much easier than explaining dozens of different configurations one by one.

The price is flexibility: each branch’s particular needs may not fit the template. That’s why the template is designed together with a few profiles and a controlled exception process. An unwritten exception kills the standard.

Branch profiles: small, medium, large

Define profiles by functional need rather than user count: is there a local server, what’s the outage tolerance, how many floors or buildings are there? The table below is an example classification.

Feature Small Intermediate Large
Typical use Sales office, store Regional office Regional headquarters, warehouse
Edge device Single firewall/SD-WAN Single device or HA pair HA pair
Switch Single PoE switch Stack, 2 members L3 distribution + access stacks
WAN Wired line + 4G/5G Two wired lines Two different carriers, physical route diversity
Routing between VLANs Firewall Firewall L3 switch, transit VLAN to the firewall
Out-of-band access None or cellular Cellular modem Console server + cellular line

Standard device set and topology

For each profile, the device model, software version and port usage are fixed. In the small and medium profiles the topology is simple: the edge device is the gateway for all VLANs and connects to the switch with a single trunk (with a two-member LACP in the medium profile), and access points are powered from the switch’s PoE ports. Port mapping is part of the standard too. A rule like “the switch’s last two ports are uplinks, the four ports before them are access points” makes on-site cabling remotely verifiable; an engineer looking at the LLDP neighbor table catches a wrongly plugged cable before the field team leaves the building. For the access port and management settings template, see the switch configuration standard article.

In the large profile, routing moves to the L3 switch and a transit VLAN is used between it and the firewall. In this structure, traffic between internal VLANs doesn’t pass through the firewall. If inspection between segments is needed, leave the gateway of the relevant VLANs on the firewall or separate them with VRFs. This decision must be written explicitly in the template; otherwise it’s debated again at every branch and every branch reaches a different conclusion.

The power side is part of the device set too. If the edge device, switch and cellular modem aren’t connected to the same UPS, in a power outage the branch is left without access despite the designed backup line. The modem stays on mains power. The branch goes dark.

IP address block allocation rule: example table

The most useful rule for branches is to give each branch a single summarizable block and make that block calculable from the branch number. At headquarters there’s a single route per branch, and anyone looking at an IP address knows which branch it belongs to.

Example rule: the 10.100.0.0/14 pool is reserved for branches (10.100.0.0–10.103.255.255). Each branch gets a /22; the pool is divided into 256 /22 blocks. If the branch number is N, the start of the block is found by adding N × 1024 to 10.100.0.0: branch 1 becomes 10.100.4.0/22, branch 2 becomes 10.100.8.0/22. If block 0 is reserved for infrastructure and testing, 255 branch numbers remain; if more are expected, choose a larger pool from the start. Growing it later means readdressing every branch. The inside of each /22 is divided the same way at every branch:

VLAN Purpose Branch 1 example Gateway
10 Wired user 10.100.4.0/24 10.100.4.1
20 IP phone 10.100.5.0/25 10.100.5.1
30 Printers and IoT 10.100.5.128/26 10.100.5.129
40 Cameras and security 10.100.5.192/26 10.100.5.193
50 Corporate wireless 10.100.6.0/24 10.100.6.1
90 Network management 10.100.7.0/27 10.100.7.1
– Reserve 10.100.7.32–10.100.7.255 –

The guest wireless network is kept outside this block: because it goes out to the internet locally and isn’t routed to the corporate network, the same private block (for example 172.31.0.0/22) can be reused at every branch. Using a separate central pool for tunnel interfaces and management loopback addresses preserves the integrity of the branch block. The general principles of which VLAN is separated and why are in the VLAN design in the enterprise network article.

Rules within the block should be fixed too: the gateway is always the first usable address, the physical addresses of the HA pair are the next two addresses, and the DHCP pool starts at a set address. Thanks to this rule, the template generator calculates the gateway and DHCP range automatically from the branch number; nobody on site types addresses by hand anymore.

WAN connection and backup

Independent of WAN technology, the template contains these decisions: the type of the primary and backup line, which physical port each connects to, how many tunnels are built to headquarters, and the routing protocol. For technology selection, the SD-WAN and MPLS comparison article offers a decision framework.

  • Two headend endpoints: The branch builds separate tunnels to the primary and secondary headquarters (or data center and cloud) endpoints. A single headend is a single point of failure for all branches.
  • Summarized advertisement: Using the routing protocol, the branch advertises only its own /22 block; on the headquarters side, unexpected prefixes aren’t accepted. A branch not filtered with a prefix list can corrupt the headquarters routing table with a single mistyped static route.
  • Backup line: At a small branch, a cellular backup line is often the most practical option; its particular issues, such as CGNAT and data quotas, are covered separately in the 4G/5G backup internet line article.
  • Local internet breakout: Whether SaaS traffic goes out from the branch or from headquarters is defined in the template together with the security policy.

Zero-touch provisioning and remote management

Zero-touch provisioning (ZTP) means the device receives its configuration from headquarters just by being cabled and powered on at the site. The method varies by vendor: on cloud-managed platforms the device is pre-assigned to the account by serial number and pulls its configuration when it reaches the internet; on platforms such as Cisco IOS XE, a configuration script or PnP server address is provided via DHCP options; firewall vendors’ central management products offer similar pre-registration mechanisms. Whichever you choose, test in advance which line and which DNS/NTP settings the device will use for its first connection. A device with the wrong clock gets stuck on certificate validation, and ZTP stops there.

The value of ZTP emerges when the configuration is generated from the template. The Jinja2 snippet below is a simple example that generates VLAN interfaces from the branch number:

{# variables: branch_code, branch_no #}
{% set o2 = 100 + (branch_no * 4) // 256 %}
{% set o3 = (branch_no * 4) % 256 %}
hostname BR{{ '%03d' % branch_no }}-{{ branch_code }}-EDGE01
!
interface Vlan10
 description USERS
 ip address 10.{{ o2 }}.{{ o3 }}.1 255.255.255.0
!
interface Vlan20
 description VOICE
 ip address 10.{{ o2 }}.{{ o3 + 1 }}.1 255.255.255.128
!
interface Vlan90
 description MGMT
 ip address 10.{{ o2 }}.{{ o3 + 3 }}.1 255.255.255.224

Configurations generated from the template are put into a version control system; changes are made in the template and rolled out to all branches. To track manual changes drifting from the template, set up configuration backup and diff tracking. Unnoticed drift grows. One implementation of this is described in the configuration backup with Oxidized article.

Branch opening checklist

  • The branch number and code have been assigned; the IP block and VLAN table have been generated from the template and entered into IPAM.
  • The handoff information for the primary and backup lines (circuit number, IP, gateway) has been entered into the configuration.
  • Devices have been pre-registered for ZTP or prepared with the template configuration.
  • Cabling labels and port mapping have been sent to the field team.
  • Tunnels have been built to both headend endpoints; it has been verified that the branch block appears as a single route at headquarters.
  • Failover to the backup line has been tested by physically disconnecting the primary line; shutting the interface down in software doesn’t replace this test.
  • DHCP, DNS resolution, wireless networks and IP phone registration have been tested.
  • Devices have been added to the monitoring system, configuration backup and the central log server.
  • UPS coverage and the remaining runtime during a power outage have been checked.
  • All settings deviating from the template have been written down as exceptions.

Designing the template falls within our enterprise network consulting service, installing branch devices within our switch, router and network device installation service, and procuring and tracking lines within our internet line management service.

Frequently asked questions

Why should we give every branch the same VLAN numbers?

The same VLAN number with the same purpose lets switch and firewall configurations be generated from a single template, central policy be written, and everyone speak the same language during a fault. As long as branches aren’t connected to each other at layer 2, repeating VLAN numbers doesn’t create conflicts; IP blocks, however, must be separate at each branch.

Does a small branch need a separate L3 switch?

Usually not. At a branch with a few VLANs and dozens of users, the firewall or SD-WAN device takes on routing between VLANs and policy together; the number of devices and failure points decreases. If traffic between VLANs is high or the branch grows, moving routing to an L3 switch comes onto the agenda.

Is it necessary to allocate addresses from the enterprise block to a branch for the guest network?

No. If guest traffic goes out to the internet locally and isn’t routed to the enterprise network, the same private block can be reused at every branch. That way you don’t need to grow the enterprise address plan according to the number of guest devices. Verify that the guest block never enters the WAN routing table.

Does zero-touch installation require no technical person on site?

Someone must be on site to unbox and cable the device and do the physical checks; ZTP removes the need for that person to have configuration knowledge. If the cabling labels, port mapping and line handoff information are ready in advance, the work on site is short and error-free.

Support

Contact us for support or a discovery session on this topic.

Contact form
[email protected]

Eretek Network

We build switching, routing, cabling and wireless networks with VLAN segmentation and redundant uplinks, and provide regular maintenance and fault support.

Knowledge Center

Other articles