SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Copyright©2017 NTT corp. All Rights Reserved.
OpenConfigを用いたネットワーク機器操作
日本電信電話株式会社
ソフトウェアイノベーションセンタ
市原 裕史
2Copyright©2017 NTT corp. All Rights Reserved.
市原 裕史
• 所属
• NTT SIC 第三推進プロジェクト
• OpenStack Developer
• Neutron Core Reviewer、その他プロジェクトへの貢献
• 技術: SDN/NFV中心
• パブリッククラウドの開発
• LinuxconでDPDKの性能の発表
• Neutronへの機能提案
自己紹介
3Copyright©2017 NTT corp. All Rights Reserved.
OpenConfigへのモチベーション
データセンター
この領域はベンダ
ロックインのない
抽象化されたAPI
が存在する
この領域はベンダ
ロックインのない抽
象化されたAPIがない
4Copyright©2017 NTT corp. All Rights Reserved.
• ネットワーク機器のAPIにベンダニュートラルなモデル
を提供することを目的としたワーキンググループ名
OpenConfig
オペレータ
オーケストレータ
自動スクリプト
…
Cisco
Juniper
Arista
???
…
共通モデル
5Copyright©2017 NTT corp. All Rights Reserved.
• 共通モデルの作成
• ベンダニュートラルなモデル
• Telemetryの置き換え
• SNMPよりもスケールし、拡張性が高い
• 共通のネットワーク管理インターフェースの作成
• gRPC Network Management Interface(gNMI)
OpenConfig 取り組み
ベンダ主導ではなくオペレータ主導
6Copyright©2017 NTT corp. All Rights Reserved.
OpenConfig 現在定義済みのモデル
出典: http://www.openconfig.net/projects/models/
7Copyright©2017 NTT corp. All Rights Reserved.
m o d u l e : o p e n c o n f i g - i n t e r f a c e s
+ - - r w i n t e r f a c e s
+ - - r w i n t e r f a c e * [ n a m e ]
+ - - r w n a m e - > . . / c o n f i g / n a m e
+ - - r w c o n f i g
| + - - r w t y p e i d e n t i t y r e f
| + - - r w m t u ? u i n t 1 6
| + - - r w n a m e ? s t r i n g
| + - - r w d e s c r i p t i o n ? s t r i n g
| + - - r w e n a b l e d ? b o o l e a n
+ - - r o s t a t e
| + - - r o t y p e i d e n t i t y r e f
| + - - r o m t u ? u i n t 1 6
| + - - r o n a m e ? s t r i n g
| + - - r o d e s c r i p t i o n ? s t r i n g
| + - - r o e n a b l e d ? b o o l e a n
| + - - r o i f i n d e x ? u i n t 3 2
| + - - r o a d m i n - s t a t u s e n u m e r a t i o n
| + - - r o o p e r - s t a t u s e n u m e r a t i o n
| + - - r o l a s t - c h a n g e ? y a n g :t i m e t i c k s
| + - - r o c o u n t e r s
| + - - r o i n - o c t e t s ? y a n g :c o u n t e r 6 4
| + - - r o i n - u n i c a s t - p k t s ? y a n g :c o u n t e r 6 4
| + - - r o i n - b r o a d c a s t - p k t s ? y a n g :c o u n t e r 6 4
| + - - r o i n - m u l t i c a s t - p k t s ? y a n g :c o u n t e r 6 4
| + - - r o i n - d i s c a r d s ? y a n g :c o u n t e r 6 4
| + - - r o i n - e r r o r s ? y a n g :c o u n t e r 6 4
| + - - r o i n - u n k n o w n - p r o t o s ? y a n g :c o u n t e r 3 2
| + - - r o o u t - o c t e t s ? y a n g :c o u n t e r 6 4
| + - - r o o u t - u n i c a s t - p k t s ? y a n g :c o u n t e r 6 4
| + - - r o o u t - b r o a d c a s t - p k t s ? y a n g :c o u n t e r 6 4
| + - - r o o u t - m u l t i c a s t - p k t s ? y a n g :c o u n t e r 6 4
| + - - r o o u t - d i s c a r d s ? y a n g :c o u n t e r 6 4
| + - - r o o u t - e r r o r s ? y a n g :c o u n t e r 6 4
| + - - r o l a s t - c l e a r ? y a n g :d a t e - a n d - t i m e
+ - - r w h o l d - t i m e
| + - - r w c o n f i g
| | + - - r w u p ? u i n t 3 2
| | + - - r w d o w n ? u i n t 3 2
| + - - r o s t a t e
| + - - r o u p ? u i n t 3 2
| + - - r o d o w n ? u i n t 3 2
+ - - r w s u b i n t e r f a c e s
+ - - r w s u b i n t e r f a c e * [ i n d e x ]
+ - - r w i n d e x - > . . / c o n f i g / i n d e x
+ - - r w c o n f i g
| + - - r w i n d e x ? u i n t 3 2
| + - - r w n a m e ? s t r i n g
| + - - r w d e s c r i p t i o n ? s t r i n g
| + - - r w e n a b l e d ? b o o l e a n
+ - - r o s t a t e
+ - - r o i n d e x ? u i n t 3 2
+ - - r o n a m e ? s t r i n g
+ - - r o d e s c r i p t i o n ? s t r i n g
+ - - r o e n a b l e d ? b o o l e a n
+ - - r o i f i n d e x ? u i n t 3 2
+ - - r o a d m i n - s t a t u s e n u m e r a t i o n
+ - - r o o p e r - s t a t u s e n u m e r a t i o n
+ - - r o l a s t - c h a n g e ? y a n g :t i m e t i c k s
+ - - r o c o u n t e r s
+ - - r o i n - o c t e t s ? y a n g :c o u n t e r 6 4
+ - - r o i n - u n i c a s t - p k t s ? y a n g :c o u n t e r 6 4
+ - - r o i n - b r o a d c a s t - p k t s ? y a n g :c o u n t e r 6 4
+ - - r o i n - m u l t i c a s t - p k t s ? y a n g :c o u n t e r 6 4
+ - - r o i n - d i s c a r d s ? y a n g :c o u n t e r 6 4
+ - - r o i n - e r r o r s ? y a n g :c o u n t e r 6 4
+ - - r o i n - u n k n o w n - p r o t o s ? y a n g :c o u n t e r 3 2
+ - - r o o u t - o c t e t s ? y a n g :c o u n t e r 6 4
+ - - r o o u t - u n i c a s t - p k t s ? y a n g :c o u n t e r 6 4
+ - - r o o u t - b r o a d c a s t - p k t s ? y a n g :c o u n t e r 6 4
+ - - r o o u t - m u l t i c a s t - p k t s ? y a n g :c o u n t e r 6 4
+ - - r o o u t - d i s c a r d s ? y a n g :c o u n t e r 6 4
+ - - r o o u t - e r r o r s ? y a n g :c o u n t e r 6 4
+ - - r o l a s t - c l e a r ? y a n g :d a t e - a n d - t i m e
OpenConfig モデル例 interfaces
出典: https://github.com/openconfig/public/blob/master/release/models/interfaces/openconfig-interfaces.yang
8Copyright©2017 NTT corp. All Rights Reserved.
OpenConfigメンバー
出典: http://openconfig.net/about/participants/
9Copyright©2017 NTT corp. All Rights Reserved.
• vMX: vMX 17.2R1.13
• XRv: iosxrv 9k demo 6.1.2
• Host OS: Ubuntu 16.04
• NETCONF Client: ncclient 0.5.3
デモ構成
ClientA
vMX1
(bgp 65101)
XRv
(bgp 65102)
.10 .20
10.10.0.0/24
10.1.1.100/24 20.1.1.200/24
20.1.1.1/2410.1.1.1/24
ge-0/0/1
ge-0/0/0 GigabitEthernet0/0/0/0 GigabitEthernet0/0/0/1
vMX2
(bgp 65103)
11.11.0.0/24
.20 .10 ge-0/0/0
ge-0/0/1
ClientB
10Copyright©2017 NTT corp. All Rights Reserved.
<config>
<interfaces xmlns="http://openconfig.net /yang /interfaces">
<interface>
<name>インターフェース名</name>
<subinterfaces>
<subinterface>
<index>100</index>
<vlan xmlns="http://openconfig.net /yang /vlan">
<config>
<vlan-id>100</vlan-id>
</config>
</vlan>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
</config>
デモ① VLAN
vMXとXRvへVLAN設定
vMX1 XRv
ge-0/0/0
vlan 100
GigabitEthernet0/0/0/0
vlan 100
デモ動画: https://youtu.be/XIpAJiRoQMU
11Copyright©2017 NTT corp. All Rights Reserved.
インターフェース、BGP、Routing-policyを設定し、
ClientAとClientB間で疎通確認
デモ② BGP
ClientA
vMX1
(bgp 65101)
XRv
(bgp 65102)
.10 .20
10.10.0.0/24
10.1.1.100/24 20.1.1.200/24
20.1.1.1/2410.1.1.1/24
ge-0/0/1
ge-0/0/0 GigabitEthernet0/0/0/0 GigabitEthernet0/0/0/1
vMX2
(bgp 65103)
11.11.0.0/24
.20 .10 ge-0/0/0
ge-0/0/1
ClientB
デモ動画: https://youtu.be/TfZXuvw_9OI
12Copyright©2017 NTT corp. All Rights Reserved.
< c o n f i g >
< i n t e r f a c e s x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / i n t e r f a c e s " >
< i n t e r f a c e >
< n a m e > g e - 0 / 0 / 0 < / n a m e >
< s u b i n t e r f a c e s >
< s u b i n t e r f a c e >
< i n d e x > 0 < / i n d e x >
< c o n f i g >
< i n d e x > 0 < / i n d e x >
< e n a b l e d > t r u e < / e n a b l e d >
< / c o n f i g >
< i p v 4 x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / i n t e r f a c e s / i p " >
< a d d r e s s e s >
< a d d r e s s >
< i p > 1 0 . 1 0 . 0 . 1 0 < / i p >
< c o n f i g >
< i p > 1 0 . 1 0 . 0 . 1 0 < / i p >
< p r e f i x - l e n g t h > 2 4 < / p r e f i x - l e n g t h >
< / c o n f i g >
< / a d d r e s s >
< / a d d r e s s e s >
< / i p v 4 >
< / s u b i n t e r f a c e >
< / s u b i n t e r f a c e s >
< / i n t e r f a c e >
< i n t e r f a c e >
< n a m e > g e - 0 / 0 / 1 < / n a m e >
< s u b i n t e r f a c e s >
< s u b i n t e r f a c e >
< i n d e x > 0 < / i n d e x >
< c o n f i g >
< i n d e x > 0 < / i n d e x >
< e n a b l e d > t r u e < / e n a b l e d >
< / c o n f i g >
< i p v 4 x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / i n t e r f a c e s / i p " >
< a d d r e s s e s >
< a d d r e s s >
< i p > 1 0 . 1 . 1 . 1 < / i p >
< c o n f i g >
< i p > 1 0 . 1 . 1 . 1 < / i p >
< p r e f i x - l e n g t h > 2 4 < / p r e f i x - l e n g t h >
< / c o n f i g >
< / a d d r e s s >
< / a d d r e s s e s >
< / i p v 4 >
< / s u b i n t e r f a c e >
< / s u b i n t e r f a c e s >
< / i n t e r f a c e >
< / i n t e r f a c e s >
< r o u t i n g - p o l i c y x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / r o u t i n g - p o l i c y " >
< p o l i c y - d e f i n i t i o n s >
< p o l i c y - d e f i n i t i o n >
< n a m e > b g p - i n < / n a m e >
< s t a t e m e n t s >
< s t a t e m e n t >
< n a m e > b g p - i n < / n a m e >
< a c t i o n s >
< c o n f i g >
< a c c e p t - r o u t e / >
< / c o n f i g >
< / a c t i o n s >
< / s t a t e m e n t >
< / s t a t e m e n t s >
< / p o l i c y - d e f i n i t i o n >
< p o l i c y - d e f i n i t i o n >
< n a m e > b g p - o u t < / n a m e >
< s t a t e m e n t s >
< s t a t e m e n t >
< n a m e > b g p - o u t < / n a m e >
< a c t i o n s >
< c o n f i g >
< a c c e p t - r o u t e / >
< / c o n f i g >
< / a c t i o n s >
< / s t a t e m e n t >
< / s t a t e m e n t s >
< / p o l i c y - d e f i n i t i o n >
< / p o l i c y - d e f i n i t i o n s >
< / r o u t i n g - p o l i c y >
< b g p x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p " >
< g l o b a l >
< c o n f i g >
< a s > 6 5 1 0 1 < / a s >
< r o u t e r - i d > 1 0 . 1 0 . 0 . 1 0 < / r o u t e r - i d >
< / c o n f i g >
< a f i - s a f i s >
< a f i - s a f i >
< a f i - s a f i - n a m e x m l n s : i d x = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p - t y p e s " > i d x : I P V 4 _ U N I C A S T < / a f i - s a f i - n a m e >
< c o n f i g >
< e n a b l e d > t r u e < / e n a b l e d >
< / c o n f i g >
< / a f i - s a f i >
< / a f i - s a f i s >
< / g l o b a l >
< n e i g h b o r s >
< n e i g h b o r >
< n e i g h b o r - a d d r e s s > 1 0 . 1 0 . 0 . 2 0 < / n e i g h b o r - a d d r e s s >
< c o n f i g >
< p e e r - g r o u p > g r o u p 6 5 1 0 2 < / p e e r - g r o u p >
< n e i g h b o r - a d d r e s s > 1 0 . 1 0 . 0 . 2 0 < / n e i g h b o r - a d d r e s s >
< / c o n f i g >
< a f i - s a f i s >
< a f i - s a f i >
< a f i - s a f i - n a m e x m l n s : i d x = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p - t y p e s " > i d x : I P V 4 _ U N I C A S T < / a f i - s a f i - n a m e >
< c o n f i g >
< e n a b l e d > t r u e < / e n a b l e d >
< / c o n f i g >
< / a f i - s a f i >
< / a f i - s a f i s >
< a p p l y - p o l i c y >
< c o n f i g >
< i m p o r t - p o l i c y > b g p - i n < / i m p o r t - p o l i c y >
< e x p o r t - p o l i c y > b g p - o u t < / e x p o r t - p o l i c y >
< / c o n f i g >
< / a p p l y - p o l i c y >
< / n e i g h b o r >
< / n e i g h b o r s >
< p e e r - g r o u p s >
< p e e r - g r o u p >
< p e e r - g r o u p - n a m e > g r o u p 6 5 1 0 2 < / p e e r - g r o u p - n a m e >
< c o n f i g >
< p e e r - a s > 6 5 1 0 2 < / p e e r - a s >
< / c o n f i g >
< / p e e r - g r o u p >
< / p e e r - g r o u p s >
< / b g p >
< / c o n f i g >
デモ② BGP デモコンフィグ
< c o n f i g >
< i n t e r f a c e s x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / i n t e r f a c e s " >
< i n t e r f a c e >
< n a m e > G i g a b i t E t h e r n e t 0 / 0 / 0 / 0 < / n a m e >
< s u b i n t e r f a c e s >
< s u b i n t e r f a c e >
< i n d e x > 0 < / i n d e x >
< c o n f i g >
< i n d e x > 0 < / i n d e x >
< e n a b l e d > t r u e < / e n a b l e d >
< / c o n f i g >
< i p v 4 x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / i n t e r f a c e s / i p " >
< a d d r e s s >
< i p > 1 0 . 1 0 . 0 . 2 0 < / i p >
< c o n f i g >
< i p > 1 0 . 1 0 . 0 . 2 0 < / i p >
< p r e f i x - l e n g t h > 2 4 < / p r e f i x - l e n g t h >
< / c o n f i g >
< / a d d r e s s >
< / i p v 4 >
< / s u b i n t e r f a c e >
< / s u b i n t e r f a c e s >
< / i n t e r f a c e >
< i n t e r f a c e >
< n a m e > G i g a b i t E t h e r n e t 0 / 0 / 0 / 1 < / n a m e >
< s u b i n t e r f a c e s >
< s u b i n t e r f a c e >
< i n d e x > 0 < / i n d e x >
< c o n f i g >
< i n d e x > 0 < / i n d e x >
< e n a b l e d > t r u e < / e n a b l e d >
< / c o n f i g >
< i p v 4 x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / i n t e r f a c e s / i p " >
< a d d r e s s >
< i p > 1 1 . 1 1 . 0 . 2 0 < / i p >
< c o n f i g >
< i p > 1 1 . 1 1 . 0 . 2 0 < / i p >
< p r e f i x - l e n g t h > 2 4 < / p r e f i x - l e n g t h >
< / c o n f i g >
< / a d d r e s s >
< / i p v 4 >
< / s u b i n t e r f a c e >
< / s u b i n t e r f a c e s >
< / i n t e r f a c e >
< / i n t e r f a c e s >
< r o u t i n g - p o l i c y x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / r o u t i n g - p o l i c y " >
< p o l i c y - d e f i n i t i o n s >
< p o l i c y - d e f i n i t i o n >
< n a m e > b g p - i n < / n a m e >
< s t a t e m e n t s >
< s t a t e m e n t >
< n a m e > b g p - i n < / n a m e >
< a c t i o n s >
< a c c e p t - r o u t e / >
< / a c t i o n s >
< / s t a t e m e n t >
< / s t a t e m e n t s >
< / p o l i c y - d e f i n i t i o n >
< p o l i c y - d e f i n i t i o n >
< n a m e > b g p - o u t < / n a m e >
< s t a t e m e n t s >
< s t a t e m e n t >
< n a m e > b g p - o u t < / n a m e >
< a c t i o n s >
< a c c e p t - r o u t e / >
< / a c t i o n s >
< / s t a t e m e n t >
< / s t a t e m e n t s >
< / p o l i c y - d e f i n i t i o n >
< / p o l i c y - d e f i n i t i o n s >
< / r o u t i n g - p o l i c y >
< b g p x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p " >
< g l o b a l >
< c o n f i g >
< a s > 6 5 1 0 2 < / a s >
< r o u t e r - i d > 1 0 . 1 0 . 0 . 2 0 < / r o u t e r - i d >
< / c o n f i g >
< a f i - s a f i s >
< a f i - s a f i >
< a f i - s a f i - n a m e x m l n s : i d x = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p - t y p e s " > i d x : i p v 4 - u n i c a s t < / a f i - s a f i - n a m e >
< c o n f i g >
< e n a b l e d > t r u e < / e n a b l e d >
< / c o n f i g >
< / a f i - s a f i >
< / a f i - s a f i s >
< / g l o b a l >
< n e i g h b o r s >
< n e i g h b o r >
< n e i g h b o r - a d d r e s s > 1 0 . 1 0 . 0 . 1 0 < / n e i g h b o r - a d d r e s s >
< c o n f i g >
< p e e r - g r o u p > g r o u p 6 5 1 0 1 < / p e e r - g r o u p >
< n e i g h b o r - a d d r e s s > 1 0 . 1 0 . 0 . 1 0 < / n e i g h b o r - a d d r e s s >
< / c o n f i g >
< a f i - s a f i s >
< a f i - s a f i >
< a f i - s a f i - n a m e x m l n s : i d x = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p - t y p e s " > i d x : i p v 4 - u n i c a s t < / a f i - s a f i - n a m e >
< c o n f i g >
< e n a b l e d > t r u e < / e n a b l e d >
< / c o n f i g >
< a p p l y - p o l i c y >
< c o n f i g >
< i m p o r t - p o l i c y > b g p - i n < / i m p o r t - p o l i c y >
< e x p o r t - p o l i c y > b g p - o u t < / e x p o r t - p o l i c y >
< / c o n f i g >
< / a p p l y - p o l i c y >
< / a f i - s a f i >
< / a f i - s a f i s >
< / n e i g h b o r >
< n e i g h b o r >
< n e i g h b o r - a d d r e s s > 1 1 . 1 1 . 0 . 1 0 < / n e i g h b o r - a d d r e s s >
< c o n f i g >
< p e e r - g r o u p > g r o u p 6 5 1 0 3 < / p e e r - g r o u p >
< n e i g h b o r - a d d r e s s > 1 1 . 1 1 . 0 . 1 0 < / n e i g h b o r - a d d r e s s >
< / c o n f i g >
< a f i - s a f i s >
< a f i - s a f i >
< a f i - s a f i - n a m e x m l n s : i d x = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p - t y p e s " > i d x : i p v 4 - u n i c a s t < / a f i - s a f i - n a m e >
< c o n f i g >
< e n a b l e d > t r u e < / e n a b l e d >
< / c o n f i g >
< a p p l y - p o l i c y >
< c o n f i g >
< i m p o r t - p o l i c y > b g p - i n < / i m p o r t - p o l i c y >
< e x p o r t - p o l i c y > b g p - o u t < / e x p o r t - p o l i c y >
< / c o n f i g >
< / a p p l y - p o l i c y >
< / a f i - s a f i >
< / a f i - s a f i s >
< / n e i g h b o r >
< / n e i g h b o r s >
< p e e r - g r o u p s >
< p e e r - g r o u p >
< p e e r - g r o u p - n a m e > g r o u p 6 5 1 0 1 < / p e e r - g r o u p - n a m e >
< c o n f i g >
< p e e r - a s > 6 5 1 0 1 < / p e e r - a s >
< / c o n f i g >
< / p e e r - g r o u p >
< p e e r - g r o u p >
< p e e r - g r o u p - n a m e > g r o u p 6 5 1 0 3 < / p e e r - g r o u p - n a m e >
< c o n f i g >
< p e e r - a s > 6 5 1 0 3 < / p e e r - a s >
< / c o n f i g >
< / p e e r - g r o u p >
< / p e e r - g r o u p s >
< / b g p >
< / c o n f i g >
vmx1.xml
xrv.xml
13Copyright©2017 NTT corp. All Rights Reserved.
デモ②のコンフィグ
https://gist.github.com/hichihara/b5ec91275513742489119f564cf732ed
14Copyright©2017 NTT corp. All Rights Reserved.
• vMXとXRvの実装バージョンの違い
• vMXのopenconfig-if-ipはバージョン1.0.1(図左)で実装され
ているが、XRvは0.2.0(図右)で実装されている
• 機器によって使用可能なインターフェースが異なる
• vMX、XRvはnetconfに対応、vEOSはnetconfに未対応
• vEOSはgRPCに対応、vMX、XRvは対応しているらしいがド
キュメントが不足していてまともに使えない
• 機器によってOpenConfigでの設定が通常の設定と別
に管理される→次ページ参照
検証していて辛かったこと
15Copyright©2017 NTT corp. All Rights Reserved.
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のOpenConfigの設定の仕方
Junosの一般的な操作
(CLI、Juniper名前空
間でのnetconf)で設定
したものはここに反映
OpenConfig名前空間で
のnetconf操作で設定し
たものはここに反映(CLI
での設定は可能)
16Copyright©2017 NTT corp. All Rights Reserved.
• 機器によって使用するスキーマが違う
• openconfig-mplsでのMPLSインターフェース設定
検証していて辛かったこと②
+--rw mpls
+--rw global
| +--rw config
| +--ro state
| +--rw interface-attributes
| | +--rw interface* [interface-id]
| | +--rw interface-id -> ../config/interface-id
| | +--rw config
| | | +--rw interface-id? oc-if:interface-id
| | | +--rw mpls-enabled? boolean
| + +
|
+--rw te-interface-attributes
| +--rw interface* [interface-id]
| +--rw interface-id -> ../config/interface-id
| +--rw config
| | +--rw interface-id? oc-if:interface-id
vMXで有効
XRvで有効
17Copyright©2017 NTT corp. All Rights Reserved.
MTU設定をデモしようとしていたがvMXとXRvで実装
が違っていた
デモボツエピソード
<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>
</config>
</interface>
</interfaces>
</config>
出典: https://www.juniper.net/documentation/en_US/junos/information-products/pathway-pages/open-config/open-config-feature-guide.pdf
コンフィグ投入できるが実際は
サポートされていない
18Copyright©2017 NTT corp. All Rights Reserved.
• すべてのモデルが存在するわけではない
• モデルがあってもスキーマに不足がある
• インターフェースのスキーマにDHCP設定がない
• バージョンによってスキーマが異なる場合がある
• openconfig-if-ip
• OSSだがオープンコミュニティではない
• 機器側で実装がない場合がある
• VRF設定用のopenconfig-network-instanceは実装がない
• モデルがありスキーマの実装もあるが未対応パラメータがある
OpenConfig 注意点・懸念点
19Copyright©2017 NTT corp. All Rights Reserved.
あらゆるベンダ機器間のギャップの抽象化
OpenConfigへの期待
データセンター
すべての機器をベンダ
ロックインのない抽象
化されたAPIで制御

