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.

Netconf yang

545 visualizações

Publicada em

Introduction to NetConf & Yang

Publicada em: Tecnologia
  • Login to see the comments

Netconf yang

  1. 1. Abstract Configuration with NETCONF/YANG Rabu, 25 April 2018 Lab Telematika Sekolah Teknik Elektro dan Informatika Institut Teknologi Bandung Labtek 8 Lantai 4 4/25/2018
  2. 2. SDN Types 4/25/2018
  3. 3. Hybrid SDN • NETCONF. • Abstract the configuration of devices. • Using YANG Data Model. 4/25/2018
  4. 4. NETCONF NETCONF is a IETF network management protocol designed specifically for configuration management • Makes a distinction between configuration and state data. • Utilized multiple configuration data stores (candidate, running, startup). • Configuration change transcations. • Provides client side configuration validation. • Uses a client-server model and SSH as transport protocol 4/25/2018
  5. 5. NETCONF 4/25/2018
  6. 6. YANG 4/25/2018 • YANG is a modeling language defined in RFC 6020. • Models files are self-documented and ship with devices • The goal is to be able to formally model any network device configuration. • YANG data models is create by IETF or OpenConfig and mapped to native models in each vendors.
  7. 7. YANG 4/25/2018 Main node types : • Leaf – node with name and value of certain type (no children) • Leaf list – sequence of leafs • Container – groups nodes and has no value • List – Sequence of records with key leafs
  8. 8. NETCONF & YANG DEMO on CSR1000V 4/25/2018
  9. 9. Demo Topology 4/25/2018
  10. 10. Step Demo 4/25/2018 • Enable NETCONF/YANG in CSR1000v • Get YANG capabilities from CSR1000v • Get YANG data model from CSR1000v • Convert YANG data model to python modules • Create python program to generate JSON files configuration from modules • Convert JSON to XML • Send XML to CSR1000v • Python Script : http://bit.ly/NETCONF-YANG
  11. 11. Client # sudo apt install python-pip # sudo pip install ncclient pyang pyangbind ipython 4/25/2018
  12. 12. Enable NETCONF/YANG router(config)# username btech privilege 15 password btech router(config)# netconf-yang 4/25/2018
  13. 13. Get YANG capabilities #ptyhon 1.get_capabilities.py {ip-address} {netconf-port} {username} {password} 4/25/2018
  14. 14. Get YANG models #ptyhon 2.get_yang.py {ip-address} {netconf-port} {username} {password} {yang-model} 4/25/2018
  15. 15. 4/25/2018
  16. 16. Convert YANG to Python Modules # export PYBINDPLUGIN=`/usr/bin/env python -c 'import pyangbind; import os; print "%s/plugin" %os.path.dirname(pyangbind.__file__)'` # echo $PYBINDPLUGIN # pyang --plugindir $PYBINDPLUGIN -f pybind -o ietf_ip_binding.py ietf-ip.yang ietf-interfaces.yang ietf-inet-types.yang ietf-inet-types.yang 4/25/2018
  17. 17. Create python program 4/25/2018
  18. 18. 4/25/2018
  19. 19. Convert JSON to XML # pyang -f jtox -o interface.jtox ietf-ip.yang ietf-interfaces.yang ietf-inet-types.yang ietf-yang-types.yang # json2xml -t config -o interface.xml interface.jtox new_interface.json 4/25/2018
  20. 20. Send XML to Device 4/25/2018
  21. 21. t.me/zufardhiyaulhaq zufar@btech.co.id 4/25/2018

×