12-03-2015 02:57 AM
Hello,
I am trying to experiment with NETCONF on a Cisco ISR 2911 (IOS Version 15.4(1)T1) .
I enabled ssh2 and configured netconf as described here.
Afterwards it is possible to initiate a netconf session by invoking the netconf subsystem (ssh -2 <host>@<ip> -s netconf).
Immediately after, a HELLO in XML format is sent from the device.
However any other type of XML NETCONF messages (e.g.<get-config>) i am trying to send manually results in the session being terminated (connection closed by remote host "<IP>").
i am only able to receive a reply from the device for HELLO messages (other than the initial).
Is there a chance this is a device or IOS issue?
Should i try another IOS version?
Thank you in advance,
Adam Pavlidis
09-15-2016 06:33 AM
Did you solve the problem?
10-19-2016 01:48 PM
I am running into same thing as you. I get the netconf hello but cannot get futher. I googled but only found this video on youtube. This video show he eabled XML agent. The cisco router I have 2911 doesn't have xml agent. The router supporting xml agent are the service providers running the IOS XR software. Anyone has gotten netconf to work on the 2911?? Any help/suggestion is appreciated.
https://www.youtube.com/watch?v=L62V6p4EwHA
10-20-2016 11:40 AM
Hello Daniel,
to be honest i was not aware of a disabled XML agent. It was an error on my part because i was not sending the proper <HELLO> message thus the switch was terminating the connection. Please find more details on my answer above.
Cheers,
Adam
10-24-2016 12:33 PM
I send a hello
11-15-2016 02:06 AM
Hello,
Unfortunately for quite some time i have not access to the router in question.
First I configured NETCONF over SSH using the instructions provided online from CISCO (something like this https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/cns/configuration/xe-3s/cns-xe-3s-book/netconf-sshv2.pdf) .
after that i could invoke the NETCONF subsystem using a command like
ssh -2 <user>@<ip> -s netconf
at this point i was getting back something like this:
<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>
</capabilities>
<session-id>4</session-id>
</hello>]]>]]>
so i just copy the message minus the <session-id> and paste it back. after that i could perform the NETCONF operations supported by the device.
Cheers,
Adam
10-20-2016 11:37 AM
Yes i did solve it. Mainly it consisted of me not sending back the proper Hello. Essentially you have to copy the hello message sent by the switch. Remove the <Session-Id> tags and paste it back to the switch. Dont forget to include the ]]>]]>
After that you can perform the Operations supported by your NETCONF schema.
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