14
© 2014 VMware Inc. All rights reserved VMware NSXがサポートするトンネル方式について ヴイエムウェア(株) ネットワーク&セキュリティー事業部 テクニカルリーダ 進藤 資訓

VMware NSXがサポートするトンネル方式について

Embed Size (px)

DESCRIPTION

Introduces the L2 over L3 tunneling (encapsulation) supported by VMware NSX (in Japanese)

Citation preview

Page 1: VMware NSXがサポートするトンネル方式について

© 2014 VMware Inc. All rights reserved

VMware NSXがサポートするトンネル方式について ヴイエムウェア(株)

ネットワーク&セキュリティー事業部

テクニカルリーダ 進藤 資訓

Page 2: VMware NSXがサポートするトンネル方式について

- 2 - © 2014 VMware Inc. All rights reserved

自己紹介

l  進藤 資訓(しんどう もとのり) / @motonori_shindo

l  略歴

u  東京電力、カーネギーメロン大学、アセンド、コサイン、プロキシム、ファイブ・フロント、ニシラ、ヴイエムウェア

l  目標

u  歌って踊れるエンジニア

Page 3: VMware NSXがサポートするトンネル方式について

- 3 - © 2014 VMware Inc. All rights reserved

VMware NSXがサポートするトンネル方式

l  GRE (Generic Routing Encapsulation)

l  STT (Stateless TCP Transport)

l  VXLAN (Virtual Extensible LAN)

Page 4: VMware NSXがサポートするトンネル方式について

- 4 - © 2014 VMware Inc. All rights reserved

STT (Stateless Transport Tunneling)

l  Nicira / VMware が提唱する L2 over L3 トンネル(Encapsulation)手法

u  draft-davie-stt-03.txt

l  Why yet another L2 over L3 tunneling ?

u  性能

u  多くのコンテクスト情報

u  Multi-Path 特性

u  ソフトウェア指向

Page 5: VMware NSXがサポートするトンネル方式について

- 5 - © 2014 VMware Inc. All rights reserved

TSO (TCP Segmentation Offload)

l  最近の(ここ4〜5年に出た)NICには様々なハードウェア・アクセラレーション機能が搭載されている

u  RSS、GSO/TSO、Checksum Offload、etc.

l  TSOは、通常OS(ソフトウェア)が行わなければいけないSegmentation処理をNICがハードウェアで行ってくれる

u  最大64K bytesのパケットを送れる à Context Switchを劇的に減らせる

l  NICには “TCP” に見えるようなパケットでEncapsulationしてやる事により、TSOのメリットを享受できる!

Page 6: VMware NSXがサポートするトンネル方式について

- 6 - © 2014 VMware Inc. All rights reserved

Encapsulation / Segmentation 処理の流れ

STT (18) TCP’ (20) IP (20)

Payload 1 STT (18) TCP’ (20) IP (20)

Payload 2 TCP’ (20) IP (20)

Payload n TCP’ (20) IP (20)

L2 Frame (up to ≒ 64K)

呍呍呍呍

(HWによる) Segmentation

処理

Page 7: VMware NSXがサポートするトンネル方式について

- 7 - © 2014 VMware Inc. All rights reserved

TCP-like ヘッダー

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Port | Destination Port | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number(*) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Acknowledgment Number(*) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data | |U|A|P|R|S|F| | | Offset| Reserved |R|C|S|S|Y|I| Window | | | |G|K|H|T|N|N| | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Urgent Pointer | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options | Padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Page 8: VMware NSXがサポートするトンネル方式について

- 8 - © 2014 VMware Inc. All rights reserved

STT ヘッダー

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version | Flags | L4 Offset | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Max. Segment Size | PCP |V| VLAN ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Context ID (64 bits) + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Padding | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | |

Page 9: VMware NSXがサポートするトンネル方式について

- 9 - © 2014 VMware Inc. All rights reserved

スループットとCPU使用率

0

10

20

30

40

50

60

70

80

90

100

0

1

2

3

4

5

6

7

8

9

10

Linux Bridge OVS Bridge OVS-GRE OVS-STT

スループット CPU (Receive) CPU (Send)

(Gbps) (%) 出典: http://networkheresy.com/2012/06/08/the-overhead-of-software-tunneling/

Page 10: VMware NSXがサポートするトンネル方式について

- 10 - © 2014 VMware Inc. All rights reserved

Multi-Path 特性

l  背景

u  East-Westトラフィックの増大に対応するため、Multi-PathによるFabricネットワークが広く用いられるようになってきている。

l  要件

u  1つのフローは同じパスを通ること

u  マルチパスを有効に活用するために十分なエントロピーを持つこと

l  STTによる対応方法

u  1フローから作られるSTTパケットは、同じsrc/dst IP address / port numberを持つようにする

u  元のパケットのフロー情報のハッシュを取り、STTのTCPヘッダのsrc port numberとして使う

Page 11: VMware NSXがサポートするトンネル方式について

- 11 - © 2014 VMware Inc. All rights reserved

Multi-Pathを意識したEncapsulation

STT (18) TCP’ (20) IP (20)

Hash (src/dst MAC addr, src/dst IP addr, src/dst port number, etc.)

TCP src port #

Ether IP TCP Data

元パケット

Page 12: VMware NSXがサポートするトンネル方式について

- 12 - © 2014 VMware Inc. All rights reserved

VXLAN

l  Arista / Broadcom / Cisco / VMware / Citrix / RedHat らが中心に提唱

u  draft-mahalingam-dutt-dcops-vxlan-04.txt

l  VLAN ID (12bit) を VNI (24bit) に拡張

l  UDP/IPでEncapsulation

u  L3オーバーレイ

u  マルチパス

l  ハードウェアで処理し易いように設計

l  エコシステムの形成

Page 13: VMware NSXがサポートするトンネル方式について

- 13 - © 2014 VMware Inc. All rights reserved

トンネルは適材適所

Physical

STT Hypervisor Hypervisor

WORLD

VXLAN VXLAN

Virtual Network

Cable Cable

Cable

Copper Cable

Controller

Third party hardware

Page 14: VMware NSXがサポートするトンネル方式について

- 14 - © 2014 VMware Inc. All rights reserved

ネットワーク仮想化とトンネリング

u  トンネリング(Encapsulation) 方式はネットワーク仮想化の重要な一部であるが、すべてではない。

u  Control Plane の作り方によって、まったく異なった特性を持つようになる

§ Hop by Hop vs Overlay

§ Proactive vs Reactive

§  Flooding vs non-Flooding

§ Multicast-based vs Multicast-less

§ Centralized vs Distributed

§ Network-oriented vs Server-oriented

u  トンネリング(Overlay)をしても、うまく設計・実装すれば性能的に問題になることはない。