What Is VPN
What Is VPN
What Is VPN
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
18.1 VPN Overview
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3
VPN Overview
Virtual Private Networks
To secure network traffic between sites and
users, organizations use virtual private
networks (VPNs) to create end-to-end private
network connections. A VPN is virtual in that
it carries information within a private network,
but that information is transported over a
public network. A VPN is private in that the
traffic is encrypted to keep the data
confidential while it is transported across the
public network. The figure shows a collection
of various types of VPNs managed by an
enterprise’s main site. The tunnel enables
remote sites and users to access main site’s
network resources securely.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4
VPN Overview
VPN Benefits
Modern VPNs now support encryption features, such as Internet Protocol Security (IPsec) and Secure
Sockets Layer (SSL) VPNs to secure network traffic between sites.
Security VPNs provide the highest level of security available, by using advanced encryption
and authentication protocols that protect data from unauthorized access.
Scalability VPNs allow organizations to use the internet, making it easy to add new users
without adding significant infrastructure.
Compatibility VPNs can be implemented across a wide variety of WAN link options including all
the popular broadband technologies. Remote workers can take advantage of these
high-speed connections to gain secure access to their corporate networks.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5
18.2 VPN Topologies
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 6
VPN Topologies
Site-to-Site and Remote-Access VPNs
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 7
VPN Topologies
Site-to-Site and Remote-Access VPNs (Cont.)
A remote-access VPN is
dynamically created to
establish a secure
connection between a client
and a VPN terminating
device. For example, a
remote access SSL VPN is
used when you check your
banking information online.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8
VPN Topologies
Remote-Access VPNs
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9
VPN Topologies
SSL VPNs
SSL uses the public key infrastructure and digital certificates to authenticate peers. Both IPsec and SSL
VPN technologies offer access to virtually any network application or resource. However, when security
is an issue, IPsec is the superior choice. If support and ease of deployment are the primary issues,
consider SSL. The type of VPN method implemented is based on the access requirements of the users
and the organization’s IT processes. The table compares IPsec and SSL remote access deployments.
Feature IPsec SSL
Applications supported Extensive - All IP-based applications are Limited - Only web-based applications and
supported. file sharing are supported.
Authentication strength Strong - Uses two-way authentication with Moderate - Using one-way or two-way
shared keys or digital certificates. authentication.
Encryption strength Strong - Uses key lengths from 56 bits to 256 Moderate to strong - With key lengths from
bits. 40 bits to 256 bits.
Connection complexity Medium - Because it requires a VPN client Low - It only requires a web browser on a
pre-installed on a host. host.
Connection option Limited - Only specific devices with specific Extensive - Any device with a web browser
configurations can connect. can connect.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 10
VPN Topologies
Site-to-Site IPsec VPNs
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 12
IPsec Overview
Video - IPsec Concepts
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13
IPsec Overview
IPsec Technologies
Using the IPsec framework, IPsec provides
these essential security functions:
• Confidentiality - IPsec uses encryption
algorithms to prevent cybercriminals from
reading the packet contents.
• Integrity - IPsec uses hashing
algorithms to ensure that packets have
not been altered between source and
destination.
• Origin authentication - IPsec uses the
Internet Key Exchange (IKE) protocol to
authenticate source and destination.
Methods of authentication including using
pre-shared keys (passwords), digital
certificates, or RSA certificates.
• Diffie-Hellman - Secure key exchange
typically using various groups of the DH
algorithm.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 14
IPsec Overview
IPsec Technologies (Cont.)
The IPsec security functions are list in the table.
IPsec Function Description
IPsec Protocol The choices for IPsec Protocol include Authentication Header (AH) or Encapsulation Security
Protocol (ESP). AH authenticates the Layer 3 packet. ESP encrypts the Layer 3 packet. Note: ESP+AH
is rarely used as this combination will not successfully traverse a NAT device.
Confidentiality Encryption ensures confidentiality of the Layer 3 packet. Choices include Data Encryption Standard
(DES), Triple DES (3DES), Advanced Encryption Standard (AES), or Software-Optimized Encryption
Algorithm (SEAL).
Integrity Ensures that data arrives unchanged at the destination using a hash algorithm, such as message-
digest 5 (MD5) or Secure Hash Algorithm (SHA).
Authentication IPsec uses Internet Key Exchange (IKE) to authenticate users and devices that can carry out
communication independently. IKE uses several types of authentication, including username and
password, one-time password, biometrics, pre-shared keys (PSKs), and digital certificates using the
Rivest, Shamir, and Adleman (RSA) algorithm.
Diffie-Hellman IPsec uses the DH algorithm to provide a public key exchange method for two peers to establish a
shared secret key. There are several different groups to choose from including DH14, 15, 16 and DH
19, 20, 21 and 24. DH1, 2 and 5 are no longer recommended.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15
IPsec Overview
IPsec Protocol Encapsulation
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16
IPsec Overview
Confidentiality
Confidentiality is achieved by encrypting the
data. The degree of confidentiality depends
on the encryption algorithm and the length
of the key used in the encryption algorithm.
The shorter the key, the easier it is to break.
• DES uses a 56-bit key and should be
avoided.
• 3DES uses three 56-bit encryption keys
per 64-bit block.
• AES offers three different key lengths:
128 bits, 192 bits, and 256 bits.
• SEAL is a stream cipher, encrypting data
continuously. It uses a 160-bit key.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17
IPsec Overview
Integrity
Data integrity means that the data that is
received is exactly the same data that was
sent.
• Message-Digest 5 (MD5) uses a 128-bit
shared-secret key. The variable-length
message and 128-bit shared-secret key
are combined and run through the
HMAC-MD5 hash algorithm producing a
128-bit hash.
• The Secure Hash Algorithm (SHA) uses
a 160-bit secret key. The variable-length
message and 160-bit shared-secret key
are combined and run through the
HMAC-SHA-1 algorithm producing a
160-bit hash.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 18
IPsec Overview
Authentication
When conducting business long
distance, the device on the other end
of the VPN tunnel must be
authenticated before the
communication path is considered
secure.
• A pre-shared secret key (PSK)
value is entered into each peer
manually. The PSK is combined
with other information to form the
authentication key.
• Rivest, Shamir, and Adleman
(RSA) authentication uses digital
certificates to authenticate peers.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19
IPsec Overview
Authentication (Cont.)
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20
IPsec Overview
Secure Key Exchange with Diffie-Hellman
Encryption algorithms require a symmetric,
shared secret key to perform encryption and
decryption. How do the encrypting and
decrypting devices get the shared secret key?
The easiest key exchange method is to use a
public key exchange method, such as Diffie-
Hellman (DH). DH provides a way for two
peers to establish a shared secret key that only
they know, even though they are
communicating over an insecure channel.
Variations of the DH key exchange are
specified as DH groups. The DH group you
choose must be strong enough, or have
enough bits, to protect the IPsec keys during
negotiation.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 21
IPsec Overview
Video - IPsec Transport and Tunnel Modes
This video will explain the process of IPv4 packet with ESP in transport mode
and in tunnel mode.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 22
18.4 IPsec Protocols
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 23
IPsec Protocols
IPsec Protocol Overview
The two main IPsec protocols are
Authentication Header (AH) and Encapsulation
Security Protocol (ESP). The IPsec protocol is
the first building block of the framework. The
choice of AH or ESP establishes which other
building blocks are available. AH uses IP
protocol 51 and is appropriate only when
confidentiality is not required or permitted. It
provides data authentication and integrity, but it
does not provide data confidentiality
(encryption). All text is transported
unencrypted. ESP uses IP protocol 50 and
provides both confidentiality and
authentication. Authentication provides data
origin authentication and data integrity.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24
IPsec Protocols
Authentication Header
The AH function is applied to the entire packet, except for any IP header fields that normally
change in transit. Fields that normally change during transit are called mutable fields. For
example, the Time to Live (TTL) field is considered mutable because routers modify this field.
The AH process occurs in this order:
1. The IP header and data payload are hashed using the shared secret key.
2. The hash builds a new AH header, which is inserted into the original packet.
3. The new packet is transmitted to the IPsec peer router.
4. The peer router hashes the IP header and data payload using the shared secret key,
extracts the transmitted hash from the AH header, and compares the two hashes.
The hashes must match exactly. If one bit is changed in the transmitted packet, the hash
output on the received packet changes and the AH header will not match. AH supports MD5
and SHA algorithms.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 25
IPsec Protocols
Encapsulation Security Protocol
If ESP is selected as the IPsec protocol, an encryption algorithm must also be selected. The default
algorithm for IPsec is 56-bit DES. ESP can also provide integrity and authentication. First, the payload is
encrypted. Next, the encrypted payload is sent through a hash algorithm. The hash provides authentication
and data integrity for the data payload.
Optionally, ESP can also enforce anti-replay protection which verifies that each packet is unique and is not
duplicated. This protection ensures that a hacker cannot intercept packets and insert changed packets into
the data stream. Anti-replay works by keeping track of packet sequence numbers and using a sliding window
on the destination end.
When a connection is established between a source and destination, their counters are initialized at zero.
Each time a packet is sent, a sequence number is appended to the packet by the source. The destination
uses the sliding window to determine which sequence numbers are expected. The destination verifies that
the sequence number of the packet is not duplicated and is received in the correct order.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 26
IPsec Protocols
ESP Encrypts and Authenticates
When both authentication and encryption are
selected, encryption is performed first. One reason
for this order of processing is that it facilitates rapid
detection and rejection of replayed or bogus
packets by the receiving device. Prior to decrypting
the packet, the receiver can authenticate inbound
packets.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 29
Internet Key Exchange
The IKE Protocol
IKE enhances IPsec by adding features and
simplifies configuration for the IPsec standard.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 32
Internet Key Exchange
Video - IKE Phase 1 and Phase 2
This video will explain IPsec: Confidentiality, Integrity, Authentication, and Secure
Key Exchange.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 33
18.6 VPNs Summary
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 34
VPNs Summary
What Did I Learn in this Module?
• Organizations use virtual private networks (VPNs) to create end-to-end private network
connections that are transported over a public network.
• VPNs support encryption features, such as IPsec and SSL to secure network traffic between
sites.
• Site-to-site VPNs are created when VPN gateways are preconfigured with information to establish
a secure tunnel.
• Remote access VPNs (clientless and client-based) are used to securely connect remote and
mobile users to the enterprise by creating a secure tunnel.
• IPsec is a framework used to define how a VPN connection will ensure confidentiality, integrity,
and origin authentication.
• When establishing a VPN link, the peers must share the same SA to negotiate key exchange
parameters, establish a shared key, authenticate each other, and negotiate the encryption
parameters.
• The two main IPsec protocols are AH and ESP, which can be applied to IP packets using transport
mode or tunnel mode. © 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 35
VPNs Summary
What Did I Learn in this Module? (Cont.)
• The IKE protocol is a key management protocol standard that is used to automatically negotiate IPsec
security associations and enable IPsec secure communications.
• IKE uses ISAKMP for phase 1 and phase 2 of key negotiation. Phase 1 negotiates a security association (a
key) between two IKE peers. During phase 2 negotiation, IKE establishes keys (security associations) for
other applications, such as IPsec.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 36
VPNs
New Terms and Commands
• virtual private networks (VPNs)
• tunnel mode
• Authentication Header (AH)
• remote-access VPN
• Internet Protocol Security (IPsec)
• Internet Security Association Key Management
Protocol (ISAKMP)
• Encapsulation Security Protocol (ESP)
• security association (SA)
• site-to-site VPN
• transport mode
• pre-shared secret key (PSK)
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 37