cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
766
Views
0
Helpful
15
Replies

Cisco NCS540 Netconf xml commands

Trying to start using netconf on cisco ncs540, but none of my commnad will work. I followed the instructions from this document, but it is not responding with any data. As you can see from the output below. I've tried many different convinations to get it to work, but nothing yet. Anybody has experience on this what could give me a hint

Programmability Configuration Guide for Cisco NCS 540 Series Routers, Cisco IOS XR Release 7.8.x

 

#418
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<filter>
<isis xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-oper">
<instances>
<instance>
<neighbors/>
<instance-name/>
</instance>
</instances>
</isis>
</filter>
</get>
</rpc>
]]>]]>
Entity: line 16: parser error : Extra content at the end of the document
##
^
ERROR: 0xa240fe00 'XML Infrastructure' detected the 'fatal' condition 'The XML document is not well-formed'
Line 16: Extra content at the end of the document

##

#418
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<filter>
<isis xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-oper">
<instances>
<instance>
<neighbors/>
<instance-name/>
</instance>
</instances>
</isis>
</filter>
</get>
</rpc>
##


#411
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<filter>
<isis xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-oper">
<instances>
<instance>
<neighbors/>
<instance-name/>
</instance>
</instances>
</isis>
</filter>
</get>
</rpc>
##

 

 

#371
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<filter>
<isis xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-oper">
<instances>
<instance>
<neighbors/>
<instance-name/>
</instance>
</instances>
</isis>
</filter>
</get>
</rpc>

##
#371
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<filter>
<isis xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-oper">
<instances>
<instance>
<neighbors/>
<instance-name/>
</instance>
</instances>
</isis>
</filter>
</get>
</rpc>
##


#212
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ping xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">
<destination>
<destination>1.2.3.4</destination>
</destination>
</ping>
</rpc>
##


i
^H'


i#251
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ping xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">
<destination>
<destination>1.2.3.4</destination>
</destination>
</ping>
</rpc>
##

^Croot@orl-vm-dev-awx-01:~# ssh dxg5emergency@10.205.0.122 -p 22 -s netconf

CC
*****************************************************************************
* *
* !!! ATTENTION !!! THIS IS A PRODUCTION SYSTEM !!! *
* *
* This network is protected by a security system. Criminal law *
* prohibits unauthorized use. If you are not specifically authorized *
* to access data on this system, disconnect now. *
* *
* Pursuant to 18 U.S.C. section 2510, all information and *
* communications on this system are subject to review, monitoring, *
* and recording at any time without notice or permission. *
* *
* Unauthorized use or access may be subject to prosecution or *
* disciplinary action. *
* *
*****************************************************************************


Password:


Mon Jun 3 08:28:40.076 EDT
<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>
urn:ietf:params:netconf:base:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:candidate:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:notification:1.0
</capability>
</capabilities>
<session-id>
285212672
</session-id>
</hello>
]]>]]>
#251
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ping xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">
<destination>
<destination>1.2.3.4</destination>
</destination>
</ping>
</rpc>
##

 


<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ping xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">
<destination>
<destination>1.2.3.4</destination>
</destination>
</ping>
</rpc>

<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ping xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">
<destination>
<destination>1.2.3.4</destination>
</destination>
</ping>
</rpc>


#274
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ping xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">
<destination>
<destination>1.2.3.4</destination>
</destination>
</ping>
</rpc>
##


^Croot@orl-vm-dev-awx-01:~# ssh dxg5emergency@10.205.0.122 -p 22 -s netconf

CC
*****************************************************************************
* *
* !!! ATTENTION !!! THIS IS A PRODUCTION SYSTEM !!! *
* *
* This network is protected by a security system. Criminal law *
* prohibits unauthorized use. If you are not specifically authorized *
* to access data on this system, disconnect now. *
* *
* Pursuant to 18 U.S.C. section 2510, all information and *
* communications on this system are subject to review, monitoring, *
* and recording at any time without notice or permission. *
* *
* Unauthorized use or access may be subject to prosecution or *
* disciplinary action. *
* *
*****************************************************************************


Password:


Mon Jun 3 08:31:24.054 EDT
<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>
urn:ietf:params:netconf:base:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:candidate:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:notification:1.0
</capability>
</capabilities>
<session-id>
285212672
</session-id>
</hello>
]]>]]>
#274
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ping xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">
<destination>
<destination>1.2.3.4</destination>
</destination>
</ping>
</rpc>
##

 

#535
<rpc message-id="101"xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter>
<interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"\>
<interface-configuration>
<active>act</active>
<interface-name>TenGigE0/0/0/2</interface-name>
</interface-configuration>
</interface-configurations>
</filter>
</get-config>
</rpc>
##
^Croot@orl-vm-dev-awx-01:~# ssh dxg5emergency@10.205.0.122 -p 22 -s netconf

CC
*****************************************************************************
* *
* !!! ATTENTION !!! THIS IS A PRODUCTION SYSTEM !!! *
* *
* This network is protected by a security system. Criminal law *
* prohibits unauthorized use. If you are not specifically authorized *
* to access data on this system, disconnect now. *
* *
* Pursuant to 18 U.S.C. section 2510, all information and *
* communications on this system are subject to review, monitoring, *
* and recording at any time without notice or permission. *
* *
* Unauthorized use or access may be subject to prosecution or *
* disciplinary action. *
* *
*****************************************************************************


!@M&A$0m3n3ng!3r^H^H^H^H^H^H
Password:


