Subject: Re: [netmod] YANG model for netowrk configuration of a device's management interface

From: Martin Bjorklund <[email-masked]>
Date: Wed, 01 Nov 2017 10:03:41 +0100 (CET)

Hi,

Jan Kundrát <[email-masked]> wrote:
> Hi,
> I'm working on adding NETCONF support for configuring network on a few
> management interfaces of our product, a random network appliance. I
> would prefer not to reinvent this particular wheel, so I started
> searching for existing models. I was surprised that it seems that all
> vendors essentially go creative and appear to hack together something
> proprietary.
> 
> Our product has a pretty modern Linux system inside. It has three
> network interfaces -- two gigabit RJ-45 ethernets, and one SFP
> port. My goal is to offer an intuitive way of assigning static IPv4 or
> IPv6 addresses, control whether DHCP/SLAAC are enabled, and perhaps
> configuring one static VLAN on each of them. It would be amazing if I
> could bridge them together, or if there was a way of configuring, say,
> OSPF, but that comes secondary to getting basic stuff done.
> 
> So far, I was able to find the following building blocks:
> 
> - RFC 7223. Perfect -- I can simply leave out the arbitrary-names and
> - pre-provisioning features.
> - RFC 7277, so that I can assign IPv4 and IPv6 addresses by hand. Good.
> - RFC 8022 for static route definitions.
> 
> However, I would also like to offer one toggle which enables an IPv4
> DHCP client on a given interface. This is where stuff starts to get
> interesting:
> 
> - https://tools.ietf.org/html/draft-liu-dhc-dhcp-yang-model-06 and its
> - IPv6 brother,
> - https://tools.ietf.org/html/draft-ietf-dhc-dhcpv6-yang-04 . Wow. Why
> - is the DHCP client configuration done outside of the /if:interfaces
> - tree?

So to summarize, it seems that you found published modules for what
you were looking for, except for DHCP client configuration, for which
you found one individual draft and one WG draft.  I agree with your
comment re. /if:interfaces.  Since these documents are developed in
the DHC WG, I suggest you send your comments to them, and hopefully
you will be able to contribute to better models!

/martin

> 
> - https://tools.ietf.org/html/draft-faq-netmod-cpe-yang-profile-01
> - refers to the above, so it seems that I'm looking in a right
> - direction.
> 
> - https://tools.ietf.org/html/draft-ietf-rtgwg-device-model-02 looks
> - nice because it mentions a "dhcp-client" within the /if:interfaces
> - tree. However, it does not define how that node looks like!
> 
> At this point I begin to understand why vendors unleash their
> creativity when it comes to assigning IP addresses to management
> interfaces of their boxes :(. However, I would prefer to just use
> whatever is most common here, and focus on the application-specific
> YANG model. Is there something that I can use as-is? I would hate to
> implement 1000th version of this task...
> 
> With kind regards,
> Jan
> 
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod
>

---

From: Vladimir Vassilev <[email-masked]>
Date: Wed, 1 Nov 2017 14:58:13 +0100

On 11/01/2017 10:03 AM, Martin Bjorklund wrote:
> Hi,
>
> Jan Kundrát<[email-masked]>  wrote:
>> Hi,
>> -https://tools.ietf.org/html/draft-liu-dhc-dhcp-yang-model-06  and its
>> - IPv6 brother,
>> -https://tools.ietf.org/html/draft-ietf-dhc-dhcpv6-yang-04  . Wow. Why
+1

The design of a ietf-dhcp(v4) and ietf-dhcpv6 modules must have 
"something" in common. I get it that the DHC WG is concentrated on v6 
but v4 is what is a mandatory requirement if there will be any point in 
implementing the ietf model.
>
>
> /martin
>
>
>
>
>> -https://tools.ietf.org/html/draft-faq-netmod-cpe-yang-profile-01
>> -https://tools.ietf.org/html/draft-ietf-rtgwg-device-model-02  looks