04-15-2020 09:34 AM - edited 04-15-2020 09:36 AM
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>
% 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>
06-15-2020 01:33 PM
<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.
06-15-2020 02:50 PM
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.
09-09-2020 02:24 AM
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.
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