Cisco Support Community
Community Member

Changing configuration with Netconf on IOS XR


i am trying to do soem very basic configuration changes on a ASR9K with netcon. I am able to retrieve configuration without problems. But i have no clue how to set something.

According to the XML Documentation there is a edit-config protocol operatino as well as a commit. What i try to do is the following

Get Interface config from System - looks likes this

<?xml version="1.0" encoding="UTF-8" standalone="no"?><rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"><get-config><source><running/></source><filter><Configuration><InterfaceConfigurationTable><InterfaceConfiguration><Naming><Active>act</Active><InterfaceName Match="GigabitEthernet0/1/0/10"/></Naming></InterfaceConfiguration></InterfaceConfigurationTable></Configuration></filter></get-config></rpc>

<InterfaceConfigurationTable MajorVersion="5" MinorVersion="3">









Good so far

Now the change (enable the interface)

<?xml version="1.0" encoding="UTF-8" standalone="no"?><rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2"><edit-config><target><candidate/></target><config><InterfaceConfiguration ><Naming><Active>act</Active><InterfaceName>GigabitEthernet0/1/0/10</InterfaceName></Naming><Description>TestBeschreibung</Description><Shutdown>true</Shutdown></InterfaceConfiguration></config></edit-config></rpc>

That fails with "unknown element"

I tried several XML-requests, like with or withput the enclosing InterfaceConfigurationTable , with or without the config tag - it is always the same.

Does anybody have a workign example,or some documentation how a edit-config request has to look like ?

Thanks in advance

Community Member

Re: Changing configuration with Netconf on IOS XR

I finally got it. The correct XML syntax is
Configuration XML

All enclosed in rpc--Tag of course . And: Configuration Tag has an upper Case C .

It is a shame - but Junipers Netconf documentation is way better...

Sent from Cisco Technical Support iPhone App

Community Member

Hi,I'm experiencing the same


I'm experiencing the same problem.

Unfortunately from your answer I don't understand the exact xml that must be submitted to the netconf client in order to make it works.

Could you please attach a working example in this thread?




Community Member

Hi, yes - find a working RPC



yes - find a working RPC-Request attached. What you need to do is to enclose the whole InterfaceConfigurationTable XML-Structure within a "Configuration" XML-Element.

The example sets a description and the Interface MTU


Hope that helps


Community Member

Thank you so much!

Thank you so much!

Just a question: I noticed you repeat twice che <description> tag.

Is there a reason, or it just a misprint?



Community Member

Hm -  i copied it from a

Hm -  i copied it from a working request. Probably it's needed only once.

Community Member

Hi Carsten BI see you can get

Hi Carsten B

I see you can get config with Netconf on IOS XR. 

Now i have a problem when get config on IOS as below discussion

can you help me to solve this problem.


Community Member

Sorry - i've got no

Sorry - i've got no experience with netconf on IOS

CreatePlease to create content