Weitere ähnliche Inhalte

Was ist angesagt?

Excel でパケット分析 - グラフ化
Excel でパケット分析 - グラフ化Excel でパケット分析 - グラフ化
Excel でパケット分析 - グラフ化
彰 村地
 

Was ist angesagt? (20)

ネットワークOS野郎 ~ インフラ野郎Night 20160414
ネットワークOS野郎 ~ インフラ野郎Night 20160414ネットワークOS野郎 ~ インフラ野郎Night 20160414
ネットワークOS野郎 ~ インフラ野郎Night 20160414
 
"SRv6の現状と展望" ENOG53@上越
"SRv6の現状と展望" ENOG53@上越"SRv6の現状と展望" ENOG53@上越
"SRv6の現状と展望" ENOG53@上越
 
NETCONFとYANGの話
NETCONFとYANGの話NETCONFとYANGの話
NETCONFとYANGの話
 
Docker Compose 徹底解説
Docker Compose 徹底解説Docker Compose 徹底解説
Docker Compose 徹底解説
 
Excel でパケット分析 - グラフ化
Excel でパケット分析 - グラフ化Excel でパケット分析 - グラフ化
Excel でパケット分析 - グラフ化
 
コンテナを止めるな! PacemakerによるコンテナHAクラスタリングとKubernetesとの違いとは
コンテナを止めるな!  PacemakerによるコンテナHAクラスタリングとKubernetesとの違いとはコンテナを止めるな!  PacemakerによるコンテナHAクラスタリングとKubernetesとの違いとは
コンテナを止めるな! PacemakerによるコンテナHAクラスタリングとKubernetesとの違いとは
 
