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.
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.
| Site-to-site VPN | Links network to network: a router or firewall in Riyadh with one in Jeddah. Staff don't notice it; it's always on. |
| Remote-access VPN | Links 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-WAN | Smart management of branch links: automatically picks the best line (fibre or 5G) and manages every branch from one console. |
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.