EstiNet 網路模擬器 實現軟體定義網路 (SDN) 技術介紹 思銳科技 October, 2017
內容 u u u EstiNet 網路模擬器介紹 SDN OpenFlow 選擇性附加模組應用範例 EstiNet Simulator SDN 實作
Introduction to EstiNet Simulator & Emulator
EstiNet 網路模擬器 (Simulator) 以軟體模擬的方式, 呈現真實網路的組態與封包傳送行為 可在模擬的網路中藉由各式有線與無線的通訊協定來傳遞網路封包 可隨意控制網路狀態, 例如有線網路的封包傳送延遲與封包遺失率, 或是無線網路的封包傳送能量 / 距離等 Switch Router Switch Router Router Switch Router Router Switch EstiNet 4
傳統網路模擬器 vs. EstiNet 網路模擬器 Developed in a proprietary environment Fake App Fake App Real App Real App Developed in real-world environment 5
EstiNet 網路仿真器 (Emulator) 網路連線 網路連線 Applications - 視訊音訊 (Skype, MSN, ) - 網頁瀏覽 (Firefox, IE, ) - 檔案傳輸 (FTP, P2P,...) - 其他 EstiNet (Emulation Mode) Applications - 視訊音訊 (Skype, MSN,...) - 網頁瀏覽 (Firefox, IE,...) - 檔案傳輸 (FTP, P2P,...) - 其他 應用程式產生的網路封包進入 EstiNet 模擬網路, 去經歷延遲 遺失 頻寬競爭等可控制的網路環境 支援 WAN LAN WLAN VANET SDN 等網路 離開 EstiNet 模擬網路的封包, 再到達另一端的應用程式, 可藉此測試與評估應用程式的效能與穩定度 6
Ethernet & Wi-Fi Simulation 7
SDN Network Simulation Environment
SDN/OpenFlow Simulation Environment (Out-of-band vs. In-band Control Planes) 9
SDN Simulator Architecture (Out-of-band Control Plane) 10
Legacy switch vs. SDN switch
STP in Legacy vs. in SDN Legacy without STP Legacy with STP SDN with STP 12
SDN Features: Technical View (1/2) u u u Legacy is distributed vs. SDN is centralized p In legacy, protocols are executed on switches. p In SDN, protocols are executed on a controller. Besides, the control plane and data plane are separated. SDN has global network view p Protocol algorithms could become simpler SDN can dynamically change forwarding paths as needed. In other words, SDN can adopt user-defined forwarding protocols instead of existing broadly-used legacy protocols for higher performance. p p p Could be with lower complexity Could be with lower convergence time after link failure Could be with better link utilization 13
u u u SDN Features: Technical View (2/2) Legacy is port-based vs. SDN is flow-based p In fact, port-based information in SDN still exist and are stored at the controller, which is located outside the switch. p In SDN, flow-based rules are stored within the flow tables on the switch. Control plane and data plane are separated. p Move complex protocols to the controller side p Easier to maintain/upgrade protocols p The switch side becomes unified based on OpenFlow protocols. Protocol Independent p On switches, recognized packet header formats can be dynamically defined (programmable). 14
SDN Features: Business View u u u R: Router H: Host R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 H13 H14 H15 H16 H17 H18 H19 H20 H21 H22 H23 H24 H25 H26 H27 H28 H29 H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 H40 H41 H42 H43 H44 Control plane and data plane are separated. p Buying SDN controller (protocols) and switch separately reduces the purchase price for customers (save CAPEX). p Attack the business of Cisco s total-solution switch products (hardware combines software tightly) Flow-based operations become a fundamental capability. p Dynamic traffic engineering helps to fully utilize link bandwidth (save OPEX) Protocol Independent p Using efficient user-defined protocols instead of making do with existing and unfit legacy protocols (improve networking performance to deliver better network application s user experience) 15
What does OpenFlow Define? Tables, Messages Tables: Flow Tables, Group Tables, Meter Tables Flow Tables Group Tables Meter Table Flow Identification and Packet Modification & Forwarding (add/ modify /delete) Broadcast, Multicast, VLAN &LAG (Action Set : Bucket) Rate Limiting : Bands 限流 Messages: Controller-to-Switch Messages Asynchronous Messages Symmetric Messages 16
OpenFlow Messages (based on version 1.3.4) 17
OpenFlow Table Processing (v 1.3.4) Copy Copy Output Action Within Apply-Actions Instruction Output Action Within Apply-Actions Instruction Output Action Within Apply-Actions Instruction Pkt Hdr + Metadata + Action Set + In Port Flow Table 1 Pkt Hdr + Metadata + Action Set + In Port Flow Table 2 Pkt Hdr + Metadata + Action Set + In Port Flow Table n Execute Packet Action Set Put to some queue of some port Meter Instruction Meter Instruction Meter Instruction Group Action Within Apply-Actions Instruction Group Action Within Apply-Actions Instruction Direct Direct Direct Group Action Within Apply-Actions Instruction Meter Table Copy Copy Copy Execute Bucket Action Set Group Table 18
Flow Table 19
Action Types & Action Set 20
Group Table 21
Meter Table 22
Legacy switch vs SDN switch Legacy switch Port-based Distributed 分散式 Protocols are executed on switches SDN switch Flow-based Centralized 集中式 Protocols are executed on controller Control plan and Data plane are separated Flow-based operations can not only provide forwarding service but also support more advanced networking services, such as QoS. 23
Use Cases of SDN Simulation Applications
在區域網路中用 SDN 技術來提供 QoS 服務
傳統的區域網路不會特意提供 QoS 服務 互聯網中有八個伺服器分別傳送資料給位於區域網路的八個使用者 若由網管人員根據動態需求去修改網路設定來提供 QoS 服務, 容易發生設定錯誤的情況, 且不容易提供即時的服務 26
當大頻寬網段進入小頻寬網段時, 會形成頻寬瓶頸 25 Mbps 1000 Mbps 80 Mbps 27
當網路有頻寬瓶頸時, 會導致使用者端的資料接收量呈現不穩定的情況 ( 因自由競爭有限頻寬 ) 28
導入 SDN 技術後, 區域網路也可以提供 QoS 服務 C A B A. 導入 SDN Controller 與 SDN Switch 設備 B. SDN Controller 可自動分配頻寬給不同的使用者 C. 使用者可被分群, 來提供不同等級的 QoS 服務 29
SDN Controller 控制 SDN Switch 來管制經過 Switch 的所有網路連線所能使用的頻寬量 30
頻寬使用量經過管制後, 使用者端的資料接收量就會呈現穩定的情況 頻寬保證 頻寬保證 頻寬分享 頻寬保證 頻寬分享 頻寬分享 頻寬分享 頻寬競爭 頻寬分享 頻寬競爭 頻寬競爭 31
模擬較大規模的 SDN Topology
模擬 25 個 SDN switch 33
SDN Wi-Fi Infran
SDN Wi-Fi Infran 35
Wireshark: controller 36
WAVE/DSRC 車間無線通訊模擬模組
Vehicular Network Simulation V2V & V2I Communication Bus Moving Path & Intra-vehicle Communication 38
EstiNet Simulator SDN 實作
用一個小型的 SDN 網路範例 ( 請同學實際操作 ) 來介紹模擬器的 4 個操作模式與 SDN 操作 前置設定 Copy OF_dissector #ls /usr/lib64/wireshark/plugins/ #cp -f openflow.so /usr/lib64/wireshark/plugins/1.10.14/ Open wireshark #wireshark & check "Help-->About Wireshark -> Plugins" openflow.so exist? Input License Key #inputkey 571H1J10K73BEVD2W62X23EH15YZ2069OVQUS269K71978882V7502TNI36K7330 #reserve 40
用一個小型的 SDN 網路範例 ( 請同學實際操作 ) 來介紹模擬器的 4 個操作模式與 SDN 操作 模擬時間 G-Setting=> Simulation=> [Simulation] Simulation Time 300 sec(s) => [Speed] As Fast S the Real-world Clock [Node1] Start Time: 1 sec; Stop Time: 300 secs Controller : nox_core -i ptcp: switch tcpdump -v -i eth1 -U -w controller.pcap [Node3] OpenFlow switch v13: [controller] => Controller IP Address 1.0.1.1 [Node4] Start Time: 10 sec; Stop Time: 300 secs Sender: ttcp -t -s -u -p 8000 1.0.2.2 [Node5] Start Time: 1 sec; Stop Time: 300 secs Receiver: ttcp -r -s -u -p 8000 41
Thank You