私たちはRESTCONFでネットワーク自動化的に何が嬉しくなるのか考えてみた
私たちはRESTCONFでネットワーク自動化的に何が嬉しくなるのか考えてみた私たちはRESTCONFでネットワーク自動化的に何が嬉しくなるのか考えてみた
私たちはRESTCONFでネットワーク自動化的に何が嬉しくなるのか考えてみた
 
Scapyで作る・解析するパケット
Scapyで作る・解析するパケットScapyで作る・解析するパケット
Scapyで作る・解析するパケット
 
Redmine にいろいろ埋め込んでみた
Redmine にいろいろ埋め込んでみたRedmine にいろいろ埋め込んでみた
Redmine にいろいろ埋め込んでみた
 
545人のインフラを支えたNOCチーム!
545人のインフラを支えたNOCチーム!545人のインフラを支えたNOCチーム!
545人のインフラを支えたNOCチーム!
 
何となく勉強した気分になれるパーサ入門
何となく勉強した気分になれるパーサ入門何となく勉強した気分になれるパーサ入門
何となく勉強した気分になれるパーサ入門
 
実運用して分かったRabbit MQの良いところ・気をつけること #jjug
実運用して分かったRabbit MQの良いところ・気をつけること #jjug実運用して分かったRabbit MQの良いところ・気をつけること #jjug
実運用して分かったRabbit MQの良いところ・気をつけること #jjug
 
