07-17-2024 09:43 PM
Hi,
I have been following the steps in this document (Cisco IOS XR Programmability Configuration Guide for ASR 9000 Series Router - Using Data Models [Cisco ASR 9000 Series Aggregation Services Routers] - Cisco)
I copied and pasted configuration I pushed to the router below:
Option 1: ssh into the router with netconf session
When I ssh into the router from linux, I get the error message below:
#ssh root@10.10.10.10 -s netconf
FIPS mode initialized
ssh: connect to host 10.10.10.10 port 22: No route to host
Option 2: run netconf after ssh session is established
I then tried to run netconf after I ssh into the router, I copied and pasted hello xml and pasted:
Hello xml message I copied and pasted after netconf prompt on the router:
What am I doing wrong?
Thanks.
Solved! Go to Solution.
07-23-2024 11:39 AM
Hi @jameslee ,
1. You first need to send a hello before you do anything else.
<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:base:1.1</capability>
</capabilities>
</hello>
]]>]]>
2. You need to send the request in netconf 1.1 format (started with the block length and ended with ##) as follow:
#134
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
</get-config>
</rpc>
##
This is not very user friendly. You would be better off using tools to do that for you.
Regards,
07-18-2024 07:26 AM - edited 07-18-2024 08:31 AM
Hi @jameslee ,
Is the Linux station directly connected to the XRv9000 or is there a device in between?
Do you use the mgmt interface or one of the GigE interfaces to connect to the XRv9000?
Regards,
07-22-2024 11:44 AM
Linux and XRv9000 is connected to a network switch.
We are using one of GigE interface to connect to the XRv9000.
07-22-2024 03:41 PM
Hi @jameslee ,
Can you try the following:
ssh root@10.10.10.10 -p 830 -s netconf
Regards,
07-22-2024 09:01 PM
I was able to establish netconf connection over ssh per your suggestion.
However, when I send "get-config" query, I am getting this error: Connection to 10.10.10.10 closed by remote host.
What I did was after ssh into the CISCO,
hit "enter" key
copied and pasted "get-config" xml query
hit "enter" key
then the error message above shows up.
Any thoughts?
Thanks.
07-23-2024 11:39 AM
Hi @jameslee ,
1. You first need to send a hello before you do anything else.
<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:base:1.1</capability>
</capabilities>
</hello>
]]>]]>
2. You need to send the request in netconf 1.1 format (started with the block length and ended with ##) as follow:
#134
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
</get-config>
</rpc>
##
This is not very user friendly. You would be better off using tools to do that for you.
Regards,
07-18-2024 07:43 AM
@jameslee how are you running this device? In cml or virtualbox etc..
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