Watch on Instagram

Network Bytes · Episode 60 · CCNA 5.5

"VPNs: site-to-site vs remote access"

A VPN encrypts each packet and wraps it inside a new one, so it can cross the public internet privately. Site-to-site VPNs join whole offices through their routers or firewalls; remote access VPNs connect one person's device back to the office.

Posted · About a 1 minute watch, 4 minute read · Take the quiz

The tunnel: encrypt, then wrap

The public internet is shared: your packets pass through networks you do not control. A VPN solves this by encrypting each packet so only the far end can read it, then encapsulating it: the whole encrypted packet goes inside a new packet with a new outer header addressed between the two tunnel endpoints. In IPsec this is called tunnel mode (RFC 4301). Anyone in the middle sees only the outer header and scrambled data, not the original addresses or contents.

Site-to-site VPNs

A site-to-site VPN connects two whole networks, such as a head office and a branch. The tunnel is built between gateways, a router or firewall at each site, usually with IPsec and keys negotiated by IKE (IKEv2, RFC 7296). NIST calls this the gateway-to-gateway model. The tunnel stays up all the time, and the PCs behind each gateway need no VPN software: they just send traffic to their normal default gateway, which encrypts it on the way out. That is why users don't even know it's there.

Remote access VPNs

A remote access VPN connects one device. The user's laptop runs a VPN client that builds its own tunnel to a VPN gateway at the office, often the firewall, from wherever the user is: a coffee shop, a hotel, home. NIST calls this the host-to-gateway model. These clients use IPsec or TLS-based protocols (Cisco's AnyConnect / Secure Client is a common example), and some remote access VPNs are clientless, running inside a web browser. Unlike site-to-site, the tunnel exists only while the user is connected.

Side by side

| | Site-to-site | Remote access | |---|---|---| | Connects | Office network to office network | One device to an office network | | Tunnel ends | Router or firewall at each site | Client on the device, gateway at the office | | Usual protocol | IPsec (with IKE) | IPsec or TLS, sometimes clientless in a browser | | When it runs | Always on | When the user connects | | Users notice? | No | Yes, they start the client |

Try it yourself

Look at what VPN settings your own device has. On Windows, open Settings, Network and internet, VPN. On macOS, open System Settings and search for VPN. On a phone, look under Settings for VPN. If your workplace or school gave you a VPN app, that is a remote access client: notice that you start it yourself, while a site-to-site tunnel between offices would never show up on your screen at all.

Good to know

  • IPsec (RFC 4301) is the usual protocol suite for site-to-site VPNs, often with IKEv2 (RFC 7296) to set up the keys.
  • "Wraps it inside a new one" is tunnel mode encapsulation: a new outer IP header around the encrypted original packet.
  • Site-to-site tunnels are set up between gateways and are transparent to users.
  • Remote access VPNs typically use IPsec or TLS-based clients (for example Cisco AnyConnect / Secure Client); some are clientless through a browser.
  • NIST SP 800-77 Rev. 1 describes the gateway-to-gateway and host-to-gateway models.
  • Linking every office directly to every other office (a full mesh) needs many tunnels; hub-and-spoke designs, where branches connect only to a central site, need fewer.

For CCNA learners

This lines up with CCNA 200-301 exam topic 5.5, describe IPsec remote access and site-to-site VPNs: know which devices build each kind of tunnel, that site-to-site is always on and invisible to users, and that remote access needs a client (or a browser) on the user's device.

Answer to the comment question

6 tunnels. Each of the 4 offices needs a tunnel to the 3 others, which gives 4 × 3 = 12 ends, but every tunnel has two ends, so 12 ÷ 2 = 6. In general a full mesh of n sites needs n(n-1)/2 tunnels, which grows fast; that is why many companies use hub-and-spoke instead.

Test your knowledge

Quick quiz: "VPNs: site-to-site vs remote access"

4 multiple-choice questions. Pick one answer for each, then check how you did.

1What does a VPN do to each packet before it crosses the internet?
2In a site-to-site VPN, which devices build the tunnel?
3Which statement fits a remote access VPN?
4Why don't users notice a site-to-site VPN?

Sources

Video transcript

How do you send private data across the public internet without anyone reading it?

You build a tunnel. A VPN, a virtual private network, encrypts each packet and wraps it inside a new one. Anyone in the middle sees only scrambled data.

Site-to-site VPNs connect whole offices. A router or firewall at each site builds the tunnel, usually with IPsec. It's always on, and users don't even know it's there.

Remote access VPNs connect one person. Your laptop runs a VPN client and builds its own tunnel back to the office, from a coffee shop or a hotel.

Four offices, and every office has its own tunnel to every other office. How many site-to-site tunnels is that? Comment your answer below!

That's your byte.

More from Network Bytes

All Network Bytes lessons