SlideShare a Scribd company logo
1 of 52
Download to read offline
Masaki Tagawa
Kazumasa Ikuta
2017.8.4
IOS/IOS-XE運用管理機能アップデート
CTU NMS 2017 Aug
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• 主に IOS-XE バージョン 16 以降で新しくサポート
された運用管理機能を中心に解説し、実際の設定や
使用方法をご紹介いたします
• Cisco ISR/ASR および Catalyst を主な対象とします
IOS/IOS-XE 運用管理機能アップデート
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• はじめに
• Guest Shell と Python
• EEM と On-box Python
• NETCONF と データ モデル
• ncclient
• YANG Explorer
アジェンダ
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
はじめに
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
UADP
Unified Access Data Plane
Flexible, Programmable, High-
Performance Switching Silicon
• Fully Programmable –
excellent flexibility, ability to handle
new encaps (VXLAN, GPE, etc) –
hardware speed, software elasticity
• Scalable – Massive recirculation
bandwidth and low recirculation
latency provide excellent tunneling
and services support for traffic flows
• Advanced on-chip QoS –
client–level granularity, sophisticated
bandwidth shaping, with integrated
on-chip NetFlow for visibility
• Secure – integrated on-chip
support for MACsec encryption
(AES-128, CBC)
• Extensible Architecture –
ability to scale both up and down –
the foundation for a long-lived
family of high-performance,
flexible switching silicon
QFP
QuantumFlow Processor
Advanced, Multi-Core,
Feature-Rich Routing Silicon
• Fully Programmable –
leveraging the many features
of IOS-XE with hardware
performance
• Scalable – Massive number
of CPU cores (40/64), ability
to cascade multiple QFPs =
consistent high performance
• Advanced on-chip QoS –
100,000+ hardware-based
queues, sophisticated traffic
shaping and control
• Secure – linkage to high-
performance crypto capability
for secure WAN transport
• Extensible Architecture –
ability to scale both up and down –
the foundation for a long-lived
family of high-performance,
flexible routing silicon
IOS-XE
The Evolution of IOS
Taking the Proven Strengths
of IOS to the Next Level
• Operational and
Services Uniformity –
Routing, Switching,
and Wireless consistency
• Speed of Innovation
Velocity – “Code once and
Re-use Many” across multiple
places in the network
• Foundation for Virtualization –
providing for network hosting
and integration of virtualized
functions (VNFs, containers)
• New Foundational
Capabilities – HA and
operational leadership, state
decoupling, net database …
• Platform for the Future –
the “software stage” for the
next wave of Cisco innovation …
“People that are really serious about
software should build their own hardware”
100% シスコが開発した
プログラマブルシリコン
– DNAの機能をハード
ウェアスピードで実行
ハードウェア+ソフトウェア
イノベーションの基礎
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Catalyst で動作する IOS-XE の進化
共通基盤 / HA
管理インターフェース
モジュールドライバ
カーネル
IOS
IOS
共通基盤 / HA
管理インターフェイス
モジュール ドライバ
カーネル
IOS XE 3.7.x (SE)
機能群
AppホスティングIOSd
機能群
WCM
Wireshark
Open IOS XE (16.1.1)
AppホスティングIOSd
LXC
LXC
データ
ベース
共通基盤 / HA
管理インターフェイス
モジュール ドライバ
カーネル
WCM
Wire
shark
IOSd コア
IOS Sub
SystemsIOS Sub
SystemsIOSサブ
システム
操作感は変えずに、ソフトウェア アーキテクチャを刷新
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
データベースを確認 – Crimson DB
Cat3850-3#show platform software process database dbm switch active r0 summary
Database: MDT_OPER_DB
Table Name or ID Table OID (id/src) Table Type LUID Records Cur Mode
-------------------------------------------------------------------------------------------------------------------------
table repl_toc 2/0x0 tbl_toc b272aa9e1d00a82f 2 en expl
table mdt_streams 4/0x0 mdt_streams 3a5c60d8eaa1ff3f 1 en expl
table mdt_subscriptions 6/0x0 mdt_subscriptions d373c82770f2af51 1 en expl
table mdt_receivers 8/0x0 mdt_receivers da893bbd75d2811e 0 en expl
table mdt_connections 10/0x0 mdt_connections ab4329ef37096b84 0 en expl
table mdt_sub_con_statist 12/0x0 mdt_sub_con_statisti d9714fa14c7907df 0 en expl
1 16/0x0 mdt_receivers da893bbd75d2811e 1 en expl
Database: MDT_CONFIG_DB
Table Name or ID Table OID (id/src) Table Type LUID Records Cur Mode
-------------------------------------------------------------------------------------------------------------------------
table repl_toc 2/0x0 tbl_toc b272aa9e1d00a82f 1 en expl
table mdt_subscriptions_c 4/0x0 mdt_subscriptions_co d2adb9245b5e6db3 1 en expl
table mdt_receivers_confi 6/0x0 mdt_receivers_config 4c73dd83691c6b0e 0 en expl
be_cursor_table 8/0x0 be_cursor_table 4249c9626610277b 2 dis -
1 1152921504606846980/0x0 mdt_receivers_config 4c73dd83691c6b0e 1 en expl
Database: IM_CONFIG_DB
<snip>
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• x86 アーキテクチャで動作するアプリケーションを、
コンテナ上でサポート
• Puppet や Chef Agent
• IoT やクラウド アプリケーションとの親和性
• MIPS アーキテクチャ プラットフォーム
(Cat3650/3850)でサポートする Guest Shell では
ハードウェアによる制約あり(Guest Shell Lite)
Catalyst 9K では x86 CPU を採用
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
IOS コンフィグレーション ガイド
Programmability & Data Models
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
ネットワーク プログラマビリティに対する考え方の違い
初級 中級 上級
特徴 • コマンドラインを使いこなす
• プログラミングは経験が少ない
• コーディング経験が少しあるネット
ワーク技術者中心
• EEM, Tcl, Expect など
• コーディング経験が豊富で、
自動化を推進
関心事 • 作業の自動化
• エンジニア スキルセットの拡大
• Netconf, Python, Ansible などへ
移行
• データ モデルの理解
• マルチベンダー環境での統一
運用、相互接続
懸念事項 • 学習事項が多いが、確保できる
時間が少ない
• プログラマビリティを本格的に実現
するツールは何か
• 抽象化する価値は何か
• オープンスタンダード仕様
提供すべき内容 • 基本的なプログラマビリティのコ
ンセプト理解
• スクリプティングの紹介 (Python,
Ansible など)
• 少ない投資ですぐに効果が出る
ユース ケースの紹介
• Netconf トレーニング
• APIを使った装置オペレーション
• 利用可能なツールとその使い方
• APIドキュメントなどの情報提
供、公開
• 新機能の差分アップデート
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
SiSi SiSi
SiSiSiSiSiSi SiSiSiSiSiSi SiSiSiSiSiSi
• デバイス内での監視や自動化を定義し、リモート管理システムだけでは得られない
ロジックを実現でき、管理品質の向上や、オペレーション コスト削減に貢献
• 任意のイベントに基づくプロアクティブな対処が可能 (EEM)
• 装置やベンダーの実装に比較的依存
Off-box + On-box プログラマビリティ
外部からの監視や自動化
• Python
• Ansible
• Netconf/YANG
• …
• DNA-Center/APIC-EM
• Prime Infrastructure
• Zabbix
• …
内部からの監視や自動化
Shell
Python
EEM
Shell
Python
EEM
• On-box Python
• EEM
• Guest Shell
• …
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
プロビジョニング手法 – IOS-XE 16.5 以降
Pre-boot Execution
Environment (PXE) Client
Zero Touch
Provisioning
Cisco Network Plug
and Play
ブートするソフト
ウェアイメージ元
ネットワーク上 装置内
(カスタマイズでイメージ配布)
装置内
(オプションでイメージ配布)
プロトコル/
インターフェイス
オープン / 標準 オープン / 標準 シスコによる作り込み、仕様は公開
「ターン キー」ソリューション
特徴 マルチベンダー環境 マルチベンダー環境
スクリプト自動配布
スクリプトは作成必要
• シスコ中心の LAN/WAN に最適化
• セキュリティ組み込み
• スケーラビリティ考慮
• API 公開
PXE Booting
Router
PXE Booting
Switch
DHCP PXE
Server
ZTP Booting
Router
ZTP Booting
Switch
DHCP ZTP
Server
PNP Booting
Router
PNP Booting
Switch
APIC-EM / Network
Plug and Play
Server
PNP Access
Point
option 150 ip 203.0.113.254
option 67 ascii /sample_python_dir/python_script.py
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Guest Shell と Python API
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Linux Shell … IOS XE 上 LXC コンテナで実行
• IOS-XE CLI や bootflash にアクセス可能
• Python を標準サポート
(Cat3K では 2.7, Cat9K では 2.7/3.X)
• pip 組込み
➡ Python パッケージの追加インストール
• yum サポート (Cat9K)
➡ Linux パッケージの追加インストール
Guest Shell
IOS-XE (IOSd)
Guest Shell
オープンアプリケーションコンテナ
API
Linux
アプリケーション
様々なライブラリを活用できる Python を使った
On-box プログラマビリティを提供
python
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Guest Shell Lite と Guest Shell
Guest Shell Lite (Limited LXCコンテナ) Guest Shell (LXCコンテナ)
OS Cisco IOS XE Cisco IOS XE
サポート プラットフォーム Cisco Catalyst 3650 Series Switches (all models)
Cisco Catalyst 3850 Series Switches (all models)
Cisco Catalyst 9300 Series Switches (all models)
Cisco ISR 4000 Series Integrated Services Routers
(Models with a minimum of 8 GB RAM.)
Guest Shell環境 Montavista CGE7 CentOS 7
Python 2.7 Supported (Python V2.7.11) Supported (Python V2.7.5)
カスタム Python ライブラリ Cisco Embedded Event Manager

Cisco IOS XE CLIs
Ncclient
Cisco Embedded Event Manager

