network-programmability

47982be7ff38d38f65eb179dbdfb24f5?s=47 KATSUYA
June 28, 2019

 network-programmability

47982be7ff38d38f65eb179dbdfb24f5?s=128

KATSUYA

June 28, 2019
Tweet

Transcript

  1. ωοτϫʔΫͷࣗಈԽ πʔϧ࠷લઢ উஉ(@katu7414) ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  2. ࣗݾ঺հ Network Automation https://github.com/Katsuya414 SR,Batfish,Ansible,PyATS,Genie JANOG43 LTͰॳొஃ NETCONओ࠵ऀ !LBUV !2

    ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ
  3. ࣭໰ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  4. Interop Tokyo or AWS summit ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  5. ͲͪΒʹߦ͖·͔ͨ͠ʁ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  6. Cisco live

  7. ษڧձॳࢀՃͰ͢ ΑΖ͓͘͠ئ͍͠·͢ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  8. ࠓճ͸ࣗ෼͕࢖͍ͬͯΔ ωοτϫʔΫͷࣗಈԽͷπʔϧ ൺֱ͠·͢ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  9. ࣗಈԽ͢΂͖ର৅෺ • ଟछଟ༷ͳωοτϫʔΫػث • OSͷόʔδϣϯ΋όϥόϥ • ssh΋ରԠ͍ͯ͠ͳ͍ • ݱঢ়ͷυΩϡϝϯτ΋੔උ͞Εͯͳ͍ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  10. ࢖͍ͬͯΔࣗಈԽπʔϧ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  11. • configมߋ͢ΔͳΒҰ൪ศར • ֶशίετ͕௿͍ͷͰνʔϜϝϯόʔʹਁಁ ͠΍͍͢ • ίʔυ͕ಡΈ΍͍͢ͱݴ͏ͷ͸ࣗಈԽ͢Δʹ ͋ͨͬͯ࠷΋ॏཁͳཁૉͷҰͭ • ϚϧνϕϯμʔରԠ͋Γ͕͍ͨ

    ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ
  12. Ansible Example code - hosts: iosxr gather_facts: no connection: local

    tasks: - name: configure interface settings iosxr_config: lines: - router static - router static vrf SHIMA - router static vrf SHIMA address-family ipv4 unicast ίʔυ͕ಡΈ΍͍͢ͷ͸ ࠾༻ཧ༝ʹͳΔ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ
  13. • configͷ੩తͳςετπʔϧͱͯ͠͸͔ͳΓ༏ल • L3ϨΠϠʔͷςετ͸׬ᘳ • Docker image͋ΔͷͰߏஙָ͕ • ຊ൪ͷIPͰࢼݧͰ͖ΔͷͰ༏ल ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  14. Batfish͔Βͷ৘ใ DPOpHΛૠೖ͢Δ͚ͩͳͷͰ঎༻ʹӨڹ͸ͳ͘ ݸਓϨϕϧͰݕূ͠΍͍͢ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  15. • Python Automated Test Systems ͷུ • pyATS ͷϑϨʔϜϫʔΫͷ্Ͱಈ͘ػೳϥΠϒϥϦ •

    configͷparse͕༏ल(ͪΌΜͱ੔ܗͯ͘͠ΕΔ) • recordingػೳ͕༏ल • YAML + Pythonͷߏ੒ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ
  16. pyats_genie Example Run Results (pyats_genie) shimakatsuyanoMacBook-puro:workshop shimakatsuya$ python test.py [2019-06-18

    14:53:29,022] +++ nx-osv-1 logfile /tmp/nx-osv-1- cli-20190618T145329021.log +++ [2019-06-18 14:53:29,022] +++ Unicon plugin nxos +++ -------------------------------------------------------------------------------- Hostname: nx-osv-1 Software Version: NX-OS 7.3(0)D1(1) BGP Instance VRF Neighbor State -------------- ------- ---------- ----------- default default 10.1.1.1 established Total # of Active Neighbors: 1 -------------------------------------------------------------------------------- ៉ྷʹ੔ܗ͢Δͷ͕ͱͯ΋ָ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ
  17. ඞཁͳࣄલ஌ࣝͷ গͳ͞ ˓ ˚ ˚ ͓खܰ͞ ˚ ˓ ˓ υΩϡϝϯτͷ

    ॆ࣮ੑ ˕ ˚ ˚ πʔϧͷศར͞ ˓ ˓ ˕ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ
  18. 1$ αʔόʔ ߏ੒ਤ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  19. ࣗಈԽͰॏཁͳ͜ͱ ର৅ͷϝϯόʔͷٕज़Ϩϕϧ΋ߟྀ͢Δ͜ͱ Ұ൪େࣄͳͷ͸πʔϧͰ͸ͳ͘υΩϡϝϯτͷ੔උ πʔϧ͸ͱΓ͋͑ͣ࢖ͬͯΈ͔ͯΒࣗ෼ͷνʔϜʹ దਖ਼͔ʁΛߟ͑Α͏ ࣗಈԽ͸ඞཁͳ͜ͱͩͱશһ͕ೝࣝ͠ͳ͍ͱਐ· ͳ͍ɻઆ໌΍Θ͔Γ΍͢͞΋ඞཁ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  20. ࠓޙ௅ઓ͢Δ͜ͱ ؂ࢹπʔϧ(Datadog౳΋͘͠͸ࣗ࡞) ՄࢹԽπʔϧ(ࣗ࡞͍ͨ͠ΞΠσΞืू) BatfishͷL2໰୊ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  21. ࠓճͷπʔϧ౳ͷϒϩά • https://qiita.com/katu7414/items/ ccef158f5999ce809a3d • https://qiita.com/katu7414/items/bb9ebf74d01936e3c662 • https://qiita.com/katu7414/items/8e60b8b8f4034009e734 ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ

  22. ͋Γ͕ͱ͏͍͟͝·ͨ͠ ωοτϫʔΫϓϩάϥϚϏϦςΟษڧձ