キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 
cancel
1091
閲覧回数
20
いいね!
0
コメント
Tomoya Watanabe
Spotlight
Spotlight

NSO 5.3でのJunos NETCONF NED対応について

下記URLに記載がある通り、NSO5.3以降ではJunosのNETCONF NEDがNativeで対応するという発表がされています。https://community.cisco.com/kxiwq67737/attachments/kxiwq67737/5672j-blogs-dev-nso/247/1/Going%20Junos%20Native%20with%20NSO.pdf

ChangesでもNSO5.3でNETCONFでJunosが操作できるようになっていることが明記されています。

NSO-5.3 [November 29, 2019]
===========================-
ncs: Add special handling to allow NSO to manage Juniper JunOS devices
in RFC-compliant mode over NETCONF. When a JunOS device is detected to
run in RFC-compatible mode, NSO determines the capabilities from the
list of schemas announced in the ietf-netconf-monitoring model and
disables special handling used for JunOS devices managed over
conventional JunOS XML API.
NSO supports RFC-compliant mode of operation for JunOS devices with
software version 18.4 or greater and both RFC-compliant and
YANG-compliant configuration parameters set. Managing the JunOS devices
with RFC-compliant behaviour switched off is still supported over the
conventional JunOS XML protocol, using the juniper-junos NED. (ENG-18935, RT:34063, PS-29235)


NSOにはnetconf-ned-builderという機能が搭載されており、RFCに準拠しているNetconfに対応している装置であればschema(YANG)を取得後、NEDをbuildすることが可能です。

上述のJunosのNETCONF NEDのNative化について要約すると下記のようになります。

  • 以前のJunosではRFC準拠していないNETCONFで動作していたため、Junos用のNEDで特別対応をしていた
  • NSO5.3からはJunos用のNEDが必要なくなった

しかし、上記の情報ではあまりイメージが掴めなかったため、実際に動作確認をした結果を下記に記載しております。

 

環境

  • NSO5.3.1.1

  • vMX(18.4R3-S3)

手順

NSO netconf-ned-builderの手順

NSOの手順については下記がそのまま参考になります。IOSの部分をJunosに読み替えて実施が可能です。

https://community.cisco.com/t5/%E3%83%8D%E3%83%83%E3%83%88%E3%83%AF%E3%83%BC%E3%82%AF%E3%82%A4%E3%83%B3%E3%83%95%E3%83%A9%E3%82%B9%E3%83%88%E3%83%A9%E3%82%AF%E3%83%81%E3%83%A3-%E3%83%89%E3%82%AD%E3%83%A5%E3%83%A1%E3%83%B3%E3%83%88/nso-netconf-ned-bui...

Junos側の手順

Junos側では下記の手順を踏む必要があります。

NETCONFの有効化

JunosでNETCONFサーバーを有効化します

[edit]
root# set system services netconf ssh

[edit]
root# show | compare
[edit system services ssh]
+    root-login allow;
[edit system services]
+    netconf {
+        ssh;
+    }

[edit]
root# commit
commit complete

 

NETCONFのrfc-compliant/yang-compliantモードの有効化

JunosのNETCONFは標準ではrfc非準拠のモードで動作しているようので、rfc-compliant/yang-compliantモードを有効化する必要があります。

root# set system services netconf rfc-compliant[edit]
root# show | compare
[edit system services netconf]
+ rfc-compliant;[edit]
root# commit
commit complete[edit]
root#

rfc-compliant/yang-compliantモードをenableにしないと、netconf-ned-builderではschemaのdownloadの時にerrorが発生します。

admin@ncs# show netconf-ned-builder project junos 184 module status
NAME                                   REVISION    STATUS
----------------------------------------------------------------------------
ietf-inet-types                        2013-07-15  selected,download-error
ietf-netconf                           2011-06-01  selected,download-error
junos-common-types                     2020-01-01  selected,download-error
junos-conf-access                      2020-01-01  selected,download-error
junos-conf-access-profile              2020-01-01  selected,download-error

また、rfc-compliant/yang-compliantモードはJunos15.1以降で対応のため、14.xでは動作しない可能性があります(未検証)

https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/rfc-compliant-edit-system-services-netconf.html

動作確認

buildされたNEDの設定

admin@ncs(config)# devices device junos184 device-type netconf ned-id junos-nc-184
admin@ncs(config-device-junos184)# commit
Commit complete.

sync-from

admin@ncs# devices device junos184 sync-from
result true
admin@ncs#

ユーザーの設定

admin@ncs(config)# devices device junos184 config configuration system login user test uid 5000 class super-user authentication encrypted-password test
admin@ncs(config-user-test)# commit dry-run
cli {
    local-node {
        data  devices {
                  device junos184 {
                      config {
                          configuration {
                              system {
                                  login {
             +                        user test {
             +                            uid 5000;
             +                            class super-user;
             +                            authentication {
             +                                encrypted-password test;
             +                            }
             +                        }
                                  }
                              }
                          }
                      }
                  }
              }
    }
}
admin@ncs(config-user-test)# commit
Commit complete.
admin@ncs(config-user-test)#

 

Getting Started

検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう

シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします