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

Netconf "replace" operation on eigrp networks on ios-xe

jaspalsingh1759
Level 1
Level 1

Hi,

I am trying to replace the current network configured under eigrp with some new networks and i want old networks should get delete so iam using netconf with replace operation and getting some errors.

Below is the rpc and rpc-reply

<?xml version="1.0" encoding="utf-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="11">
<edit-config>
<target>
<running/>
</target>
<default-operation>replace</default-operation>
<config>
<native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
<router>
<eigrp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-eigrp">
<id>1000</id>
<network>
<number>30.0.0.0</number>
<wild-card>255.0.0.0</wild-card>
</network>
<network>
<number>40.0.0.0</number>
<wild-card>255.0.0.0</wild-card>
</network>
</eigrp>
</router>
</native>
</config>
</edit-config>
</rpc>

 

 

<?xml version="1.0" encoding="utf-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="11">
<rpc-error>
<error-type>application</error-type>
<error-tag>invalid-value</error-tag>
<error-severity>error</error-severity>
<error-message xml:lang="en">inconsistent value: Device refused one or more commands</error-message>
<error-info>
<severity xmlns="http://cisco.com/yang/cisco-ia">error_cli</severity>
<detail xmlns="http://cisco.com/yang/cisco-ia">
<bad-cli>
<bad-command>no control-plane</bad-command>
<error-location>16</error-location>
<parser-response>&#xD;
% Removal of control-plane is not permitted</parser-response>
</bad-cli>
<bad-cli>
<bad-command>no redundancy</bad-command>
<error-location>6</error-location>
<parser-response/>
</bad-cli>
<bad-cli>
<bad-command>no spanning-tree extend system-id</bad-command>
<error-location>18</error-location>
<parser-response/>
</bad-cli>
</detail>
</error-info>
</rpc-error>
</rpc-reply>

3 Replies 3

<default-operation>replace</default-operation>

The operation will "replace" the entire configuration. Not the individual element for EIGRP.

I am still working myself to find a way to orverride or replace the XML elements in NETCONF.

Might have more features in IOS-XR, however, IOS-XE is limited as NETCONF has to be converted to CLI from the CONF'D engine before pushed into candidate/running datastores.

I found the Cisco IOS-EX doesn't support "replace" from its E-DI interface. Only "merge" operation is allowed for "edit_config". This will make override or config replacement very difficult to achieve in my opinion. You may have to use "copy_config" and somehow add in the change you want.

 

https://www.cisco.com/c/en/us/td/docs/net_mgmt/enhanced_device_interface/2-2-1/developer/EDI221ProgrammersGuide/xml_pi.html

 

 

netconf.JPG

 

vamikhai
Cisco Employee
Cisco Employee

Hello,

 

In this case you can put replace on respective level, like following:

<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
<router>
<eigrp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-eigrp" operation="replace">
...

If you don't want to replace the whole EIGRP, you may need to switch to named mode and target AFI.