---
title: "Virtual Private Network with example"
subject: "Computer Networks and Security"
chapter: 8
key: "semester_7/computer_networks_and_security:vpn-example"
source: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/vpn-example
site: BCT Engineering
---

# Virtual Private Network with example

Computer Networks and Security · Chapter 8: Network Security

- Asked in: 2071 Chaitra, 4 marks
- Video: [VPN (Virtual Private Network) Explained](https://www.youtube.com/watch?v=R-JUOpCgTZc) — PowerCert Animated Videos
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/vpn-example
- Whole chapter: https://www.bctengineer.com/md/semester_7/computer_networks_and_security/chapter-8

## Question

Explain Virtual Private Network (VPN) with an example.

## Short answer

A VPN creates an encrypted tunnel over the public internet, providing secure private network connectivity at lower cost than leased lines. Types include site-to-site (connecting LANs via VPN gateways) and remote-access (individual users connecting via client software). Protocols include IPsec, SSL/TLS, and OpenVPN. Example: a bank connects its Kathmandu headquarters and Pokhara branch via VPN gateways, encrypting traffic between 192.168.1.0/24 and 192.168.2.0/24 over the internet.

## Answer

A **Virtual Private Network (VPN)** creates a secure, private connection (a **tunnel**) over a public network such as the Internet. Data is encapsulated and encrypted, so it behaves as if the users were on a private leased line, but at a much lower cost.

#### How it works
1. Both ends authenticate each other (passwords, certificates, pre-shared key).
2. A tunnel is created: the original packet is encrypted and encapsulated in a new packet with the VPN gateway's address (e.g. IPsec ESP in tunnel mode).
3. The packet is carried over the Internet and cannot be read or changed.
4. The receiving gateway decrypts and delivers the original packet.

#### Types
- **Site-to-site VPN:** connects two LANs through VPN gateways.
- **Remote-access VPN:** a single user connects to the office network using VPN client software.

#### Protocols
IPsec, SSL/TLS VPN, L2TP, PPTP, OpenVPN.

#### Example
A bank has its head office in Kathmandu and a branch in Pokhara. Instead of renting a private line, each site has a VPN gateway connected to the Internet.

```text
Branch LAN --[VPN GW]====== encrypted tunnel ======[VPN GW]-- HQ LAN
 192.168.2.0/24         over the public Internet       192.168.1.0/24
```
A branch PC sending data to a head-office server has its packet encrypted by the Pokhara gateway, carried over the Internet and decrypted at Kathmandu. An employee at home can likewise use a remote-access VPN to reach the HQ servers securely.

Advantages: security, lower cost, scalability, remote access. Disadvantages: some speed overhead, depends on Internet quality.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is a VPN tunnel?
   A. Firewall
   B. Cable
   C. Leased line
   D. Encrypted and encapsulated connection over a public network
   Answer: D. It behaves like a private line at lower cost. (Key point: Tunnel)

2. Which connects two LANs?
   A. Remote-access VPN
   B. Site-to-site VPN
   C. Proxy
   D. DMZ
   Answer: B. Remote-access connects a single user. (Key point: Types)

3. What happens at the receiving gateway?
   A. Decrypts and delivers original packet
   B. Drops
   C. Encrypts again
   D. Compresses
   Answer: A. The sending gateway encrypts and encapsulates. (Key point: Process)

4. Which protocol is used in tunnel mode for VPN?
   A. IPsec ESP
   B. ARP
   C. DNS
   D. HTTP
   Answer: A. IPsec ESP in tunnel mode. (Key point: Protocol)

## Related in Computer Networks and Security

- [Subnet 120.89.96.0/19 for 100-800 hosts](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Asubnetting-120-89-96-four-depts) — Computer Networks and Security, chapter 4, asked 2×
- [Subnet 202.70.64.0/19 for 100-800 hosts](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Asubnetting-202-70-64-19) — Computer Networks and Security, chapter 4, asked 2×

## Related in other subjects

- [Intranet implementation procedure and VPN](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aintranet-implementation-procedure-vpn) — Internet and Intranet, chapter 6
- [Short note: Virtual-circuit network](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Ashort-note-virtual-circuit) — Telecommunications, chapter 8, asked 2×
