Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


Setting up NETCONF for Cisco switch

asked 2014-12-10 00:35:58 -0700

Has anyone been successful in setting up NETCONF for Cisco devices?

I managed some part of the way, at least it logs in and authenticates, so my config seems okay. I followed the guidelines on:

But when exchanging <hello> messages, both ODL and Cisco IOS don't understand each other. ODL receives the hello from the Cisco device with the following info:</hello>

2014-12-09 20:07:31,211 | INFO  | upCloseable-4-13 | AbstractSessionNegotiator        | 185 - org.opendaylight.controller.protocol-framework - 0.5.1.Helium-SR1 | Unexpected error during negotiation
io.netty.handler.codec.DecoderException: java.lang.IllegalStateException: Hello message not received, instead received: <hello>

It looks like what I have some seen from other posts, that the issue might be that the hello message lacks a xml namespace. Is there anyway to make ODL less specific and accept the hello, or find out why it fails exactly?

If anyone has managed to get NETCONF working for Cisco devices, I would be happy to hear about it.

Thanks in advance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-12-10 02:34:57 -0700

Maros gravatar image

Yes we have successfully connected ODL using NETCONF to multiple CISCO devices.

In your case, the missing namespace for hello message is the reason session was not established. All of the devices we tested so far sent correct hello messages.

Is there a reason for your device not to add the namespace ? Is this hello message even valid according to the NETCONF RFC ?

On ODL side, there is currently no way of setting "Ignore missing namespaces in NETCONF messages" to true.

edit flag offensive delete publish link more


Thanks for your answer, looking at Cisco documentation for IOS devices, examples of hello messages are always without a namespace. (eg. To be honest, looking at the RFC, I cannot determine if the namespace in a hello packet is mandatory or not. Also I cannot find any statement from Cisco that they are RFC 6241 compliant for C3750 switches, so it is a bit vague :-) However for NX-OS Nexus devices, the namespace is included in the hello. Probably you are using Nexus devices.

ph0tek ( 2014-12-10 04:48:48 -0700 )edit

If this was just the hello message, making netconf accept hello with no namespace would be fairly easy. But its not clear from the link you provided whether its for all the rpcs, replies and also norifications.

Maros ( 2014-12-15 08:30:40 -0700 )edit

That's correct, however there are some examples in the document which show <rpc> and <rpc-reply> tags with the namespace included. When testing I noticed this as well. For the notification or other tags, I haven't tested.

ph0tek ( 2014-12-16 00:16:52 -0700 )edit

Hi, Maros, are you able to perform any config changes or view the configuration of your cisco devices? If so, how do you do that? Maybe there is a way to convert the schemas cisco IOS devices use to yang models? Or are you using cisco xr devices? Thanks

Paulius ( 2017-03-12 07:50:59 -0700 )edit

Hi guys, i also work on ODL Beryllium version and working with a cisco xr devices. I'm able to view the configuration of my cisco xr devices via POSTMAN api's and YANG UI too but i can't perform any config changes on the both interfaces. If someone has an idea how to do that, i'm listening. thanks.

azerty123 ( 2017-05-16 08:11:53 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-12-10 00:35:58 -0700

Seen: 2,427 times

Last updated: Dec 10 '14