
Setting up VPN links between offices solves one problem: connecting branch-office local networks into a single corporate network over the public internet. Employees can access shared files, the CRM, and the cash-register server as if they were in the same building.
A problem faced by almost every company with two or more offices is that resources are located in one place while people work somewhere else. Every request to an internal server travels over the public internet. This is slow and insecure.
A site-to-site VPN between offices closes that gap. Traffic between locations is encrypted, internal subnet addresses are not visible from outside, and routing is configured once and then works without employee involvement.
What this means in practice:
A branch can access files on the head-office server directly, without transferring them through cloud drives.
IP cameras and video surveillance at a remote site are accessible from the head office through internal addresses.
Telephony and internal services work across cities as if they were on one network.
The administrator manages access centrally.
These links are built for companies with a distributed structure. And the key point upfront: a VPN does not compensate for poor internet service. If the branch’s connection is unstable, the tunnel will drop along with it. So start by checking the internet connection at each site, not by choosing protocols. A suitable connection can be selected through the office internet service.
A VPN network topology between offices determines which locations connect directly and which connect through an intermediary. This choice affects cost, speed, and support complexity.
Three basic topologies:
Hub-and-spoke. The central office becomes the hub, and branches connect to it. Simple, inexpensive, and easy to manage. The downside: traffic between two branches passes through the central office, adding latency.
Full mesh. Every office connects directly to every other office. This provides the shortest paths and maximum speed. The downside: the number of tunnels grows quickly, making setup and maintenance more complex.
Point-to-point. Two offices and one tunnel between them. Ideal for two sites, but it does not scale further.
A simple rule: if there are two offices, choose point-to-point. If there are three to five offices and almost all traffic goes to the central office, choose hub-and-spoke. If branches actively exchange data with each other—for example, shared media files or database replication—consider full mesh.
|
Topology |
Number of offices |
Advantages |
Disadvantages |
|---|---|---|---|
|
Point-to-point |
2 |
Simple, minimal configuration |
Does not scale |
|
Hub-and-spoke |
3–10 |
Centralized management |
Latency between branches |
|
Full mesh |
3–6 |
Short paths, high speed |
Many tunnels |
A common mistake is building a full mesh for eight offices and then discovering that the routing table has become unreadable.
The protocol determines how traffic is encrypted and tunnelled, while the hardware requirements determine whether your router can handle it. Problems at this stage may not appear immediately: the tunnel comes up, but under load the speed drops or the session disconnects.
IPsec operates at the network layer, is supported by almost all networking equipment, and provides good performance thanks to hardware acceleration on many models. It is the standard choice for connecting offices using routers and firewalls. In tunnel mode, it encapsulates the entire packet; in transport mode, only the payload. Site-to-site connections require tunnel mode.
OpenVPN runs over TCP or UDP, is flexible to configure, and passes through NAT easily. Encryption runs in user space, so it requires a more powerful processor: on a weak router, speed will become CPU-bound before the connection is saturated. UDP is preferable for an office-to-office tunnel because it has lower latency and less acknowledgement overhead.
GRE does not encrypt traffic on its own. It is used with IPsec when multicast or dynamic routing (OSPF, BGP) needs to pass through the tunnel. Without IPsec, GRE leaves traffic exposed.
PPTP is outdated and insecure: it uses MS-CHAPv2, which has long been considered compromised. Do not use it for new projects, even if it is available in the router interface.
Tunnel security is determined not by the protocol name, but by the set of algorithms. Most integrators follow these practices:
For IPsec/IKEv2, use AES-256-GCM or AES-128-GCM, a Diffie–Hellman group of at least 14 (2048 bits), and SHA-256 or higher.
Disable 3DES, SHA-1, and DH groups 1, 2, and 5. They are outdated and should not be used in production profiles.
For OpenVPN, use TLS 1.2 or 1.3, AES-256-GCM, and certificate-based authentication rather than a username and password.
Store certificates and keys on the device itself, not in a publicly accessible folder. Record certificate expiration dates in your procedures.
Note: if you leave the cipher suite set to “any” to maintain compatibility with an old branch router, negotiation may fall back to a weak algorithm. Check the actual parameters of the established phase, not just the list of allowed options.
A VPN router must be able to sustain the tunnel under load. A weak device will hit its CPU limit before the connection is saturated. Consider these factors when choosing equipment:
The stated VPN throughput (IPsec and OpenVPN are measured separately) should exceed the branch’s peak bandwidth with some headroom.
Hardware encryption acceleration for IPsec.
Memory for routing tables and sessions, which is critical in a full-mesh setup.
Redundancy support: a second WAN port or the ability to connect a backup link.
A router with a built-in optical terminal can be suitable for setting up the tunnel, while compatible subscriber terminals can help build the branch-side setup.
A simple rule: if both sides support IPsec and maximum speed is required, choose IPsec. If one office is behind NAT without a public address, or flexible routing is needed, choose OpenVPN. If multicast or dynamic protocols must be transmitted, use GRE over IPsec. Protocols can be mixed at one site, but each additional tunnel is another point of failure and another item in the operating procedures.
Setting up a VPN tunnel between offices follows the same plan regardless of protocol. Only the interface fields change.
An engineer configures a VPN between offices on MikroTik equipment according to the network diagram in the server room.
Steps:
Document the addressing plan: the subnets of the two offices must not overlap.
Check whether each side has a public IP address or DDNS.
Choose the protocol and document encryption and authentication settings.
Create the server profile on one side and the client profile on the other.
Add routes to the routing table for remote subnets.
Open the required ports on the firewall.
Test connectivity: ping, resource access, and data-transfer speed.
Document the settings and save a backup of the configuration.
On MikroTik, the PPP section is the most convenient place to work: create a profile and account there and assign addresses. IPsec settings are configured under IP, IPsec. On routers with OpenVPN, setup involves importing certificates and specifying the server address.
The main rule: first bring up the tunnel between two test devices, and only then touch the production network. A rollback plan must be ready before work begins.
A backup VPN link is necessary where losing connectivity between offices would stop operations. One provider and one router represent a single point of failure.
What to plan for:
A second internet connection from another provider at critical sites.
Backup power: without electricity, neither the router nor the terminal will work.
Automatic route switching when the primary tunnel fails.
A separate test tunnel for validating changes.
How long connectivity lasts during outages depends on the redundancy design. More details are available in the material about internet access during power outages and backup power.
A tunnel’s throughput is always lower than the connection’s raw speed. Encryption consumes CPU resources, and encapsulation adds overhead bytes to each packet. This section covers what brief guides often leave out: how to calculate headroom, what to measure, and how to distinguish a connection problem from a hardware problem.
Each packet inside the tunnel gets an additional header. For IPsec in tunnel mode, this is around 50–70 bytes per packet; for OpenVPN over UDP, it is comparable. With an average packet size of 1200–1400 bytes, overhead accounts for only a few percent and does not usually reduce speed significantly on its own. The main factors are:
Router CPU: software encryption hits the CPU limit long before the connection is saturated.
Fragmentation: if the tunnel MTU is not aligned, large packets are split and packet loss increases.
Latency and packet loss on the provider’s connection: TCP over a tunnel reacts to these more strongly than it does without encryption.
Practical guideline: choose the tunnel MTU so packets are not fragmented, and verify it with a test ping that prohibits fragmentation. If speed drops several times after enabling the tunnel while the connection itself remains unchanged, check router CPU utilization rather than the provider.
The tunnel must support peak traffic between sites, not average traffic. Calculate it as follows:
Use monitoring data from the past month to find peak data-transfer speed between offices.
Add headroom for overhead traffic and retransmissions; in practice, at least 20–30% is usually allowed.
Compare the result with the router’s stated VPN performance. If it is below the calculated requirement, replace the device rather than upgrading the plan.
For latency-sensitive services: video calls and IP telephony are sensitive to latency and jitter, not just bandwidth. If video conferencing is planned between offices, allow twice the bandwidth headroom and check latency before and after enabling the tunnel.
It is best to configure monitoring and logging from the start. Without logs, diagnosis becomes guesswork. The minimum set of metrics includes:
Router CPU utilization under peak traffic.
Latency between offices before and after enabling the tunnel.
Packet loss on the provider’s connection and on the tunnel interface.
Number of tunnel reconnections per day.
Interface error and drop counters.
Note: a tunnel that “sometimes drops” almost always leaves evidence in the logs. Look there for the cause of reconnections—phase timeout, mismatched parameters, or a device reboot—instead of repeatedly reconfiguring it.
The tunnel is up, but traffic does not pass: routes to the remote subnet are usually missing, or the address spaces overlap.
The connection drops under load: the CPU is overloaded or a phase timeout occurs. Check utilization and rekey parameters.
Speed is lower than expected despite an uncongested connection: MTU-related fragmentation or software encryption without acceleration may be responsible.
Outages occur periodically at the same time: check backups, updates, and provider activity.
On cryptography: use current cipher suites, disable outdated algorithms, and update device firmware regularly. These are basic corporate-network security settings, and they also directly affect performance: hardware-accelerated algorithms can provide several times the throughput of software-based ones.
Building a VPN between offices yourself is realistic when there are two sites and the design is simple. With more offices, redundancy, monitoring, and equipment compatibility become concerns.
Discuss end-to-end VPN link design and setup directly with your provider. COSMONOVA provides reliable internet links, secure data centers, and Ajax security solutions for businesses.
You can contact us and discuss the design through the contact information.
Connectivity between offices should not depend on a single connection or a single device. If you are building a network across several sites, start with an audit of connections and equipment.
You need two routers that support site-to-site VPN, one in each office, and at least one public IP address at the central office. The office subnets must not overlap: if both branches use 192.168.1.0/24, one of them will need to be renumbered. Configure an IPsec or OpenVPN tunnel between the external interfaces, add routes to the remote subnets, and verify access to resources using ping and the routing table.
For permanent office links, IPsec IKEv2 is the more common choice: it is hardware-accelerated on most routers and provides low latency. OpenVPN is convenient when flexibility and NAT traversal are needed, but its encryption puts more load on the processor. GRE is used with IPsec for multicast and dynamic routing. Do not use PPTP: its authentication is outdated and does not provide adequate protection for a corporate network.
A backup business VPN link uses a second internet connection from another provider and a second tunnel between the same offices. Configure dynamic routing (OSPF or BGP) on the routers, or monitor tunnel availability and switch routes automatically. Test the failure scenario: physically disconnect the primary link and confirm that traffic switches to the backup without sessions being interrupted for more than a few seconds.
Check that IKEv2 with AES-256 and SHA-256 is used, PPTP and weak ciphers are disabled, and keys are updated on schedule. Stability is assessed by latency and packet loss: run a long ping between subnets and measure response time during peak hours. Keep connection logs and configure alerts for tunnel failures so issues can be diagnosed before branch employees report them.
|
×
Request a
callback |