cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2593
Views
0
Helpful
2
Replies

error configure CSR 1000k with opendaylight

hello, i have some question to configure CSR 1K with OpenDayLight

my environment :

  1. OpenDayLight Boron SR2
  2. XE 16.04.01

i have sucessful connect XE with OpenDayLight.

{

                        "node-id": "CSR1K",

                        "netconf-node-topology:available-capabilities": {

                            "available-capability": [

                                "urn:ietf:params:netconf:capability:xpath:1.0",

                                "urn:ietf:params:netconf:capability:notification:1.0",

                                "urn:ietf:params:netconf:capability:validate:1.1",

                                "(urn:ietf:params:xml:ns:yang:ietf-interfaces?revision=2014-05-08)ietf-interfaces",

                                "urn:ietf:params:netconf:capability:rollback-on-error:1.0",

                                "http://tail-f.com/ns/netconf/extensions",

                                "urn:ietf:params:netconf:base:1.1",

                                "urn:ietf:params:netconf:base:1.0",

                                "(urn:ietf:params:xml:ns:yang:ietf-ip?revision=2014-06-16)ietf-ip",

                                "urn:ietf:params:netconf:capability:interleave:1.0",

                                "(http://cisco.com/ns/yang/ned/ios?revision=2016-09-19)ned",

                                "(http://tail-f.com/yang/common-monitoring?revision=2016-05-04)tailf-cli-extensions",

                                "(urn:ietf:params:xml:ns:yang:ietf-inet-types?revision=2013-07-15)ietf-inet-types",

                                "(http://tail-f.com/yang/common-monitoring?revision=2016-05-04)tailf-common",

                                "urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=explicit&also-supported=report-all-tagged",

                                "urn:ietf:params:netconf:capability:validate:1.0",

                                "(urn:ietf:params:xml:ns:yang:ietf-yang-types?revision=2013-07-15)ietf-yang-types",

                                "(http://tail-f.com/yang/common-monitoring?revision=2013-11-07)tailf-meta-extensions",

                                "http://tail-f.com/ns/netconf/actions/1.0",

                                "urn:ietf:params:netconf:capability:writable-running:1.0"

                            ]

                        },

                        "netconf-node-topology:host": "10.200.200.17",

                        "netconf-node-topology:unavailable-capabilities": {},

                        "netconf-node-topology:connection-status": "connected",

                        "netconf-node-topology:port": 830

                    }

but when i try to configure the device via OpenDayLight, its error. i try to use ietf-interfaces to configure ip address

and native.yang to configure bgp, but all error.

this URL i use to config

- http://10.200.200.12:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/CSR1K/yang-ext:mount/ned:native/router

{

    "errors": {

        "error": [

            {

                "error-type": "protocol",

                "error-tag": "malformed-message",

                "error-message": "Error parsing input: Child \"bgp\" was not found in parent schema node \"(http://cisco.com/ns/yang/ned/ios?revision=2016-09-19)router\""

            }

        ]

    }

}

- http://10.200.200.12:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/CSR1K/yang-ext:mount/ietf-interfaces:interfaces

{

    "errors": {

        "error": [

            {

                "error-type": "protocol",

                "error-tag": "malformed-message",

                "error-message": "Error parsing input: Child \"interfaces\" was not found in parent schema node \"(urn:ietf:params:xml:ns:yang:ietf-interfaces?revision=2014-05-08)interfaces\""

            }

        ]

    }

}


thanks before

1 Accepted Solution

Accepted Solutions

i have fix this issue, yes data that i send to the device is wrong data. i dont know why, maybe different version i use in my CSR1000K and the YDK (i use YDK to generate the data).

this is the data that generate from YDK (different method, this is to configure static route)

<route xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">

  <ip-route-interface-forwarding-list>

    <prefix>0.0.0.0</prefix>

    <mask>0.0.0.0</mask>

    <fwd-list>

      <fwd>10.200.200.1</fwd>

    </fwd-list>

  </ip-route-interface-forwarding-list>

</route

that error!, so i try to get the data format first from RESTCONF.

curl -v -k -u admin:admin -H https://10.200.200.X7/restconf/api/config/native/ip/route?deep

and this is the correct format

<route xmlns="http://cisco.com/ns/yang/ned/ios" xmlns:y="http://tail-f.com/ns/rest"  xmlns:ios="http://cisco.com/ns/yang/ned/ios">

  <ip-route-interface-forwarding-list>

    xxxxxx

</route>

yes, there are some error in the XML namespace. i think this is because i use the latest YDK to configure my CSR.

so i try to change the XML namespace. and send to the opendaylight with this data.

<route xmlns="http://cisco.com/ns/yang/ned/ios">

  <ip-route-interface-forwarding-list>

    <prefix>0.0.0.0</prefix>

    <mask>0.0.0.0</mask>

    <fwd-list>

      <fwd>10.200.200.1</fwd>

    </fwd-list>

  </ip-route-interface-forwarding-list>

</route>

thanks everyone

View solution in original post

2 Replies 2

giheron
Cisco Employee
Cisco Employee

Hi - what data were you trying to POST to those URLs?

i have fix this issue, yes data that i send to the device is wrong data. i dont know why, maybe different version i use in my CSR1000K and the YDK (i use YDK to generate the data).

this is the data that generate from YDK (different method, this is to configure static route)

<route xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">

  <ip-route-interface-forwarding-list>

    <prefix>0.0.0.0</prefix>

    <mask>0.0.0.0</mask>

    <fwd-list>

      <fwd>10.200.200.1</fwd>

    </fwd-list>

  </ip-route-interface-forwarding-list>

</route

that error!, so i try to get the data format first from RESTCONF.

curl -v -k -u admin:admin -H https://10.200.200.X7/restconf/api/config/native/ip/route?deep

and this is the correct format

<route xmlns="http://cisco.com/ns/yang/ned/ios" xmlns:y="http://tail-f.com/ns/rest"  xmlns:ios="http://cisco.com/ns/yang/ned/ios">

  <ip-route-interface-forwarding-list>

    xxxxxx

</route>

yes, there are some error in the XML namespace. i think this is because i use the latest YDK to configure my CSR.

so i try to change the XML namespace. and send to the opendaylight with this data.

<route xmlns="http://cisco.com/ns/yang/ned/ios">

  <ip-route-interface-forwarding-list>

    <prefix>0.0.0.0</prefix>

    <mask>0.0.0.0</mask>

    <fwd-list>

      <fwd>10.200.200.1</fwd>

    </fwd-list>

  </ip-route-interface-forwarding-list>

</route>

thanks everyone