Device Preparation

In order to start using NETCONF, let's create a separate user as well as turning on the service:

    set system login user netconf uid 2001
set system login user netconf class super-user
set system login user netconf authentication encrypted-password
"$1$0EkA.XVf$cm80A0GC2dgSWJIYWv7Pt1"
set system services ssh
set system services telnet
set system services netconf ssh port 830
For the Juniper device lab, I am using an older, unsupported platform called Juniper Olive. It is solely used for lab purposes. You can use your favorite search engine to find out some interesting facts and history about Juniper Olive.

On the Juniper device, you can always take a look at the configuration either in a flat file or in the XML format. The flat file comes in handy when you need to specify a one-liner command to make configuration changes:

    netconf@foo> show configuration | display set
set version 12.1R1.9
set system host-name foo
set system domain-name bar
<omitted>

The XML format comes in handy at times when you need to see the XML structure of the configuration:

    netconf@foo> show configuration | display xml
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/12.1R1/junos">
<configuration junos:commit-seconds="1485561328" junos:commit-
localtime="2017-01-27 23:55:28 UTC" junos:commit-user="netconf">
<version>12.1R1.9</version>
<system>
<host-name>foo</host-name>
<domain-name>bar</domain-name>
We have installed the necessary Linux libraries and the ncclient Python library in the Cisco section. If you have not done so, refer back to the section and install the necessary packages.

We are now ready to look at our first Juniper NETCONF example.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.106.7