MyMisPal
← Networking & security lessons
Lesson 7 of 12

Connecting networks together

This is the heart of it: Nakhla has a head office, a branch and staff on the road. How do we make them work like one network, safely?

1. Default gateway: every device knows its own network. If data is headed to another network, it goes to the gateway, usually the router's address like 192.168.1.1. The router keeps a routing table to decide where to send it next.

2. Virtual LANs (VLANs): instead of buying a switch per department, we split one switch logically. Finance in VLAN 10, HR in VLAN 20, guests in VLAN 30. Devices in different VLANs can only talk through the router or firewall, which is where we enforce control.

Trunk · 802.1QRouter / firewall: controls who talks to whomFinanceVLAN 10FinanceVLAN 10HRVLAN 20GuestsVLAN 30GuestsVLAN 30

3. Connecting branches: the traditional way is a private leased line or MPLS from a telecom provider: reliable but costly. The most common way today: use the ordinary internet and build an encrypted tunnel over it, a VPN.

Head office · Riyadh10.10.0.0/16Jeddah branch10.20.0.0/16Site-to-site VPNRemote-access VPNERPInternetRep at a hotel
Site-to-site VPNLinks network to network: a router or firewall in Riyadh with one in Jeddah. Staff don't notice it; it's always on.
Remote-access VPNLinks one device to the network: a sales rep starts a VPN app on the laptop at a hotel and reaches the ERP as if in the office.
SD-WANSmart management of branch links: automatically picks the best line (fibre or 5G) and manages every branch from one console.
Watch outImportant: the two sites' addresses must not overlap. If Riyadh is 192.168.1.0/24 and Jeddah is also 192.168.1.0/24, the router can't tell where to send! So plan ahead: Riyadh 10.10.0.0/16 and Jeddah 10.20.0.0/16, for example.
Spotted a mistake on this page, or have an idea to improve the site?