Mon Jun 3 08:42:26.734 EDT
<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>
urn:ietf:params:netconf:base:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:candidate:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:notification:1.0
</capability>
</capabilities>
<session-id>
285212672
</session-id>
</hello>
]]>]]>
#535
<rpc message-id="101"xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter>
<interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"\>
<interface-configuration>
<active>act</active>
<interface-name>TenGigE0/0/0/2</interface-name>
</interface-configuration>
</interface-configurations>
</filter>
</get-config>
</rpc>
##


#477
<rpc message-id="101"xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<filter>
<interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"\>
<interface-configuration>
<active>act</active>
<interface-name>TenGigE0/0/0/2</interface-name>
</interface-configuration>
</interface-configurations>
</filter>
</get-config>
</rpc>
##

 


^Croot@orl-vm-dev-awx-01:~# #
root@orl-vm-dev-awx-01:~# <rpc message-id="101"xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
-bash: syntax error near unexpected token `newline'
root@orl-vm-dev-awx-01:~# <get-config>
-bash: syntax error near unexpected token `newline'
root@orl-vm-dev-awx-01:~# <filter>
-bash: syntax error near unexpected token `newline'
root@orl-vm-dev-awx-01:~# <interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"\>
-bash: interface-configurations: No such file or directory
root@orl-vm-dev-awx-01:~# <interface-configuration>
-bash: syntax error near unexpected token `newline'
root@orl-vm-dev-awx-01:~# <active>act</active>
-bash: syntax error near unexpected token `newline'
root@orl-vm-dev-awx-01:~# <interface-name>TenGigE0/0/0/2</interface-name>
-bash: syntax error near unexpected token `newline'
root@orl-vm-dev-awx-01:~# </interface-configuration>
-bash: syntax error near unexpected token `newline'
root@orl-vm-dev-awx-01:~# </interface-configurations>
-bash: syntax error near unexpected token `newline'
root@orl-vm-dev-awx-01:~# </filter>
-bash: syntax error near unexpected token `newline'
root@orl-vm-dev-awx-01:~# </get-config>
-bash: syntax error near unexpected token `newline'
root@orl-vm-dev-awx-01:~# </rpc>
-bash: syntax error near unexpected token `newline'
root@orl-vm-dev-awx-01:~# ##
root@orl-vm-dev-awx-01:~#
root@orl-vm-dev-awx-01:~# <rpc message-id="101"xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">^C
root@orl-vm-dev-awx-01:~#
root@orl-vm-dev-awx-01:~# ssh dxg5emergency@10.205.0.122 -p 22 -s netconf

CC
*****************************************************************************
* *
* !!! ATTENTION !!! THIS IS A PRODUCTION SYSTEM !!! *
* *
* This network is protected by a security system. Criminal law *
* prohibits unauthorized use. If you are not specifically authorized *
* to access data on this system, disconnect now. *
* *
* Pursuant to 18 U.S.C. section 2510, all information and *
* communications on this system are subject to review, monitoring, *
* and recording at any time without notice or permission. *
* *
* Unauthorized use or access may be subject to prosecution or *
* disciplinary action. *
* *
*****************************************************************************


Password:


Mon Jun 3 08:43:55.427 EDT
<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>
urn:ietf:params:netconf:base:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:candidate:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:notification:1.0
</capability>
</capabilities>
<session-id>
285212672
</session-id>
</hello>
]]>]]>
#517
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<filter>
<interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"\>
<interface-configuration>
<active>act</active>
<interface-name>TenGigE0/0/0/2</interface-name>
</interface-configuration>
</interface-configurations>
</filter>
</get-config>
</rpc>
##

 

#517
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter>
<interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"\>
<interface-configuration>
<active>act</active>
<interface-name>TenGigE0/0/0/2</interface-name>
</interface-configuration>
</interface-configurations>
</filter>
</get>
</rpc>
##


#517
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<filter>
<interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"\>
<interface-configuration>
<active>act</active>
<interface-name>TenGigE0/0/0/2</interface-name>
</interface-configuration>
</interface-configurations>
</filter>
</get-config>
</rpc>
##


^C^Croot@orl-vm-dev-awx-01:~# ssh dxg5emergency@10.205.0.122 -p 22 -s netconf

CC
*****************************************************************************
* *
* !!! ATTENTION !!! THIS IS A PRODUCTION SYSTEM !!! *
* *
* This network is protected by a security system. Criminal law *
* prohibits unauthorized use. If you are not specifically authorized *
* to access data on this system, disconnect now. *
* *
* Pursuant to 18 U.S.C. section 2510, all information and *
* communications on this system are subject to review, monitoring, *
* and recording at any time without notice or permission. *
* *
* Unauthorized use or access may be subject to prosecution or *
* disciplinary action. *
* *
*****************************************************************************


Password:


Mon Jun 3 09:04:47.816 EDT
<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>
urn:ietf:params:netconf:base:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:candidate:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:notification:1.0
</capability>
</capabilities>
<session-id>
285212672
</session-id>
</hello>
]]>]]>
#517
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<filter>
<interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"\>
<interface-configuration>
<active>act</active>
<interface-name>TenGigE0/0/0/2</interface-name>
</interface-configuration>
</interface-configurations>
</filter>
</get-config>
</rpc>
##

15 Replies 15

Found the problem. it was the command   ssh server capability netconf-xml . Now it's working 

RP/0/RP0/CPU0:SCTLAB-NCS540-01(config)#no ssh server capability netconf-xml
RP/0/RP0/CPU0:SCTLAB-NCS540-01(config)#commit
Mon Jun 3 14:29:29.743 EDT