Cisco IOS XE CLIs
Supported Rootfs Busybox, SSH, and Python PIP install SSH, Yum install, and Python PIP install
GNU C Compiler Not supported Not supported
RPM Install Not supported Supported
アーキテクチャ MIPS x86
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Guest Shell の起動
Cat3850-3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Cat3850-3(config)#iox
Cat3850-3(config)#exit
Cat3850-3#
Cat3850-3#guestshell enable
Management Interface will be selected if configured
Please wait for completion
guestshell is in RUNNING state
Cat3850-3#
Cat3850-3#guestshell
[guestshell@guestshell ~]$
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Guest Shell の動作確認
Cat3850-3#show iox
IOx Infrastructure Summary:
---------------------------
IOx service (CAF) : Running
IOx service (HA) : Running
IOx service (IOxman) : Running
Libvirtd : Running
Cat3850-3#show app-hosting detail
State : RUNNING
Author : Cisco Systems
Application
Type : lxc
App id : guestshell
Name : guestshell
Version : 0.1
Activated profile name : custom
Description : MontaVista guestshell
Resource reservation
Memory : 256 MB
Disk : 1 MB
CPU : 800 units
VCPU : 1
Attached devices
Type Name Alias
---------------------------------------------
Serial/shell
Serial/aux
Serial/Syslog serial2
Serial/Trace serial3
Network interfaces
---------------------------------------
eth0:
MAC address : 52:54:dd:63:b1:0a
IPv4 address : 192.168.30.2
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Guest Shell の環境設定
[guestshell@guestshell ~]$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 52:54:DD:63:B1:0A
inet addr:192.168.30.2 Bcast:192.168.30.7 Mask:255.255.255.248
interface GigabitEthernet0/0
vrf forwarding Mgmt-vrf
ip address <ipaddress> <mask>
!
ip route vrf Mgmt-vrf 0.0.0.0 0.0.0.0 <mgmt-gateway>
IOS-XE 側で management port を設定
自動設定される Guest Shell のネットワーク環境
[guestshell@guestshell ~]$ cat /flash/proxy_vars.sh
export http_proxy=http://proxy-wsa.example.com:80/
export https_proxy=http://proxy-wsa.example.com:80/
export HTTP_PROXY=http://proxy-wsa.example.com:80/
export HTTPS_PROXY=http://proxy-wsa.example.com:80/
[guestshell@guestshell ~]$ source /flash/proxy_vars.sh
Guest Shell 上のプロキシ設定例
[guestshell@guestshell ~]$ cat /etc/resolv.conf
nameserver 8.8.8.8
Guest Shell 上の DNS サーバ設定例
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Python インタラクティブモード
Cat3850-3#guestshell run python
Python 2.7.11 (default, May 17 2017, 05:17:57)
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> msg = "Hello CTU!"
>>> print msg
Hello CTU!
>>>
>>> import cli
>>> cli.clip('show ip int brief | i Vlan1')
Vlan1 unassigned YES NVRAM up up
>>>
>>> output = cli.cli('show clock')
>>> print output
*11:11:17.345 UTC Tue Aug 1 2017
>>>
>>> cli.configure(["interface GigabitEthernet1/0/7", "no shut", "end"])
[ConfigResult(success=True, command='interface GigabitEthernet1/0/7', line=1, output='', notes=None), ConfigResult(success=True, command='no shut', line=2,
output='', notes=None), ConfigResult(success=True, command='end', line=3, output='', notes=None)]
>>>
• 組込み Python CLI ライブラリを import し、Guest Shell から
IOS コマンドを実行・結果取得する例
• Netconf(ncclient ライブラリ)を使えば、内部データベースと
直接やり取りできる
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Guest Shell 環境
Cat3850-3#guestshell
[guestshell@guestshell ~]$ uname -a
Linux guestshell 3.10.101-rt110 #1 SMP Fri Jun 30 20:16:49 PDT 2017 mips64 GNU/Linux
[guestshell@guestshell ~]$
[guestshell@guestshell ~]$ cat /proc/version
Linux version 3.10.101-rt110 (xelinux@xe-linux-bld2) (gcc version 5.3.0 (GCC) ) #1 SMP Fri Jun 30 20:16:49 PDT 2017
[guestshell@guestshell ~]$
[guestshell@guestshell ~]$ cd /
[guestshell@guestshell /]$ ls
bin data flash local proc tmp
boot dev home lost+found sbin usr
bootflash etc lib media selinux var
cisco fix_sshd.sh lib64 mnt sys
C9300-24U#guestshell
[guestshell@guestshell ~]$ uname -a
Linux guestshell 4.4.51 #1 SMP Sun Jun 4 17:58:12 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux
[guestshell@guestshell ~]$
[guestshell@guestshell ~]$ cat /proc/version
Linux version 4.4.51 (xelinux@xe-linux-bld2) (gcc version 5.3.0 (GCC) ) #1 SMP Sun Jun 4 17:58:12 PDT 2017
[guestshell@guestshell ~]$
[guestshell@guestshell ~]$ cd /
[guestshell@guestshell /]$ ls
bin cisco dev flash lib64 media proc run srv unfix_sshd.sh
boot created.2016-05-31.14:23:44 etc home local mnt root sbin sys usr
bootflash data fix_sshd.sh lib lost+found opt rr_moved selinux tmp var
flash:/(IOS-XE) = /flash/(Guest Shell)
自動でマウントされる
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Guest Shell 上で Python スクリプトを編集・実行
[guestshell@guestshell ~]$ pwd
/home/guestshell
[guestshell@guestshell ~]$ pip list
pip (9.0.1)
setuptools (22.0.5)
[guestshell@guestshell ~]$
[guestshell@guestshell ~]$ cd /flash/
[guestshell@guestshell flash]$ ls | grep .bin
cat3k_caa-universalk9.16.06.01.SPA.bin
[guestshell@guestshell flash]$
[guestshell@guestshell flash]$ touch test.txt
[guestshell@guestshell flash]$ ls | grep test
test.txt
[guestshell@guestshell flash]$
[guestshell@guestshell flash]$ vi sho-ver.py
[guestshell@guestshell flash]$
[guestshell@guestshell flash]$ cat sho-ver.py
#!/usr/bin/python
import cli
print cli.execute('show version')
[guestshell@guestshell flash]$
[guestshell@guestshell flash]$ python ./sho-ver.py | grep bin
System image file is "flash:cat3k_caa-universalk9.16.06.01.SPA.bin"
[guestshell@guestshell flash]$
Vi エディタを実行
show version を実行して
結果を表示する Python スクリプト例
スクリプト実行結果
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
EEM と On-box Python
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• 装置内で実行される On-box 監視&カスタマイズ機能
• イベント検知→アクション実行
• イベント・アクションの組み合わせは自由
• 既存の IOS-XE 機能では不可能なロジックを作成
• アプレット版(CLI), Tcl 版(スクリプト), Python 版(スクリプト)
• 幅広いサポート機器
• C800〜ASR1000, Cat2K, 3K, 4K, 6K, Nexus, XR…, Cat9K…
• イベント、アクションの細かなサポート内容はバージョンに依存
EEM 概要と Python サポート
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Embedded Event
Manager
Syslog
email
notification
SNMP set
Counter
CLI
Applets
SNMP
get
SNMP
notification
Application
specific
TCL
Policies
Reload or
switchover
EEM Applets
multi-event-correlation
IOS.sh
Policies
Actions
Event Detectors
Syslog
Event
Process
Scheduler
Database
Interface
Descriptor
Blocks
Syslog
ED
Watchdog
ED
Interface
Counter
ED
CLI
ED
OIR
ED
ERM
ED
EOT
ED
RF
ED
none
ED
GOLD
ED
XML
RPC
ED
SNMP
EDs
Remote:
• Notification
Local:
• Notification
• Get/Set
NetFlow
ED
IPSLA
ED
Route
ED
Timer
EDs
• Cron
• Count
down
HW
EDs
• Fan
• Temp
• Env
• ...
CDP
LLDP
ED
802.1x
ED
MAC
ED
Python
Policies
xxx
ED
…
EEM アーキテクチャ
…
New!
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• 「〜が発生したら〜する」という判断や処理を自動化する EEM
Cisco Embedded Event Manager(EEM)
CLI ベース(EEM アプレット) Tcl ベース(EEM Tcl) Python ベース
(EEM Python Module)
•強み
•設定が比較的容易
•余分なファイルが不要
•弱み
•高度な処理には不向き
•強み
•CLI より柔軟な動作を設定
可能
•弱み
•TCL を覚える必要がある
•強み
•TCL スクリプト同様の柔軟な
動作を設定可能
•豊富なライブラリを活用可能
•弱み
•Python を覚える必要がある
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
1. EEM アプレット(CLI)の中で Python スクリプトを実行
• Event Detector: CLI, Action: CLI で Python スクリプトを実行
• メリット:汎用的な Python スクリプトがそのまま使える
• デメリット:イベントは EEM アプレット (CLI) 相当
2. EEM スクリプト (Python) を記述
• Event Detector, Action ともに Python スクリプトで記述
• メリット:EEM 特有の高度な記述が可能(複雑なイベント検出など)
• デメリット:EEM Python ライブラリの学習が必要
EEM と Python の組み合わせ方: 2 種類
Event Detectors
(〜が発生したら)
Action
(〜を行う)
Event Detectors
(〜が発生したら)
Action
(〜を行う)
値の受け渡し
・何が?
・いつ?
値の受け渡し
・何が?
・いつ?
CLI
Python
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• 標準で 3 つのカスタムライブラリが付属
• pip を使って追加インストール可能
On-box プログラマビリティのための Python ライブラリ
ライブラリ名 読み込み 概要
Cisco IOS XE CLI import cli IOS XE の CLI に対して入出力を行う
ライブラリ
Cisco Embedded
Event Manager
import eem Python スクリプト内で EEM 固有の操作
を実現するためのライブラリ(Event 検出,
syslog, cli, snmp, mail, reload, …)
Ncclient import
ncclient
Netconf クライアントの Python ライブラリ
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
event manager applet TEST
event none
action 100 cli command "enable"
action 200 cli command "guestshell run python /bootflash/sho-ver.py"
Cat3850-3#debug event manager action cli
Debug EEM action cli debugging is on
Cat3850-3#event manager run TEST
*Aug 2 20:40:47.987: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : CTL : cli_open called.
*Aug 2 20:40:47.990: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Cat3850-3>
*Aug 2 20:40:47.990: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : IN : Cat3850-3>enable
*Aug 2 20:40:48.103: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Cat3850-3#
*Aug 2 20:40:48.104: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : IN : Cat3850-3#guestshell run python /bootflash/sho-ver.py
*Aug 2 20:40:53.654: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Cisco IOS XE Software, Version 16.06.01
*Aug 2 20:40:53.654: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Cisco IOS Software [Everest], Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 16.6.1, RELEASE SOFTWARE (fc2)
*Aug 2 20:40:53.655: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Technical Support: http://www.cisco.com/techsupport
*Aug 2 20:40:53.655: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Copyright (c) 1986-2017 by Cisco Systems, Inc.
*Aug 2 20:40:53.655: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Compiled Sat 22-Jul-17 03:00 by mcpre
*Aug 2 20:40:53.655: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Cisco IOS-XE software, Copyright (c) 2005-2017 by cisco Systems, Inc.
*Aug 2 20:40:53.655: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : All rights reserved. Certain components of Cisco IOS-XE software are
*Aug 2 20:40:53.656: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : licensed under the GNU General Public License ("GPL") Version 2.0. The
*Aug 2 20:40:53.656: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : software code licensed under GPL Version 2.0 is free software that comes
*Aug 2 20:40:53.656: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such
*Aug 2 20:40:53.656: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : GPL code under the terms of GPL Version 2.0. For more details, see the
*Aug 2 20:40:53.657: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : documentation or "License Notice" file accompanying the IOS-XE software,
*Aug 2 20:40:53.657: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : or the applicable URL provided on the flyer accompanying the IOS-XE
*Aug 2 20:40:53.657: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : software.
*Aug 2 20:40:53.657: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : ROM: IOS-XE ROMMON
*Aug 2 20:40:53.658: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : BOOTLDR: CAT3K_CAA Boot Loader (CAT3K_CAA-HBOOT-M) Version 3.58, RELEASE SOFTWARE (P)
*Aug 2 20:40:53.658: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Cat3850-3 uptime is 3 days, 13 hours, 13 minutes
*Aug 2 20:40:53.658: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Uptime for this control processor is 3 days, 13 hours, 16 minutes
*Aug 2 20:40:53.658: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : System returned to ROM by reload
*Aug 2 20:40:53.658: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : System image file is "flash:cat3k_caa-universalk9.16.06.01.SPA.bin"
*Aug 2 20:40:53.658: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : CTL : 20+ lines read from cli, debug output truncated
*Aug 2 20:40:53.659: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : CTL : cli_close called.
*Aug 2 20:40:53.661:
*Aug 2 20:40:53.661: tty is now going through its death sequence
Cat3850-3#
シンプルな動作例
* None event detector … Action のテスト用で多用
* debug event manager action cli … EEM による CLI 実行結果を出力
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
EEM Python モジュール デモ
EEM
1. Syslog 中に
%LINEPROTO-5-UPDOWN:
を見つけると Python スクリプトを実行
2. Cisco Spark の特定スペースに通知
(Syslog 内容や任意のメッセージなど)
REST API (HTTPS)python
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Python パッケージの追加インストール
Spark にメッセージを POST するために利用するライブラリ - Requests
[guestshell@guestshell ~]$ sudo pip list install
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in
your pip.conf under the [list] section) to disable this warning.
certifi (2017.7.27.1)
chardet (3.0.4)
idna (2.5)
pip (9.0.1)
requests (2.18.2)
setuptools (22.0.5)
urllib3 (1.22)
[guestshell@guestshell ~]$ sudo pip install requests
任意のパッケージを追加インストール・活用できる
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
event manager applet syslog
event syslog pattern "%LINEPROTO-5-UPDOWN:"
action 100 syslog msg "Syslog ## $_syslog_msg ## Detected by EEM"
action 200 cli command "enable"
action 205 cli command "guestshell run python /bootflash/kikuta/spark_post.py Interface_UpDownEvent_Detected"
action 208 cli command "guestshell run python /bootflash/kikuta/spark_post.py https://10.71.154.112/"
設定例 1
EEM アプレット (CLI) + Python スクリプト
[guestshell@guestshell ~]$ cat /bootflash/kikuta/spark_post.py
import requests
import sys
ACCESS_TOKEN = "<Cisco Spark Access Token>”
ROOM_ID = "<Cisco Spark_Room Id>”
YOUR_MESSAGE = sys.argv[1]
#ヘッダー作成
def setHeaders():
accessToken_hdr = 'Bearer ' + ACCESS_TOKEN
spark_header = {'Authorization': accessToken_hdr, 'Content-Type': 'application/json; charset=utf-8'}
return spark_header
#メッセージをポスト
def postMsg(the_header,roomId,message):
message = '{"roomId":"' + roomId + '","text":"' + message +'"}’
uri = 'https://api.ciscospark.com/v1/messages’
resp = requests.post(uri, data=message, headers=the_header)
print resp
header=setHeaders()
postMsg(header,ROOM_ID,YOUR_MESSAGE)
汎用的なPythonスクリプトが
そのまま使える
CLI で設定する引数を Spark に投稿
(イベントごとに投稿する内容を変更できる)
NMS や OSS へ誘導
チケットを自動発行
他装置を API で設定変更
…などなど
EEM イベントは CLI で記述
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
::cisco::eem::event_register_syslog tag "1" pattern %LINEPROTO-5-UPDOWN: maxrun 200
import requests
import sys
import eem
ACCESS_TOKEN = "<Cisco Spark Access Token>”
ROOM_ID = "<Cisco Spark Room Id>”
# Make HTTP request headers with the token
def setHeaders():
accessToken_hdr = 'Bearer ' + ACCESS_TOKEN
spark_header = {'Authorization': accessToken_hdr,
'Content-Type': 'application/json; charset=utf-8’}
return spark_header
# Create a message with the matched syslog message
def makeMsg(syslogMsg):
# Remove LF on the syslog message
msg = '## Critical Syslog Message¥¥n¥¥n' + syslogMsg.replace(’¥n','')
return msg
# Post a message to the person
def postMsg(the_header, roomId, markdown):
message = '{"roomId":"' + roomId + '","markdown":"' + markdown +'"}’
uri = 'https://api.ciscospark.com/v1/messages’
resp = requests.post(uri, data=message, headers=the_header)
# Get the event information
event = eem.event_reqinfo()
header = setHeaders()
message = makeMsg(event['msg'])
postMsg(header, ROOM_ID, message)
設定例2
EEM スクリプト (Python)
1. 左のファイルを
/flash/syslog2spark.py として
保存
2. IOS XE CLI で EEM スクリプトを登録
EEMで検出するイベントを記述
EEM パッケージを使った Syslog 情報の取得
(event_reqinfo)
event manager directory user policy "flash:/"
event manager policy syslog2spark.py type user
EEM パッケージを読み込み
実行例
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
NETCONF / YANG
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• “NETwork CONFiguration Protocol”
• ネットワーク機器の設定投入や削除、情報取得
• プログラムによる自動化を想定した設計
• 標準化された通信方法と構造化されたデータ
NETCONF
⭕
構造化された
データ
❌
構造化されていない
データ
Name : John Smith
Age : 42
Phone: +1-415-555-1212
<name>John Smith</name>
<age>42</age>
<phone>+1-415-555-1212</phone>
John Smith 42 +1-415-555-1212
Keys Values
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• “NETwork CONFiguration Protocol”
• ネットワーク機器の設定投入や削除、情報取得
• プログラムによる自動化を想定した設計
• 標準化された通信方法と構造化されたデータ
NETCONF
switch1# sh int e1/10
Ethernet1/10 is up
Hardware: 1000/10000 Ethernet, address:
0005.73d0.9331 (bia 0005.73d0.9331)
Description: To UCS-11
MTU 1500 bytes, BW 1000000 Kbit, DLY
<interface>Ethernet 0/0</interface>
<name>Switch1 to UCS1</name>
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• “NETwork CONFiguration Protocol”
• ネットワーク機器の設定投入や削除、情報取得
• プログラムによる自動化を想定した設計
• 標準化された通信方法と構造化されたデータ
NETCONF
switch1# sh int e1/10
Ethernet1/10 is up
Hardware: 1000/10000 Ethernet, address:
0005.73d0.9331 (bia 0005.73d0.9331)
Description: To UCS-11
MTU 1500 bytes, BW 1000000 Kbit, DLY
<interface>Ethernet 0/0</interface>
<name>Switch1 to UCS1</name>
<name>Ethernet 0/0</name>
<descr>Switch1 to UCS1</descr>
データ構造の定義(値の格納の仕方)が必要
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
データ モデル
• Cisco 定義
• Ciscoプラットフォーム毎に
ユニーク
• 例) IOS-XE のみ
• Cisco 定義
• Ciscoプラットフォーム間共通
• 例) IOS-XE / NX-OS
• 標準策定 (IETF, ITU,
OpenConfig, etc)
• 標準に準拠
• 例) “Policy”
• ietf-diffserv-policy.yang,
• ietf-diffserv-classifer.yang,
• ietf-diffserv-target.yang
業界
標準
Cisco
共通
Cisco
プラット
フォーム
独自
マルチベンダ環境での共通データ モデルや、装置固有の機能に
対応したデータモデルに対応したプログラムを記述できる
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
NETCONF/YANG の有効化と動作確認
Cat3850-3(config)#netconf-yang
Cat3850-3#show platform software yang-management process
confd : Running
nesd : Running
syncfd : Running
ncsshd : Running
dmiauthd : Running
vtyserverutild : Running
opdatamgrd : Running
nginx : Running
ndbmand : Running
pubd : Running
Cat3850-3(config)#username <user> privilege 15 secret <password>
Cat3850-3(config)#aaa new-model
Cat3850-3(config)#aaa authentication login default local
Cat3850-3(config)#aaa authorization exec default local
Cat3850-3(config)#hostname Cat3850-3
Cat3850-3(config)#ip domain name example.com
Cat3850-3(config)#crypto key generate rsa modulus 2048
Cat3850-3(config)#ip ssh version 2
SSH によるリモートアクセスの設定例
動作確認
有効化
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
装置が対応するデータ モデルを確認
Capabilities Exchange
$ ssh -s cisco@10.71.154.98 -p 830 netconf
cisco@10.71.154.98's password:
<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
<capability>urn:ietf:params:netconf:base:1.1</capability>
<capability>urn:ietf:params:netconf:capability:writable-running:1.0</capability>
<capability>urn:ietf:params:netconf:capability:xpath:1.0</capability>
<capability>urn:ietf:params:netconf:capability:validate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:validate:1.1</capability>
..
<snip>
<capability>http://cisco.com/ns/yang/Cisco-IOS-XE-aaa?module=Cisco-IOS-XE-aaa&amp;revision=2017-06-05</capability>
<capability>http://cisco.com/ns/yang/Cisco-IOS-XE-acl?module=Cisco-IOS-XE-acl&amp;revision=2017-06-06</capability>
..
<snip>
<capability>http://openconfig.net/yang/interfaces/ip-ext?module=openconfig-if-ip-ext&amp;revision=2016-12-22</capability>
<capability>http://openconfig.net/yang/lacp?module=openconfig-lacp&amp;revision=2016-05-26</capability>
<capability>http://openconfig.net/yang/lldp?module=openconfig-lldp&amp;revision=2016-05-16</capability>
<capability>http://openconfig.net/yang/lldp/types?module=openconfig-lldp-types&amp;revision=2016-05-16</capability>
<capability>http://openconfig.net/yang/local-routing?module=openconfig-local-routing&amp;revision=2016-05-11</capability>
..
<snip>
SSH netconf サブ システムへポート 830 に接続
Cisco Native や Openconfig によるデータ モデル(YANG モジュール)に対応していることがわかる
IETF
Cisco
Openconfig
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
実際にやってみる
ncclient: Netconf クライアントの Python ライブラリ
#!/usr/bin/env python3
from ncclient import manager
from xml.dom.minidom import parseString
host = '<hostname or ip_addr>’
username = '<username>’
password = '<password>’
with manager.connect(host=host, port=830,
username=username,
password=password,
device_params={'name':'iosxe'}
) as m:
c = m.get_config(source='running').data_xml
print(parseString(c).toprettyxml(indent=' '))
$ pip install ncclient 事前準備:pip を使ったライブラリのインストール
Running config を
xml 形式で表示する
https://github.com/ncclient/ncclient
#!/usr/bin/env python3
from ncclient import manager
from xml.dom.minidom import parseString
host = '<hostname or ip_addr>’
username = '<username>’
password = '<password>’
payload = “””
<filter xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
<version/>
</native>
</filter>
“””
with manager.connect(host=host, port=830,
username=username, password=password,
device_params={'name':'iosxe'}) as m:
c = m.get(payload).data_xml
print(parseString(c).
getElementsByTagName('version')[0].firstChild.data)
IOS のバージョンを表示する
Netconf による接続を
簡単に記述できる
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Cisco が開発・公開しているオープンソース ツール
• IETF93 のハッカソンがきっかけで開発された
• https://blogs.cisco.com/getyourbuildon/yang-opensource-tools-for-data-modeling-driven-management
• Netconf/YANG 関連の動作確認やテスト、学習時に活用
• YANG モデル対応装置(NETCONF サーバ、つまりルータやスイッチなど)か
ら YANG Explorer への対応データ モデルのダウンロード
• YANG モデル ファイルをコンパイルして見やすく表示
• RPC の生成、保存
• 装置 (NETCONF サーバ) に対して RPC を実行 (Read/Write)
• Python スクリプトの生成、保存
• YANG モデルの依存グラフの生成
実際にやってみる
YANG Explorer
https://github.com/CiscoDevNet/yang-explorer
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
接続デバイス情報の登録
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
必要なデータ モデル(スキーマ)にチェックを入れて
“Sync” をクリック
⬇
データ モデル(スキーマ)が装置からYang Explorer に
ダウンロードされる
デバイスからデータモデルを同期・ダウンロード
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Yang Explorer にダウンロードされた
データ モデルを
左の Explorer ペインにツリー表示する
YANG モデルファイルをコンパイルして見やすく表示
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
ncclient デモの「IOS のバージョンを表示する」
Python スクリプトにおける変数 `payload` と
同一の内容
RPC の生成, 保存, 実行
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Python 2.x 向けのソースコードが生成される
NETCONF クライアントとしての実装に
ncclient ライブラリが利用されている
ncclient を使う Python スクリプトの生成, 保存
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• https://github.com/YangModels/yang
“YANG modules from standard
organizations such as the IETF, open
source such as Open Daylight or
vendor specific modules”
• https://github.com/YangModels/yang
/tree/master/vendor/cisco
Reference: GitHub レポジトリ
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
まとめ
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• プログラマビリティを推進 – IOS-XE 16.X
• オープン化、自動化を推進する多数の機能
や技術
• 装置単位(On-Box/Off-Box)
• プロトコル
• 新機能多数!
• ゲストシェル
• Python
• EEM/Python
• Netconf/YANG
• Yang Explorer
まとめ
IOS-XE 16.X - オープンでプログラマブルなインフラストラクチャ
Automation
Abstraction and Policy
Control from Core to Edge
オープン&プログラマブル | 標準ベース
オープンAPI | 開発環境
Cloud Service Management
Policy | Orchestration
Virtualization
Physical and Virtual Infrastructure | App Hosting
Analytics
Network Data,
Contextual Insights
ネットワークアプリケーション
クラウド対応 | ソフトウェア
DNA構成要素、テクノロジー スタック
NW機器コントローラクラウド
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Appendix
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• IOS-XE コンフィグレーション マニュアル
• http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3850/software/release/16-5/configuration_guide/b-165-3850-cg/b-165-3850-
cg_chapter_01.html
• http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/16-5/configuration_guide/b-165-9300-cg/b-165-9300-
cg_chapter_010.html
• http://www.cisco.com/c/en/us/support/routers/asr-1000-series-aggregation-services-routers/products-installation-and-configuration-
guides-list.html
• http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/datamodels/configuration/xe-16/data-models-xe-16-book.html
• ツール参考
• ncclient
• https://github.com/ncclient/ncclient
• Yang Explorer
• https://github.com/CiscoDevNet/yang-explorer
URLs
IOS/IOS-XE 運用管理機能アップデート

More Related Content

What's hot

OpenStack超入門シリーズ いまさら聞けないSwiftの使い方
OpenStack超入門シリーズ いまさら聞けないSwiftの使い方OpenStack超入門シリーズ いまさら聞けないSwiftの使い方
OpenStack超入門シリーズ いまさら聞けないSwiftの使い方
Toru Makabe
 

What's hot (20)

大規模サービスを支えるネットワークインフラの全貌
大規模サービスを支えるネットワークインフラの全貌大規模サービスを支えるネットワークインフラの全貌
大規模サービスを支えるネットワークインフラの全貌
 
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(DevNet編)
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(DevNet編)Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(DevNet編)
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(DevNet編)
 
明日からはじめるネットワーク運用自動化
明日からはじめるネットワーク運用自動化明日からはじめるネットワーク運用自動化
明日からはじめるネットワーク運用自動化
 
KubernetesでRedisを使うときの選択肢
KubernetesでRedisを使うときの選択肢KubernetesでRedisを使うときの選択肢
KubernetesでRedisを使うときの選択肢
 
EthernetやCPUなどの話
EthernetやCPUなどの話EthernetやCPUなどの話
EthernetやCPUなどの話
 
ネットワーク機器のAPIあれこれ入門 (NetOpsCoding#2)
ネットワーク機器のAPIあれこれ入門(NetOpsCoding#2)ネットワーク機器のAPIあれこれ入門(NetOpsCoding#2)
ネットワーク機器のAPIあれこれ入門 (NetOpsCoding#2)
 
GMOインターネット様 発表「OpenStackのモデルの最適化とConoHa, Z.comとGMOアプリクラウドへの適用」 - OpenStack最新情...
GMOインターネット様 発表「OpenStackのモデルの最適化とConoHa, Z.comとGMOアプリクラウドへの適用」 - OpenStack最新情...GMOインターネット様 発表「OpenStackのモデルの最適化とConoHa, Z.comとGMOアプリクラウドへの適用」 - OpenStack最新情...
GMOインターネット様 発表「OpenStackのモデルの最適化とConoHa, Z.comとGMOアプリクラウドへの適用」 - OpenStack最新情...
 
Fluentdのお勧めシステム構成パターン
Fluentdのお勧めシステム構成パターンFluentdのお勧めシステム構成パターン
Fluentdのお勧めシステム構成パターン
 
OpenStackをコマンドで攻める! 構築・運用とトラブル解決 - OpenStack最新情報セミナー 2014年6月
OpenStackをコマンドで攻める! 構築・運用とトラブル解決 - OpenStack最新情報セミナー 2014年6月OpenStackをコマンドで攻める! 構築・運用とトラブル解決 - OpenStack最新情報セミナー 2014年6月
OpenStackをコマンドで攻める! 構築・運用とトラブル解決 - OpenStack最新情報セミナー 2014年6月
 
OpenStack超入門シリーズ いまさら聞けないSwiftの使い方
OpenStack超入門シリーズ いまさら聞けないSwiftの使い方OpenStack超入門シリーズ いまさら聞けないSwiftの使い方
OpenStack超入門シリーズ いまさら聞けないSwiftの使い方
 
Vacuum徹底解説
Vacuum徹底解説Vacuum徹底解説
Vacuum徹底解説
 
Kubernetesのしくみ やさしく学ぶ 内部構造とアーキテクチャー
Kubernetesのしくみ やさしく学ぶ 内部構造とアーキテクチャーKubernetesのしくみ やさしく学ぶ 内部構造とアーキテクチャー
Kubernetesのしくみ やさしく学ぶ 内部構造とアーキテクチャー
 
Ansible とネットワーク自動化の概要(SmartCS と Ansible の連携による自動化の可能性を体験!)
Ansible とネットワーク自動化の概要(SmartCS と Ansible の連携による自動化の可能性を体験!)Ansible とネットワーク自動化の概要(SmartCS と Ansible の連携による自動化の可能性を体験!)
Ansible とネットワーク自動化の概要(SmartCS と Ansible の連携による自動化の可能性を体験!)
 
【SRX】JUNOS ハンズオントレーニング資料 SRXシリーズ サービス ゲートウェイ コース
【SRX】JUNOS ハンズオントレーニング資料 SRXシリーズ サービス ゲートウェイ コース【SRX】JUNOS ハンズオントレーニング資料 SRXシリーズ サービス ゲートウェイ コース
【SRX】JUNOS ハンズオントレーニング資料 SRXシリーズ サービス ゲートウェイ コース
 
「ネットワーク超入門 IPsec VPN編」
「ネットワーク超入門 IPsec VPN編」「ネットワーク超入門 IPsec VPN編」
「ネットワーク超入門 IPsec VPN編」
 
eBPFは何が嬉しいのか
eBPFは何が嬉しいのかeBPFは何が嬉しいのか
eBPFは何が嬉しいのか
 
ネットワークの自動化・監視の取り組みについて #netopscoding #npstudy
ネットワークの自動化・監視の取り組みについて #netopscoding #npstudyネットワークの自動化・監視の取り組みについて #netopscoding #npstudy
ネットワークの自動化・監視の取り組みについて #netopscoding #npstudy
 
速習!論理レプリケーション ~基礎から最新動向まで~(PostgreSQL Conference Japan 2022 発表資料)
速習!論理レプリケーション ~基礎から最新動向まで~(PostgreSQL Conference Japan 2022 発表資料)速習!論理レプリケーション ~基礎から最新動向まで~(PostgreSQL Conference Japan 2022 発表資料)
速習!論理レプリケーション ~基礎から最新動向まで~(PostgreSQL Conference Japan 2022 発表資料)
 
InnoDBのすゝめ(仮)
InnoDBのすゝめ(仮)InnoDBのすゝめ(仮)
InnoDBのすゝめ(仮)
 
Building the Game Server both API and Realtime via c#
Building the Game Server both API and Realtime via c#Building the Game Server both API and Realtime via c#
Building the Game Server both API and Realtime via c#
 

Similar to IOS/IOS-XE 運用管理機能アップデート

Open stack reference architecture v1 2
Open stack reference architecture v1 2Open stack reference architecture v1 2
Open stack reference architecture v1 2
Dell TechCenter Japan
 
ASP.NET 新時代に向けて ~ ASP.NET 5 / Visual Studio 2015 基礎解説
ASP.NET 新時代に向けて ~ ASP.NET 5 / Visual Studio 2015 基礎解説ASP.NET 新時代に向けて ~ ASP.NET 5 / Visual Studio 2015 基礎解説
ASP.NET 新時代に向けて ~ ASP.NET 5 / Visual Studio 2015 基礎解説
Akira Inoue
 

Similar to IOS/IOS-XE 運用管理機能アップデート (20)

Netapp_innovation_2015_Cisco_抜粋修正版
Netapp_innovation_2015_Cisco_抜粋修正版Netapp_innovation_2015_Cisco_抜粋修正版
Netapp_innovation_2015_Cisco_抜粋修正版
 
Gmo media.inc 第9回西日本ossの普及を考える会
Gmo media.inc 第9回西日本ossの普及を考える会Gmo media.inc 第9回西日本ossの普及を考える会
Gmo media.inc 第9回西日本ossの普及を考える会
 
AWS Black Belt Online Seminar 2017 Amazon EC2
AWS Black Belt Online Seminar 2017 Amazon EC2AWS Black Belt Online Seminar 2017 Amazon EC2
AWS Black Belt Online Seminar 2017 Amazon EC2
 
FlexPod Day 2016 - Cisco session (Publish edition)
FlexPod Day 2016 - Cisco session (Publish edition)FlexPod Day 2016 - Cisco session (Publish edition)
FlexPod Day 2016 - Cisco session (Publish edition)
 
[G-Tech2014講演資料] シスコのSDN最新動向とITインフラエンジニアに求められるスキル - シスコシステムズ合同会社
[G-Tech2014講演資料] シスコのSDN最新動向とITインフラエンジニアに求められるスキル - シスコシステムズ合同会社[G-Tech2014講演資料] シスコのSDN最新動向とITインフラエンジニアに求められるスキル - シスコシステムズ合同会社
[G-Tech2014講演資料] シスコのSDN最新動向とITインフラエンジニアに求められるスキル - シスコシステムズ合同会社
 
ITpro EXPO 2014: Cisco ACI  ~データセンター運用の効率化と迅速なアプリケーション展開~
ITpro EXPO 2014: Cisco ACI  ~データセンター運用の効率化と迅速なアプリケーション展開~ITpro EXPO 2014: Cisco ACI  ~データセンター運用の効率化と迅速なアプリケーション展開~
ITpro EXPO 2014: Cisco ACI  ~データセンター運用の効率化と迅速なアプリケーション展開~
 
JAWS目黒 EC2チューニングTips #jawsmeguro #jawsug
JAWS目黒 EC2チューニングTips #jawsmeguro #jawsugJAWS目黒 EC2チューニングTips #jawsmeguro #jawsug
JAWS目黒 EC2チューニングTips #jawsmeguro #jawsug
 
OpenStack概要
OpenStack概要OpenStack概要
OpenStack概要
 
VIRLとPyATSで実現するネットワークCI
VIRLとPyATSで実現するネットワークCIVIRLとPyATSで実現するネットワークCI
VIRLとPyATSで実現するネットワークCI
 
Open stack reference architecture v1 2
Open stack reference architecture v1 2Open stack reference architecture v1 2
Open stack reference architecture v1 2
 
Nutanix@Open Source Conference 2015 Hiroshima
Nutanix@Open Source Conference 2015 HiroshimaNutanix@Open Source Conference 2015 Hiroshima
Nutanix@Open Source Conference 2015 Hiroshima
 
ASP.NET 新時代に向けて ~ ASP.NET 5 / Visual Studio 2015 基礎解説
ASP.NET 新時代に向けて ~ ASP.NET 5 / Visual Studio 2015 基礎解説ASP.NET 新時代に向けて ~ ASP.NET 5 / Visual Studio 2015 基礎解説
ASP.NET 新時代に向けて ~ ASP.NET 5 / Visual Studio 2015 基礎解説
 
EC2 Deep Dive at CTO Night&Day 2016
EC2 Deep Dive at CTO Night&Day 2016 EC2 Deep Dive at CTO Night&Day 2016
EC2 Deep Dive at CTO Night&Day 2016
 
「hbstudy#23 OpenStack祭!!」資料 ~OpenStackプロジェクトの全体像~
「hbstudy#23 OpenStack祭!!」資料 ~OpenStackプロジェクトの全体像~「hbstudy#23 OpenStack祭!!」資料 ~OpenStackプロジェクトの全体像~
「hbstudy#23 OpenStack祭!!」資料 ~OpenStackプロジェクトの全体像~
 
OpenStack 向けネットワーク入門
OpenStack 向けネットワーク入門OpenStack 向けネットワーク入門
OpenStack 向けネットワーク入門
 
Dockerのエンタープライズ運用を支える技術 - FlexPod Day 2017 Tokyo
Dockerのエンタープライズ運用を支える技術 - FlexPod Day 2017 TokyoDockerのエンタープライズ運用を支える技術 - FlexPod Day 2017 Tokyo
Dockerのエンタープライズ運用を支える技術 - FlexPod Day 2017 Tokyo
 
OSC2012 Tokyo/Spring JOSUG
OSC2012 Tokyo/Spring JOSUGOSC2012 Tokyo/Spring JOSUG
OSC2012 Tokyo/Spring JOSUG
 
【Interop Tokyo 2016】 Seminar - EA-08 : シスコ データセンターSDN戦略、3本の矢
【Interop Tokyo 2016】 Seminar - EA-08 : シスコ データセンターSDN戦略、3本の矢【Interop Tokyo 2016】 Seminar - EA-08 : シスコ データセンターSDN戦略、3本の矢
【Interop Tokyo 2016】 Seminar - EA-08 : シスコ データセンターSDN戦略、3本の矢
 
[db tech showcase Tokyo 2016] D13: NVMeフラッシュストレージを用いた高性能高拡張高可用なデータベースシステムの実現方...
[db tech showcase Tokyo 2016] D13: NVMeフラッシュストレージを用いた高性能高拡張高可用なデータベースシステムの実現方...[db tech showcase Tokyo 2016] D13: NVMeフラッシュストレージを用いた高性能高拡張高可用なデータベースシステムの実現方...
[db tech showcase Tokyo 2016] D13: NVMeフラッシュストレージを用いた高性能高拡張高可用なデータベースシステムの実現方...
 
20190530 osc hokkaido_public
20190530 osc hokkaido_public20190530 osc hokkaido_public
20190530 osc hokkaido_public
 

More from シスコシステムズ合同会社

More from シスコシステムズ合同会社 (20)

Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(応用編)
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(応用編)Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(応用編)
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(応用編)
 
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(基礎編)配布用
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(基礎編)配布用Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(基礎編)配布用
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(基礎編)配布用
 
【Interop Tokyo 2016】 ShowNet - SSS-17 : ShowNet 2016 を支える シスコの最新テクノロジー
【Interop Tokyo 2016】 ShowNet - SSS-17 :  ShowNet 2016 を支えるシスコの最新テクノロジー【Interop Tokyo 2016】 ShowNet - SSS-17 :  ShowNet 2016 を支えるシスコの最新テクノロジー
【Interop Tokyo 2016】 ShowNet - SSS-17 : ShowNet 2016 を支える シスコの最新テクノロジー
 
【Interop Tokyo 2016】 Seminar - EA-18 : 「Cisco の先進セキュリティ ソリューション」 Shownet 2016...
【Interop Tokyo 2016】 Seminar - EA-18 : 「Cisco の先進セキュリティ ソリューション」 Shownet 2016...【Interop Tokyo 2016】 Seminar - EA-18 : 「Cisco の先進セキュリティ ソリューション」 Shownet 2016...
【Interop Tokyo 2016】 Seminar - EA-18 : 「Cisco の先進セキュリティ ソリューション」 Shownet 2016...
 
【Interop Tokyo 2016】 Seminar - EA-14 : シスコ スイッチが標的型攻撃を食い止める ~新しい内部対策ソリューション「C...
【Interop Tokyo 2016】 Seminar - EA-14 : シスコ スイッチが標的型攻撃を食い止める ~新しい内部対策ソリューション「C...【Interop Tokyo 2016】 Seminar - EA-14 : シスコ スイッチが標的型攻撃を食い止める ~新しい内部対策ソリューション「C...
【Interop Tokyo 2016】 Seminar - EA-14 : シスコ スイッチが標的型攻撃を食い止める ~新しい内部対策ソリューション「C...
 
【Interop Tokyo 2016】 Seminar - EA-09 : エンタープライズ ワイヤレス:デジタル世界のための信頼性と汎用性に優れたアクセス
【Interop Tokyo 2016】 Seminar - EA-09 : エンタープライズ ワイヤレス:デジタル世界のための信頼性と汎用性に優れたアクセス【Interop Tokyo 2016】 Seminar - EA-09 : エンタープライズ ワイヤレス:デジタル世界のための信頼性と汎用性に優れたアクセス
【Interop Tokyo 2016】 Seminar - EA-09 : エンタープライズ ワイヤレス:デジタル世界のための信頼性と汎用性に優れたアクセス
 
【Interop Tokyo 2016】 Seminar - EA-05 : 「Cisco の先進コア ネットワーク ソリューション」 Shownet 2...
【Interop Tokyo 2016】 Seminar - EA-05 : 「Cisco の先進コア ネットワーク ソリューション」 Shownet 2...【Interop Tokyo 2016】 Seminar - EA-05 : 「Cisco の先進コア ネットワーク ソリューション」 Shownet 2...
【Interop Tokyo 2016】 Seminar - EA-05 : 「Cisco の先進コア ネットワーク ソリューション」 Shownet 2...
 
【Interop Tokyo 2016】 SP ネットワークの変革を支える技術イノベーション
【Interop Tokyo 2016】 SP ネットワークの変革を支える技術イノベーション【Interop Tokyo 2016】 SP ネットワークの変革を支える技術イノベーション
【Interop Tokyo 2016】 SP ネットワークの変革を支える技術イノベーション
 
【Interop Tokyo 2016】 新たなルーティング パラダイム セグメントルーティング
【Interop Tokyo 2016】 新たなルーティング パラダイム セグメントルーティング【Interop Tokyo 2016】 新たなルーティング パラダイム セグメントルーティング
【Interop Tokyo 2016】 新たなルーティング パラダイム セグメントルーティング
 
【Interop Tokyo 2016】 ネットワーク モデリングと自動制御
【Interop Tokyo 2016】 ネットワーク モデリングと自動制御【Interop Tokyo 2016】 ネットワーク モデリングと自動制御
【Interop Tokyo 2016】 ネットワーク モデリングと自動制御
 
【Interop Tokyo 2016】 次世代サービス チェイニング NSH (Network Service Header)
【Interop Tokyo 2016】 次世代サービス チェイニング NSH (Network Service Header)【Interop Tokyo 2016】 次世代サービス チェイニング NSH (Network Service Header)
【Interop Tokyo 2016】 次世代サービス チェイニング NSH (Network Service Header)
 
【Interop Tokyo 2016】 ビッグデータ解析手法による脅威分析サービス
【Interop Tokyo 2016】 ビッグデータ解析手法による脅威分析サービス【Interop Tokyo 2016】 ビッグデータ解析手法による脅威分析サービス
【Interop Tokyo 2016】 ビッグデータ解析手法による脅威分析サービス
 
【Interop Tokyo 2016】 Cisco Advanced Malware Protection(AMP)/ レトロ スペクティブで見えてくる...
【Interop Tokyo 2016】 Cisco Advanced Malware Protection(AMP)/ レトロ スペクティブで見えてくる...【Interop Tokyo 2016】 Cisco Advanced Malware Protection(AMP)/ レトロ スペクティブで見えてくる...
【Interop Tokyo 2016】 Cisco Advanced Malware Protection(AMP)/ レトロ スペクティブで見えてくる...
 
【Interop Tokyo 2016】 世界最大級の脅威情報と自社ネットワークの脅威可視化
【Interop Tokyo 2016】 世界最大級の脅威情報と自社ネットワークの脅威可視化【Interop Tokyo 2016】 世界最大級の脅威情報と自社ネットワークの脅威可視化
【Interop Tokyo 2016】 世界最大級の脅威情報と自社ネットワークの脅威可視化
 
【Interop Tokyo 2016】 初心者でもわかるCisco SDNの概要
【Interop Tokyo 2016】 初心者でもわかるCisco SDNの概要【Interop Tokyo 2016】 初心者でもわかるCisco SDNの概要
【Interop Tokyo 2016】 初心者でもわかるCisco SDNの概要
 
【Interop Tokyo 2016】 LAN/WAN向けSDNコントローラ APIC-EMのご紹介
【Interop Tokyo 2016】 LAN/WAN向けSDNコントローラ APIC-EMのご紹介【Interop Tokyo 2016】 LAN/WAN向けSDNコントローラ APIC-EMのご紹介
【Interop Tokyo 2016】 LAN/WAN向けSDNコントローラ APIC-EMのご紹介
 
【Interop Tokyo 2016】 CCNA RS 改訂ポイントと BOOTCAMP トレーニング
【Interop Tokyo 2016】 CCNA RS 改訂ポイントと BOOTCAMP トレーニング【Interop Tokyo 2016】 CCNA RS 改訂ポイントと BOOTCAMP トレーニング
【Interop Tokyo 2016】 CCNA RS 改訂ポイントと BOOTCAMP トレーニング
 
【Interop Tokyo 2016】 Cisco Jasper Control Center
【Interop Tokyo 2016】 Cisco Jasper Control Center【Interop Tokyo 2016】 Cisco Jasper Control Center
【Interop Tokyo 2016】 Cisco Jasper Control Center
 
【Interop Tokyo 2016】 Cisco IoT (展示内容紹介)
【Interop Tokyo 2016】 Cisco IoT (展示内容紹介)【Interop Tokyo 2016】 Cisco IoT (展示内容紹介)
【Interop Tokyo 2016】 Cisco IoT (展示内容紹介)
 
【Interop Tokyo 2016】 30年の実績と経験!シスコ スイッチ最新機能と伝統機能をご紹介
【Interop Tokyo 2016】 30年の実績と経験!シスコ スイッチ最新機能と伝統機能をご紹介【Interop Tokyo 2016】 30年の実績と経験!シスコ スイッチ最新機能と伝統機能をご紹介
【Interop Tokyo 2016】 30年の実績と経験!シスコ スイッチ最新機能と伝統機能をご紹介
 

Recently uploaded

Recently uploaded (11)

LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
 
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
 
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
 
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
 
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
 

IOS/IOS-XE 運用管理機能アップデート

  • 2. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • 主に IOS-XE バージョン 16 以降で新しくサポート された運用管理機能を中心に解説し、実際の設定や 使用方法をご紹介いたします • Cisco ISR/ASR および Catalyst を主な対象とします IOS/IOS-XE 運用管理機能アップデート
  • 3. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • はじめに • Guest Shell と Python • EEM と On-box Python • NETCONF と データ モデル • ncclient • YANG Explorer アジェンダ
  • 4. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public はじめに
  • 5. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public UADP Unified Access Data Plane Flexible, Programmable, High- Performance Switching Silicon • Fully Programmable – excellent flexibility, ability to handle new encaps (VXLAN, GPE, etc) – hardware speed, software elasticity • Scalable – Massive recirculation bandwidth and low recirculation latency provide excellent tunneling and services support for traffic flows • Advanced on-chip QoS – client–level granularity, sophisticated bandwidth shaping, with integrated on-chip NetFlow for visibility • Secure – integrated on-chip support for MACsec encryption (AES-128, CBC) • Extensible Architecture – ability to scale both up and down – the foundation for a long-lived family of high-performance, flexible switching silicon QFP QuantumFlow Processor Advanced, Multi-Core, Feature-Rich Routing Silicon • Fully Programmable – leveraging the many features of IOS-XE with hardware performance • Scalable – Massive number of CPU cores (40/64), ability to cascade multiple QFPs = consistent high performance • Advanced on-chip QoS – 100,000+ hardware-based queues, sophisticated traffic shaping and control • Secure – linkage to high- performance crypto capability for secure WAN transport • Extensible Architecture – ability to scale both up and down – the foundation for a long-lived family of high-performance, flexible routing silicon IOS-XE The Evolution of IOS Taking the Proven Strengths of IOS to the Next Level • Operational and Services Uniformity – Routing, Switching, and Wireless consistency • Speed of Innovation Velocity – “Code once and Re-use Many” across multiple places in the network • Foundation for Virtualization – providing for network hosting and integration of virtualized functions (VNFs, containers) • New Foundational Capabilities – HA and operational leadership, state decoupling, net database … • Platform for the Future – the “software stage” for the next wave of Cisco innovation … “People that are really serious about software should build their own hardware” 100% シスコが開発した プログラマブルシリコン – DNAの機能をハード ウェアスピードで実行 ハードウェア+ソフトウェア イノベーションの基礎
  • 6. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Catalyst で動作する IOS-XE の進化 共通基盤 / HA 管理インターフェース モジュールドライバ カーネル IOS IOS 共通基盤 / HA 管理インターフェイス モジュール ドライバ カーネル IOS XE 3.7.x (SE) 機能群 AppホスティングIOSd 機能群 WCM Wireshark Open IOS XE (16.1.1) AppホスティングIOSd LXC LXC データ ベース 共通基盤 / HA 管理インターフェイス モジュール ドライバ カーネル WCM Wire shark IOSd コア IOS Sub SystemsIOS Sub SystemsIOSサブ システム 操作感は変えずに、ソフトウェア アーキテクチャを刷新
  • 7. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public データベースを確認 – Crimson DB Cat3850-3#show platform software process database dbm switch active r0 summary Database: MDT_OPER_DB Table Name or ID Table OID (id/src) Table Type LUID Records Cur Mode ------------------------------------------------------------------------------------------------------------------------- table repl_toc 2/0x0 tbl_toc b272aa9e1d00a82f 2 en expl table mdt_streams 4/0x0 mdt_streams 3a5c60d8eaa1ff3f 1 en expl table mdt_subscriptions 6/0x0 mdt_subscriptions d373c82770f2af51 1 en expl table mdt_receivers 8/0x0 mdt_receivers da893bbd75d2811e 0 en expl table mdt_connections 10/0x0 mdt_connections ab4329ef37096b84 0 en expl table mdt_sub_con_statist 12/0x0 mdt_sub_con_statisti d9714fa14c7907df 0 en expl 1 16/0x0 mdt_receivers da893bbd75d2811e 1 en expl Database: MDT_CONFIG_DB Table Name or ID Table OID (id/src) Table Type LUID Records Cur Mode ------------------------------------------------------------------------------------------------------------------------- table repl_toc 2/0x0 tbl_toc b272aa9e1d00a82f 1 en expl table mdt_subscriptions_c 4/0x0 mdt_subscriptions_co d2adb9245b5e6db3 1 en expl table mdt_receivers_confi 6/0x0 mdt_receivers_config 4c73dd83691c6b0e 0 en expl be_cursor_table 8/0x0 be_cursor_table 4249c9626610277b 2 dis - 1 1152921504606846980/0x0 mdt_receivers_config 4c73dd83691c6b0e 1 en expl Database: IM_CONFIG_DB <snip>
  • 8. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • x86 アーキテクチャで動作するアプリケーションを、 コンテナ上でサポート • Puppet や Chef Agent • IoT やクラウド アプリケーションとの親和性 • MIPS アーキテクチャ プラットフォーム (Cat3650/3850)でサポートする Guest Shell では ハードウェアによる制約あり(Guest Shell Lite) Catalyst 9K では x86 CPU を採用
  • 9. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public IOS コンフィグレーション ガイド Programmability & Data Models
  • 10. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public ネットワーク プログラマビリティに対する考え方の違い 初級 中級 上級 特徴 • コマンドラインを使いこなす • プログラミングは経験が少ない • コーディング経験が少しあるネット ワーク技術者中心 • EEM, Tcl, Expect など • コーディング経験が豊富で、 自動化を推進 関心事 • 作業の自動化 • エンジニア スキルセットの拡大 • Netconf, Python, Ansible などへ 移行 • データ モデルの理解 • マルチベンダー環境での統一 運用、相互接続 懸念事項 • 学習事項が多いが、確保できる 時間が少ない • プログラマビリティを本格的に実現 するツールは何か • 抽象化する価値は何か • オープンスタンダード仕様 提供すべき内容 • 基本的なプログラマビリティのコ ンセプト理解 • スクリプティングの紹介 (Python, Ansible など) • 少ない投資ですぐに効果が出る ユース ケースの紹介 • Netconf トレーニング • APIを使った装置オペレーション • 利用可能なツールとその使い方 • APIドキュメントなどの情報提 供、公開 • 新機能の差分アップデート
  • 11. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public SiSi SiSi SiSiSiSiSiSi SiSiSiSiSiSi SiSiSiSiSiSi • デバイス内での監視や自動化を定義し、リモート管理システムだけでは得られない ロジックを実現でき、管理品質の向上や、オペレーション コスト削減に貢献 • 任意のイベントに基づくプロアクティブな対処が可能 (EEM) • 装置やベンダーの実装に比較的依存 Off-box + On-box プログラマビリティ 外部からの監視や自動化 • Python • Ansible • Netconf/YANG • … • DNA-Center/APIC-EM • Prime Infrastructure • Zabbix • … 内部からの監視や自動化 Shell Python EEM Shell Python EEM • On-box Python • EEM • Guest Shell • …
  • 12. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public プロビジョニング手法 – IOS-XE 16.5 以降 Pre-boot Execution Environment (PXE) Client Zero Touch Provisioning Cisco Network Plug and Play ブートするソフト ウェアイメージ元 ネットワーク上 装置内 (カスタマイズでイメージ配布) 装置内 (オプションでイメージ配布) プロトコル/ インターフェイス オープン / 標準 オープン / 標準 シスコによる作り込み、仕様は公開 「ターン キー」ソリューション 特徴 マルチベンダー環境 マルチベンダー環境 スクリプト自動配布 スクリプトは作成必要 • シスコ中心の LAN/WAN に最適化 • セキュリティ組み込み • スケーラビリティ考慮 • API 公開 PXE Booting Router PXE Booting Switch DHCP PXE Server ZTP Booting Router ZTP Booting Switch DHCP ZTP Server PNP Booting Router PNP Booting Switch APIC-EM / Network Plug and Play Server PNP Access Point option 150 ip 203.0.113.254 option 67 ascii /sample_python_dir/python_script.py
  • 13. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Guest Shell と Python API
  • 14. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • Linux Shell … IOS XE 上 LXC コンテナで実行 • IOS-XE CLI や bootflash にアクセス可能 • Python を標準サポート (Cat3K では 2.7, Cat9K では 2.7/3.X) • pip 組込み ➡ Python パッケージの追加インストール • yum サポート (Cat9K) ➡ Linux パッケージの追加インストール Guest Shell IOS-XE (IOSd) Guest Shell オープンアプリケーションコンテナ API Linux アプリケーション 様々なライブラリを活用できる Python を使った On-box プログラマビリティを提供 python
  • 15. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Guest Shell Lite と Guest Shell Guest Shell Lite (Limited LXCコンテナ) Guest Shell (LXCコンテナ) OS Cisco IOS XE Cisco IOS XE サポート プラットフォーム Cisco Catalyst 3650 Series Switches (all models) Cisco Catalyst 3850 Series Switches (all models) Cisco Catalyst 9300 Series Switches (all models) Cisco ISR 4000 Series Integrated Services Routers (Models with a minimum of 8 GB RAM.) Guest Shell環境 Montavista CGE7 CentOS 7 Python 2.7 Supported (Python V2.7.11) Supported (Python V2.7.5) カスタム Python ライブラリ Cisco Embedded Event Manager
 Cisco IOS XE CLIs Ncclient Cisco Embedded Event Manager
 Cisco IOS XE CLIs Supported Rootfs Busybox, SSH, and Python PIP install SSH, Yum install, and Python PIP install GNU C Compiler Not supported Not supported RPM Install Not supported Supported アーキテクチャ MIPS x86
  • 16. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Guest Shell の起動 Cat3850-3#conf t Enter configuration commands, one per line. End with CNTL/Z. Cat3850-3(config)#iox Cat3850-3(config)#exit Cat3850-3# Cat3850-3#guestshell enable Management Interface will be selected if configured Please wait for completion guestshell is in RUNNING state Cat3850-3# Cat3850-3#guestshell [guestshell@guestshell ~]$
  • 17. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Guest Shell の動作確認 Cat3850-3#show iox IOx Infrastructure Summary: --------------------------- IOx service (CAF) : Running IOx service (HA) : Running IOx service (IOxman) : Running Libvirtd : Running Cat3850-3#show app-hosting detail State : RUNNING Author : Cisco Systems Application Type : lxc App id : guestshell Name : guestshell Version : 0.1 Activated profile name : custom Description : MontaVista guestshell Resource reservation Memory : 256 MB Disk : 1 MB CPU : 800 units VCPU : 1 Attached devices Type Name Alias --------------------------------------------- Serial/shell Serial/aux Serial/Syslog serial2 Serial/Trace serial3 Network interfaces --------------------------------------- eth0: MAC address : 52:54:dd:63:b1:0a IPv4 address : 192.168.30.2
  • 18. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Guest Shell の環境設定 [guestshell@guestshell ~]$ ifconfig eth0 eth0 Link encap:Ethernet HWaddr 52:54:DD:63:B1:0A inet addr:192.168.30.2 Bcast:192.168.30.7 Mask:255.255.255.248 interface GigabitEthernet0/0 vrf forwarding Mgmt-vrf ip address <ipaddress> <mask> ! ip route vrf Mgmt-vrf 0.0.0.0 0.0.0.0 <mgmt-gateway> IOS-XE 側で management port を設定 自動設定される Guest Shell のネットワーク環境 [guestshell@guestshell ~]$ cat /flash/proxy_vars.sh export http_proxy=http://proxy-wsa.example.com:80/ export https_proxy=http://proxy-wsa.example.com:80/ export HTTP_PROXY=http://proxy-wsa.example.com:80/ export HTTPS_PROXY=http://proxy-wsa.example.com:80/ [guestshell@guestshell ~]$ source /flash/proxy_vars.sh Guest Shell 上のプロキシ設定例 [guestshell@guestshell ~]$ cat /etc/resolv.conf nameserver 8.8.8.8 Guest Shell 上の DNS サーバ設定例
  • 19. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Python インタラクティブモード Cat3850-3#guestshell run python Python 2.7.11 (default, May 17 2017, 05:17:57) [GCC 5.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> msg = "Hello CTU!" >>> print msg Hello CTU! >>> >>> import cli >>> cli.clip('show ip int brief | i Vlan1') Vlan1 unassigned YES NVRAM up up >>> >>> output = cli.cli('show clock') >>> print output *11:11:17.345 UTC Tue Aug 1 2017 >>> >>> cli.configure(["interface GigabitEthernet1/0/7", "no shut", "end"]) [ConfigResult(success=True, command='interface GigabitEthernet1/0/7', line=1, output='', notes=None), ConfigResult(success=True, command='no shut', line=2, output='', notes=None), ConfigResult(success=True, command='end', line=3, output='', notes=None)] >>> • 組込み Python CLI ライブラリを import し、Guest Shell から IOS コマンドを実行・結果取得する例 • Netconf(ncclient ライブラリ)を使えば、内部データベースと 直接やり取りできる
  • 20. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Guest Shell 環境 Cat3850-3#guestshell [guestshell@guestshell ~]$ uname -a Linux guestshell 3.10.101-rt110 #1 SMP Fri Jun 30 20:16:49 PDT 2017 mips64 GNU/Linux [guestshell@guestshell ~]$ [guestshell@guestshell ~]$ cat /proc/version Linux version 3.10.101-rt110 (xelinux@xe-linux-bld2) (gcc version 5.3.0 (GCC) ) #1 SMP Fri Jun 30 20:16:49 PDT 2017 [guestshell@guestshell ~]$ [guestshell@guestshell ~]$ cd / [guestshell@guestshell /]$ ls bin data flash local proc tmp boot dev home lost+found sbin usr bootflash etc lib media selinux var cisco fix_sshd.sh lib64 mnt sys C9300-24U#guestshell [guestshell@guestshell ~]$ uname -a Linux guestshell 4.4.51 #1 SMP Sun Jun 4 17:58:12 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux [guestshell@guestshell ~]$ [guestshell@guestshell ~]$ cat /proc/version Linux version 4.4.51 (xelinux@xe-linux-bld2) (gcc version 5.3.0 (GCC) ) #1 SMP Sun Jun 4 17:58:12 PDT 2017 [guestshell@guestshell ~]$ [guestshell@guestshell ~]$ cd / [guestshell@guestshell /]$ ls bin cisco dev flash lib64 media proc run srv unfix_sshd.sh boot created.2016-05-31.14:23:44 etc home local mnt root sbin sys usr bootflash data fix_sshd.sh lib lost+found opt rr_moved selinux tmp var flash:/(IOS-XE) = /flash/(Guest Shell) 自動でマウントされる
  • 21. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Guest Shell 上で Python スクリプトを編集・実行 [guestshell@guestshell ~]$ pwd /home/guestshell [guestshell@guestshell ~]$ pip list pip (9.0.1) setuptools (22.0.5) [guestshell@guestshell ~]$ [guestshell@guestshell ~]$ cd /flash/ [guestshell@guestshell flash]$ ls | grep .bin cat3k_caa-universalk9.16.06.01.SPA.bin [guestshell@guestshell flash]$ [guestshell@guestshell flash]$ touch test.txt [guestshell@guestshell flash]$ ls | grep test test.txt [guestshell@guestshell flash]$ [guestshell@guestshell flash]$ vi sho-ver.py [guestshell@guestshell flash]$ [guestshell@guestshell flash]$ cat sho-ver.py #!/usr/bin/python import cli print cli.execute('show version') [guestshell@guestshell flash]$ [guestshell@guestshell flash]$ python ./sho-ver.py | grep bin System image file is "flash:cat3k_caa-universalk9.16.06.01.SPA.bin" [guestshell@guestshell flash]$ Vi エディタを実行 show version を実行して 結果を表示する Python スクリプト例 スクリプト実行結果
  • 22. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public EEM と On-box Python
  • 23. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • 装置内で実行される On-box 監視&カスタマイズ機能 • イベント検知→アクション実行 • イベント・アクションの組み合わせは自由 • 既存の IOS-XE 機能では不可能なロジックを作成 • アプレット版(CLI), Tcl 版(スクリプト), Python 版(スクリプト) • 幅広いサポート機器 • C800〜ASR1000, Cat2K, 3K, 4K, 6K, Nexus, XR…, Cat9K… • イベント、アクションの細かなサポート内容はバージョンに依存 EEM 概要と Python サポート
  • 24. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Embedded Event Manager Syslog email notification SNMP set Counter CLI Applets SNMP get SNMP notification Application specific TCL Policies Reload or switchover EEM Applets multi-event-correlation IOS.sh Policies Actions Event Detectors Syslog Event Process Scheduler Database Interface Descriptor Blocks Syslog ED Watchdog ED Interface Counter ED CLI ED OIR ED ERM ED EOT ED RF ED none ED GOLD ED XML RPC ED SNMP EDs Remote: • Notification Local: • Notification • Get/Set NetFlow ED IPSLA ED Route ED Timer EDs • Cron • Count down HW EDs • Fan • Temp • Env • ... CDP LLDP ED 802.1x ED MAC ED Python Policies xxx ED … EEM アーキテクチャ … New!
  • 25. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • 「〜が発生したら〜する」という判断や処理を自動化する EEM Cisco Embedded Event Manager(EEM) CLI ベース(EEM アプレット) Tcl ベース(EEM Tcl) Python ベース (EEM Python Module) •強み •設定が比較的容易 •余分なファイルが不要 •弱み •高度な処理には不向き •強み •CLI より柔軟な動作を設定 可能 •弱み •TCL を覚える必要がある •強み •TCL スクリプト同様の柔軟な 動作を設定可能 •豊富なライブラリを活用可能 •弱み •Python を覚える必要がある
  • 26. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 1. EEM アプレット(CLI)の中で Python スクリプトを実行 • Event Detector: CLI, Action: CLI で Python スクリプトを実行 • メリット:汎用的な Python スクリプトがそのまま使える • デメリット:イベントは EEM アプレット (CLI) 相当 2. EEM スクリプト (Python) を記述 • Event Detector, Action ともに Python スクリプトで記述 • メリット:EEM 特有の高度な記述が可能(複雑なイベント検出など) • デメリット:EEM Python ライブラリの学習が必要 EEM と Python の組み合わせ方: 2 種類 Event Detectors (〜が発生したら) Action (〜を行う) Event Detectors (〜が発生したら) Action (〜を行う) 値の受け渡し ・何が? ・いつ? 値の受け渡し ・何が? ・いつ? CLI Python
  • 27. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • 標準で 3 つのカスタムライブラリが付属 • pip を使って追加インストール可能 On-box プログラマビリティのための Python ライブラリ ライブラリ名 読み込み 概要 Cisco IOS XE CLI import cli IOS XE の CLI に対して入出力を行う ライブラリ Cisco Embedded Event Manager import eem Python スクリプト内で EEM 固有の操作 を実現するためのライブラリ(Event 検出, syslog, cli, snmp, mail, reload, …) Ncclient import ncclient Netconf クライアントの Python ライブラリ
  • 28. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public event manager applet TEST event none action 100 cli command "enable" action 200 cli command "guestshell run python /bootflash/sho-ver.py" Cat3850-3#debug event manager action cli Debug EEM action cli debugging is on Cat3850-3#event manager run TEST *Aug 2 20:40:47.987: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : CTL : cli_open called. *Aug 2 20:40:47.990: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Cat3850-3> *Aug 2 20:40:47.990: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : IN : Cat3850-3>enable *Aug 2 20:40:48.103: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Cat3850-3# *Aug 2 20:40:48.104: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : IN : Cat3850-3#guestshell run python /bootflash/sho-ver.py *Aug 2 20:40:53.654: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Cisco IOS XE Software, Version 16.06.01 *Aug 2 20:40:53.654: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Cisco IOS Software [Everest], Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 16.6.1, RELEASE SOFTWARE (fc2) *Aug 2 20:40:53.655: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Technical Support: http://www.cisco.com/techsupport *Aug 2 20:40:53.655: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Copyright (c) 1986-2017 by Cisco Systems, Inc. *Aug 2 20:40:53.655: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Compiled Sat 22-Jul-17 03:00 by mcpre *Aug 2 20:40:53.655: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Cisco IOS-XE software, Copyright (c) 2005-2017 by cisco Systems, Inc. *Aug 2 20:40:53.655: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : All rights reserved. Certain components of Cisco IOS-XE software are *Aug 2 20:40:53.656: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : licensed under the GNU General Public License ("GPL") Version 2.0. The *Aug 2 20:40:53.656: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : software code licensed under GPL Version 2.0 is free software that comes *Aug 2 20:40:53.656: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such *Aug 2 20:40:53.656: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : GPL code under the terms of GPL Version 2.0. For more details, see the *Aug 2 20:40:53.657: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : documentation or "License Notice" file accompanying the IOS-XE software, *Aug 2 20:40:53.657: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : or the applicable URL provided on the flyer accompanying the IOS-XE *Aug 2 20:40:53.657: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : software. *Aug 2 20:40:53.657: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : ROM: IOS-XE ROMMON *Aug 2 20:40:53.658: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : BOOTLDR: CAT3K_CAA Boot Loader (CAT3K_CAA-HBOOT-M) Version 3.58, RELEASE SOFTWARE (P) *Aug 2 20:40:53.658: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Cat3850-3 uptime is 3 days, 13 hours, 13 minutes *Aug 2 20:40:53.658: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Uptime for this control processor is 3 days, 13 hours, 16 minutes *Aug 2 20:40:53.658: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : System returned to ROM by reload *Aug 2 20:40:53.658: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : System image file is "flash:cat3k_caa-universalk9.16.06.01.SPA.bin" *Aug 2 20:40:53.658: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : CTL : 20+ lines read from cli, debug output truncated *Aug 2 20:40:53.659: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : CTL : cli_close called. *Aug 2 20:40:53.661: *Aug 2 20:40:53.661: tty is now going through its death sequence Cat3850-3# シンプルな動作例 * None event detector … Action のテスト用で多用 * debug event manager action cli … EEM による CLI 実行結果を出力
  • 29. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public EEM Python モジュール デモ EEM 1. Syslog 中に %LINEPROTO-5-UPDOWN: を見つけると Python スクリプトを実行 2. Cisco Spark の特定スペースに通知 (Syslog 内容や任意のメッセージなど) REST API (HTTPS)python
  • 30. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Python パッケージの追加インストール Spark にメッセージを POST するために利用するライブラリ - Requests [guestshell@guestshell ~]$ sudo pip list install DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning. certifi (2017.7.27.1) chardet (3.0.4) idna (2.5) pip (9.0.1) requests (2.18.2) setuptools (22.0.5) urllib3 (1.22) [guestshell@guestshell ~]$ sudo pip install requests 任意のパッケージを追加インストール・活用できる
  • 31. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public event manager applet syslog event syslog pattern "%LINEPROTO-5-UPDOWN:" action 100 syslog msg "Syslog ## $_syslog_msg ## Detected by EEM" action 200 cli command "enable" action 205 cli command "guestshell run python /bootflash/kikuta/spark_post.py Interface_UpDownEvent_Detected" action 208 cli command "guestshell run python /bootflash/kikuta/spark_post.py https://10.71.154.112/" 設定例 1 EEM アプレット (CLI) + Python スクリプト [guestshell@guestshell ~]$ cat /bootflash/kikuta/spark_post.py import requests import sys ACCESS_TOKEN = "<Cisco Spark Access Token>” ROOM_ID = "<Cisco Spark_Room Id>” YOUR_MESSAGE = sys.argv[1] #ヘッダー作成 def setHeaders(): accessToken_hdr = 'Bearer ' + ACCESS_TOKEN spark_header = {'Authorization': accessToken_hdr, 'Content-Type': 'application/json; charset=utf-8'} return spark_header #メッセージをポスト def postMsg(the_header,roomId,message): message = '{"roomId":"' + roomId + '","text":"' + message +'"}’ uri = 'https://api.ciscospark.com/v1/messages’ resp = requests.post(uri, data=message, headers=the_header) print resp header=setHeaders() postMsg(header,ROOM_ID,YOUR_MESSAGE) 汎用的なPythonスクリプトが そのまま使える CLI で設定する引数を Spark に投稿 (イベントごとに投稿する内容を変更できる) NMS や OSS へ誘導 チケットを自動発行 他装置を API で設定変更 …などなど EEM イベントは CLI で記述
  • 32. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public ::cisco::eem::event_register_syslog tag "1" pattern %LINEPROTO-5-UPDOWN: maxrun 200 import requests import sys import eem ACCESS_TOKEN = "<Cisco Spark Access Token>” ROOM_ID = "<Cisco Spark Room Id>” # Make HTTP request headers with the token def setHeaders(): accessToken_hdr = 'Bearer ' + ACCESS_TOKEN spark_header = {'Authorization': accessToken_hdr, 'Content-Type': 'application/json; charset=utf-8’} return spark_header # Create a message with the matched syslog message def makeMsg(syslogMsg): # Remove LF on the syslog message msg = '## Critical Syslog Message¥¥n¥¥n' + syslogMsg.replace(’¥n','') return msg # Post a message to the person def postMsg(the_header, roomId, markdown): message = '{"roomId":"' + roomId + '","markdown":"' + markdown +'"}’ uri = 'https://api.ciscospark.com/v1/messages’ resp = requests.post(uri, data=message, headers=the_header) # Get the event information event = eem.event_reqinfo() header = setHeaders() message = makeMsg(event['msg']) postMsg(header, ROOM_ID, message) 設定例2 EEM スクリプト (Python) 1. 左のファイルを /flash/syslog2spark.py として 保存 2. IOS XE CLI で EEM スクリプトを登録 EEMで検出するイベントを記述 EEM パッケージを使った Syslog 情報の取得 (event_reqinfo) event manager directory user policy "flash:/" event manager policy syslog2spark.py type user EEM パッケージを読み込み 実行例
  • 33. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public NETCONF / YANG
  • 34. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • “NETwork CONFiguration Protocol” • ネットワーク機器の設定投入や削除、情報取得 • プログラムによる自動化を想定した設計 • 標準化された通信方法と構造化されたデータ NETCONF ⭕ 構造化された データ ❌ 構造化されていない データ Name : John Smith Age : 42 Phone: +1-415-555-1212 <name>John Smith</name> <age>42</age> <phone>+1-415-555-1212</phone> John Smith 42 +1-415-555-1212 Keys Values
  • 35. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • “NETwork CONFiguration Protocol” • ネットワーク機器の設定投入や削除、情報取得 • プログラムによる自動化を想定した設計 • 標準化された通信方法と構造化されたデータ NETCONF switch1# sh int e1/10 Ethernet1/10 is up Hardware: 1000/10000 Ethernet, address: 0005.73d0.9331 (bia 0005.73d0.9331) Description: To UCS-11 MTU 1500 bytes, BW 1000000 Kbit, DLY <interface>Ethernet 0/0</interface> <name>Switch1 to UCS1</name>
  • 36. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • “NETwork CONFiguration Protocol” • ネットワーク機器の設定投入や削除、情報取得 • プログラムによる自動化を想定した設計 • 標準化された通信方法と構造化されたデータ NETCONF switch1# sh int e1/10 Ethernet1/10 is up Hardware: 1000/10000 Ethernet, address: 0005.73d0.9331 (bia 0005.73d0.9331) Description: To UCS-11 MTU 1500 bytes, BW 1000000 Kbit, DLY <interface>Ethernet 0/0</interface> <name>Switch1 to UCS1</name> <name>Ethernet 0/0</name> <descr>Switch1 to UCS1</descr> データ構造の定義(値の格納の仕方)が必要
  • 37. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public データ モデル • Cisco 定義 • Ciscoプラットフォーム毎に ユニーク • 例) IOS-XE のみ • Cisco 定義 • Ciscoプラットフォーム間共通 • 例) IOS-XE / NX-OS • 標準策定 (IETF, ITU, OpenConfig, etc) • 標準に準拠 • 例) “Policy” • ietf-diffserv-policy.yang, • ietf-diffserv-classifer.yang, • ietf-diffserv-target.yang 業界 標準 Cisco 共通 Cisco プラット フォーム 独自 マルチベンダ環境での共通データ モデルや、装置固有の機能に 対応したデータモデルに対応したプログラムを記述できる
  • 38. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public NETCONF/YANG の有効化と動作確認 Cat3850-3(config)#netconf-yang Cat3850-3#show platform software yang-management process confd : Running nesd : Running syncfd : Running ncsshd : Running dmiauthd : Running vtyserverutild : Running opdatamgrd : Running nginx : Running ndbmand : Running pubd : Running Cat3850-3(config)#username <user> privilege 15 secret <password> Cat3850-3(config)#aaa new-model Cat3850-3(config)#aaa authentication login default local Cat3850-3(config)#aaa authorization exec default local Cat3850-3(config)#hostname Cat3850-3 Cat3850-3(config)#ip domain name example.com Cat3850-3(config)#crypto key generate rsa modulus 2048 Cat3850-3(config)#ip ssh version 2 SSH によるリモートアクセスの設定例 動作確認 有効化
  • 39. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 装置が対応するデータ モデルを確認 Capabilities Exchange $ ssh -s cisco@10.71.154.98 -p 830 netconf cisco@10.71.154.98's password: <?xml version="1.0" encoding="UTF-8"?> <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <capabilities> <capability>urn:ietf:params:netconf:base:1.0</capability> <capability>urn:ietf:params:netconf:base:1.1</capability> <capability>urn:ietf:params:netconf:capability:writable-running:1.0</capability> <capability>urn:ietf:params:netconf:capability:xpath:1.0</capability> <capability>urn:ietf:params:netconf:capability:validate:1.0</capability> <capability>urn:ietf:params:netconf:capability:validate:1.1</capability> .. <snip> <capability>http://cisco.com/ns/yang/Cisco-IOS-XE-aaa?module=Cisco-IOS-XE-aaa&amp;revision=2017-06-05</capability> <capability>http://cisco.com/ns/yang/Cisco-IOS-XE-acl?module=Cisco-IOS-XE-acl&amp;revision=2017-06-06</capability> .. <snip> <capability>http://openconfig.net/yang/interfaces/ip-ext?module=openconfig-if-ip-ext&amp;revision=2016-12-22</capability> <capability>http://openconfig.net/yang/lacp?module=openconfig-lacp&amp;revision=2016-05-26</capability> <capability>http://openconfig.net/yang/lldp?module=openconfig-lldp&amp;revision=2016-05-16</capability> <capability>http://openconfig.net/yang/lldp/types?module=openconfig-lldp-types&amp;revision=2016-05-16</capability> <capability>http://openconfig.net/yang/local-routing?module=openconfig-local-routing&amp;revision=2016-05-11</capability> .. <snip> SSH netconf サブ システムへポート 830 に接続 Cisco Native や Openconfig によるデータ モデル(YANG モジュール)に対応していることがわかる IETF Cisco Openconfig
  • 40. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 実際にやってみる ncclient: Netconf クライアントの Python ライブラリ #!/usr/bin/env python3 from ncclient import manager from xml.dom.minidom import parseString host = '<hostname or ip_addr>’ username = '<username>’ password = '<password>’ with manager.connect(host=host, port=830, username=username, password=password, device_params={'name':'iosxe'} ) as m: c = m.get_config(source='running').data_xml print(parseString(c).toprettyxml(indent=' ')) $ pip install ncclient 事前準備:pip を使ったライブラリのインストール Running config を xml 形式で表示する https://github.com/ncclient/ncclient #!/usr/bin/env python3 from ncclient import manager from xml.dom.minidom import parseString host = '<hostname or ip_addr>’ username = '<username>’ password = '<password>’ payload = “”” <filter xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native"> <version/> </native> </filter> “”” with manager.connect(host=host, port=830, username=username, password=password, device_params={'name':'iosxe'}) as m: c = m.get(payload).data_xml print(parseString(c). getElementsByTagName('version')[0].firstChild.data) IOS のバージョンを表示する Netconf による接続を 簡単に記述できる
  • 41. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • Cisco が開発・公開しているオープンソース ツール • IETF93 のハッカソンがきっかけで開発された • https://blogs.cisco.com/getyourbuildon/yang-opensource-tools-for-data-modeling-driven-management • Netconf/YANG 関連の動作確認やテスト、学習時に活用 • YANG モデル対応装置(NETCONF サーバ、つまりルータやスイッチなど)か ら YANG Explorer への対応データ モデルのダウンロード • YANG モデル ファイルをコンパイルして見やすく表示 • RPC の生成、保存 • 装置 (NETCONF サーバ) に対して RPC を実行 (Read/Write) • Python スクリプトの生成、保存 • YANG モデルの依存グラフの生成 実際にやってみる YANG Explorer https://github.com/CiscoDevNet/yang-explorer
  • 42. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 接続デバイス情報の登録
  • 43. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 必要なデータ モデル(スキーマ)にチェックを入れて “Sync” をクリック ⬇ データ モデル(スキーマ)が装置からYang Explorer に ダウンロードされる デバイスからデータモデルを同期・ダウンロード
  • 44. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Yang Explorer にダウンロードされた データ モデルを 左の Explorer ペインにツリー表示する YANG モデルファイルをコンパイルして見やすく表示
  • 45. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public ncclient デモの「IOS のバージョンを表示する」 Python スクリプトにおける変数 `payload` と 同一の内容 RPC の生成, 保存, 実行
  • 46. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Python 2.x 向けのソースコードが生成される NETCONF クライアントとしての実装に ncclient ライブラリが利用されている ncclient を使う Python スクリプトの生成, 保存
  • 47. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • https://github.com/YangModels/yang “YANG modules from standard organizations such as the IETF, open source such as Open Daylight or vendor specific modules” • https://github.com/YangModels/yang /tree/master/vendor/cisco Reference: GitHub レポジトリ
  • 48. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public まとめ
  • 49. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • プログラマビリティを推進 – IOS-XE 16.X • オープン化、自動化を推進する多数の機能 や技術 • 装置単位(On-Box/Off-Box) • プロトコル • 新機能多数! • ゲストシェル • Python • EEM/Python • Netconf/YANG • Yang Explorer まとめ IOS-XE 16.X - オープンでプログラマブルなインフラストラクチャ Automation Abstraction and Policy Control from Core to Edge オープン&プログラマブル | 標準ベース オープンAPI | 開発環境 Cloud Service Management Policy | Orchestration Virtualization Physical and Virtual Infrastructure | App Hosting Analytics Network Data, Contextual Insights ネットワークアプリケーション クラウド対応 | ソフトウェア DNA構成要素、テクノロジー スタック NW機器コントローラクラウド
  • 50. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Appendix
  • 51. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public • IOS-XE コンフィグレーション マニュアル • http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3850/software/release/16-5/configuration_guide/b-165-3850-cg/b-165-3850- cg_chapter_01.html • http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/16-5/configuration_guide/b-165-9300-cg/b-165-9300- cg_chapter_010.html • http://www.cisco.com/c/en/us/support/routers/asr-1000-series-aggregation-services-routers/products-installation-and-configuration- guides-list.html • http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/datamodels/configuration/xe-16/data-models-xe-16-book.html • ツール参考 • ncclient • https://github.com/ncclient/ncclient • Yang Explorer • https://github.com/CiscoDevNet/yang-explorer URLs