Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SDN Training Day2

SDN Training Day2

SDN Training Day2

Che-Wei Lin

July 31, 2015
Tweet

More Decks by Che-Wei Lin

Other Decks in Technology

Transcript

  1. 《SDN交換機平台模擬與實務 Day 2》7/24, 7/31

  2. SDN Tutorial TAs ✤ 現場有三位助教會協助各位操作 • 林哲緯 • 吳昇蓉 •

    李紀萱 • 李哲銓 ✤ 簡報檔下載:
  3. Outline ✤ SDN Implementations • LAB1 Developing a hub application

    (Review) • LAB2 Developing a learning switch application • LAB3 Developing a learning switch with ACLs application ✤ Network Topology Emulator • Overview of Mininet • Basic Mininet Commands • How to make a Network Topology
  4. 實驗拓墣 Internet . . . . . . . .

    . . . . SDN Switch host Control plane Data plane host host SDN Switch SDN Switch SDN Switch Legacy Switch
  5. Hub Application Review (1/2) h1 ping 8.8.8.8 1.packet 2. OF:packet-in

    3. OF:packet-out 4.packet 4.packet Internet Legacy Switch ✤ LAB 1 : Hub ✤ 接上兩台host至switch ✤ ⼀一台ping 8.8.8.8 ✤ 利⽤用另⼀一台host,開啟wireshark,觀察到有收到其封包 ✤ 使⽤用 ping 的 echo time 約1000~2000ms ✤ How does it work ?
  6. HubApplication Review (2/2) ✤ LAB 1 : Hub (adding flow)

    ✤ 接上兩台host至switch ✤ ⼀一台ping 8.8.8.8 ✤ 利⽤用另⼀一台host,開啟wireshark,觀察到有收到其封包 ✤ 使⽤用 ping 的 echo time ⼤大幅減少至 10~20ms ✤ How does it work ? h1 ping 8.8.8.8 1.packet 2. OF:Add flow 3.packet 3.packet Internet Legacy Switch
  7. Switch Application 實驗結果 ✤ LAB 2 : Learning switch ✤

    如Part 1 ✤ 利⽤用另⼀一台host,開啟wireshark,觀察到可上網但收不到其封包 ✤ How does it work ? h1 ping h2 1.ARP request 2. OF:packet-in 3. OF:packet-out 4.ARP request 4.ARP request h1 ping h2 8.ARP reply 7. OF:packet-out 5.ARP reply Controller s1:port1->host1 Controller s1:port1->host1 s1:port2->host2 6. OF:packet-in 9. OF:flow-mod s1 Flow Table dst:mac_h1 out:1 dst:mac_h2 out:2
  8. Switch with ACLs Application 實驗結果 ✤ LAB 3 : Learning

    switch with ACLs ✤ 接上⼀一台host至 Switch ✤ 可使⽤用 ping, ssh, FTP 或其他網路協定,但無法使⽤用 HTTP ✤ How does it work ? ✤ 延續Lab2之結果,利⽤用flow-mod⽅方式加入對應之flow ✤ match field 設定為 HTTP 對應的 port number (80) OF:flow-mod
  9. Outline ✤ SDN Implementations • LAB1 Developing a hub application

    (Review) • LAB2 Developing a learning switch application • LAB3 Developing a learning switch with ACLs application ✤ Network Topology Emulator • Overview of Mininet • Basic Mininet Commands • How to make a Network Topology
  10. Mininet ✤ Mininet is a network emulator which can create

    a network of ✤ Virtual hosts ✤ Switches ✤ Controllers ✤ Links
 on a single machine (VM, cloud or native) ✤ Inside this virtual network, each OpenFlow switch is emulated by an Open vSwitch program.
  11. Mininet ✤ Mininet hosts run standard Linux network software, and

    its switches support OpenFlow for highly flexible custom routing. ✤ Mininet is under a permissive BSD Open Source license – we can implement any idea to achieve our goal !
  12. Mininet ✤ You can control the virtual network using the

    Mininet Command- Line Interface (and API). ✤ Inside this virtual network, each OpenFlow switch is emulated by an Open Vswitch program. ✤ Inside this virtual network, each host is emulated by a container (like a VM). ✤ You can execute a real program like ping on a emulate host.
  13. Commands

  14. Create a minimal topology ✤ Enter the Linux command to

    create network ✤ Enter the Mininet command to check network : • Display Mininet CLI commands: • Display nodes: $"sudo"mn mininet>'help mininet>'nodes
  15. Mininet Commands ✤ Display links: ✤ Dump information about all

    nodes: ✤ Do all-pairs ping: ✤ Exit the CLI :
  16. Changing Topology Size and Type ✤ You can create different

    topo with --topo • one switch and four hosts:
  17. Changing Topology Size and Type ✤ a linear topology (where

    each switch has one host, and all switches connect in a line)
  18. Changing Topology Size and Type ✤ a simple tree topology

  19. More Detail Network Setting ✤ Set bandwidth and delay of

    all links : ✤ Create your custom topology ✤ Remote controller
  20. Custom topology --topo-2sw-2host

  21. How to make a Network Topologys ✤ Use “sudo python

    <file>” to execute a testing script
  22. ✤ To use remote controller: • from mininet.node import RemoteController

    • net.addController( <controller name>, controller=RemoteController, ip=<controller IP> ) ✤ Create a mininet object (Line 32): • net = Mininet( topo=topo, link=TCLink ) ✤ Start mininet (Line 33): • net.start() ✤ Stop mininet (Line 41): • net.stop() How to make a Network Topology
  23. ✤ get nodes by name (Line 39): • net.get('h1', 'h2')

    ✤ “pingall” test (Line 37): • net.pingAll() How to make a Network Topology
  24. About SDNDS-TW ✤ 台灣 SDN 開發者社群: http://sdnds.tw/ ✤ Slack: https://sdnds-tw.slack.com/

    or 
 IRC #sdnds-tw on Freenode ✤ 索取Slack頻道邀請函: https://sdnds-tw.herokuapp.com/ ✤ Google group: http://group.sdnds.tw/ ✤ Hackpad: https://sdnds-tw.hackpad.com/
  25. Q&A