OpenConfig を いたネットワーク機器操作 本電信電話株式会社 ソフトウェアイノベーションセンタ 市原裕史
紹介 市原裕史 所属 NTT SIC 第三推進プロジェクト OpenStack Developer Neutron Core Reviewer その他プロジェクトへの貢献 技術 : SDN/NFV 中 パブリッククラウドの開発 LinuxconでDPDKの性能の発表 Neutronへの機能提案 2
OpenConfig へのモチベーション この領域はベンダロックインのない抽象化された API がない データセンター この領域はベンダロックインのない抽象化された API が存在する 3
OpenConfig ネットワーク機器の API にベンダニュートラルなモデルを提供することを 的としたワーキンググループ名 Cisco オペレータ オーケストレータ 動スクリプト 共通モデル Juniper Arista??? 4
OpenConfig 取り組み 共通モデルの作成 ベンダニュートラルなモデル Telemetry の置き換え SNMP よりもスケールし 拡張性が い 共通のネットワーク管理インターフェースの作成 grpc Network Management Interface(gNMI) ベンダ主導ではなくオペレータ主導 5
OpenConfig 現在定義済みのモデル 出典 : http://www.openconfig.net/projects/models/ 6
OpenConfig モデル例 interfaces module: openconfig-interfaces + --rw interfaces + --rw interface* [name] + --rw name - >../config/ name + --rw config + --rw type identityref + --rw mtu? uint16 + --rw name? string + --rw description? string + --rw enabled? boolean + --ro state + --ro type identityref + --ro mtu? uint16 + --ro name? string + --ro description? string + --ro enabled? boolean + --ro ifindex? uint32 + --ro admin-status enumeration + --ro oper-status enumeration + --ro last-change? yang:timeticks + --ro counters + --ro in-octets? yang:counter64 + --ro in-unicast-pkts? yang:counter64 + --ro in-broadcast-pkts? yang:counter64 + --ro in-multicast-pkts? yang:counter64 + --ro in-discards? yang:counter64 + --ro in-errors? yang:counter64 + --ro in-unknown-protos? yang:counter32 + --ro out-octets? yang:counter64 + --ro out-unicast-pkts? yang:counter64 + --ro out-broadcast-pkts? yang:counter64 + --ro out-multicast-pkts? yang:counter64 + --ro out-discards? yang:counter64 + --ro out-errors? yang:counter64 + --ro last-clear? yang:date-and-time + --rw hold-time + --rw config + --rw up? uint32 + --rw down? uint32 + --ro state + --ro up? uint32 + --ro down? uint32 + --rw subinterfaces + --rw subinterface* [index] + --rw index - >../config/ index + --rw config + --rw index? uint32 + --rw name? string + --rw description? string + --rw enabled? boolean + --ro state + --ro index? uint32 + --ro name? string + --ro description? string + --ro enabled? boolean + --ro ifindex? uint32 + --ro admin-status enumeration + --ro oper-status enumeration + --ro last-change? yang:timeticks + --ro counters + --ro in-octets? yang:counter64 + --ro in-unicast-pkts? yang:counter64 + --ro in-broadcast-pkts? yang:counter64 + --ro in-multicast-pkts? yang:counter64 + --ro in-discards? yang:counter64 + --ro in-errors? yang:counter64 + --ro in-unknown-protos? yang:counter32 + --ro out-octets? yang:counter64 + --ro out-unicast-pkts? yang:counter64 + --ro out-broadcast-pkts? yang:counter64 + --ro out-multicast-pkts? yang:counter64 + --ro out-discards? yang:counter64 + --ro out-errors? yang:counter64 + --ro last-clear? yang:date-and-time 出典 : https://github.com/openconfig/public/blob/master/release/models/interfaces/openconfig-interfaces.yang 7
OpenConfig メンバー 出典 : http://openconfig.net/about/participants/ 8
デモ構成 vmx 17.2R1.13 iosxrv 9k demo 6.1.2 Ubuntu 16.04 vmx1 (bgp 65101) ge-0/0/0 10.10.0.0/24.10.20 XRv (bgp 65102) GigabitEthernet0/0/0/0 GigabitEthernet0/0/0/1 11.11.0.0/24 vmx2 (bgp 65103).20.10 ge-0/0/0 ge-0/0/1 10.1.1.1/24 ge-0/0/1 20.1.1.1/24 10.1.1.100/24 20.1.1.200/24 ClientA ClientB 9
デモ 1 vmx と XRv へ MTU 設定 vmx1 XRv ge-0/0/0 MTU 1400 GigabitEthernet0/0/0/0 MTU 1400 <config> <interfaces xmlns="http://openconfig.net/yang/interfaces"> <interface> <name> インターフェース名 </name> <config> <type xmlns:idx="urn:ietf:params:xml:ns:yang:iana-if-type">idx:ethernetcsmacd</type> <mtu>1400</mtu> </interface> </interfaces> 10
デモ 2 インターフェース BGP Routing-policy を設定し ClientA と ClientB 間で疎通確認 vmx1 (bgp 65101) ge-0/0/0 10.10.0.0/24.10.20 XRv (bgp 65102) GigabitEthernet0/0/0/0 GigabitEthernet0/0/0/1 11.11.0.0/24 vmx2 (bgp 65103).20.10 ge-0/0/0 ge-0/0/1 10.1.1.1/24 ge-0/0/1 20.1.1.1/24 10.1.1.100/24 20.1.1.200/24 ClientA ClientB 11
デモ 2 config vmx1.xml < interfaces xmlns="http://openconfig.net/ yang/ interfaces"> < interface> < name>ge- 0/0/0</name> < subinterfaces> < subinterface> < index>0</index> < index>0</index> <ipv4 xmlns="http://openconfig.net/ yang/ interfaces/ ip"> < addresses> < address> < ip>10.10.0.10</ip> < ip>10.10.0.10</ip> < prefix- length>24</prefix- length> </address> </addresses> </ipv4> </subinterface> </subinterfaces> </interface> < interface> < name>ge- 0/0/1</name> < subinterfaces> < subinterface> < index>0</index> < index>0</index> <ipv4 xmlns="http://openconfig.net/ yang/ interfaces/ ip"> < addresses> < address> < ip>10.1.1.1</ip> < ip>10.1.1.1</ip> < prefix- length>24</prefix- length> </address> </addresses> </ipv4> </subinterface> </subinterfaces> </interface> </interfaces> <routing- policy xmlns="http://openconfig.net/ yang/routing- policy"> < policy- definitions> < policy- definition> < name> bgp- in</name> < statements> < statement> < name> bgp- in</name> < actions> < accept- route/> </actions> </statement> </statements> </policy- definition> < policy- definition> < name> bgp- out</name> < statements> < statement> < name> bgp- out</name> < actions> < accept- route/> </actions> </statement> </statements> </policy- definition> </policy- definitions> </routing- policy> < bgp xmlns="http://openconfig.net/ yang/ bgp"> <global> < as>65101</as> < router- id>10.10.0.10</router- id> < afi- safis> < afi- safi> < afi- safi- name xmlns:idx="http://openconfig.net/ yang/ bgp- types">idx:ipv4_unicast</afi- safi- name> </afi- safi> </afi- safis> </global> < neighbors> < neighbor> < neighbor- address>10.10.0.20</neighbor- address> <peer- group>group65102</peer- group> < neighbor- address>10.10.0.20</neighbor- address> < afi- safis> < afi- safi> < afi- safi- name xmlns:idx="http://openconfig.net/ yang/ bgp- types">idx:ipv4_unicast</afi- safi- name> </afi- safi> </afi- safis> < apply- policy> <import- policy> bgp- in</import- policy> <export- policy> bgp- out</export- policy> </apply- policy> </neighbor> </neighbors> <peer- groups> <peer- group> <peer- group- name>group65102</peer- group- name> <peer- as>65102</peer- as> </peer- group> </peer- groups> </bgp> xrv.xml < interfaces xmlns="http://openconfig.net/ yang/ interfaces"> < interface> < name>gigabitethernet0/0/0/0</name> < subinterfaces> < subinterface> < index>0</index> < index>0</index> <ipv4 xmlns="http://openconfig.net/ yang/ interfaces/ ip"> < address> < ip>10.10.0.20</ip> < ip>10.10.0.20</ip> < prefix- length>24</prefix- length> </address> </ipv4> </subinterface> </subinterfaces> </interface> < interface> < name>gigabitethernet0/0/0/1</name> < subinterfaces> < subinterface> < index>0</index> < index>0</index> <ipv4 xmlns="http://openconfig.net/ yang/ interfaces/ ip"> < address> < ip>11.11.0.20</ip> < ip>11.11.0.20</ip> < prefix- length>24</prefix- length> </address> </ipv4> </subinterface> </subinterfaces> </interface> </interfaces> <routing- policy xmlns="http://openconfig.net/ yang/routing- policy"> < policy- definitions> < policy- definition> < name> bgp- in</name> < statements> < statement> < name> bgp- in</name> < actions> < accept- route/> </actions> </statement> </statements> </policy- definition> < policy- definition> < name> bgp- out</name> < statements> < statement> < name> bgp- out</name> < actions> < accept- route/> </actions> </statement> </statements> </policy- definition> </policy- definitions> </routing- policy> < bgp xmlns="http://openconfig.net/ yang/ bgp"> <global> < as>65102</as> < router- id>10.10.0.20</router- id> < afi- safis> < afi- safi> < afi- safi- name xmlns:idx="http://openconfig.net/ yang/ bgp- types">idx:ipv4- unicast</afi- safi- name> </afi- safi> </afi- safis> </global> < neighbors> < neighbor> < neighbor- address>10.10.0.10</neighbor- address> <peer- group>group65101</peer- group> < neighbor- address>10.10.0.10</neighbor- address> < afi- safis> < afi- safi> < afi- safi- name xmlns:idx="http://openconfig.net/ yang/ bgp- types">idx:ipv4- unicast</afi- safi- name> < apply- policy> <import- policy> bgp- in</import- policy> <export- policy> bgp- out</export- policy> </apply- policy> </afi- safi> </afi- safis> </neighbor> < neighbor> < neighbor- address>11.11.0.10</neighbor- address> <peer- group>group65103</peer- group> < neighbor- address>11.11.0.10</neighbor- address> < afi- safis> < afi- safi> < afi- safi- name xmlns:idx="http://openconfig.net/ yang/ bgp- types">idx:ipv4- unicast</afi- safi- name> < apply- policy> <import- policy> bgp- in</import- policy> <export- policy> bgp- out</export- policy> </apply- policy> </afi- safi> </afi- safis> </neighbor> </neighbors> <peer- groups> <peer- group> <peer- group- name>group65101</peer- group- name> <peer- as>65101</peer- as> </peer- group> <peer- group> <peer- group- name>group65103</peer- group- name> <peer- as>65103</peer- as> </peer- group> </peer- groups> </bgp> 12
検証していて かったこと vmx と XRv の実装バージョンの違い vmx の openconfig-if-ip はバージョン 1.0.1( 図左 ) で実装されているが XRv は 0.2.0( 図右 ) で実装されている 機器によって使 可能なインターフェースが異なる vmx XRv は netconf に対応 veos は netconf に未対応 veos は grpc に対応 vmx XRv は対応しているらしいがドキュメントが不 していてまともに使えない 機器によって OpenConfig での設定が通常の設定と別に管理される 次ページ参照 13
Junos の OpenConfig の設定の仕 interfaces { ge-0/0/1 { vlan-tagging; unit 101 { vlan-id 101; family inet { address 192.168.101.1/24; fxp0 { unit 0 { family inet { address 172.26.211.26/16; openconfig-interfaces:interfaces { interface ge-0/0/1 { subinterfaces { subinterface 200 { config { index 200; enabled true; openconfig-if-ip:ipv4 { addresses { address 192.168.200.1 { config { ip 192.168.200.1; prefix-length 24; openconfig-vlan:vlan { config { vlan-id 200; Junos の 般的な操作 (CLI Juniper 名前空間での netconf) で設定したものはここに反映 OpenConfig 名前空間での netconf 操作で設定したものはここに反映 (CLI での設定は可能 ) 14
OpenConfig 注意点 懸念点 すべてのモデルが存在するわけではない モデルがあっても機器側で実装がない場合がある VRF 設定 に openconfig-network-instance が定義されているが実機側で実装がない モデルがあってもスキーマに不 がある インターフェースのスキーマに DHCP 設定がない バージョンによってスキーマが異なる場合がある openconfig-if-ip OSS だがオープンコミュニティではない 15
OpenConfig への期待 あらゆるベンダ機器間のギャップの抽象化 すべての機器をベンダロックインのない抽象化された API で制御 データセンター 16