09-16-2020 05:56 AM
Dear Community members,
I need some help.
While creating a Device Template, i cannot enter some CLI command into device template, although i can execute them on the Device ( either directly on device CLI or via NSO, it is same ).
I appreciate any guidance on the reason for this and guidance on how to run a Compliance report for those commands as i cannot enter them into the template.
nso ver : 5.3.0.1
ned : cisco-ios-cli-6.43
Definition of the issue :
CASE 1 : ntp server
i can execute command
ntp server 195.33.242.133 |
on the device, but not on the Device Template
CSE 2 : logging
i can execute command
logging 10.210.162.238 |
on the device, but not on the Device template..
Below are command execution output for like "logging ? " or "ntp server ? " and my notes and YANG portion for these commands out of IOS NED for both cases :
CASE 1 : ntp server
When i try to execute command on Device
admin@ncs(config-config)# ntp server ?
Possible completions:
<IP address> <--- there is IP address field here
<string, min: 1 chars, max: 253 chars>
<Hostname, A.B.C.D or X:X:X:X::X> Address of peer
ip Use IP for DNS resolution
ipv6 Use IPv6 for DNS resolution
vrf VPN Routing/Forwarding Information
When i try to execute command on Template :
admin@ncs(config-config)# ntp server ?
Possible completions:
ip ipv6 peer-list vrf <--- there is peer-list field here, in which there is IP address
IOS YANG for ntp server :
Solved! Go to Solution.
09-17-2020 09:09 AM
Hi,
The NTP commands in your template should look like:
<config> <ntp xmlns="http://tail-f.com/ned/cisco-ios-xr"> <server> <server-list> <name>1.2.3.4</name> </server-list> </server> <source> <Loopback>0</Loopback> </source> </ntp> </config>
Similarly, your logging configuration in the template should look like
<config> <logging xmlns="http://tail-f.com/ned/cisco-ios-xr"> <trap>debugging</trap> <monitor>debugging</monitor> <buffered> <type>informational</type> </buffered> <host> <address>1.2.3.4</address> <vrf>default</vrf> <severity>info</severity> <port>default</port> </host> </logging> </config>
One thing that helps figure these types of things out is to go to a device that has the configuration you want and issue command like:
show running-configuration | display xml
regards
Richard
09-17-2020 09:09 AM
Hi,
The NTP commands in your template should look like:
<config> <ntp xmlns="http://tail-f.com/ned/cisco-ios-xr"> <server> <server-list> <name>1.2.3.4</name> </server-list> </server> <source> <Loopback>0</Loopback> </source> </ntp> </config>
Similarly, your logging configuration in the template should look like
<config> <logging xmlns="http://tail-f.com/ned/cisco-ios-xr"> <trap>debugging</trap> <monitor>debugging</monitor> <buffered> <type>informational</type> </buffered> <host> <address>1.2.3.4</address> <vrf>default</vrf> <severity>info</severity> <port>default</port> </host> </logging> </config>
One thing that helps figure these types of things out is to go to a device that has the configuration you want and issue command like:
show running-configuration | display xml
regards
Richard
09-17-2020 04:32 PM
Dear RichardD2,
very good. now, i am able to synchronize template and device cli. show run | display xml on device made the trick.
many thanks.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide