cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
614
Views
0
Helpful
3
Replies

netconf command from the controller server to the switch

rlatndls0211
Level 1
Level 1

I want to issue a netconf command from the controller server to the switch, but when I access the netconf session from the controller to ssh, it comes out as below and stops..

Is there a way on the switch side to see if this came in well after flying the netconf command from the controller to the switch with ssh?

 

 

[root@localhost ~]# sshpass -p **** ssh -s admin@[ip] -p 830 netconf
User Access Verification
<?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:base:1.1</capability>
<capability>urn:ietf:params:netconf:capability:writable-running:1.0</capability>
<capability>urn:ietf:params:netconf:capability:rollback-on-error:1.0</capability>
<capability>urn:ietf:params:netconf:capability:candidate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:validate:1.1</capability>
<capability>urn:ietf:params:netconf:capability:confirmed-commit:1.1</capability>
<capability>urn:ietf:params:netconf:capability:notification:1.0</capability>
<capability>urn:ietf:params:netconf:capability:interleave:1.0</capability>
<capability>urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=report-all</capability>
<capability>http://cisco.com/ns/yang/cisco-nx-os-device?revision=2023-05-03&amp;module=Cisco-NX-OS-device</capability>
</capabilities>
<session-id>1548315384</session-id>
</hello>
]]>]]>

3 Replies 3

balaji.bandi
Hall of Fame
Hall of Fame

what is the model of the switch and what IOS code running on it. ( as per message you trying nexus device ?)

you can enable Logging to check logs - (but there is lot of logs generated which not required once this is working )

IOS XE

https://www.cisco.com/c/en/us/support/docs/storage-networking/management/200933-YANG-NETCONF-Configuration-Validation.html

nexus :

https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus9000/sw/93x/progammability/guide/b-cisco-nexus-9000-series-nx-os-programmability-guide-93x/b-cisco-nexus-9000-series-nx-os-programmability-guide-93x_chapter_0100110.html

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

thanks to advice!! my switch model is Cisco Nexux NX api 9100.

when I access the netconf session, is it normal to stop as shown below? What do I need to do next??

[root@localhost ~]# sshpass -p **** ssh -s admin@[ip] -p 830 netconf
User Access Verification
<?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:base:1.1</capability>
<capability>urn:ietf:params:netconf:capability:writable-running:1.0</capability>
<capability>urn:ietf:params:netconf:capability:rollback-on-error:1.0</capability>
<capability>urn:ietf:params:netconf:capability:candidate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:validate:1.1</capability>
<capability>urn:ietf:params:netconf:capability:confirmed-commit:1.1</capability>
<capability>urn:ietf:params:netconf:capability:notification:1.0</capability>
<capability>urn:ietf:params:netconf:capability:interleave:1.0</capability>
<capability>urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=report-all</capability>
<capability>http://cisco.com/ns/yang/cisco-nx-os-device?revision=2023-05-03&amp;module=Cisco-NX-OS-device</capability>
</capabilities>
<session-id>1548315384</session-id>
</hello>
]]>]]>

 

What do I need to do next??

read the document provided above.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Review Cisco Networking for a $25 gift card