Node.js Native ESM への道 〜最終章: Babel / TypeScript Modules との闘い〜
Node.js Native ESM への道  〜最終章: Babel / TypeScript Modules との闘い〜Node.js Native ESM への道  〜最終章: Babel / TypeScript Modules との闘い〜
Node.js Native ESM への道 〜最終章: Babel / TypeScript Modules との闘い〜
 
react-scriptsはwebpackで何をしているのか
react-scriptsはwebpackで何をしているのかreact-scriptsはwebpackで何をしているのか
react-scriptsはwebpackで何をしているのか
 
NTTデータ流Infrastructure as Code~ 大規模プロジェクトを通して考え抜いた基盤自動化の新たな姿~(NTTデータ テクノロジーカンフ...
NTTデータ流Infrastructure as Code~ 大規模プロジェクトを通して考え抜いた基盤自動化の新たな姿~(NTTデータ テクノロジーカンフ...NTTデータ流Infrastructure as Code~ 大規模プロジェクトを通して考え抜いた基盤自動化の新たな姿~(NTTデータ テクノロジーカンフ...
NTTデータ流Infrastructure as Code~ 大規模プロジェクトを通して考え抜いた基盤自動化の新たな姿~(NTTデータ テクノロジーカンフ...
 
backlogsでもCI/CDする夢を見る
backlogsでもCI/CDする夢を見るbacklogsでもCI/CDする夢を見る
backlogsでもCI/CDする夢を見る
 
作って(壊して?)学ぶインターネットのしくみ サイバーエージェントの実験用ASの紹介 / Introduce experimental AS in ...
作って(壊して?)学ぶインターネットのしくみ サイバーエージェントの実験用ASの紹介 / Introduce experimental AS in ...作って(壊して?)学ぶインターネットのしくみ サイバーエージェントの実験用ASの紹介 / Introduce experimental AS in ...
作って(壊して?)学ぶインターネットのしくみ サイバーエージェントの実験用ASの紹介 / Introduce experimental AS in ...
 
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料RFC6241(Network Configuration Protocol (NETCONF))の勉強資料
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料
 
Linux女子部 iptables復習編
Linux女子部 iptables復習編Linux女子部 iptables復習編
Linux女子部 iptables復習編
 
インターネットの仕組みとISPの構造
インターネットの仕組みとISPの構造インターネットの仕組みとISPの構造
インターネットの仕組みとISPの構造
 

Ähnlich wie Openconfigを用いたネットワーク機器操作 (12)

Oficio la occidental
Oficio la occidentalOficio la occidental
Oficio la occidental
 
Untdsadasitled(2)
Untdsadasitled(2)Untdsadasitled(2)
Untdsadasitled(2)
 
how to five sense with raspberry pi
how to five sense with raspberry pihow to five sense with raspberry pi
how to five sense with raspberry pi
 
Browzine presentation 20150914 for customers
Browzine presentation 20150914 for customers Browzine presentation 20150914 for customers
Browzine presentation 20150914 for customers
 
20180208_shibuya30_final_children
20180208_shibuya30_final_children20180208_shibuya30_final_children
20180208_shibuya30_final_children
 
Browzine presentation 20150714 for customers
Browzine presentation 20150714 for customers Browzine presentation 20150714 for customers
Browzine presentation 20150714 for customers
 
Constructedlandscape2a
Constructedlandscape2aConstructedlandscape2a
Constructedlandscape2a
 
New doc-8
New doc-8New doc-8
New doc-8
 
New doc-8 (1)
New doc-8 (1)New doc-8 (1)
New doc-8 (1)
 
CL PROJECT 2A ASSIGNMENT
CL PROJECT 2A ASSIGNMENTCL PROJECT 2A ASSIGNMENT
CL PROJECT 2A ASSIGNMENT
 
エシカル消費の基礎知識
エシカル消費の基礎知識エシカル消費の基礎知識
エシカル消費の基礎知識
 
855 coldplay-paradise
855 coldplay-paradise855 coldplay-paradise
855 coldplay-paradise
 

Mehr von Hirofumi Ichihara

NFV Infrastructure Manager with High Performance Software Switch Lagopus
NFV Infrastructure Manager with High Performance Software Switch Lagopus NFV Infrastructure Manager with High Performance Software Switch Lagopus
NFV Infrastructure Manager with High Performance Software Switch Lagopus
Hirofumi Ichihara
 

Mehr von Hirofumi Ichihara (10)

OSS光と闇
OSS光と闇OSS光と闇
OSS光と闇
 
[RECAP] Blackholes and Wormholes: Understand and Troubleshoot the “Magic” of ...
[RECAP] Blackholes and Wormholes: Understand and Troubleshoot the “Magic” of ...[RECAP] Blackholes and Wormholes: Understand and Troubleshoot the “Magic” of ...
[RECAP] Blackholes and Wormholes: Understand and Troubleshoot the “Magic” of ...
 
Container Networking Deep Dive
Container Networking Deep DiveContainer Networking Deep Dive
Container Networking Deep Dive
 
OSSコミッタの生活とその必要性
OSSコミッタの生活とその必要性OSSコミッタの生活とその必要性
OSSコミッタの生活とその必要性
 
OpenStack Neutron プロジェクトから見たソフトウェアスイッチ動向
OpenStack Neutron プロジェクトから見たソフトウェアスイッチ動向OpenStack Neutron プロジェクトから見たソフトウェアスイッチ動向
OpenStack Neutron プロジェクトから見たソフトウェアスイッチ動向
 
OpenStack Project Update Neutron Update
OpenStack Project Update Neutron UpdateOpenStack Project Update Neutron Update
OpenStack Project Update Neutron Update
 
Summit前にやることTODO
Summit前にやることTODOSummit前にやることTODO
Summit前にやることTODO
 
NFV Infrastructure Manager with High Performance Software Switch Lagopus
NFV Infrastructure Manager with High Performance Software Switch Lagopus NFV Infrastructure Manager with High Performance Software Switch Lagopus
NFV Infrastructure Manager with High Performance Software Switch Lagopus
 
Neutron CI Run on Docker
Neutron CI Run on DockerNeutron CI Run on Docker
Neutron CI Run on Docker
 
Report of OpenStack Ops Meetup Palo Alto (in Japanese)
Report of OpenStack Ops Meetup Palo Alto (in Japanese)Report of OpenStack Ops Meetup Palo Alto (in Japanese)
Report of OpenStack Ops Meetup Palo Alto (in Japanese)
 

Openconfigを用いたネットワーク機器操作

  • 1. Copyright©2017 NTT corp. All Rights Reserved. OpenConfigを用いたネットワーク機器操作 日本電信電話株式会社 ソフトウェアイノベーションセンタ 市原 裕史
  • 2. 2Copyright©2017 NTT corp. All Rights Reserved. 市原 裕史 • 所属 • NTT SIC 第三推進プロジェクト • OpenStack Developer • Neutron Core Reviewer、その他プロジェクトへの貢献 • 技術: SDN/NFV中心 • パブリッククラウドの開発 • LinuxconでDPDKの性能の発表 • Neutronへの機能提案 自己紹介
  • 3. 3Copyright©2017 NTT corp. All Rights Reserved. OpenConfigへのモチベーション データセンター この領域はベンダ ロックインのない 抽象化されたAPI が存在する この領域はベンダ ロックインのない抽 象化されたAPIがない
  • 4. 4Copyright©2017 NTT corp. All Rights Reserved. • ネットワーク機器のAPIにベンダニュートラルなモデル を提供することを目的としたワーキンググループ名 OpenConfig オペレータ オーケストレータ 自動スクリプト … Cisco Juniper Arista ??? … 共通モデル
  • 5. 5Copyright©2017 NTT corp. All Rights Reserved. • 共通モデルの作成 • ベンダニュートラルなモデル • Telemetryの置き換え • SNMPよりもスケールし、拡張性が高い • 共通のネットワーク管理インターフェースの作成 • gRPC Network Management Interface(gNMI) OpenConfig 取り組み ベンダ主導ではなくオペレータ主導
  • 6. 6Copyright©2017 NTT corp. All Rights Reserved. OpenConfig 現在定義済みのモデル 出典: http://www.openconfig.net/projects/models/
  • 7. 7Copyright©2017 NTT corp. All Rights Reserved. m o d u l e : o p e n c o n f i g - i n t e r f a c e s + - - r w i n t e r f a c e s + - - r w i n t e r f a c e * [ n a m e ] + - - r w n a m e - > . . / c o n f i g / n a m e + - - r w c o n f i g | + - - r w t y p e i d e n t i t y r e f | + - - r w m t u ? u i n t 1 6 | + - - r w n a m e ? s t r i n g | + - - r w d e s c r i p t i o n ? s t r i n g | + - - r w e n a b l e d ? b o o l e a n + - - r o s t a t e | + - - r o t y p e i d e n t i t y r e f | + - - r o m t u ? u i n t 1 6 | + - - r o n a m e ? s t r i n g | + - - r o d e s c r i p t i o n ? s t r i n g | + - - r o e n a b l e d ? b o o l e a n | + - - r o i f i n d e x ? u i n t 3 2 | + - - r o a d m i n - s t a t u s e n u m e r a t i o n | + - - r o o p e r - s t a t u s e n u m e r a t i o n | + - - r o l a s t - c h a n g e ? y a n g :t i m e t i c k s | + - - r o c o u n t e r s | + - - r o i n - o c t e t s ? y a n g :c o u n t e r 6 4 | + - - r o i n - u n i c a s t - p k t s ? y a n g :c o u n t e r 6 4 | + - - r o i n - b r o a d c a s t - p k t s ? y a n g :c o u n t e r 6 4 | + - - r o i n - m u l t i c a s t - p k t s ? y a n g :c o u n t e r 6 4 | + - - r o i n - d i s c a r d s ? y a n g :c o u n t e r 6 4 | + - - r o i n - e r r o r s ? y a n g :c o u n t e r 6 4 | + - - r o i n - u n k n o w n - p r o t o s ? y a n g :c o u n t e r 3 2 | + - - r o o u t - o c t e t s ? y a n g :c o u n t e r 6 4 | + - - r o o u t - u n i c a s t - p k t s ? y a n g :c o u n t e r 6 4 | + - - r o o u t - b r o a d c a s t - p k t s ? y a n g :c o u n t e r 6 4 | + - - r o o u t - m u l t i c a s t - p k t s ? y a n g :c o u n t e r 6 4 | + - - r o o u t - d i s c a r d s ? y a n g :c o u n t e r 6 4 | + - - r o o u t - e r r o r s ? y a n g :c o u n t e r 6 4 | + - - r o l a s t - c l e a r ? y a n g :d a t e - a n d - t i m e + - - r w h o l d - t i m e | + - - r w c o n f i g | | + - - r w u p ? u i n t 3 2 | | + - - r w d o w n ? u i n t 3 2 | + - - r o s t a t e | + - - r o u p ? u i n t 3 2 | + - - r o d o w n ? u i n t 3 2 + - - r w s u b i n t e r f a c e s + - - r w s u b i n t e r f a c e * [ i n d e x ] + - - r w i n d e x - > . . / c o n f i g / i n d e x + - - r w c o n f i g | + - - r w i n d e x ? u i n t 3 2 | + - - r w n a m e ? s t r i n g | + - - r w d e s c r i p t i o n ? s t r i n g | + - - r w e n a b l e d ? b o o l e a n + - - r o s t a t e + - - r o i n d e x ? u i n t 3 2 + - - r o n a m e ? s t r i n g + - - r o d e s c r i p t i o n ? s t r i n g + - - r o e n a b l e d ? b o o l e a n + - - r o i f i n d e x ? u i n t 3 2 + - - r o a d m i n - s t a t u s e n u m e r a t i o n + - - r o o p e r - s t a t u s e n u m e r a t i o n + - - r o l a s t - c h a n g e ? y a n g :t i m e t i c k s + - - r o c o u n t e r s + - - r o i n - o c t e t s ? y a n g :c o u n t e r 6 4 + - - r o i n - u n i c a s t - p k t s ? y a n g :c o u n t e r 6 4 + - - r o i n - b r o a d c a s t - p k t s ? y a n g :c o u n t e r 6 4 + - - r o i n - m u l t i c a s t - p k t s ? y a n g :c o u n t e r 6 4 + - - r o i n - d i s c a r d s ? y a n g :c o u n t e r 6 4 + - - r o i n - e r r o r s ? y a n g :c o u n t e r 6 4 + - - r o i n - u n k n o w n - p r o t o s ? y a n g :c o u n t e r 3 2 + - - r o o u t - o c t e t s ? y a n g :c o u n t e r 6 4 + - - r o o u t - u n i c a s t - p k t s ? y a n g :c o u n t e r 6 4 + - - r o o u t - b r o a d c a s t - p k t s ? y a n g :c o u n t e r 6 4 + - - r o o u t - m u l t i c a s t - p k t s ? y a n g :c o u n t e r 6 4 + - - r o o u t - d i s c a r d s ? y a n g :c o u n t e r 6 4 + - - r o o u t - e r r o r s ? y a n g :c o u n t e r 6 4 + - - r o l a s t - c l e a r ? y a n g :d a t e - a n d - t i m e OpenConfig モデル例 interfaces 出典: https://github.com/openconfig/public/blob/master/release/models/interfaces/openconfig-interfaces.yang
  • 8. 8Copyright©2017 NTT corp. All Rights Reserved. OpenConfigメンバー 出典: http://openconfig.net/about/participants/
  • 9. 9Copyright©2017 NTT corp. All Rights Reserved. • vMX: vMX 17.2R1.13 • XRv: iosxrv 9k demo 6.1.2 • Host OS: Ubuntu 16.04 • NETCONF Client: ncclient 0.5.3 デモ構成 ClientA vMX1 (bgp 65101) XRv (bgp 65102) .10 .20 10.10.0.0/24 10.1.1.100/24 20.1.1.200/24 20.1.1.1/2410.1.1.1/24 ge-0/0/1 ge-0/0/0 GigabitEthernet0/0/0/0 GigabitEthernet0/0/0/1 vMX2 (bgp 65103) 11.11.0.0/24 .20 .10 ge-0/0/0 ge-0/0/1 ClientB
  • 10. 10Copyright©2017 NTT corp. All Rights Reserved. <config> <interfaces xmlns="http://openconfig.net /yang /interfaces"> <interface> <name>インターフェース名</name> <subinterfaces> <subinterface> <index>100</index> <vlan xmlns="http://openconfig.net /yang /vlan"> <config> <vlan-id>100</vlan-id> </config> </vlan> </subinterface> </subinterfaces> </interface> </interfaces> </config> デモ① VLAN vMXとXRvへVLAN設定 vMX1 XRv ge-0/0/0 vlan 100 GigabitEthernet0/0/0/0 vlan 100 デモ動画: https://youtu.be/XIpAJiRoQMU
  • 11. 11Copyright©2017 NTT corp. All Rights Reserved. インターフェース、BGP、Routing-policyを設定し、 ClientAとClientB間で疎通確認 デモ② BGP ClientA vMX1 (bgp 65101) XRv (bgp 65102) .10 .20 10.10.0.0/24 10.1.1.100/24 20.1.1.200/24 20.1.1.1/2410.1.1.1/24 ge-0/0/1 ge-0/0/0 GigabitEthernet0/0/0/0 GigabitEthernet0/0/0/1 vMX2 (bgp 65103) 11.11.0.0/24 .20 .10 ge-0/0/0 ge-0/0/1 ClientB デモ動画: https://youtu.be/TfZXuvw_9OI
  • 12. 12Copyright©2017 NTT corp. All Rights Reserved. < c o n f i g > < i n t e r f a c e s x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / i n t e r f a c e s " > < i n t e r f a c e > < n a m e > g e - 0 / 0 / 0 < / n a m e > < s u b i n t e r f a c e s > < s u b i n t e r f a c e > < i n d e x > 0 < / i n d e x > < c o n f i g > < i n d e x > 0 < / i n d e x > < e n a b l e d > t r u e < / e n a b l e d > < / c o n f i g > < i p v 4 x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / i n t e r f a c e s / i p " > < a d d r e s s e s > < a d d r e s s > < i p > 1 0 . 1 0 . 0 . 1 0 < / i p > < c o n f i g > < i p > 1 0 . 1 0 . 0 . 1 0 < / i p > < p r e f i x - l e n g t h > 2 4 < / p r e f i x - l e n g t h > < / c o n f i g > < / a d d r e s s > < / a d d r e s s e s > < / i p v 4 > < / s u b i n t e r f a c e > < / s u b i n t e r f a c e s > < / i n t e r f a c e > < i n t e r f a c e > < n a m e > g e - 0 / 0 / 1 < / n a m e > < s u b i n t e r f a c e s > < s u b i n t e r f a c e > < i n d e x > 0 < / i n d e x > < c o n f i g > < i n d e x > 0 < / i n d e x > < e n a b l e d > t r u e < / e n a b l e d > < / c o n f i g > < i p v 4 x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / i n t e r f a c e s / i p " > < a d d r e s s e s > < a d d r e s s > < i p > 1 0 . 1 . 1 . 1 < / i p > < c o n f i g > < i p > 1 0 . 1 . 1 . 1 < / i p > < p r e f i x - l e n g t h > 2 4 < / p r e f i x - l e n g t h > < / c o n f i g > < / a d d r e s s > < / a d d r e s s e s > < / i p v 4 > < / s u b i n t e r f a c e > < / s u b i n t e r f a c e s > < / i n t e r f a c e > < / i n t e r f a c e s > < r o u t i n g - p o l i c y x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / r o u t i n g - p o l i c y " > < p o l i c y - d e f i n i t i o n s > < p o l i c y - d e f i n i t i o n > < n a m e > b g p - i n < / n a m e > < s t a t e m e n t s > < s t a t e m e n t > < n a m e > b g p - i n < / n a m e > < a c t i o n s > < c o n f i g > < a c c e p t - r o u t e / > < / c o n f i g > < / a c t i o n s > < / s t a t e m e n t > < / s t a t e m e n t s > < / p o l i c y - d e f i n i t i o n > < p o l i c y - d e f i n i t i o n > < n a m e > b g p - o u t < / n a m e > < s t a t e m e n t s > < s t a t e m e n t > < n a m e > b g p - o u t < / n a m e > < a c t i o n s > < c o n f i g > < a c c e p t - r o u t e / > < / c o n f i g > < / a c t i o n s > < / s t a t e m e n t > < / s t a t e m e n t s > < / p o l i c y - d e f i n i t i o n > < / p o l i c y - d e f i n i t i o n s > < / r o u t i n g - p o l i c y > < b g p x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p " > < g l o b a l > < c o n f i g > < a s > 6 5 1 0 1 < / a s > < r o u t e r - i d > 1 0 . 1 0 . 0 . 1 0 < / r o u t e r - i d > < / c o n f i g > < a f i - s a f i s > < a f i - s a f i > < a f i - s a f i - n a m e x m l n s : i d x = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p - t y p e s " > i d x : I P V 4 _ U N I C A S T < / a f i - s a f i - n a m e > < c o n f i g > < e n a b l e d > t r u e < / e n a b l e d > < / c o n f i g > < / a f i - s a f i > < / a f i - s a f i s > < / g l o b a l > < n e i g h b o r s > < n e i g h b o r > < n e i g h b o r - a d d r e s s > 1 0 . 1 0 . 0 . 2 0 < / n e i g h b o r - a d d r e s s > < c o n f i g > < p e e r - g r o u p > g r o u p 6 5 1 0 2 < / p e e r - g r o u p > < n e i g h b o r - a d d r e s s > 1 0 . 1 0 . 0 . 2 0 < / n e i g h b o r - a d d r e s s > < / c o n f i g > < a f i - s a f i s > < a f i - s a f i > < a f i - s a f i - n a m e x m l n s : i d x = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p - t y p e s " > i d x : I P V 4 _ U N I C A S T < / a f i - s a f i - n a m e > < c o n f i g > < e n a b l e d > t r u e < / e n a b l e d > < / c o n f i g > < / a f i - s a f i > < / a f i - s a f i s > < a p p l y - p o l i c y > < c o n f i g > < i m p o r t - p o l i c y > b g p - i n < / i m p o r t - p o l i c y > < e x p o r t - p o l i c y > b g p - o u t < / e x p o r t - p o l i c y > < / c o n f i g > < / a p p l y - p o l i c y > < / n e i g h b o r > < / n e i g h b o r s > < p e e r - g r o u p s > < p e e r - g r o u p > < p e e r - g r o u p - n a m e > g r o u p 6 5 1 0 2 < / p e e r - g r o u p - n a m e > < c o n f i g > < p e e r - a s > 6 5 1 0 2 < / p e e r - a s > < / c o n f i g > < / p e e r - g r o u p > < / p e e r - g r o u p s > < / b g p > < / c o n f i g > デモ② BGP デモコンフィグ < c o n f i g > < i n t e r f a c e s x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / i n t e r f a c e s " > < i n t e r f a c e > < n a m e > G i g a b i t E t h e r n e t 0 / 0 / 0 / 0 < / n a m e > < s u b i n t e r f a c e s > < s u b i n t e r f a c e > < i n d e x > 0 < / i n d e x > < c o n f i g > < i n d e x > 0 < / i n d e x > < e n a b l e d > t r u e < / e n a b l e d > < / c o n f i g > < i p v 4 x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / i n t e r f a c e s / i p " > < a d d r e s s > < i p > 1 0 . 1 0 . 0 . 2 0 < / i p > < c o n f i g > < i p > 1 0 . 1 0 . 0 . 2 0 < / i p > < p r e f i x - l e n g t h > 2 4 < / p r e f i x - l e n g t h > < / c o n f i g > < / a d d r e s s > < / i p v 4 > < / s u b i n t e r f a c e > < / s u b i n t e r f a c e s > < / i n t e r f a c e > < i n t e r f a c e > < n a m e > G i g a b i t E t h e r n e t 0 / 0 / 0 / 1 < / n a m e > < s u b i n t e r f a c e s > < s u b i n t e r f a c e > < i n d e x > 0 < / i n d e x > < c o n f i g > < i n d e x > 0 < / i n d e x > < e n a b l e d > t r u e < / e n a b l e d > < / c o n f i g > < i p v 4 x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / i n t e r f a c e s / i p " > < a d d r e s s > < i p > 1 1 . 1 1 . 0 . 2 0 < / i p > < c o n f i g > < i p > 1 1 . 1 1 . 0 . 2 0 < / i p > < p r e f i x - l e n g t h > 2 4 < / p r e f i x - l e n g t h > < / c o n f i g > < / a d d r e s s > < / i p v 4 > < / s u b i n t e r f a c e > < / s u b i n t e r f a c e s > < / i n t e r f a c e > < / i n t e r f a c e s > < r o u t i n g - p o l i c y x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / r o u t i n g - p o l i c y " > < p o l i c y - d e f i n i t i o n s > < p o l i c y - d e f i n i t i o n > < n a m e > b g p - i n < / n a m e > < s t a t e m e n t s > < s t a t e m e n t > < n a m e > b g p - i n < / n a m e > < a c t i o n s > < a c c e p t - r o u t e / > < / a c t i o n s > < / s t a t e m e n t > < / s t a t e m e n t s > < / p o l i c y - d e f i n i t i o n > < p o l i c y - d e f i n i t i o n > < n a m e > b g p - o u t < / n a m e > < s t a t e m e n t s > < s t a t e m e n t > < n a m e > b g p - o u t < / n a m e > < a c t i o n s > < a c c e p t - r o u t e / > < / a c t i o n s > < / s t a t e m e n t > < / s t a t e m e n t s > < / p o l i c y - d e f i n i t i o n > < / p o l i c y - d e f i n i t i o n s > < / r o u t i n g - p o l i c y > < b g p x m l n s = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p " > < g l o b a l > < c o n f i g > < a s > 6 5 1 0 2 < / a s > < r o u t e r - i d > 1 0 . 1 0 . 0 . 2 0 < / r o u t e r - i d > < / c o n f i g > < a f i - s a f i s > < a f i - s a f i > < a f i - s a f i - n a m e x m l n s : i d x = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p - t y p e s " > i d x : i p v 4 - u n i c a s t < / a f i - s a f i - n a m e > < c o n f i g > < e n a b l e d > t r u e < / e n a b l e d > < / c o n f i g > < / a f i - s a f i > < / a f i - s a f i s > < / g l o b a l > < n e i g h b o r s > < n e i g h b o r > < n e i g h b o r - a d d r e s s > 1 0 . 1 0 . 0 . 1 0 < / n e i g h b o r - a d d r e s s > < c o n f i g > < p e e r - g r o u p > g r o u p 6 5 1 0 1 < / p e e r - g r o u p > < n e i g h b o r - a d d r e s s > 1 0 . 1 0 . 0 . 1 0 < / n e i g h b o r - a d d r e s s > < / c o n f i g > < a f i - s a f i s > < a f i - s a f i > < a f i - s a f i - n a m e x m l n s : i d x = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p - t y p e s " > i d x : i p v 4 - u n i c a s t < / a f i - s a f i - n a m e > < c o n f i g > < e n a b l e d > t r u e < / e n a b l e d > < / c o n f i g > < a p p l y - p o l i c y > < c o n f i g > < i m p o r t - p o l i c y > b g p - i n < / i m p o r t - p o l i c y > < e x p o r t - p o l i c y > b g p - o u t < / e x p o r t - p o l i c y > < / c o n f i g > < / a p p l y - p o l i c y > < / a f i - s a f i > < / a f i - s a f i s > < / n e i g h b o r > < n e i g h b o r > < n e i g h b o r - a d d r e s s > 1 1 . 1 1 . 0 . 1 0 < / n e i g h b o r - a d d r e s s > < c o n f i g > < p e e r - g r o u p > g r o u p 6 5 1 0 3 < / p e e r - g r o u p > < n e i g h b o r - a d d r e s s > 1 1 . 1 1 . 0 . 1 0 < / n e i g h b o r - a d d r e s s > < / c o n f i g > < a f i - s a f i s > < a f i - s a f i > < a f i - s a f i - n a m e x m l n s : i d x = " h t t p : / / o p e n c o n f i g . n e t / y a n g / b g p - t y p e s " > i d x : i p v 4 - u n i c a s t < / a f i - s a f i - n a m e > < c o n f i g > < e n a b l e d > t r u e < / e n a b l e d > < / c o n f i g > < a p p l y - p o l i c y > < c o n f i g > < i m p o r t - p o l i c y > b g p - i n < / i m p o r t - p o l i c y > < e x p o r t - p o l i c y > b g p - o u t < / e x p o r t - p o l i c y > < / c o n f i g > < / a p p l y - p o l i c y > < / a f i - s a f i > < / a f i - s a f i s > < / n e i g h b o r > < / n e i g h b o r s > < p e e r - g r o u p s > < p e e r - g r o u p > < p e e r - g r o u p - n a m e > g r o u p 6 5 1 0 1 < / p e e r - g r o u p - n a m e > < c o n f i g > < p e e r - a s > 6 5 1 0 1 < / p e e r - a s > < / c o n f i g > < / p e e r - g r o u p > < p e e r - g r o u p > < p e e r - g r o u p - n a m e > g r o u p 6 5 1 0 3 < / p e e r - g r o u p - n a m e > < c o n f i g > < p e e r - a s > 6 5 1 0 3 < / p e e r - a s > < / c o n f i g > < / p e e r - g r o u p > < / p e e r - g r o u p s > < / b g p > < / c o n f i g > vmx1.xml xrv.xml
  • 13. 13Copyright©2017 NTT corp. All Rights Reserved. デモ②のコンフィグ https://gist.github.com/hichihara/b5ec91275513742489119f564cf732ed
  • 14. 14Copyright©2017 NTT corp. All Rights Reserved. • vMXとXRvの実装バージョンの違い • vMXのopenconfig-if-ipはバージョン1.0.1(図左)で実装され ているが、XRvは0.2.0(図右)で実装されている • 機器によって使用可能なインターフェースが異なる • vMX、XRvはnetconfに対応、vEOSはnetconfに未対応 • vEOSはgRPCに対応、vMX、XRvは対応しているらしいがド キュメントが不足していてまともに使えない • 機器によってOpenConfigでの設定が通常の設定と別 に管理される→次ページ参照 検証していて辛かったこと
  • 15. 15Copyright©2017 NTT corp. All Rights Reserved. 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のOpenConfigの設定の仕方 Junosの一般的な操作 (CLI、Juniper名前空 間でのnetconf)で設定 したものはここに反映 OpenConfig名前空間で のnetconf操作で設定し たものはここに反映(CLI での設定は可能)
  • 16. 16Copyright©2017 NTT corp. All Rights Reserved. • 機器によって使用するスキーマが違う • openconfig-mplsでのMPLSインターフェース設定 検証していて辛かったこと② +--rw mpls +--rw global | +--rw config | +--ro state | +--rw interface-attributes | | +--rw interface* [interface-id] | | +--rw interface-id -> ../config/interface-id | | +--rw config | | | +--rw interface-id? oc-if:interface-id | | | +--rw mpls-enabled? boolean | + + | +--rw te-interface-attributes | +--rw interface* [interface-id] | +--rw interface-id -> ../config/interface-id | +--rw config | | +--rw interface-id? oc-if:interface-id vMXで有効 XRvで有効
  • 17. 17Copyright©2017 NTT corp. All Rights Reserved. MTU設定をデモしようとしていたがvMXとXRvで実装 が違っていた デモボツエピソード <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> </config> </interface> </interfaces> </config> 出典: https://www.juniper.net/documentation/en_US/junos/information-products/pathway-pages/open-config/open-config-feature-guide.pdf コンフィグ投入できるが実際は サポートされていない
  • 18. 18Copyright©2017 NTT corp. All Rights Reserved. • すべてのモデルが存在するわけではない • モデルがあってもスキーマに不足がある • インターフェースのスキーマにDHCP設定がない • バージョンによってスキーマが異なる場合がある • openconfig-if-ip • OSSだがオープンコミュニティではない • 機器側で実装がない場合がある • VRF設定用のopenconfig-network-instanceは実装がない • モデルがありスキーマの実装もあるが未対応パラメータがある OpenConfig 注意点・懸念点
  • 19. 19Copyright©2017 NTT corp. All Rights Reserved. あらゆるベンダ機器間のギャップの抽象化 OpenConfigへの期待 データセンター すべての機器をベンダ ロックインのない抽象 化されたAPIで制御