cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
190
Views
1
Helpful
5
Replies
khgrant
Cisco Employee

Juniper NED

 

Hi,

 

 

I am trying to figure out the best way to validate that the Juniper NED supports all of the configurations required by my customer for a various Juniper devices and various JunOS version.

 

 

Juniper M10i

JunOS 12.3R5-S1.1

Juniper M120

JUNOS 10.4X16.1/JunOS 13.3R9-S1

Juniper M320

JUNOS 10.4X16.1/JunOS 13.3R9-S1

Juniper M40e

Juniper MX2020

Juniper MX480

JunOS 13.3R3-S6.3/JunOS 15.1F6

Juniper MX960

JunOS 13.3R3-S6.3/JunOS 15.1F6

Juniper MX960-3D

Juniper T1600

JunOS 12.3R5-S1.1

Juniper T4000

JunOS 12.3R5-S1.1

Juniper TX+

 

 

If I’d like to obtain a YANG model for a single device then it would be nothing more complex then just get system schema from device into the yang module and then use it for netconf ned creation. However if I have multiple devices that have different I would like to have single yang module structure that combines all the variation. And that to me comes in the Juniper NED. However not sure what is the best way to validate if all of the configuration I will need to provide for all the versions are supported.

 

 

I tried to validate it using the load merge in the netsim device:

 

 

MMALYSZ-M-60YE:ned mmalysz$ ncs-netsim cli junos0

 

admin@junos0%show configuration interfaces

 

interface lo0 {

 

unit 0 {

 

family {

 

inet {

 

address 192.168.1.1/32;

 

}

 

}

 

}

 

}

 

admin@junos0%show configuration interfaces | save mm

 

admin@junos0%edit configuration interfaces

 

admin@junos0%load merge mm

 

Error: syntax error on line 1: interface

 

 

However I am getting syntax error. I tried it with the configuration create by „display xml” and that worked. However the configuration that I have been provided with is in curly mode and for that the load merge seems not to be working,

 

 

Looking for any hints from someone who already went that way..

 

 

 

Regards,

Maciej

 

5 REPLIES 5
khgrant
Cisco Employee

 

Maciej,

 

 

I tried to validate it using the load merge in the netsim device:

 

 

MMALYSZ-M-60YE:ned mmalysz$ ncs-netsim cli junos0

 

admin@junos0%show configuration interfaces

 

interface lo0 {

 

    unit 0 {

 

        family {

 

            inet {

 

                address 192.168.1.1/32;

 

            }

 

        }

 

    }

 

}

 

admin@junos0%show configuration interfaces | save mm

 

admin@junos0%edit configuration interfaces

 

admin@junos0%load merge mm

 

Error: syntax error on line 1: interface

 

 

However I am getting syntax error. I tried it with the configuration create by „display xml” and that worked. However the configuration that I have been provided with is in curly mode and for that the load merge seems not to be working,

 

 

Looking for any hints from someone who already went that way..

 

 

Loading curly brackets format is not a problem per se, but loading a small piece in the middle, as above, is. You need to ensure that the file you load contains all the outer levels as well. I.e. the "edit configuration interfaces" has no effect on the load command.

 

 

Best Regards,

 

/jan

 

khgrant
Cisco Employee

 

Hi Maciej,

 

 

Using the NSO ncs_load tool will make it easier for you to save configuration or operational data in curly brackets format. In your case below you can run something like:

 

$ ncs_load -F j -p /interfaces > mm

 

$ cat mm

 

interfaces {

 

    interface lo0 {
         unit 0 {
             family {
                 inet {
                    address 192.168.1.1/32;
                 }
            }
       }
}

 

 

Add the “-o” flag when you want to save operational data.

 

 

Best regards,

 

Conny

 

khgrant
Cisco Employee

 

Hi Jan,

 

 

Thanks a lot. I managed to get access to real devices from customer and that is much more efficient now as I don’t need to translate manually the configuration from Juniper into the JunOS NED style (where quite some configuration are slightly different.

 

I have turned on the trace for the devices  admin@ncs% set devices global-settings trace raw

 

When it comes to sync-from Cisco devices I can see for not supported configurations „Failure – error parsing config”.

 

However for Juniper not supported configuration I seem not to get those kind of errors in the trace file. Is there a way to see not parsed configurations by the NED in the trace file for Juniper?

 

 

Thanks,

 

Maciej

 

khgrant
Cisco Employee

 

Maciej,

 

 

Thanks a lot. I managed to get access to real devices from customer and that is much more efficient now as I don’t need to translate manually the configuration from Juniper into the JunOS NED style (where quite some configuration are slightly different.

 

 

Very good.

 



 

I have turned on the trace for the devices  admin@ncs% set devices global-settings trace raw

 

When it comes to sync-from Cisco devices I can see for not supported configurations „Failure – error parsing config”.

 

 

You mean when you sync-from using a CLI NED. Each and every CLI NED has some NED specific handling of this case.

 



 

However for Juniper not supported configuration I seem not to get those kind of errors in the trace file. Is there a way to see not parsed configurations by the NED in the trace file for Juniper?

 

 

When NSO loads configuration in a sync-from, it uses a 'lax' flag that silently allows skipping config that appears in the input stream that is not part of the YANG model. This is essential in many cases. When NSO loads configuration from a file, using the load merge command, the 'lax' flag is not set, so it would refuse items that are not part of the loaded YANG. So by saving the get-config result from the device to a file, and then load it, you could find the items that are not in the YANG. You could copy the data from the trace file (you need to add an envelope), or use the pioneer config sync-from-into-file command to do this.

 

 

If you need more details, you can unicast me.

 

 

Best Regards,

 

/jan

 

khgrant
Cisco Employee

 

Hello Jan,

 

 

I have been trying to use the pioneer now on the NSO4.2.1 in customer system install environment to capture configuration from their production devices during a maintenance window.

 

However trying to do pioneer sync-from-into-file I am getting following error:

 

devel.log

 

<ERR> 9-Sep-2016::10:03:19.313 gpltfmadpe01 ncs[8161]: devel-c no registration found for callpoint pioneer/action of type=external path /ncs:devices/device{GRAMTYBB1}/pioneer/netconf

 

<ERR> 9-Sep-2016::10:03:19.314 gpltfmadpe01 ncs[8161]: ncs external error when executing action application communication failure

 

 

 

admin@ncs> request devices device GRAMTYBB1 pioneer config sync-from-into-file filename GRAMTYBB1.conf

 

Error: application communication failure

 

[error][2016-09-09 10:03:19]

 

admin@ncs>

 

 

 

admin@ncs> show packages package pioneer

 

packages package pioneer

 

package-version 2.1.0

 

description     "Your Swiss army knife for NETCONF, YANG and NSO NEDs"

 

ncs-min-version [ 2.2 ]

 

directory       /var/opt/ncs/state/packages-in-use/1/pioneer

 

component action

 

  application python-class-name Action

 

  application start-phase phase2

 

oper-status up

 

[ok][2016-09-09 10:06:59]

 

admin@ncs>

 

 

netconf-console --get-config -sraw --host=213.140.32.135 --port=22 --user=cisco_nso_bb --password=„xxx” - worked fine and output is attached.

 

 

admin@ncs> request devices device * sync-from

 

devices device GRAMTYBB1 sync-from

 

    result true

 

Content for Community-Ad

This widget could not be displayed.