cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Who Me Too'd this topic

Changing configuration with Netconf on IOS XR

Hello,

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">

  <InterfaceConfiguration>

    <Naming>

      <Active>act</Active>

      <InterfaceName>GigabitEthernet0/1/0/10</InterfaceName>

    </Naming>

    <Shutdown>true</Shutdown>

  </InterfaceConfiguration>

</InterfaceConfigurationTable>

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

Who Me Too'd this topic