Subject: [Netconf] schema capabilities in hello

From: Mikael Abrahamsson <[email-masked]>
Date: Wed, 9 May 2018 08:14:44 +0200 (CEST)

Hi,

I received a question I couldn't answer. It was regarding capabilities 
exchange in hellos:

https://tools.ietf.org/html/rfc6241#section-8

It seems common way of doing this is to list all schemas as "capabilties". 
The person asking the question said one vendor did not list all schemas in 
capabilities, and one NMS they were trying out relied on the schemas being 
listed in the hello, for discovery.

Looking at above URL from the NETCONF RFC, one might imply that it only 
talks about netconf capabilities, not what schemas it supports. Yet, most 
implementations seem to list all schemas in their hellos.

So which one is correct here? My immediate reaction is that it's kind of 
"bloated" to list 1000 schemas (or more) in the hello, and that the 
schemas supported is something that shouldn't need to be exchanged every 
time one connects to the device.

Thoughts?

-- 
Mikael Abrahamsson    email: [email-masked]

---

From: Jan Lindblad <[email-masked]>
Date: Wed, 9 May 2018 08:22:43 +0200

Mikael,

> I received a question I couldn't answer. It was regarding capabilities exchange in hellos:
> 
> It seems common way of doing this is to list all schemas as "capabilties". The person asking the question said one vendor did not list all schemas in capabilities, and one NMS they were trying out relied on the schemas being listed in the hello, for discovery.
> 
> Looking at above URL from the NETCONF RFC, one might imply that it only talks about netconf capabilities, not what schemas it supports. Yet, most implementations seem to list all schemas in their hellos.

NETCONF does not require this, but YANG 1.0 does. See RFC 6020 sec 5.6.4.

> So which one is correct here? My immediate reaction is that it's kind of "bloated" to list 1000 schemas (or more) in the hello, and that the schemas supported is something that shouldn't need to be exchanged every time one connects to the device.

Right. This development has been noted by the NETCONF and NETMOD WGs as well, so in YANG 1.1 this is radically changed. Instead of listing all namespaces in hello, they are listed in a YANG data structure called ietf-yang-library. See RFC 7950 sec 5.6.4 and RFC 7895.

/jan

---

From: Mikael Abrahamsson <[email-masked]>
Date: Wed, 9 May 2018 08:28:51 +0200 (CEST)

> NETCONF does not require this, but YANG 1.0 does. See RFC 6020 sec 5.6.4.

Thanks.

> Right. This development has been noted by the NETCONF and NETMOD WGs as 
> well, so in YANG 1.1 this is radically changed. Instead of listing all 
> namespaces in hello, they are listed in a YANG data structure called 
> ietf-yang-library. See RFC 7950 sec 5.6.4 and RFC 7895.

So if an NMS only supporting YANG 1.0 connects to a device that supports 
YANG 1.1, and this NMS relies on the schemas being listed in the hello, 
who's wrong here?

---

From: Martin Bjorklund <[email-masked]>
Date: Wed, 09 May 2018 08:50:33 +0200 (CEST)

Mikael Abrahamsson <[email-masked]> wrote:
> > Right. This development has been noted by the NETCONF and NETMOD WGs
> > as well, so in YANG 1.1 this is radically changed. Instead of listing
> > all namespaces in hello, they are listed in a YANG data structure
> > called ietf-yang-library. See RFC 7950 sec 5.6.4 and RFC 7895.
> 
> So if an NMS only supporting YANG 1.0 connects to a device that
> supports YANG 1.1, and this NMS relies on the schemas being listed in
> the hello, who's wrong here?

Noone is wrong.  The YANG 1.0-only NMS won't understand the 1.1
modules in the server anyway.  Note that if the server implements a
mix of 1.0 and 1.1 modules, all 1.0 modules MUST be listed in
<hello>.

/martin

---

From: Mikael Abrahamsson <[email-masked]>
Date: Wed, 9 May 2018 09:13:50 +0200 (CEST)

On Wed, 9 May 2018, Martin Bjorklund wrote:

> Noone is wrong.  The YANG 1.0-only NMS won't understand the 1.1 modules 
> in the server anyway.  Note that if the server implements a mix of 1.0 
> and 1.1 modules, all 1.0 modules MUST be listed in <hello>.

Thanks for the clarification, I think this distinction is non-obvious so 
great to get this explicitly stated.

---

From: Mahesh Jethanandani <[email-masked]>
Date: Wed, 9 May 2018 22:19:39 -0700

Martin,

> On May 9, 2018, at 12:13 AM, Mikael Abrahamsson <[email-masked]> wrote:
> 
>> Noone is wrong.  The YANG 1.0-only NMS won't understand the 1.1 modules in the server anyway.  Note that if the server implements a mix of 1.0 and 1.1 modules, all 1.0 modules MUST be listed in <hello>.

Do you mean to say that a server that supports both YANG 1.0 and YANG 1.1 modules, needs to advertise 1.0 modules in <hello> and 1.1 modules in the yang-library?

> 
> Thanks for the clarification, I think this distinction is non-obvious so great to get this explicitly stated.

I would agree with Mikael. It was not clear reading the drafts what a NETCONF server that wants to support both YANG 1.0 and YANG 1.1 supposed to do.

As I see it there are some of the following implementation possibilities (with the caveat about the question above):

- NETCONF Server supports YANG 1.0, and advertises schema capabilities as part of <hello> message.
- NETCONF non-NMDA Server supports YANG 1.1, and advertises schema capabilities as part of yang-library:1.0
- NETCONF NMDA Server supports YANG 1.1, and advertises schema capabilities as part of yang-library:1.1
- NETCONF non-NMDA Server supports YANG 1.0 and 1.1, and advertises schema in both <hello> and yang-library:1.0
- NETCONF NMDA Server supports YANG 1.0 and 1.1, and advertises schema in both <hello> and yang-library:1.1

Would this be right?

> _______________________________________________
> Netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf

Mahesh Jethanandani
[email-masked]