O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

SDN Onboarding: Open vSwitch CLIs, OpenDaylight

475 visualizações

Publicada em

SDN Onboarding: Open vSwitch CLIs, OpenDaylight

Publicada em: Tecnologia
  • Login to see the comments

SDN Onboarding: Open vSwitch CLIs, OpenDaylight

  1. 1. SDN Onboarding: Spine Leaf Topology, OVS CLIs and OpenDaylight Telematika Open Session #10 Rabu, 11 April 2018 Lab Telematika Sekolah Teknik Elektro dan Informatika Institut Teknologi Bandung Labtek 8 Lantai 4
  2. 2. Apa itu Software Defined Network? 1
  3. 3. “ Software Defined Network is emerging architecture that is dynamic, manageable, cost-effective, and adaptable, making it ideal for the high-bandwidth, dynamic nature of today’s applications. -Open Networking Foundation
  4. 4. Mengapa SDN bisa tercipta? • Companies like IBM, Burroughs, Honeywell - they all made a killing doing everything for the customer in mutually-exclusive, proprietary ways. • Today we have open source, and Linux. People buy or build their own systems (often now virtual) and do their own thing.
  5. 5. Mengapa SDN bisa tercipta? • Innovation is huge in compute.Today we have open source, and Linux. People buy or build their own systems (often now virtual) and do their own thing. • Contrast this with networking
  6. 6. Mengapa SDN bisa tercipta? • for many years, people running data centers wanted solutions that just work, were plug n' go, and they were wiling to pay for that. And innovation in networking was slow • Today, data centers are exploding.
  7. 7. Mengapa SDN bisa tercipta? • First, look at the generic architecture of a switch. Switch consists of two main components -- the control plane, and the forwarding plane. • The forwarding plane is the hardware other than CPU that makes sure packets are routed. And this level of a switch is *fast*.
  8. 8. Mengapa SDN bisa tercipta? • The control plane is the component where things are configured, routing protocols live and do their work, and the results find their way down into the forwarding plane tables to control how packets are routed.
  9. 9. Mengapa SDN bisa tercipta? • Software defined networking (SDN) is a way to exert control on the forwarding plane by writing software to augment or replace portions of the control plane on the switch. The SDN system most associated with SDN is OpenFlow
  10. 10. Mengapa SDN bisa tercipta? • OpenFlow allows the control plane to be co- located on a compute node in a data center, as well as an agent running on the switch. • In simple terms, the compute node half of OpenFlow can read stats from the switch, and change the forwarding plane in response by sending commands to the OpenFlow agent on the switch.
  11. 11. Bagaimana Arsitekturnya?
  12. 12. Rest API OpenDaylight
  13. 13. Contoh – contoh Controller and more…
  14. 14. OpenFlow2
  15. 15. OF 1.0
  16. 16. Flow table
  17. 17. OF 1.3
  18. 18. OF 1.3(2)
  19. 19. How the flow table works
  20. 20. OpenDaylight
  21. 21. Bagaimana Arsitekturnya?
  22. 22. Instalasi OpenDaylight • Pertama, install dependency dari OpenDaylight. Maven, Java JDK dan JRE apt-get install maven apt-get install default-jdk apt-get install deafault-jre
  23. 23. Instalasi OpenDaylight • Download OpenDaylight.
  24. 24. Instalasi OpenDaylight • Setelah didownload, unzip/untar kemudian run ./bin/karaf. wget [URL Download ODL] unzip [Nama File ODL (ZIP)] tar -xvzf [Nama File ODL (TAR)] cd [Directory] ./bin/karaf
  25. 25. Instalasi OpenDaylight root@my-home:/home/petra# cd karaf-0.7.1 root@my-home:/home/petra/karaf-0.7.1# ./bin/karaf Apache Karaf starting up. Press Enter to open the shell now... 100% [========================================================================] Karaf started in 10s. Bundle stats: 375 active, 376 total ________ ________ .__ .__ .__ __ _____ ______ ____ ____ ______ _____ ___.__.| | |__| ____ | |___/ |_ / | ____ _/ __ / | | __ < | || | | |/ ___| | __ / | |_> > ___/| | | ` / __ ___ || |_| / /_/ > Y | _______ / __/ ___ >___| /_______ (____ / ____||____/_____ /|___| /__| /|__| / / / // /_____/ / Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight. opendaylight-user@root>
  26. 26. Instalasi Fitur-Fitur OpenDaylight #Mengaktifkan Apidocs dan Restconf opendaylight-user@root> feature:install odl-restconf odl-mdsal-apidocs #Mengaktifkan GUI opendaylight-user@root> feature:install odl-dlux-core odl-dluxapps-nodes odl-dluxapps-topology odl- dluxapps-yangui odl-dluxapps-yangvisualizer odl-dluxapps-yangman #Mengaktifkan Fungsi Switch Dasar (Link Discovery, Address Tracker) opendaylight-user@root> feature:install odl-l2switch-hosttracker odl-l2switch-addresstracker odl- l2switch-packet Alternatif #Apabila ingin switch memiliki fungsi seperti switch biasa opendaylight-user@root> feature:install odl-l2switch-switch #Melihat Seluruh Fitur dan Fitur Terinstall opendaylight-user@root> feature:list opendaylight-user@root> feature:list -i
  27. 27. GUI OpenDaylight GUI OpenDaylight dapat diakses di [IP_Controller]:8181/index.html dengan login: admin password: admin
  28. 28. Akses API OpenDaylight API OpenDaylight dapat diakses di tab YangUI atau YangMan
  29. 29. Rest API dan OpenDaylight Bagaimana Cara Mengatur Kontroller Menggunakan Rest API
  30. 30. Persiapan 1. Siapkan Opendaylight, Switch OpenFlow, dan Aplikasi Komunikasi Rest Api, misal Postman 2. Koneksikan Switch dengan Opendaylight
  31. 31. Persiapan 1. Siapkan Opendaylight, Switch OpenFlow, dan Aplikasi Komunikasi Rest Api, misal Postman 2. Koneksikan Switch dengan Opendaylight
  32. 32. Akses Opendaylight Inventory 1. Akses untuk konfigurasi switch berada di opendaylight-inventory. 2. Terdapat dua pilihan, operational untuk melihat konfigurasi, dan config untuk mengubah konfigurasi
  33. 33. Contoh GET Informasi Node Openflow:1 http://[ipcontroller]:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:1
  34. 34. GET Menggunakan Postman 1. Masukan Auth Username: admin Password: admin 2. Masukkan Header Accept: application/xml dan Content-Type: application/xml
  35. 35. GET Menggunakan Postman 1. Kirimkan Perintah GET ke URL http://[IP_Controller]:8181/restconf/operational/opendaylight- inventory:nodes/node/openflow:[ID_Node]
  36. 36. PUT Flow Menggunakan Postman Terlebih dahulu, siapkan Flow dalam XML yang akan dikirimkan, dokumentasinya ada di: https://wiki.opendaylight.org/view/Editing_OpenDaylight_OpenFlow_ Plugin:End_to_End_Flows:Example_Flows
  37. 37. PUT Flow Menggunakan Postman Kemudian, edit xml tersebut dan masukkan pada tab body
  38. 38. PUT Flow Menggunakan Postman Kirimkan ke URL (dengan method PUT) http://[IP_controller]:8181/restconf/config/opendaylight- inventory:nodes/node/openflow:[ID_Node]/table/[ID_Table]/flow/[ID _Flow] Pastikan bahwa Table ID dan Flow ID URL sama dengan yang ada di XML
  39. 39. PUT Flow Menggunakan Postman Apabila keluar status 200 OK atau 201 Created, maka Flow sudah berhasil dimasukkan ke switch. root@mininet-vm:/home/mininet# ovs-ofctl dump-flows s1 NXST_FLOW reply (xid=0x4): cookie=0x3, duration=7.149s, table=0, n_packets=0, n_bytes=0, idle_age=7, priority=2,dl_src=00:00:00:00:00:01 actions=drop
  40. 40. demo
  41. 41. Openflow-Basic ◉ Basic forwarding flows
  42. 42. OpenFlow-Basic(2) ◉ Actions examples
  43. 43. Post-basic ◉ Match examples
  44. 44. Post-basic(2) ◉ Modify packet examples
  45. 45. OpenDaylight root@my-home:/home/petra# cd karaf-0.7.1 root@my-home:/home/petra/karaf-0.7.1# ./bin/karaf Apache Karaf starting up. Press Enter to open the shell now... 100% [========================================================================] Karaf started in 10s. Bundle stats: 375 active, 376 total ________ ________ .__ .__ .__ __ _____ ______ ____ ____ ______ _____ ___.__.| | |__| ____ | |___/ |_ / | ____ _/ __ / | | __ < | || | | |/ ___| | __ / | |_> > ___/| | | ` / __ ___ || |_| / /_/ > Y | _______ / __/ ___ >___| /_______ (____ / ____||____/_____ /|___| /__| /|__| / / / // /_____/ / Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight. opendaylight-user@root>
  46. 46. Spine & leaf Topology
  47. 47. Huh ? ◉ leaf terdiri dari access switch yang umumnya digunakan untuk menghubungkan server, firewall, load balancer, dan edge router. ◉ spine terdiri dari switch yang difungsikan untuk routing dan menjadi backbone dari network
  48. 48. Why? ◉ +Masalah pada Spanning Tree Protocol, mengeliminasi rute yang bukan rute utama ◉ + Skalabilitas
  49. 49. The ideas? ◉ menentukan switch mana yang berfungsi sebagai “spine” dan sebagai “leaf” pada jaringan. ◉ Tiap “leaf” berfungsi seperti layaknya switch/L2, dan “spine” berfungsi seperti layaknya router/L3 ◉ Secara default, akan ada 2 mekanisme pengiriman flow dari controller, active forwarding dan reactive forwarding. ◉ Active forwarding dilakukan saat awal sebelum jaringan siap dengan memberikan set flow pada tiap device untuk kondisi jaringan yang telah di prediksi.
  50. 50. The ideas?(2) ◉ Bila ada perubahan pada jaringan, akan terjadi perubahan flow table dengan meminta flow pada controller dengan meneruskan paket ke controller. Disini terjadi proses reactive forwarding ◉ Kontroller akan merespon dengan memberikan set flow baru ke seluruh perangkat pada jaringan
  51. 51. The ideas?(3)
  52. 52. Thanks!

×