Encrypting OVN tunnels with IPsec Qiuyu Xiao - - PowerPoint PPT Presentation
Encrypting OVN tunnels with IPsec Qiuyu Xiao - - PowerPoint PPT Presentation
Encrypting OVN tunnels with IPsec Qiuyu Xiao (qiuyu.xiao.qyx@gmail.com) Ben Pfaff (blp@ovn.org) Open Virtual Network (OVN) OVN provides a logical network abstraction on top of a physical network VM1 VM2 VM1 VM6 VM2 VM7 L-Switch VM6 VM7
Open Virtual Network (OVN)
Hypervisor 1 Hypervisor 2
VM1 VM2 VM8 VM3 VM4 VM9 VM6 VM7 VM5
Physical
1
OVN provides a logical network abstraction on top of a physical network
VM6 VM7 VM8 VM9 L-Switch L-Switch VM1 VM2 L-Switch VM3 VM4 VM5 L-Router
Logical
Open Virtual Network (OVN)
VMs are oblivious to the physical network states
2
Hypervisor 1 Hypervisor 2
VM1 VM2 VM8 VM3 VM4 VM9 VM6 VM7 VM5
Physical
VM6 VM7 VM8 VM9 L-Switch L-Switch VM1 VM2 L-Switch VM3 VM4 VM5 L-Router
Logical
Open Virtual Network (OVN)
Network appliances can be implemented and placed in the logical network
3
Hypervisor 1 Hypervisor 2
VM1 VM2 VM8 VM3 VM4 VM9 VM6 VM7 VM5
Physical
VM6 VM7 VM8 VM9 L-Switch
Logical
L-Switch VM1 VM2 L-Switch VM3 VM4 VM5 L-Router L-Firewall L-LoadBalancer
OVN Tunnel Traffic
4
Hypervisor 1 Hypervisor 2
VM1 VM2 VM8 VM3 VM4 VM9 VM6 VM7 VM5 Inner Ethernet Header Inner IP Header Payload
OVN Tunnel Traffic
4
Hypervisor 1 Hypervisor 2
VM1 VM2 VM8 VM3 VM4 VM9 VM6 VM7 VM5 Outer Ethernet Header Outer IP Header Outer UDP Header Geneve Header Inner Ethernet Header Inner IP Header Payload
OVN Tunnel Traffic
4
Hypervisor 1 Hypervisor 2
VM1 VM2 VM8 VM3 VM4 VM9 VM6 VM7 VM5 Outer Ethernet Header Outer IP Header Outer UDP Header Geneve Header Inner Ethernet Header Inner IP Header Payload
OVN Tunnel Traffic
4
Hypervisor 1 Hypervisor 2
VM1 VM2 VM8 VM3 VM4 VM9 VM6 VM7 VM5 Outer Ethernet Header Outer IP Header Outer UDP Header Geneve Header Inner Ethernet Header Inner IP Header Payload
OVN Tunnel Traffic
4
Hypervisor 1 Hypervisor 2
VM1 VM2 VM8 VM3 VM4 VM9 VM6 VM7 VM5 Inner Ethernet Header Inner IP Header Payload
The Needs for Tunnel Encryption
- VMs compute and communicate sensitive data, e.g., financial and health data
- Physical network devices (e.g., router, switch) cannot be trusted or might be
compromised
q Traffic across datacenters q Router misconfiguration q Attackers breaking into internal network q Phishing or social engineering attacks on administrators
5
Encrypting Tunnel Traffic with IPsec
Outer Ethernet Header Outer IP Header Outer UDP Header Geneve Header Inner Ethernet Header Inner IP Header Payload
IPsec Encryption
Outer Ethernet Header Outer IP Header ESP Header
- Confidentiality
- Integrity
- Authenticity
6
IPsec in Linux
IKE daemon IPsec kernel stack
security association security policy IKE protocol ESP/AH protocol
User space Kernel
7
IPsec in Linux
IKE daemon IPsec kernel stack
security association security policy IKE protocol ESP/AH protocol
User space Kernel
8
IKE daemon
- Authentication
- Negotiates cryptographic algorithms
- Generates keying material
IPsec in Linux
IKE daemon IPsec kernel stack
security association security policy IKE protocol
IKE daemon
- Authentication
- Negotiates cryptographic algorithms
- Generates keying material
- Installs security policy and security
association
ESP/AH protocol
User space Kernel
9
IPsec in Linux
IKE daemon IPsec kernel stack
security association security policy IKE protocol
IKE daemon
- Authentication
- Negotiates cryptographic algorithms
- Generates keying material
- Installs security policy and security
association
ESP/AH protocol
User space Kernel
9
Which traffic to protect
IPsec in Linux
IKE daemon IPsec kernel stack
security association security policy IKE protocol
IKE daemon
- Authentication
- Negotiates cryptographic algorithms
- Generates keying material
- Installs security policy and security
association
ESP/AH protocol
User space Kernel
9
How to protect the selected traffic
IPsec in Linux
IKE daemon IPsec kernel stack
security association security policy IKE protocol ESP/AH protocol
IPsec kernel stack
- Encryption and decryption
- Checks integrity and authenticity
User space Kernel
10
OVS IPsec Tunnel
IKE daemon IPsec kernel stack
- vsdb
- vs-monitor-ipsec
- vs datapath
User space Kernel
11
OVS IPsec Tunnel
IKE daemon IPsec kernel stack
- vsdb
- vs-monitor-ipsec
- vs datapath
Configuring IPsec tunnel via
- vsdb
- Using pre-shared key
User space Kernel
12
For example:
OVS IPsec Tunnel
IKE daemon IPsec kernel stack
- vsdb
- vs-monitor-ipsec
- vs datapath
Configuring IPsec tunnel via
- vsdb
- Using pre-shared key
- Using self-signed certificate
User space Kernel
13
For example:
OVS IPsec Tunnel
IKE daemon IPsec kernel stack
- vsdb
- vs-monitor-ipsec
- vs datapath
Configuring IPsec tunnel via
- vsdb
- Using pre-shared key
- Using self-signed certificate
- Using CA-signed certificate
User space Kernel
14
For example:
OVS IPsec Tunnel
IKE daemon IPsec kernel stack
- vsdb
- vs-monitor-ipsec
- vs datapath
Establishing IPsec tunnel
- ovs-monitor-ipsec configures IKE
daemon
security association security policy
User space Kernel
15
OVS IPsec Tunnel
IKE daemon IPsec kernel stack
- vsdb
- vs-monitor-ipsec
- vs datapath
Establishing IPsec tunnel
- ovs-monitor-ipsec configures IKE
daemon
- IKE daemon sets up security policy
and security association
security association security policy
User space Kernel
15
OVS IPsec Tunnel
IKE daemon IPsec kernel stack
- vsdb
- vs-monitor-ipsec
- vs datapath
For example (geneve tunnel): Establishing IPsec tunnel
- ovs-monitor-ipsec configures IKE
daemon
- IKE daemon sets up security policy
and security association
security association security policy
User space Kernel
15
OVS IPsec Tunnel
IKE daemon IPsec kernel stack
- vsdb
- vs-monitor-ipsec
- vs datapath
User space Kernel
IPsec kernel stack
- Encryption and decryption
- Checks integrity and authenticity
unencrypted packet encrypted packet
16
OVN IPsec
northbound db
- vn-northd
southbound db
- vn-controller
…
- vsdb
- vn-controller
Hypervisor 1 Hypervisor n
17
vswitchd
- vsdb
vswitchd
OVN IPsec
northbound db
- vn-northd
southbound db
- vn-controller
…
- vn-controller
Hypervisor 1 Hypervisor n
- In each hypervisor, configure ovsdb to use
CA-signed certificate for authentication
- Enable IPsec by configuring northbound
database
17
- vsdb
vswitchd
- vsdb
vswitchd
For example:
IPsec Evaluation
- Environment: StrongSwan 5.3.5, Linux 4.4.0, Intel Xeon 2 GHz, 10 Gbps NIC
- iperf generates TCP stream (window size: 85KB), which is encrypted in a single
core
1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 aes256-sha256 aes-gcm no encryption
Throughput (Mbps)
Throughput (Mbps) 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% aes256-sha256 aes-gcm no encryption
CPU Usage
iperf-client iperf-server
18
IPsec Evaluation
- Environment: StrongSwan 5.3.5, Linux 4.4.0, Intel Xeon 2 GHz, 10 Gbps NIC
- iperf generates TCP stream (window size: 85KB), which is encrypted in a single
core
1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 aes256-sha256 aes-gcm no encryption
Throughput (Mbps)
Throughput (Mbps) 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% aes256-sha256 aes-gcm no encryption
CPU Usage
iperf-client iperf-server
18
IPsec Evaluation
- Environment: StrongSwan 5.3.5, Linux 4.4.0, Intel Xeon 2 GHz, 10 Gbps NIC
- iperf generates TCP stream (window size: 85KB), which is encrypted in a single
core
1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 aes256-sha256 aes-gcm no encryption
Throughput (Mbps)
Throughput (Mbps) 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% aes256-sha256 aes-gcm no encryption
CPU Usage
iperf-client iperf-server
18
IPsec Evaluation
- Environment: StrongSwan 5.3.5, Linux 4.4.0, Intel Xeon 2 GHz, 10 Gbps NIC
- iperf generates TCP stream (window size: 85KB), which is encrypted in a single
core
1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 aes256-sha256 aes-gcm no encryption
Throughput (Mbps)
Throughput (Mbps) 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% aes256-sha256 aes-gcm no encryption
CPU Usage
iperf-client iperf-server
18
Current Status
- Compatible with StrongSwan and LibreSwan IKE daemon
- Packages for Ubuntu and Fedora
- Tutorials on using OVN IPsec
- Need to use OVS upstream kernel module
19
Future Directions
More flexible tunnel encryption policies:
- Only encrypting tunnel traffic between certain hypervisors
- Only encrypting tunnel traffic from certain logical network
20