cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
531
Views
0
Helpful
6
Replies

IOS XRV9000 netconf

jameslee
Level 1
Level 1

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:

 

jameslee_0-1721277452208.png

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:

jameslee_1-1721277512854.png

jameslee_2-1721277512856.png

What am I doing wrong?

Thanks.

1 Accepted Solution

Accepted Solutions

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

6 Replies 6

Harold Ritter
Level 12
Level 12

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Linux and XRv9000 is connected to a network switch.

We are using one of GigE interface to connect to the XRv9000.

Hi @jameslee ,

Can you try the following:

ssh root@10.10.10.10 -p 830 -s netconf

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

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.

 

jameslee_1-1721706950273.png

 

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

@jameslee how are you running this device? In cml or virtualbox etc..

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Review Cisco Networking for a $25 gift card